| name | run-tests |
| description | Run Meadow tests through repository Make targets with correct Localstack provisioning and argument forwarding. Use when working in a Meadow checkout and you need to run test suites, re-run failed tests, run a single test file, or pass `mix test` flags via `ARGS` such as `--failed`, `--seed`, or file paths. |
Run Meadow Tests With Make Targets
Use Make targets instead of calling mix test directly so environment setup and provisioning remain consistent.
Inspect Available Targets
- Run
make help at repository root to view namespaced targets.
- Run
make app-help for app-specific targets.
- Run
make localstack-help for Localstack lifecycle targets.
Use this mapping:
- Root app tests:
make app-test
- Root all tests (backend + frontend):
make app-all-test
- App-only equivalents from
app/: make test, make all-test
Managing the test environment:
- Provisioning:
make localstack-provision
- Starting:
make localstack-start
- Stopping:
make localstack-stop
- Cleaning:
make localstack-clean
Test Execution Workflow
- Start with the narrowest run that answers the request.
- Execute from repo root unless the user explicitly asks otherwise.
- Pass
mix test filters through ARGS exactly once with shell quoting.
- Report the executed command, pass/fail outcome, and key failure lines.
Common commands:
make app-test
make app-test ARGS="--failed"
make app-test ARGS="test/meadow/csv_metadata_update_driver_test.exs"
make app-test ARGS="test/meadow/csv_metadata_update_driver_test.exs:24"
make app-test ARGS="--seed 315411"
make app-all-test
ARGS Rules
- Treat
ARGS as direct mix test arguments.
- Preserve user-provided ordering and flags.
- Keep
ARGS in double quotes when it contains spaces.
- Do not add extra escaping unless required by the shell.
Examples:
ARGS="--failed"
ARGS="test/meadow/foo_test.exs --max-failures 1"
ARGS="--seed 12345 test/meadow/foo_test.exs"
Failure Triage
When tests fail:
- Surface failing test names, locations, and primary error messages.
- Call out environment/provisioning symptoms (Localstack/S3/DB/migrations) if present.
- Suggest the smallest rerun command first, then broader fallback.
Rerun sequence:
make app-test ARGS="<specific test file or line>"
make app-test ARGS="--failed"
make app-test
If failures indicate stale infrastructure, run:
make localstack-stop
make localstack-start
make localstack-provision
Then rerun the same make app-test ARGS="..." command.
Output Contract
After any run, return:
- Exact command executed.
- Whether tests passed or failed.
- Short list of failing tests/errors (or confirmation of zero failures).
- Next rerun command when failures exist.