Testing Overview
Our testing strategy is divided into three main categories, ensuring comprehensive coverage from the backend APIs to the end-user experience.
API Tests (Ruby)
The vast majority of our testing is done at the API level using Ruby's RSpec framework. This forms the foundation of our quality assurance.
- Commander Tests: These are highly detailed tests for our service objects that handle complex business logic beyond simple database operations. They cover success scenarios, expected errors, and edge cases to ensure core processes are sound.
- Request Tests: These specs test the full API request lifecycle, verifying that given certain parameters, the endpoint returns the correct response and database changes occur as expected. They focus on the main use cases for each endpoint.
- Model/Unit Tests: Used for critical, heavily-used helper functions or complex calculations within models or other service objects, like pricing calculators.
Integration Tests (Playwright)
We use Playwright for our end-to-end integration tests, which focus on verifying the "happy path" of key user flows. These tests simulate real user interactions in a browser, touching every part of our stack from the frontend to the database.
- The test environment is containerized using Docker.
- We use our Rails factories to seed the database with consistent test data.
- This setup covers all of our Nuxt applications and allows us to test the web export of our React Native Attendee application.
Frontend Unit Tests (Jest)
For targeted frontend testing, we use Jest. These tests are not nearly as extensive as our other suites but are "sprinkled in" where appropriate. They are typically written for reusable functions or complex state management logic within our frontend applications that benefit from being tested in isolation.