test-discovery
Skill4 starsChanged 4 months agoISCView on GitHub
Catalog existing tests — discover test frameworks, count tests by type, parse coverage reports, and map test-to-feature relationships. Pure discovery — no gap analysis, no recommendations for new tests, no assessment of test quality. Use when you need a factual inventory of the testing landscape before migration or modernization planning.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- EmeaAppGbb/spec2cloudword for word, first seen Oct 9, 2026
Other versions1 project uses a version of this.
Word for word · 1
- EmeaAppGbb/spec2cloud★ 100100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- adrSkill
- api-extractorSkill
- architecture-mapperSkill
- aspireSkill
- audit-logSkill
- azure-app-registrationSkill
- azure-deploymentSkill
- bug-fixSkill
- build-checkSkill
- cloud-native-assessmentSkill
- cloud-native-plannerSkill
- codebase-scannerSkill
- commit-protocolSkill
- contract-generationSkill
- data-model-extractorSkill
- ddd-modelingSkill
- dependency-inventorySkill
- deploy-diagnosticsSkill
- dev-implementerSkill
- e2e-generationSkill
- error-handlingSkill
- extension-plannerSkill
- find-skillsSkill
- frd-generatorSkill
- gherkin-generationSkill
- human-gateSkill
- implementationSkill
- modernization-assessmentSkill
- modernization-plannerSkill
- performance-assessmentSkill
- playwright-cliSkill
- pm-issue-authorSkill
- prd-generatorSkill
- release-managerSkill
- research-best-practicesSkill
- resumeSkill
- rewrite-assessmentSkill
- rewrite-plannerSkill
- security-assessmentSkill
- security-plannerSkill
- skill-creatorSkill
- skill-discoverySkill
- spec-refinementSkill
- spec-validatorSkill
- state-managementSkill
- tech-stack-resolutionSkill
- test-generationSkill
- test-runnerSkill
- ui-ux-designSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 16 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 64
Test runner command (from scripts in package.json, Makefile, etc.)
- Very specific: line 74
By configuration: Test file patterns from framework config files (e.g., testMatch in Jest config, testDir in Playwright config)
- Distinctive: line 99
If a test file doesn't clearly fit one category, classify it as "unclassified" and note why.
- Distinctive: line 138
Look for existing coverage reports and artifacts:
- Very specific: line 140
Coverage configuration: Check for coverage settings in test framework configs (e.g., collectCoverage in Jest, --cov in pytest)
- Distinctive: line 142
Coverage report files: Look for:
- Distinctive: line 146
CI coverage: Check CI config files for coverage upload steps (Codecov, Coveralls, SonarQube)
- Distinctive: line 149
If coverage reports are found in the repository, extract:
- Distinctive: line 155
If no reports are found, record "no coverage reports found in repository".
- Distinctive: line 156
Do NOT run tests to generate coverage — only parse existing reports.
- Distinctive: line 162
Import analysis: Check what the test file imports — the imported modules are likely what it tests.
- Very specific: line 168
Explicit references: Test descriptions or file names that reference features (e.g., test_login_flow.py → authentication feature).
- Distinctive: line 179
Fixtures: Test data files, mock data, seed data for tests
- Very specific: line 183
Test scripts: All test-related scripts in package.json, Makefile, etc.
- Distinctive: line 282
No gap analysis: Do not identify "untested" code, "missing" test types, or "insufficient" coverage.
- Distinctive: line 285
No quality assessment: Do not comment on test quality, naming conventions, assertion patterns, or test organization quality.
- Distinctive: line 287
No recommendations: Do not suggest adding tests, improving coverage, refactoring test code, or adopting different testing strategies.
- Distinctive: line 289
Accurate counts: Test counts must be accurate.
- Distinctive: line 292
Parse, don't run: Do not execute tests. Do not run test commands to generate coverage.
- Distinctive: line 296
Uncertain mappings are okay: If you cannot determine what a test file tests, say "mapping uncertain" rather than guessing.
- Distinctive: line 310
BLOCKING: If any item is unchecked, the skill has NOT completed successfully.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test Discovery
Role
You are the Test Discovery agent — a factual cataloger that inventories every test in the project. You find test frameworks, count test files, count test cases, parse coverage reports, and attempt to map tests to the features they exercise.
You are an archivist, not a quality auditor. You count and catalog what is on the shelves. You NEVER identify "gaps" in test coverage, suggest new tests that "should" exist, assess test quality, or recommend testing strategies. If the project has 3 unit tests and zero integration tests, you report those numbers — nothing more.
Inputs
- The project source tree
- Output from
codebase-scanner(specs/docs/technology/stack.md) if available — to know which test frameworks to look for - Existing coverage reports (if present in the repository)
Process
Step 1 — Detect Test Frameworks
Identify all test frameworks in use by checking:
| Framework | Detection Method |
| Jest | jest.config.*, jest in package.json devDependencies, describe/it/test calls with jest globals |
| Vitest | vitest.config.*, vitest in devDependencies |
| Mocha | .mocharc.*, mocha in devDependencies |
| Jasmine | jasmine.json, jasmine in devDependencies |
| Playwright | playwright.config.*, @playwright/test in devDependencies |
| Cypress | cypress.config.*, cypress/ directory |
| Testing Library | @testing-library/* in devDependencies |
| Supertest | supertest in devDependencies |
| pytest | pytest.ini, pyproject.toml with [tool.pytest], conftest.py, files named test_*.py |
| unittest | Files with class X(unittest.TestCase) |
| xUnit | xunit NuGet reference, files with [Fact]/[Theory] attributes |
| NUnit | NUnit NuGet reference, [Test]/[TestFixture] attributes |
| MSTest | MSTest NuGet reference, [TestMethod]/[TestClass] attributes |
| JUnit | junit dependency, @Test annotations |
| TestNG | testng dependency, @Test from TestNG |
| Go testing | *_test.go files, func TestX(t *testing.T) |
| Rust tests | #[test] attributes, #[cfg(test)] modules |
| RSpec | spec/ directory, .rspec config, Gemfile with rspec |
| PHPUnit | phpunit.xml, phpunit in composer.json |
For each detected framework, record:
- Framework name and version
- Configuration file path
- Test runner command (from scripts in package.json, Makefile, etc.)
Step 2 — Locate Test Files
Find all test files using framework-specific conventions:
- By naming convention:
*.test.ts,*.spec.ts,test_*.py,*_test.go,*Test.java,*Tests.cs,*_spec.rb - By directory:
__tests__/,test/,tests/,spec/,cypress/,e2e/,integration/ - By configuration: Test file patterns from framework config files
(e.g.,
testMatchin Jest config,testDirin Playwright config)
For each test file, record:
- File path
- Framework it belongs to
- Approximate test count (count
it(),test(),[Fact],def test_,func Testoccurrences)
Step 3 — Classify Tests by Type
Categorize each test file into a type based on its location, framework, and content:
| Type | Heuristics |
| Unit | Tests in __tests__/, test/unit/, *.test.ts colocated with source, mocking external dependencies, testing single functions/classes |
| Integration | Tests in test/integration/, tests that import multiple modules, tests that use real database connections or test containers |
| End-to-End | Playwright, Cypress, Selenium tests; tests that start the full application; tests in e2e/, test/e2e/ |
| API/Contract | Tests using supertest, httptest; tests that make HTTP calls to the API |
| Component | React/Vue/Angular component tests using Testing Library, Enzyme, Vue Test Utils |
| Snapshot | Tests using toMatchSnapshot(), toMatchInlineSnapshot() |
| Performance | Load tests, benchmark tests (k6, Artillery, Go benchmarks) |
| Smoke | Tests tagged as smoke, tests in test/smoke/ |
If a test file doesn't clearly fit one category, classify it as "unclassified" and note why.
Step 4 — Count Test Cases
For each test file, count individual test cases:
JavaScript/TypeScript (Jest/Vitest/Mocha):
- Count
it(,test(,it.each(,test.each(occurrences - Count
describe(blocks for grouping information - Note
it.skip(,test.skip(,xit(,xtest(as skipped tests - Note
it.todo(,test.todo(as todo tests - Note
it.only(,test.only(as focused tests
Python (pytest):
- Count
def test_andasync def test_functions - Count parametrized test expansions from
@pytest.mark.parametrize - Note
@pytest.mark.skipas skipped tests - Count test classes with
class Test
C# (xUnit/NUnit/MSTest):
- Count
[Fact],[Theory],[Test],[TestMethod]attributes - Count
[InlineData]for theory data rows - Note
[Skip]as skipped tests
Go:
- Count
func Testandfunc Benchmarkfunctions - Note
t.Skip()calls
Java (JUnit/TestNG):
- Count
@Testannotations - Count
@ParameterizedTestwith@MethodSource/@CsvSource - Note
@Disabledas skipped tests
Produce totals: active tests, skipped tests, todo tests, per framework and per test type.
Step 5 — Parse Coverage Reports
Look for existing coverage reports and artifacts:
- Coverage configuration: Check for coverage settings in test framework
configs (e.g.,
collectCoveragein Jest,--covin pytest) - Coverage report files: Look for:
coverage/,htmlcov/,.coveragelcov.info,coverage.xml,cobertura.xmlcoverage-summary.json,coverage-final.json
- CI coverage: Check CI config files for coverage upload steps (Codecov, Coveralls, SonarQube)
If coverage reports are found in the repository, extract:
- Overall line coverage percentage
- Overall branch coverage percentage
- Per-file or per-directory coverage (if available)
- Coverage thresholds configured (minimum coverage requirements)
If no reports are found, record "no coverage reports found in repository". Do NOT run tests to generate coverage — only parse existing reports.
Step 6 — Map Tests to Features/Components
Attempt to map each test file to the source code it exercises:
- Import analysis: Check what the test file imports — the imported modules are likely what it tests.
- Path proximity: Colocated tests (e.g.,
UserService.test.tsnext toUserService.ts) map directly. - Directory mirroring:
test/services/auth.test.tslikely testssrc/services/auth.ts. - Explicit references: Test descriptions or file names that reference
features (e.g.,
test_login_flow.py→ authentication feature).
Produce a mapping table. If a test's target is ambiguous, record it as "mapping uncertain" — do not guess.
Step 7 — Document Test Infrastructure
Record the test infrastructure and support files:
- Test utilities: Shared helpers, custom matchers, test factories
- Fixtures: Test data files, mock data, seed data for tests
- Mocking: Mock files,
__mocks__/directories, mock service workers - Test configuration: Environment-specific test configs, test databases
- CI integration: How tests are run in CI (which commands, which stages)
- Test scripts: All test-related scripts in package.json, Makefile, etc.
Output Format
Produce specs/docs/testing/coverage.md:
# Test Inventory — [Project Name]
_Extracted on [date]. Catalogs all tests that exist in the project._
## Summary
| Metric | Value |
|--------|-------|
| Test frameworks | Jest, Playwright |
| Total test files | 87 |
| Total test cases | 423 |
| Skipped tests | 12 |
| Test types | Unit (312), Integration (67), E2E (44) |
| Coverage reports available | Yes — Jest coverage |
| Overall line coverage | 74.2% |
| Overall branch coverage | 61.8% |
## Test Frameworks
| Framework | Version | Config File | Run Command | Test Count |
|-----------|---------|-------------|-------------|------------|
| Jest | 29.7.0 | jest.config.ts | npm test | 379 |
| Playwright | 1.41.0 | playwright.config.ts | npm run test:e2e | 44 |
## Tests by Type
### Unit Tests (312 tests in 64 files)
| File | Test Count | Tests Target |
|------|-----------|-------------|
| src/services/__tests__/auth.test.ts | 18 | src/services/auth.ts |
| src/utils/__tests__/validators.test.ts | 24 | src/utils/validators.ts |
| ... | ... | ... |
### Integration Tests (67 tests in 15 files)
[Same table format]
### End-to-End Tests (44 tests in 8 files)
[Same table format]
## Skipped and Todo Tests
| File | Test Name | Status | Reason (if documented) |
|------|----------|--------|----------------------|
| auth.test.ts | should handle token refresh | skipped | "flaky — needs fix" |
| ... | ... | ... | ... |
## Coverage Data
| Metric | Value |
|--------|-------|
| Line coverage | 74.2% |
| Branch coverage | 61.8% |
| Function coverage | 79.1% |
| Statement coverage | 75.0% |
| Coverage threshold configured | 70% lines |
### Coverage by Directory
| Directory | Line Coverage | Files |
|-----------|-------------|-------|
| src/services/ | 82.3% | 12 |
| src/utils/ | 91.0% | 8 |
| src/routes/ | 45.2% | 6 |
| ... | ... | ... |
## Test-to-Component Mapping
| Component/Feature | Test Files | Test Count | Types |
|------------------|-----------|------------|-------|
| Authentication | auth.test.ts, login.spec.ts | 34 | Unit, E2E |
| User Management | users.test.ts, user-api.test.ts | 28 | Unit, Integration |
| ... | ... | ... | ... |
## Test Infrastructure
### Utilities and Helpers
[List shared test utilities, custom matchers, factories]
### Fixtures and Mock Data
[List fixture files, mock directories, test data]
### CI Integration
[How tests run in CI — commands, stages, parallelization]Rules
- Catalog, don't analyze. Report what exists. Every statement must be verifiable from the files.
- No gap analysis. Do not identify "untested" code, "missing" test types, or "insufficient" coverage. The words "gap", "missing", "insufficient", "should", and "recommend" are banned.
- No quality assessment. Do not comment on test quality, naming conventions, assertion patterns, or test organization quality.
- No recommendations. Do not suggest adding tests, improving coverage, refactoring test code, or adopting different testing strategies.
- Accurate counts. Test counts must be accurate. If you cannot reliably count test cases in a file (e.g., dynamically generated tests), note it as "count approximate — dynamic test generation detected".
- Parse, don't run. Do not execute tests. Do not run test commands to generate coverage. Only parse existing files and reports.
- Skipped tests matter. Skipped and todo tests are part of the inventory. Count them separately but always include them.
- Uncertain mappings are okay. If you cannot determine what a test file tests, say "mapping uncertain" rather than guessing. Partial information is better than fabricated information.
Mandatory Completion Checklist
The orchestrator MUST verify ALL of the following before marking test-discovery as complete:
specs/docs/testing/coverage.mdexists with: test framework(s), total test count, pass/fail/skip breakdown- Every test file in the project is cataloged with its framework and approximate test count
- Test-to-source mapping is documented where determinable (which tests cover which source files)
- Skipped/pending/todo tests are counted separately and listed
- Coverage reports (if they exist as files) are referenced with their location and date
BLOCKING: If any item is unchecked, the skill has NOT completed successfully. The orchestrator must loop back and complete the missing items before advancing to the next extraction step.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

