Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for recording results for test methods using a data provider #55

Closed
chiefmyron opened this issue Mar 14, 2023 · 1 comment · Fixed by #64
Closed

Add support for recording results for test methods using a data provider #55

chiefmyron opened this issue Mar 14, 2023 · 1 comment · Fixed by #64
Assignees
Labels
enhancement New feature or request

Comments

@chiefmyron
Copy link
Owner

When a test makes use of a data provider (https://docs.phpunit.de/en/10.0/writing-tests-for-phpunit.html#data-providers), the same test function will be run multiple times, once for each data point supplied by the data provider.

This explains the discrepancy between the number of tests shown as queued for execution in the Test Explorer vs the numbers actually reported by the PHPUnit command line runner.

@chiefmyron
Copy link
Owner Author

Preferred option would be to create child TestItems underneath the test method on the fly during test execution. These would then be cleared out (removed) at the start of the next test run, in case the data provider has been modified in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant