We have a large set of tests that we want to repeat (iterate) over different data sets. PHPUnit allows this via a Data Provider (https://docs.phpunit.de/en/12.2/writing-tests-for-phpunit.html#data-providers). However, the current Qase Parameter annotation for the phpunit reporter is a single value - which currently does not comprehend the dataset.
This results in Tests using a data provider to show us "retries" rather than parameterized.
Can we enhance the phpunit reporter to comprehend data providers?
Something like the following example...
Lets assume we have a test where we want to run it against several major versions.
We may implement a data provider like...
// Return a list of versions to test
public static function getProviderData(): array {
return [
'v1' => ['version', 'v1'],
'v2' => ['version', 'v2'],
'v3' => ['version', 'v3'],
];
}
#[
DataProvider('getProviderData'),
Parameter('version', ''),
Title("Test version")
]
public function testVersion(string $paramName, string $version)
{
$this->assertStringContainsString('v', $version, "Version includes v");
}
This would run "testVersion" 3 times, with $version = v1 | v2 | v3 respectively.
In Qase, we would need that reported as a parameterized test
Is this possible?