feat(e2e): make tests machine-selectable via REQ + feature markers#644
Merged
nolte-portfolio-app[bot] merged 3 commits intoJul 20, 2026
Merged
Conversation
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>
nolte
marked this pull request as ready for review
July 20, 2026 13:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 junittc_idproperty. Also delivers a core-function coverage audit and removes a stale spec duplicate.Changes
req<NNN>marker (from thetest_req<NNN>_*.pyfile name) and a semantic feature axis (plant/watering/nutrient/harvest/calendar/journey) opted into via a module-levelFEATUREStuple; aFEATURESvalue outside the registered set is a hard collection error (typo guard).conftest.py::pytest_configureand enable--strict-markersvia a newtests/e2e/pytest.ini.user_propertieschannel (tc_id) for downstream tooling.FEATURES.tests/e2e/README.mddocumenting the selection workflow..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.spec/test-cases/TC-REQ-001.mdduplicate; canonical source isspec/e2e-testcases/.Linked issues
Refs spec/e2e-testcases/ (coverage audit basis; removed duplicate
spec/test-cases/TC-REQ-001.md)Testing
pytest --collect-onlyper 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-markersbreaks nothing.<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).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-markersis safe: the only decorator markers in the suite are the four already-registered ones. Coverage gaps are documented, not closed (separate follow-ups).