mirror of
https://github.com/azaion/missions.git
synced 2026-06-21 08:41:07 +00:00
001e80fe96
Batch 4 of test implementation cycle 1 (existing-code Step 6, final batch).
- AZ-585 SteadyStateLoadTests + ColdStartRssTests: NFT-RES-LIM-01..04.
SteadyStateLoadFixture runs one 5-min sustained-load window and samples
RSS (docker stats), Npgsql conns (pg_stat_activity), and FDs
(/proc/1/fd) every 5s; three test methods assert independently. All
SkippableFact-gated on docker primitives.
- AZ-586 PerformanceTests: NFT-PERF-01..04. Sequential single-client,
5 warm-ups + N measured calls, P50+P95 via LatencyPercentiles, recorded
to PERF_RESULTS_FILE. Tagged Category=Perf so default gate excludes them.
Infrastructure:
- entrypoint.sh now applies --filter "${TEST_FILTER:-Category!=Perf}"
per AZ-586 (default CI gate excludes performance).
- MetricCsvRecorder: idempotent CSV appender keyed on env var, used by
both Perf and ResLim categories.
Step 6 (Implement Tests) is complete. Final report at
_docs/03_implementation/implementation_report_tests.md handoffs the
full-suite gate to test-run/SKILL.md (Step 7).
Co-authored-by: Cursor <cursoragent@cursor.com>
49 lines
1.8 KiB
Bash
Executable File
49 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env sh
|
|
## e2e-consumer entrypoint.
|
|
## 1. Run xUnit suite with TRX + console loggers.
|
|
## 2. Convert TRX -> the flat CSV documented in environment.md § Reporting.
|
|
## 3. Propagate the test exit code.
|
|
##
|
|
## Failure surface:
|
|
## - dotnet test returns non-zero on any test failure.
|
|
## - The CSV step still runs so the report captures whatever DID execute.
|
|
## - Final exit code is the dotnet test exit code (CSV failures are logged
|
|
## but do NOT mask test failures).
|
|
set -eu
|
|
|
|
mkdir -p "$RESULTS_DIR"
|
|
|
|
set +e
|
|
## Performance scenarios (Category=Perf) are excluded from the default gate
|
|
## per AZ-586. They are invoked from scripts/run-performance-tests.sh which
|
|
## passes its own --filter Category=Perf. ResLim tests (Category=ResLim) stay
|
|
## in the default gate because their docker-CLI gate causes them to skip
|
|
## with an explicit reason when COMPOSE_RESTART_ENABLED is not set.
|
|
TEST_FILTER="${TEST_FILTER:-Category!=Perf}"
|
|
dotnet test /src/Azaion.Missions.E2E.Tests.csproj \
|
|
--no-build \
|
|
--configuration Release \
|
|
--filter "$TEST_FILTER" \
|
|
--logger "trx;LogFileName=results.trx" \
|
|
--logger "console;verbosity=normal" \
|
|
--results-directory "$RESULTS_DIR"
|
|
TEST_EXIT=$?
|
|
set -e
|
|
|
|
TRX_FILE="$RESULTS_DIR/results.trx"
|
|
CSV_FILE="$RESULTS_DIR/report.csv"
|
|
TEST_DLL="/src/bin/Release/net10.0/Azaion.Missions.E2E.Tests.dll"
|
|
|
|
if [ -f "$TRX_FILE" ]; then
|
|
if dotnet /app/cli/Azaion.Missions.E2E.Reporting.Cli.dll "$TRX_FILE" "$CSV_FILE" "$TEST_DLL"; then
|
|
echo "[entrypoint] CSV report at $CSV_FILE"
|
|
else
|
|
cli_exit=$?
|
|
echo "[entrypoint] WARNING: trx -> csv conversion exited $cli_exit; tests still report their own verdict." >&2
|
|
fi
|
|
else
|
|
echo "[entrypoint] WARNING: $TRX_FILE not found; xUnit may not have produced any results." >&2
|
|
fi
|
|
|
|
exit "$TEST_EXIT"
|