Skip to content

Reorganise tests/ into category folders (unit, system, SIT, performance, uat) #167

Open

Description

@amar-python

Context

Backend test organisation follow-up from closed PR #41.

PR #41 (23 days old, Draft) proposed reorganising tests/ into six category folders: unit/, system/, system_integration/, performance/, accessibility/, uat/. It also added shared fixtures in tests/conftest.py (live_api, registry_cleanup, te_org_cleanup, destructive_enabled) and new Makefile targets (test-unit, test-system, test-sit, test-performance, test-accessibility, test-uat).

The reorganisation is still valuable — the current flat tests/*.py layout makes it hard to run just one category, and the new M2/M3 tests have landed in the flat folder with no categorisation.

Scope

  • Move existing tests/*.py into category folders (same renames Group tests into unit, system, SIT, performance, accessibility and UAT #41 proposed)
  • Create tests/conftest.py with the four shared fixtures
  • Add Makefile targets for each category
  • Update pytest.ini with the new markers (system, sit, performance, accessibility, uat)
  • Update scripts/lint.sh PY_TESTS list to the new paths plus the 9 M2/M3/preflight tests that landed after Group tests into unit, system, SIT, performance, accessibility and UAT #41 was drafted (test_api_hardening.py, test_evals_tier_e_x.py, test_migrations.py, test_import_counts.py, test_accounts.py, test_tenant_isolation.py, test_roles.py, test_oidc.py, test_preflight_ps1.py)
  • Update requirements-dev.txt with playwright and axe-playwright-python (needed by #B below)

Out of scope

Done when

  • tests/ has the six category folders, each with an __init__.py and the moved files
  • make test-unit, make test-system etc work locally
  • python -m pytest tests/ -q still passes with the same test count
  • scripts/lint.sh lists every Python test file in the repo

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions