@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).
61 lines (50 loc) โข 1.92 kB
YAML
version: 1
kind: action
name: Test
description: Comprehensive testing execution with detailed analysis and reporting
prompt: |
Execute comprehensive testing with detailed analysis and quality validation.
Run complete test suites including unit, integration, and end-to-end tests.
Ensure proper environment setup and failure analysis.
Provide detailed reporting for continuous improvement and team visibility.
enhanced-prompt: |-
# ๐งช Testing Workflow
## Environment Setup
```bash
# Check test environment
[ -f "package.json" ] || { echo "โ No package.json"; exit 1; }
# Install dependencies
npm ci || npm install
# Check test configuration
[ -f "jest.config.js" ] && echo "โ
Jest config found" || echo "โ ๏ธ No Jest config"
```
## Test Execution
```bash
# Run unit tests
echo "๐งช Running unit tests..."
npm run test:unit 2>/dev/null || npm test
# Run smoke tests
echo "๐จ Running smoke tests..."
npm run test:smoke 2>/dev/null || echo "โ ๏ธ No smoke tests"
```
## Coverage Analysis
```bash
# Generate coverage report
npm run test:coverage 2>/dev/null || npm test -- --coverage
# Check coverage threshold
COVERAGE=$(grep -o '"lines":{"pct":[0-9.]*' coverage/coverage-summary.json 2>/dev/null | cut -d: -f3 || echo "0")
if [ $(echo "$COVERAGE >= 80" | bc -l 2>/dev/null || echo "0") -eq 1 ]; then
echo "โ
Coverage: ${COVERAGE}% (meets 80% threshold)"
else
echo "โ ๏ธ Coverage: ${COVERAGE}% (below 80% threshold)"
fi
```
## Results Analysis
```bash
# Test summary
echo "๐ Test Results Summary:"
echo "- Unit tests: $(npm test 2>&1 | grep -o '[0-9]* passing' || echo 'Unknown')"
echo "- Coverage: ${COVERAGE}%"
echo "- Status: $([ $? -eq 0 ] && echo 'โ
All tests passed' || echo 'โ Some tests failed')"
```
**๐ฏ Result:** Comprehensive test validation with quality metrics and detailed reporting