Add support for recording results for test methods using a data provider
Closed this issue · 1 comments
chiefmyron commented
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 commented
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.