Skip to content

Exclude @DataProvider and @Factory methods from phased test ordering - #262

Merged
baubakg merged 2 commits into
mainfrom
fix/106-exclude-factory-dataprovider-from-ordering
Aug 31, 2026
Merged

baubakg merged 2 commits into
mainfrom
fix/106-exclude-factory-dataprovider-from-ordering

Conversation

@baubakg

@baubakg baubakg commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

  • Excludes @DataProvider and @Factory annotated methods from phased test step ordering — they are TestNG infrastructure hooks, not test steps, and were previously being treated as ordinary steps.
  • Adds them to the existing CONFIG_CLASSES exclusion list in ScenarioStepDependencyFactory, reusing the same mechanism already used for @Before*/@After* methods.

Test plan

  • Added ProducerConsumerWithDataProviderAndFactory fixture with @Factory and @DataProvider methods
  • Added testFetchExtractingProduceConsumeWithDataProviderAndFactory asserting both are marked as config methods and excluded from fetchExecutionOrderList()
  • Ran TestExtractingDependencies — 23/23 tests pass

Closes #106

🤖 Generated with Claude Code

…106)

These methods are TestNG infrastructure hooks, not test steps, so they
should be ignored the same way @before*/@after* methods already are.
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@baubakg
baubakg merged commit 31d7661 into main Aug 31, 2026
7 checks passed
@baubakg
baubakg deleted the fix/106-exclude-factory-dataprovider-from-ordering branch August 31, 2026 19:44
@baubakg baubakg mentioned this pull request Aug 31, 2026
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.

Include factory in the filters for the order

1 participant