Testing Strategy Overview π― β
The Yappa Knowledge Hub relies on a multi-layered testing strategy designed to maintain high quality across the decoupled systems (Slack Node.js bot and Symfony PHP Backend). This ensures every component works strictly as defined in our 10-Layer Architecture.
The Testing Pyramid β
Our repository is guarded by three highly specialized testing environments:
1. PHPUnit Backend Testing β
- Where:
backend/tests/ - Focus: Domain Logic, Services, and REST APIs.
- Tools: PHPUnit 9.5, SQLite (In-Memory Testing).
- Goal: Ensure core APIs like
KnowledgeOrchestratorandCategorySubscriptionOrchestratorbehave correctly and write to the database accurately. - Read the Backend Testing Guide
2. Slack Bot Testing (Jest) β
- Where:
slack/tests/ - Focus: Slack App interactions, payload routing, message shortcuts, and action handlers.
- Tools: Jest 29, Nock (HTTP Mocking).
- Goal: Ensure the Node.js Slack Bot interprets Slack's Socket Mode events and safely routes them to the Symfony Backend without error.
- Read the Slack Bot Testing Guide
3. Playwright E2E Testing β
- Where:
e2e-tests/ - Focus: End-to-End System Workflows, Notional integrations, Delivery Preferences, and Slack UI interactions.
- Tools: Playwright Test,
@slack/web-apistubs, Notion Client Mocks. - Goal: Act as the final line of defense by simulating the complete lifecycle of our MVPβfrom opening the App Home on Slack, to generating an AI Summary on the backend, to receiving a compiled Digest report.
- Read the E2E Testing Guide
Continuous Integration (CI/CD) β
The testing suites are natively configured to run on integration through GitHub Actions to ensure code coverage and workflow stability. Tests automatically spin up the required Docker containers (MySQL data layer) and memory environments to execute end-to-end integration scenarios before a PR can be merged into the canonical main branch.