-
Notifications
You must be signed in to change notification settings - Fork 2
Tests
The project uses Playwright combined with Cucumber to perform Behavior-Driven Development (BDD) end-to-end testing. These tests ensure that the entire system (frontend, backend APIs, game engine, and database) works seamlessly together from the user's perspective.
-
Location:
webapp/test/e2e/ -
Execution: Run locally via
npm run test:e2einside thewebappfolder. -
Pipeline Integration: In our GitHub Actions CI/CD pipeline (
build.ymlandrelease-deploy.yml), the E2E suite is automatically executed against a fully containerized environment (spinning up MongoDB, Users service, and Gamey engine via service containers) across multiple browsers (Chromium and Firefox). - Scope: Verifies critical user journeys including registration, authentication, dynamic UI interactions, real-time board updates, and playing full matches against the AI.
We use Artillery to simulate high concurrency and evaluate system stability under stress. The tests cover a fully realistic user lifecycle rather than just hitting a single endpoint.
-
Location:
load-tests/scenario-flow.yml -
Phases: The load test is designed to stress the system progressively in three phases:
- Warm up: 15 seconds at 2 users/sec.
- Sustained load: 30 seconds at 5 users/sec.
- Peak load: 20 seconds at 15 users/sec.
-
Scenario Flow: Every single virtual user spawned by Artillery completes a full journey:
- Generates mock user credentials.
- Checks username availability.
- Registers and logs in (fetching a JWT).
- Creates a new game against a bot strategy.
- Submits valid coordinates and retrieves bot responses.
- Triggers a teardown (
DELETE /deleteuser) to clean up the database footprint automatically.
-
Target Environments: Configured to run both against
localhostfor development and against the live production deployment domain when triggered via GitHub Actions.
The project has tests in three components:
Built with Vitest and mongodb-memory-server (no real DB needed). Covers authentication, user profile, statistics, game creation, moves, bot play, undo, and finish. Gamey is mocked with vi.spyOn so tests run fully isolated. bashnpm --prefix users run test:coverage
Built with Vitest. Covers the main React components and UI interactions. bashnpm --prefix webapp test
Rust's built-in test framework with inline #[cfg(test)] modules colocated with the source. Covers board logic, YEN notation, coordinate validation and bot strategies. bashcargo test
All tests run automatically on every push via GitHub Actions and report coverage to SonarCloud.
The YOVI frontend has successfully passed WCAG 2.0 AAA verification using the Web Accessibility tool Achecker: https://achecks.org/ . This confirms that the application meets the highest standard of web accessibility, ensuring it is usable by the broadest possible range of users, including those relying on assistive technologies.