3ccd94f661
Test Organization: - Create tests/unit/, tests/integration/, tests/system/ directories - Move existing tests into appropriate categories - Add pytest markers (@pytest.mark.unit, @pytest.mark.integration) Shared Fixtures: - Create conftest.py with SQLite engine (for unit tests) - Add PostgreSQL session fixture with transaction rollback - Add TestClient fixture for API tests Configuration: - Update pyproject.toml with asyncio_mode=auto - Add test markers and default addopts - Add aiosqlite dependency for SQLite support E2E Testing: - Initialize Playwright in e2e/ directory - Add playwright.config.ts - Create login flow E2E test Build: - Add test-unit, test-integration, test-system, test-e2e to Makefile - Update test target to run all categories - Add testing documentation to README Note: Some tests have import issues due to missing python-jose package in dev environment. This needs to be addressed separately.
1.0 KiB
1.0 KiB
ADDED Requirements
Requirement: E2E Test Framework
The system SHALL provide end-to-end tests using Playwright.
Scenario: Test setup
- GIVEN the e2e test directory
- THEN
e2e/SHALL contain Playwright configuration - AND tests SHALL run against the full application stack
Scenario: Critical user journeys
- GIVEN the e2e test suite
- THEN it SHALL test:
- User login flow
- Project creation and listing
- SSH key generation
Scenario: Test environment
- GIVEN e2e tests are running
- THEN they SHALL use a dedicated test database
- AND tests SHALL clean up data after completion
Requirement: Test Commands
The system SHALL provide Makefile targets for running different test categories.
Scenario: Make targets
- GIVEN the Makefile
- THEN these targets SHALL exist:
make test-unit- Run unit tests onlymake test-integration- Run integration tests onlymake test-system- Run system tests onlymake test-e2e- Run Playwright E2E testsmake test- Run all backend tests