— No reviews yet
0 installs
8 views
0.0% view→install
Install
$ agentstack add skill-aeyeops-aeo-skill-marketplace-test-design-patterns ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Are you the author of Test Design Patterns? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claimAbout
Test Design Patterns
The Test Pyramid
/ E2E \ Few, slow, expensive
/----------\ Test critical user journeys
/ Integration \ Moderate count, moderate speed
/----------------\ Test component interactions
/ Unit Tests \ Many, fast, cheap
/--------------------\ Test individual behaviors
Layer Guidelines
Unit Tests (70% of test suite):
Speed: with >=
- Replace + with -
- Remove a function call
- Change a constant
- Negate a condition
3. Run the test suite against the mutant
4. If tests fail → mutant "killed" (tests caught the change) ✓
5. If tests pass → mutant "survived" (tests missed the change) ✗
Mutation score = killed mutants / total mutants × 100%
Target: >80% mutation score
Common Mutation Operators
Arithmetic: + → -, * → /, % → *
Relational: > → >=, == → !=, = 18): return "adult"
Mutant: if (age > 18): return "adult"
Survived because: No test checks age == 18 (boundary)
Fix: Add test_classify_age_18_returns_adult()
Coverage Interpretation
What Coverage Measures
Line coverage: Which lines were executed
Branch coverage: Which conditional branches were taken
Path coverage: Which execution paths were followed
Function coverage: Which functions were called
Line coverage is necessary but not sufficient.
100% line coverage does NOT mean the code is well-tested.
Coverage Traps
False confidence from high coverage:
- Lines executed but results not asserted
- Happy path covered but edge cases missing
- Implementation tested but behavior not verified
Example of misleading 100% coverage:
def divide(a, b):
return a / b
def test_divide():
divide(10, 2) # 100% line coverage, but:
# - No assertion on result
# - Division by zero not tested
# - Float precision not tested
Healthy Coverage Practices
Guidelines:
- Aim for 80%+ line coverage as a baseline
- Focus on branch coverage for conditional logic
- Use coverage to find UNTESTED code, not to prove quality
- Never game coverage metrics (writing tests just to hit lines)
- High-risk code (payments, auth, data) deserves near-100% coverage
- Generated code, configuration, and glue code can have lower coverage
- Review uncovered lines: are they dead code or missing tests?
Coverage as a ratchet:
- Set a minimum threshold (e.g., 80%)
- Never allow coverage to decrease
- Increase the threshold as the suite matures
- Fail CI if coverage drops below threshold
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: AeyeOps
- Source: AeyeOps/aeo-skill-marketplace
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.