open-metadata/openmetadata/test-enforcement
Claude Code and agent skill by open-metadata/openmetadata
- community
Checking that the SKILL.md file is still in the repository.
Use after implementing any feature or fix to ensure comprehensive test coverage. Enforces 90% line coverage in openmetadata-service, integration tests for all API endpoints in openmetadata-integration-tests, and Playwright E2E tests for UI changes.
Install
npx vskill@latest install open-metadata/openmetadata/test-enforcementSKILL.md
The same SKILL.md was published earlier as open-metadata/openmetadata/test-enforcement.
Test Enforcement for OpenMetadata
Ensure every code change has comprehensive tests — 90% line coverage for service code, integration tests for APIs, and browser tests for UI page behaviour + Playwright E2E for cross-feature journeys.
When to Use
- After implementing any feature or bug fix (before creating a PR)
- When reviewing a PR to check test completeness
- When the
/tddskill was not used during implementation
Scope and evidence reuse
Apply AGENTS.md's completion boundary. Check coverage and test gaps for changed behavior; do not treat each skill as a separate execution requirement. Reuse applicable results. For implementation, push or PR creation run focused checks and list broader coverage as outstanding; full impacted runs are required for merge-readiness tasks. An infrastructure blocker is a reported limitation, not permission to retry indefinitely or dispatch new workflows.
Workflow
Step 1: Identify Changed Files
Determine what changed and classify by layer:
Classify each changed file:
| File path pattern | Layer | Required tests | |
|---|---|---|---|
openmetadata-service/src/main/ | Java backend | Unit tests (90% coverage) + integration tests | |
openmetadata-spec/src/main/resources/json/schema/ | Schema | Regeneration verification + downstream tests | |
openmetadata-integration-tests/ | Integration tests | Self — verify they pass | |
ingestion/src/metadata/ | Python ingestion | pytest unit tests (90% coverage) | |
openmetadata-ui/.../ui/src/ | React frontend | Jest unit tests + browser tests for page behaviour + Playwright only for cross-feature journeys (.claude/rules/frontend-browser-tests.md) | |
bootstrap/sql/migrations/ | Database | Integration tests verifying migration |
Step 2: Check Java Service Coverage
For any changes under openmetadata-service/src/main/:
2a. Find existing tests
2b. Run coverage for the module
2c. Verify 90% line coverage for changed code
After running tests, check the JaCoCo report for the specific classes you changed:
Target: 90% line coverage on all changed/new classes.
2d. Generate missing tests
If coverage is below 90%, create tests following these patterns:
Unit tests (openmetadata-service/src/test/):
- Test public methods with meaningful inputs
- Test edge cases: null inputs, empty collections, boundary values
- Test error paths: invalid input, missing data, permission denied
- Use descriptive test names:
testCreateEntityWithValidInput,testDeleteEntityNotFound
Do NOT:
- Mock internal OpenMetadata classes — write integration tests instead
- Test obvious getters/setters
- Write tests that only verify mock wiring
Step 3: Check Integration Tests for API Endpoints
For any changes to REST resources or entity logic:
3a. Map changed code to API endpoints
3b. Check existing integration tests
Every REST resource should have a corresponding *IT.java that tests:
| Operation | What to test | |
|---|---|---|
| Create | Valid creation, duplicate handling, missing required fields | |
| Get | By ID, by name, with fields parameter, not found | |
| List | Pagination, filtering, sorting, limit | |
| Update (PUT) | Full update, partial update, version increment | |
| Patch | JSON patch operations, concurrent modification | |
| Delete | Soft delete, hard delete, cascade behavior | |
| Custom endpoints | Any non-CRUD endpoints specific to the entity |
3c. Verify integration tests use the current patterns
Tests must follow these patterns:
Key patterns:
- Use
TestNamespacefor test isolation (notTestInfo) - Use
OpenMetadataClientSDK for API calls - Use typed exceptions, not raw HTTP status codes
- Create entities via API, assert on API responses
- Clean up created entities in test teardown
3d. Generate missing integration tests
If an API endpoint lacks integration test coverage:
- Read the existing
BaseEntityITto understand the contract - Read a similar entity's IT class as a reference pattern
- Create the IT class with all CRUD operations tested
- Add entity-specific endpoint tests
- Run and verify. A new or changed IT is selected by the planner, which prints the per-lane command:
``bash make java_affected # then copy MyEntityIT's line, or run them all with make java_affected_run ` PR CI does not run integration tests; see the java-affected-tests` skill.
Step 4: Check Playwright E2E Tests
For any changes under openmetadata-ui/src/main/resources/ui/src/:
4a. Identify UI features affected
Map changed components to user-facing features:
4b. Check existing Playwright coverage
4c. Determine if new Playwright tests are needed
First decide the layer (.claude/rules/frontend-browser-tests.md): a page's own behaviour (paging, forms, pickers, permission-driven controls, empty/error states) gets a Vitest browser test (*.browser.test.tsx), not a Playwright test. The rest of this step is for real journeys.
New Playwright tests ARE needed when:
- A new page or major UI section was added
- User-facing workflow was changed (e.g., entity creation flow)
- New permissions or role-based behavior was added
- A UI bug was fixed (regression test)
New Playwright tests are NOT needed when:
- Only internal refactoring with no visible behavior change
- Style-only changes (colors, spacing)
- Changes already covered by existing specs (verify by running them)
4d. Generate missing Playwright tests
Use the /playwright skill to generate tests. At minimum, verify:
- Read the Playwright Developer Handbook first:
`` openmetadata-ui/src/main/resources/ui/playwright/PLAYWRIGHT_DEVELOPER_HANDBOOK.md ``
- Required test coverage for new features:
- Happy path — feature works as expected
- Permission boundaries — admin vs. data consumer vs. data steward
- Data persistence — changes survive page reload
- Error states — invalid input, network errors
- Navigation — feature accessible from expected entry points
- Run and verify:
``bash cd openmetadata-ui/src/main/resources/ui yarn playwright:run --grep "<test name>" ``
- Run the linter:
``bash yarn lint:playwright ``
Step 5: Check Jest Unit Tests for Frontend
For component changes, verify Jest coverage:
Every component should have a co-located `.test.ts` or `.test.tsx` file.
Step 6: Check Python Ingestion Tests
For changes under ingestion/src/metadata/:
Step 7: Generate Coverage Report
Produce a summary for the PR:
Coverage Targets
| Layer | Metric | Target | How to measure | |
|---|---|---|---|---|
| openmetadata-service | Line coverage | 90% | JaCoCo with -P static-code-analysis | |
| openmetadata-integration-tests | API endpoint coverage | 100% of changed endpoints | Manual check against resource classes | |
| Browser tests (UI page behaviour) | Page behaviour coverage | New/changed page behaviour | yarn test:ui:coverage | |
| Playwright | Feature coverage | New/changed cross-feature UI journeys | Spec file existence + test pass | |
| Jest | Component coverage | 90% lines | yarn test --coverage | |
| Python ingestion | Line coverage | 90% | pytest --cov |
Quick Reference: Test File Locations
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/test-enforcement/SKILL.md
Popularity
- Repository stars
- 15,335
- Repository forks
- 2,410
- 7-day trend score
- 48
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/open-metadata/openmetadata/test-enforcement)