Skip to content
Alejandro De San Claudio Mesa edited this page Apr 29, 2026 · 6 revisions

E2e Test

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:e2e inside the webapp folder.
  • Pipeline Integration: In our GitHub Actions CI/CD pipeline (build.yml and release-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.

Load Test

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:
    1. Warm up: 15 seconds at 2 users/sec.
    2. Sustained load: 30 seconds at 5 users/sec.
    3. Peak load: 20 seconds at 15 users/sec.
  • Scenario Flow: Every single virtual user spawned by Artillery completes a full journey:
    1. Generates mock user credentials.
    2. Checks username availability.
    3. Registers and logs in (fetching a JWT).
    4. Creates a new game against a bot strategy.
    5. Submits valid coordinates and retrieves bot responses.
    6. Triggers a teardown (DELETE /deleteuser) to clean up the database footprint automatically.
  • Target Environments: Configured to run both against localhost for development and against the live production deployment domain when triggered via GitHub Actions.

Unitary Test

The project has tests in three components:

Users Service (users/tests/users-service.test.js)

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

Webapp (webapp/)

Built with Vitest. Covers the main React components and UI interactions. bashnpm --prefix webapp test

Gamey (gamey/src/)

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

CI

All tests run automatically on every push via GitHub Actions and report coverage to SonarCloud.

Usability Test

Adaptability Test

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.

image

Clone this wiki locally