@noanswer/context-compose
Version:
Orchestrate complex AI interactions with Context Compose. A powerful CLI and server for building, validating, and managing context for large language models using the Model Context Protocol (MCP).
54 lines (47 loc) • 2.39 kB
YAML
version: 1
kind: context
name: Software Testing
description: A context for building a robust testing strategy, including unit, integration, and end-to-end tests.
context:
personas:
- personas/kent-c-dodds.yaml
- personas/dan-abramov.yaml
rules:
- rules/the-must-follow.yaml
- rules/testing-standards.yaml
- rules/error-handling.yaml
- rules/performance-best-practices.yaml
mcps:
- mcps/sequential-thinking.yaml
- mcps/context7.yaml
- mcps/playwright.yaml
- mcps/web-search.yaml
- mcps/github-api.yaml
actions:
- actions/test.yaml
prompt: |
Let's ensure our code is reliable and bug-free.
We will implement a comprehensive testing strategy covering all layers of the application.
Our focus is on writing clean, maintainable, and effective tests.
We'll follow the testing pyramid to build a balanced and efficient test suite.
Let's start by identifying the critical paths to test.
enhanced-prompt: |-
# Software Testing Context
## Core Philosophy
Adopt a comprehensive testing strategy focused on quality, reliability, and maintainability. We write tests to build confidence and ensure correctness.
## Testing Pyramid
1. **Unit Tests (70%)**: Test individual functions and components in isolation. They should be fast and focused.
2. **Integration Tests (20%)**: Verify that different modules or services work together as expected.
3. **End-to-End (E2E) Tests (10%)**: Simulate real user scenarios from start to finish. These are crucial for validating the entire system.
## Key Best Practices
- **Arrange-Act-Assert (AAA)**: Structure tests clearly for readability.
- **Test Isolation**: Ensure tests can run independently without side effects.
- **Meaningful Assertions**: Test behaviors, not implementation details.
- **Code Coverage**: Aim for high coverage (90%+) on critical code, but prioritize quality over quantity.
- **CI/CD Integration**: Automate the execution of your test suite on every commit.
## Quality Gates
- **All Tests Passing**: No code is merged if any test fails.
- **Coverage Threshold**: Maintain a minimum code coverage level.
- **Static Analysis**: Enforce code quality standards with linters.
- **Peer Review**: All tests and code must be reviewed by another developer.
**Ready to build a rock-solid application. What component should we test first?**