open-metadata/openmetadata/tdd
Claude Code and agent skill by open-metadata/openmetadata
- community
Checking that the SKILL.md file is still in the repository.
Use when implementing new features or fixing bugs to enforce test-driven development. Guides the RED-GREEN-REFACTOR cycle for Java (JUnit), Python (pytest), and TypeScript (Jest/Playwright) in OpenMetadata.
Install
npx vskill@latest install open-metadata/openmetadata/tddSKILL.md
The same SKILL.md was published earlier as open-metadata/openmetadata/tdd.
Test-Driven Development for OpenMetadata
Enforce RED-GREEN-REFACTOR discipline across all three language stacks.
When to Use
- Implementing any new feature or behavior
- Fixing bugs (write a test that reproduces the bug first)
- Adding new API endpoints, connectors, or UI components
The Cycle
1. RED - Write a Failing Test
Write the smallest test that describes the desired behavior. Run it. It must fail. If it passes, your test isn't testing the new behavior.
Java (JUnit 5):
Python (pytest):
TypeScript (Jest):
Rules for RED:
- Test one behavior per test
- Use descriptive test names that explain what should happen
- Assert on observable outcomes (API responses, database state, rendered output), not internal method calls
- For Python: use
assert x == y, notself.assertEqual(x, y)
2. GREEN - Write the Minimum Code to Pass
Write only the code needed to make the test pass. No more.
- Don't add error handling for cases you haven't tested
- Don't generalize — hardcode if that's what the test requires
- Don't clean up or refactor yet
Run the test again. It must pass.
3. REFACTOR - Clean Up While Green
Now improve the code while keeping tests green:
- Remove duplication
- Improve naming
- Extract methods if needed (but don't over-abstract)
- Reuse passing checks and run the affected regression tests after behavioral refactoring.
- Expand to a module suite only for merge readiness or a named unresolved risk.
4. Repeat
Go back to RED with the next behavior. Each cycle should take minutes, not hours.
What to Test Where
| Layer | Test Type | Location | Runner | |
|---|---|---|---|---|
| Java REST API | Integration | openmetadata-integration-tests/ | mvn verify | |
| Java service logic | Unit | openmetadata-service/src/test/ | mvn test | |
| Python connectors | Unit | ingestion/tests/unit/ | pytest | |
| Python integration | Integration | ingestion/tests/integration/ | pytest | |
| React components | Unit | Co-located .test.ts files | yarn test | |
| UI page behaviour | Browser test | Co-located .browser.test.tsx | yarn test:ui | |
| Cross-feature UI journeys | E2E | playwright/e2e/ | yarn playwright:run |
Anti-Patterns to Avoid
- Writing code before the test. If you catch yourself doing this, stop. Write the test first.
- Mocking everything. Mock external boundaries (HTTP clients, third-party APIs), not your own classes. If you need 3+ mocks, write an integration test instead.
- Testing implementation details. Don't assert on internal method calls with
verify(). Assert on outcomes. - Giant test methods. Each test should verify one behavior. Split multi-assertion tests into separate test cases.
- Skipping REFACTOR. The refactor step is where code quality happens. Don't skip it.
OpenMetadata-Specific Patterns
Java integration tests use BaseEntityIT with TestNamespace for isolation and OpenMetadataClient for API calls. Prefer this over heavily mocked unit tests for API testing.
Python connector tests should test real behavior:
Frontend tests should render components and assert on visible output:
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/tdd/SKILL.md
Popularity
- Repository stars
- 15,784
- Repository forks
- 2,516
- 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/tdd)