HydraSRT Development
Actionable dev and test commands for HydraSRT. Stable reference: AGENTS.md, test/AGENTS.md.
When to use
- Run or debug a specific test layer (Elixir, native, web)
- Pre-commit quality check (
mix q) - Start local dev (
make dev) - Reproduce CI locally (
make test_ci_local)
Agent behaviour
- Show the exact shell command before running it.
- Summarize pass/fail counts and duration; offer full logs on failure.
- Elixir unit: default
mix test(excludes:e2e,:native_e2eviatest/test_helper.exs). - Elixir E2E: requires
E2E=true; needsffmpegand native binary built. - Native E2E: requires
NATIVE_E2E=true. - Do not run
make test_ci_localunless the user asks (slow, full stack). - Follow project standards: no
defp, do not delete commented code. - When creating commits, use Conventional Commits (
feat:,fix:,docs:, etc.) perAGENTS.md.
Command map
Quality
mix q
# or: mix quality
# format --check-formatted, compile --warnings-as-errors, credo, sobelow, dialyzer
First-time Dialyzer: mix dialyzer (builds PLT).
Elixir
| Intent | Command |
|---|---|
| Unit (default) | mix test |
| One file | mix test test/hydra_srt/route_handler_test.exs |
| One line | mix test test/hydra_srt/route_handler_test.exs:42 |
| E2E | E2E=true mix test --only e2e or make test_e2e |
| E2E encrypted | E2E=true mix test --only encrypted |
| Native E2E | NATIVE_E2E=true mix test test/native_e2e |
Debug env: TRACE=true, SLOWEST=true, TEST_TIMEOUT=ms, E2E_DEBUG_LOGS=true (with E2E).
Native (Rust)
cd native && cargo test # unit
make test_rs_native_unit
make test_rs_native_e2e # Elixir wrapper + NATIVE_E2E=true
Web
cd web_app && npm run test:unit
cd web_app && npm run test:unit:watch
cd web_app && npm run test:e2e # Playwright; backend + native build required
Aggregates
make test_all # sequential: backend unit, e2e, native unit, web unit, web e2e
make test_ci_local # CI-equivalent (slow)
make dev # IEx + Phoenix; see docs/envs.md for env vars
Natural language
| User says | Run |
|---|---|
| run unit tests / backend tests | mix test |
| run e2e / srt e2e | E2E=true mix test --only e2e |
| run native tests | cd native && cargo test |
| run web tests | cd web_app && npm run test:unit |
| run playwright | cd web_app && npm run test:e2e |
| MCP token tests | mix test test/hydra_srt/db_tokens_test.exs test/hydra_srt_web/controllers/token_controller_test.exs |
| check quality / before commit | mix q |
| start dev server | make dev |
| like CI | make test_ci_local |
Before committing (typical)
mix q— fast quality gatemix test— Elixir unit- If touching routes/SRT/native:
make test_e2eand/orcd native && cargo test - If touching UI:
cd web_app && npm run typecheck && npm run lint && npm run test:unit - If touching MCP/tokens:
mix test test/hydra_srt/db_tokens_test.exs test/hydra_srt_web/controllers/token_controller_test.exs - Commit with Conventional Commits (see
AGENTS.mdStandards): e.g.feat: ...,fix: ...,docs: ...,chore: ...
E2E notes
- E2E uses
max_cases: 1(shared DB + HTTP). :encryptedtests skipped if ffmpeg lacks SRT passphrase support.- Helpers:
HydraSrt.TestSupport.E2EHelpers— seetest/AGENTS.md.
References
AGENTS.md— architecture, docs indextest/AGENTS.md— full test matrix, support modules, tagsMakefile— alltest_*targetsdocs/envs.md— environment variablesdocs/mcp.md— MCP server, tokens, client setup
Source: abc3/hydra-srt — distributed by TomeVault.