Skip to content

Latest commit

 

History

History
75 lines (53 loc) · 4.8 KB

testing.md

File metadata and controls

75 lines (53 loc) · 4.8 KB

Testing

Testing Strategy

Assignment 6 keeps the earlier product and quality checks active and focuses verification on customer-critical Sprint 4 and Sprint 5 behavior.

  • Order creation, dates, comments, and workflow behavior.
  • Inventory visibility and low-stock filtering.
  • Item import validation and safe item voiding.
  • Transaction readability and export behavior.
  • Store, warehouse, item, order, and transaction detail pages.
  • Product access, handover instructions, and public links.

Automated Checks

Backend smoke tests are located in MVP-v2/backend/tests/.

cd MVP-v2/backend
python3 -m venv .venv
.venv/bin/python -m pip install coverage fastapi httpx openpyxl pandas psycopg2-binary python-dotenv python-multipart ruff sqlalchemy uvicorn
.venv/bin/ruff check app tests scripts
.venv/bin/ruff format --check tests scripts
.venv/bin/python -m compileall app
.venv/bin/python -m coverage run --source=app -m unittest discover -s tests
.venv/bin/python -m coverage report --fail-under=30
.venv/bin/python -m coverage json
.venv/bin/python scripts/check_critical_coverage.py

Frontend verification:

cd MVP-v2/frontend
npm ci
npm run lint
npm run format:check
npm run test:coverage
npm run build

CI

GitLab CI runs the product and documentation checks for merge requests, the protected default branch, and release tags:

  • link-check validates maintained Markdown links with Lychee.
  • secret-scan checks the working tree for committed secrets with Gitleaks.
  • backend-lint enforces Ruff source checks and formatting for maintained automated-test and verification code.
  • backend-tests runs 45 unit/integration tests under Coverage.py, reports total line coverage, enforces 30% overall coverage, and enforces 30% per selected customer-critical module.
  • quality-requirement-tests automatically executes API assembly, Analytics authorization, and item-import quality scenarios.
  • frontend-quality runs ESLint, focused Prettier verification, Vitest unit tests, and coverage thresholds for customer-critical utilities.
  • frontend-build installs locked dependencies with npm ci, runs TypeScript/Vite production verification, and preserves the generated bundle as a temporary artifact.
  • pages publishes the documentation site from the protected default branch.

The merge-request pipeline and the protected-main pipeline must pass before a release or submission commit is accepted.

CI evidence: GitLab Pipelines

UAT

Customer-facing scenarios and their Week 6 and Week 7 results are maintained in User Acceptance Tests. Failed or partial scenarios must link resulting Sprint work.

Current Verification

On Jul 19, 2026, the published-release documentation state passed protected-main pipeline 51661. Assignment 6 compliance hardening adds the expanded gates above; all seven jobs passed in issue-linked MR pipeline 51663. Completed Week 7 UAT is recorded in the final verification record.

Coverage

Coverage.py reports backend line coverage in Cobertura and JSON formats. CI requires at least 30% overall and at least 30% for analytics/access.py, import_item_service.py, inventory_service.py, and stores_service.py. Vitest reports line, statement, and function coverage and requires at least 30% across the selected Analytics date-range and business-logic utilities. Manual UAT complements, but does not replace, these automated thresholds.

Sprint 5 Customer-Feedback Regression Scope

The final feedback implementation adds automated checks for order-comment history routes, phone fields, store analytics access boundaries, and item-import SKU/EAN/header rules. Manual UAT must additionally verify the analytics workspace selector, Inventory-to-Replenishment return path, store-specific void visibility, compact transaction details, terminology, and low-stock/status colors before MVP v3 is tagged.

MVP v3 regression UAT passed before v3.0.0 publication. The compliance-hardening pipeline runs 45 backend tests, three automated QRT groups, frontend unit tests, coverage checks, lint/format checks, compilation/build, link checking, and secret detection. Its issue-linked MR !54 and pipeline 51663 are the final inspectable evidence for these expanded gates.