Files
Eduardo Rios 1d764439cb test: parametrize SIENTIAPDE-1993 e2e regression over max_count=1 and >1
Feedback (Vitor): the intent was a single scenario covering both
max_count=1 and max_count>1, checking that in both cases each tag's
own latest (properly aggregated) timestamp prevails — not just the
max_count>1 case from the previous commit.

Renamed the existing fixture to
pi_web_api_scouter_distinct_tag_timestamps_multi_point.json and added
a sibling _single_point.json (max_count=1, one point per tag, distinct
timestamps across tags). test_scenario_2_1_4 is now parametrized over
both fixtures with the same assertion: each tag's stored Postgres row
keeps its own real timestamp, never another tag's.

SIENTIAPDE-1993

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 08:39:00 -03:00
..
2026-05-25 12:58:03 -03:00
2025-12-30 08:40:07 -03:00
2026-07-21 09:34:53 -03:00
2026-05-25 12:58:03 -03:00
2026-05-25 12:58:03 -03:00
2026-05-25 12:58:03 -03:00
2026-05-25 12:58:03 -03:00
2026-05-25 12:58:03 -03:00
2026-05-25 12:58:03 -03:00

Scouter end-to-end tests

Production-faithful E2E tests for Scouter, PIWebAPIScouter, and CoreScouter against real backing services.

Requirements

  • Docker (for testcontainers: MongoDB, Redis, PostgreSQL)
  • Python 3.11+ with dev dependencies: pip install -r requirements-dev.txt

Run locally

pytest e2e/ --override-ini testpaths=e2e -m e2e -v

Stop on first failure:

pytest e2e/ --override-ini testpaths=e2e -m e2e -x

Coverage (separate from unit tests)

COVERAGE_FILE=.coverage.e2e pytest e2e/ --override-ini testpaths=e2e -m e2e --cov=scouter --cov-branch
coverage combine .coverage .coverage.e2e && coverage report

Scenario catalog

See scenarios.md for numbered scenarios and how they map to test_scenario_* functions. Section ## 0 of that file lists the harness smoke tests in test_harness_smoke.py (infra liveness checks, not business scenarios).

Production code is not mocked

E2E uses real testcontainers, an in-process PI Web API HTTP server, WorkflowEnvironment.start_local(), and production Activities wiring. The only stand-ins are mock_logger and the optional notification_inserts spy. If a scenario fails due to a production defect, it is marked xfail(strict=True) and tracked in openspec/changes/standardize-and-complete-e2e-tests/notes.md when applicable.

Unit tests under tests/ remain Docker-free and run with the default pytest invocation.