Skip to content

Improve IntegrationTest coverage#64

Open
sullis wants to merge 2 commits intonebula-plugins:mainfrom
sullis:sullis/improve-int-test-coverage
Open

Improve IntegrationTest coverage#64
sullis wants to merge 2 commits intonebula-plugins:mainfrom
sullis:sullis/improve-int-test-coverage

Conversation

@sullis
Copy link
Copy Markdown
Contributor

@sullis sullis commented Mar 9, 2026

Summary

Expands and tightens IntegrationTest coverage for the Gradle plugin by improving assertions in existing tests and adding focused scenarios for empty-rule and low-threshold behavior.

What changed

  • Removed unused @Disabled import.
  • Strengthened test variant resolution by asserting :code-to-check:enforceArchRules is SKIPPED.
  • Strengthened test proto integration by asserting task outcomes for:
    • :code-to-check:checkArchRulesMain
    • :code-to-check:check
  • Added parameterized test test empty rules project (across SupportedGradleVersion) to verify projects with no defined rules still execute checks successfully.
  • Added test fail mode with low threshold to cover failure behavior when failureThreshold("LOW") is configured.

Why

This closes coverage gaps by validating both successful execution paths and explicit failure behavior, while ensuring expected Gradle task outcomes are asserted instead of only checking warning output.


@ParameterizedTest
@EnumSource(SupportedGradleVersion::class)
fun `test skip source set`(gradleVersion: SupportedGradleVersion) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is a test for this in ArchrulesRunnerPluginTest already.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed.

- Remove unused @disabled import
- Add missing enforceArchRules SKIPPED assertion to 'test variant resolution'
- Add task outcome assertions to 'test proto integration'
- Add 'test empty rules project' to verify no-rules library doesn't break consumer
- Add 'test fail mode with low threshold' to cover LOW priority failure path

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sullis sullis force-pushed the sullis/improve-int-test-coverage branch from 2d8feab to ab783e6 Compare March 10, 2026 02:52
@sullis sullis requested a review from wakingrufus March 10, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants