๐งช Testing Strategy
Quality is a first-class citizen at Adamondo. Our testing strategy combines automated E2E tests with unit and integration coverage to ensure platform stability.
๐ End-to-End (E2E) Testingโ
Our E2E suite (apps/e2e-tests) simulates real user behavior across the entire stack.
Framework: SpecFlow-inspired Automationโ
We use a custom wrapper around Selenium WebDriver that allows us to write tests in a readable, behavior-driven format:
await runScenario('Valid Login', async (flow) => {
await flow.given('the login form is open', async () => { ... });
await flow.when('the user submits credentials', async () => { ... });
await flow.then('the user is authenticated', async () => { ... });
});
Key Components:โ
- Selenium WebDriver: Direct browser/device orchestration.
- Page Object Model (POM): Every screen/page is represented by a class in
src/pom, centralizing selectors and logic. - PageFactory: Coordinates the instantiation of page objects within a test context.
- TestConfig: Centralized management of test users, environments, and URLs.
๐ฑ Multi-Platform Verificationโ
Our tests are designed to be cross-platform:
- Native Detection: Tests detect if they are running against a Web browser or a Mobile device (using Appium/Selenium).
- Dynamic Assertions: Logical flows remain consistent while UI interactions adapt to the specific platform's capabilities.
๐๏ธ Backend Qualityโ
- Prisma Integration: We use dedicated test databases and Prisma migrations to ensure isolation.
- Mocking: External integrations (like Paymob or Firebase) are mocked using custom service wrappers to allow deterministic testing.
๐ Observability & Debuggingโ
- Screenshots on Failure: The framework automatically captures a screenshot of the browser/device state when a test fails.
- CI/CD Integration: Tests are run as part of the GitHub Actions pipeline before any cluster sync.
- Report Portal: (Optional/Planned) Centralized dashboard for historical test trends.