Skip to content

Add Resources Testing Framework documentation to check and transform skills#18

Open
dgarros wants to merge 1 commit into
mainfrom
dga-20260318-testing-framework
Open

Add Resources Testing Framework documentation to check and transform skills#18
dgarros wants to merge 1 commit into
mainfrom
dga-20260318-testing-framework

Conversation

@dgarros

@dgarros dgarros commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Document Infrahub's YAML-driven pytest testing framework across shared common rules and skill-specific rules for checks and transforms. Elevate testing from LOW to HIGH priority and add complete test YAML examples with fixtures.

…skills

Document Infrahub's YAML-driven pytest testing framework across shared common
rules and skill-specific rules for checks and transforms. Elevate testing from
LOW to HIGH priority and add complete test YAML examples with fixtures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dgarros dgarros requested a review from a team March 28, 2026 09:55

@PhillSimonds PhillSimonds left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of comments. Overall LGTM, spare merge conflict/CI test failure remediation ofc.

Comment on lines +24 to +26
4. **Caching (caching-)** -- MEDIUM. Display label caching with parent relationships, batch loading timing issues, no-op mutation workarounds.

5. **Testing (testing-)** -- HIGH. Resources Testing Framework, YAML-driven pytest tests, smoke/unit/integration test kinds, always-create-tests recommendation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pedantic, but there is a difference in width on these lines from the other items. Should probably be made consistent.


Transforms should always have accompanying test definitions. The Resources Testing Framework provides test kinds for both Python and Jinja2 transforms, from lightweight syntax validation to full integration testing.

See [Resources Testing Framework](../../common/rules/testing-resource-framework.md) for the general framework overview, YAML structure, and how to run tests.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to be a little more specific about what kind of tests must (or should) be created for transforms? For example, a transform should create a specific output, not a fuzzy output, so we might want to be specific about creating unit tests (and not just smoke tests) for transforms. The instructions are a little ambiguous about which kind of tests to use for a transform definition, and the LLM might be a bit lazy and just create a smoke test instead of a unit test. Similarly, an integration test might be a step too far in testing for the majority of transform definitions. Integration tests take additional resources, and a unit test is probably sufficient.

@BeArchiTek BeArchiTek added the changes/patch Bump patch version (bug fix) label Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes/patch Bump patch version (bug fix)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants