Skip to content

feat(e2e): make tests machine-selectable via REQ + feature markers#644

Merged
nolte-portfolio-app[bot] merged 3 commits into
developfrom
feat/e2e-test-identifizierbarkeit
Jul 20, 2026
Merged

feat(e2e): make tests machine-selectable via REQ + feature markers#644
nolte-portfolio-app[bot] merged 3 commits into
developfrom
feat/e2e-test-identifizierbarkeit

Conversation

@nolte

@nolte nolte commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

Make the E2E suite machine-selectable so a code/feature change can be mapped to the affected tests without hand-marking 700+ functions. Adds two auto-derived pytest marker axes (REQ + semantic feature), enforces marker registration with --strict-markers, and lifts each test's docstring TC-ID into the junit tc_id property. Also delivers a core-function coverage audit and removes a stale spec duplicate.

Changes

  • Add auto-derived req<NNN> marker (from the test_req<NNN>_*.py file name) and a semantic feature axis (plant/watering/nutrient/harvest/calendar/journey) opted into via a module-level FEATURES tuple; a FEATURES value outside the registered set is a hard collection error (typo guard).
  • Register all REQ + feature markers in conftest.py::pytest_configure and enable --strict-markers via a new tests/e2e/pytest.ini.
  • Record each docstring TC-ID into the standard junit user_properties channel (tc_id) for downstream tooling.
  • Annotate the 15 core-function test modules with their FEATURES.
  • Add tests/e2e/README.md documenting the selection workflow.
  • Add .audits/e2e-core-function-coverage/2026-07-14-core-function-coverage.md: spec-vs-implementation coverage map for the five core functions with named gaps.
  • Remove the stale spec/test-cases/TC-REQ-001.md duplicate; canonical source is spec/e2e-testcases/.

Linked issues

Refs spec/e2e-testcases/ (coverage audit basis; removed duplicate spec/test-cases/TC-REQ-001.md)

Testing

  • pytest --collect-only per axis: -m req004 -> 98, -m watering -> watering-log + journey, -m harvest -> REQ-007 + REQ-008, -m 'nutrient and smoke' -> 21; full suite 702 collected, --strict-markers breaks nothing.
  • R4 verified end-to-end: junit <property name="tc_id" value="TC-REQ-004-W001"> emitted; no-op when no TC-ID.
  • bash scripts/run-e2e.sh --smoke (full containerised stack): configfile: pytest.ini, 188 selected -> 141 passed, 42 skipped, 5 xpassed, 0 failed (exit 0).
  • ruff: no new findings (working tree == HEAD baseline of 35 pre-existing).

Risk / rollout notes

Low. Test-tooling only — no backend/frontend/app source touched; the marker derivation is additive and the smoke run confirms no test regressed. --strict-markers is safe: the only decorator markers in the suite are the four already-registered ones. Coverage gaps are documented, not closed (separate follow-ups).

Add two auto-derived pytest marker axes so a code/feature change maps to
the affected E2E tests without hand-marking 700+ functions:
- REQ axis (req<NNN>) derived from the test_req<NNN>_*.py file name
- semantic feature axis (plant/watering/nutrient/harvest/calendar/journey)
  from a module-level FEATURES tuple, cross-cutting to REQ IDs

Enforce marker registration with --strict-markers (new tests/e2e/pytest.ini)
and lift each docstring TC-ID into the junit tc_id property via
record_property, so downstream tooling can consume it.

Also add a core-function coverage audit (spec-vs-implementation for the five
core functions), a selection-workflow README, and remove the stale
spec/test-cases/ duplicate (canonical source is spec/e2e-testcases/).

Requirement: project/requirements/e2e-test-identifizierbarkeit.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@boring-cyborg boring-cyborg Bot added the spec Touches files under `spec/`. label Jul 14, 2026
@nolte nolte added the automerge Allow automatic Merge. label Jul 20, 2026
@nolte
nolte marked this pull request as ready for review July 20, 2026 13:21
@nolte-portfolio-app
nolte-portfolio-app Bot merged commit 263d140 into develop Jul 20, 2026
6 of 8 checks passed
@nolte-portfolio-app
nolte-portfolio-app Bot deleted the feat/e2e-test-identifizierbarkeit branch July 20, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Allow automatic Merge. spec Touches files under `spec/`.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant