Skip to content

Commit 18b44d1

Browse files
committed
docs(testing): add comprehensive testing strategy and guidelines
- Add multi-level testing strategy documentation (Unit, Integration, Contract, E2E) - Create detailed test plan with 50+ test scenarios covering all features - Add testing guidelines to .cursor/rules for each testing level - Update AGENTS.md with testing best practices and tool recommendations - Enhance existing documentation with testing sections and examples - Document testing tools: xUnit, bUnit, WireMock.Net, Testcontainers, NJsonSchema, Verify.NET This establishes a complete testing framework for the project with: - Clear guidance on when to use each testing approach - Tool selection rationale aligned with project needs - Specific code examples for policy evaluator testing - Coverage targets and quality gates for CI/CD pipeline
1 parent 3d58f7d commit 18b44d1

14 files changed

+8230
-5
lines changed

.ai/tech-stack.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,11 @@
4141
* **Automated Delivery Pipeline:** Automates the entire build and deployment process, ensuring that new features and bug fixes are delivered to users quickly and reliably.
4242
* **Ensures Reliability:** Enables the creation of automated testing suites that verify the logic of policy checks and actions, directly supporting the "Action Reliability" success metric.
4343
* **Unified Ecosystem:** Keeps the entire development, testing, and deployment lifecycle within the GitHub ecosystem, providing a seamless workflow for developers.
44+
45+
### Testing Stack
46+
47+
* **xUnit, FluentAssertions, NSubstitute**: Provides a robust, industry-standard foundation for all .NET testing. `xUnit` is the test runner, `FluentAssertions` creates readable assertions, and `NSubstitute` offers a clean mocking framework for isolating components in unit tests.
48+
* **bUnit**: The de-facto standard for testing Blazor components. It allows for rendering components in-memory and verifying their output and interactivity without a browser, making UI tests fast and reliable.
49+
* **WireMock.Net**: Essential for creating reliable integration tests against the GitHub API. It allows mocking the API at the HTTP level to simulate various scenarios, including rate limiting, API errors, and specific data payloads, isolating our tests from external network failures.
50+
* **Testcontainers**: Manages ephemeral SQL Server instances in Docker for integration tests. This ensures that every test run starts with a clean, consistent, and isolated database, which is critical for reliable data-dependent tests.
51+
* **Verify.NET & NJsonSchema**: Enables contract testing to protect the application from breaking changes in the GitHub API. By validating response schemas (`NJsonSchema`) and snapshotting response structures (`Verify.NET`), we can detect and adapt to API changes before they impact production.

0 commit comments

Comments
 (0)