agentleFS
open-metadataopen-metadata/OpenMetadata/skills/tdd/SKILL.md

tdd

Skill15k starsChanged 3 months agoApache-2.0View on GitHub

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.

193 other projects use a version of this.

Trending

Less talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 10 mentionsMay 2026: 1 mentionJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 8 mentionsSep 2026: 4 mentionsOct 2026: 3 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the open-metadata/OpenMetadata repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about open-metadata/OpenMetadata

The biggest 5 of 40 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 40

Talked about on GitHub, Bluesky and Hacker News (40 times).

On GitHub · 29

24 more on GitHub

On Bluesky · 10

5 more on Bluesky

On Hacker News · 1

Used with

Projects with it also use make-bot-ui, Poteto Mode and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • eryzerzSkill

    make-bot-ui

    Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.

    Also in 8 projects that use this

  • jtarorehSkill

    Poteto Mode

    poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.

    Also in 5 projects that use this

  • risadamsSkill

    which-skill

    Router over this pack's skills and flows. Ask it "which skill fits X" when you don't remember what's available.

    Also in 7 projects that use this

  • TheOnlyFusionCubeSkill

    principle-attack-the-premise

    Inventory who actually owns or exhibits the imbalance, then challenge the shared premise before writing another patch. Use when two or more fixes that share one premise have failed the same gate.

    Also in 11 projects that use this

  • TheOnlyFusionCubeSkill

    principle-test-behavior-not-implementation

    Call the system the way its consumer does and assert meaningful observable output; avoid mocks or assertions that only mirror internal calls. Use when when writing or evaluating tests.

    Also in 11 projects that use this

  • shreyT19Skill

    principle-laziness-protocol

    Apply when refactoring, evaluating diff size, or tempted to add abstractions, layers, or signal threading. Bias toward deletion and the smallest change that solves the problem.

    Also in 22 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 11 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 177 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write the smallest test that describes the desired behavior.

    line 22
  2. Distinctive:

    Test one behavior per test

    line 45
  3. Distinctive:

    Use descriptive test names that explain what should happen

    line 46
  4. Distinctive:

    Write only the code needed to make the test pass.

    line 52
  5. Distinctive:

    Don't add error handling for cases you haven't tested

    line 54
  6. Distinctive:

    Don't generalize — hardcode if that's what the test requires

    line 55
  7. Distinctive:

    Don't clean up or refactor yet

    line 56
  8. Distinctive:

    Run the full test suite for the module to check for regressions

    line 67
  9. Distinctive:

    Writing code before the test: If you catch yourself doing this, stop.

    line 101
  10. Very specific:

    Testing implementation details: Don't assert on internal method calls with verify().

    line 103
  11. Very specific:

    Java integration tests: use BaseEntityIT with TestNamespace for isolation and OpenMetadataClient for API calls.

    line 109
  12. Distinctive:

    Python connector tests: should test real behavior:

    line 111
  13. Distinctive:

    Frontend tests: should render components and assert on visible output:

    line 128

“Common” is measured: kept by at least 6 in 10 of the 177 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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):

# Write test in openmetadata-service/src/test/ or openmetadata-integration-tests/
mvn test -pl openmetadata-service -Dtest=YourTestClass#yourTestMethod

Python (pytest):

source env/bin/activate
cd ingestion
# Write test using pytest style — plain assert, no unittest.TestCase
python -m pytest tests/unit/your_test.py::test_your_function -v

TypeScript (Jest):

cd openmetadata-ui/src/main/resources/ui
yarn test path/to/YourComponent.test.ts

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, not self.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)
  • Run the full test suite for the module to check for regressions
# Java — format then test
mvn spotless:apply
mvn test -pl openmetadata-service

# Python — format, lint, then test
cd ingestion && make py_format && make py_format_check
python -m pytest tests/unit/your_test.py -v

# TypeScript — lint then test
cd openmetadata-ui/src/main/resources/ui
yarn lint:fix
yarn test path/to/YourComponent.test.ts

4. Repeat

Go back to RED with the next behavior. Each cycle should take minutes, not hours.

What to Test Where

LayerTest TypeLocationRunner
Java REST APIIntegrationopenmetadata-integration-tests/mvn verify
Java service logicUnitopenmetadata-service/src/test/mvn test
Python connectorsUnitingestion/tests/unit/pytest
Python integrationIntegrationingestion/tests/integration/pytest
React componentsUnitCo-located .test.ts filesyarn test
UI E2E flowsE2Eplaywright/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:

# Good: test the actual parsing logic
def test_parse_table_metadata():
    raw = {"name": "users", "columns": [...]}
    result = parse_table(raw)
    assert result.name == "users"
    assert len(result.columns) == 3

# Bad: mock everything and verify calls
def test_parse_table_metadata():
    mock_client = MagicMock()
    mock_client.get.return_value = {...}
    # ... 20 lines of mock setup
    verify(mock_client.get).called_once()  # proves nothing

Frontend tests should render components and assert on visible output:

// Good: test what the user sees
render(<MyComponent data={testData} />);
expect(screen.getByText('Expected Label')).toBeInTheDocument();

// Bad: test implementation details
expect(component.state.internalFlag).toBe(true);

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.