Add DataProvider execution support to Allure TestNG setup section by baflQA · Pull Request #1236 · allure-framework/allure-java

added 4 commits

January 21, 2026 21:22
This commit implements IDataProviderListener in AllureTestNg to report DataProvider executions as fixtures in the Allure report.
- Implemented beforeDataProviderExecution, afterDataProviderExecution, and onDataProviderFailure.
- DataProvider executions now appear in the 'Set up' section.
- Attachments added within DataProviders are now visible.
- Failed DataProviders are correctly reported with BROKEN status.
- Added tests to verify correct reporting of successful and failed DataProviders.
Previously, DataProvider fixtures were attached to the Class container, causing them to appear in the setup of all tests within that class.
This commit creates a dedicated container for each DataProvider execution and links it only to the specific test method requesting the data.
This ensures that DataProvider execution details (and failures) are correctly associated only with the relevant tests.
…ailures

- Changed dataProviderContainerUuidStorage to use computeIfAbsent to reuse the existing container for a test method if it already exists (e.g. during retry).
- Added currentExecutable.remove() in beforeDataProviderExecution to force generation of a new UUID for each execution attempt, ensuring retries are captured as distinct fixtures even if TestNG suppresses failure events or we missed cleanup.
- Added FlakyDataProvider sample and test case to verify retry reporting.
Updated container count expectations in multipleSuites and parallelMethods tests to account for the new DataProvider execution containers introduced by the fix.

@baflQA

@baflQA

…Test

Updated assertions to use more concise methods and removed unnecessary code. This enhances code clarity and maintainability.

@baev baev added the type:improvement

Change that improves some user experience but can't be considered as a new feature

label

Feb 3, 2026

baev

baev approved these changes Feb 3, 2026

@baflQA baflQA deleted the feature/dataprovider-setup branch

February 4, 2026 11:16