citrus
citrus copied to clipboard
Incorrect parameter value passed to test when using TestNG DataProvider with attribute parallel set to true
Related to #83
Scenario:
Trying to use TestNG DataProvider together with TestRunner resource injection. DataProvider attribute parallel = true
Testcase:
public class DataProviderTest extends TestNGCitrusTest {
private static final Logger log = LoggerFactory.getLogger(DataProviderTest.class);
@DataProvider(name = "getTestData", parallel = true)
public Object[][] getTestData() {
return new String[][]{
{"foo", null},
{"bar", null},
};
}
@Test(testName = "dataProviderAndCitrusResourceInjectionTest",
dataProvider = "getTestData")
@CitrusTest(name = "dataProviderAndCitrusResourceInjectionTest")
@Parameters({"dataRecord", "runner"})
public void dataProviderAndCitrusResource(String dataRecord, @CitrusResource TestRunner runner) {
runner.echo("Hello Citrus Test World.");
log.info("DataProvider dataRecord = " + dataRecord);
}
}
Expected result:
Log contains string "DataProvider dataRecord = foo" and "DataProvider dataRecord = bar"
Actual result:
[PoolService-0] INFO ple.DataProviderTest| DataProvider dataRecord = foo [PoolService-1] INFO ple.DataProviderTest| DataProvider dataRecord = foo
Parallel data provider is not supported yet
Reminder: #501 contains another solid refinement of this issue!
Would be really awesome if this could be fixed in the next release :)
It would be great if you introduce this fix in the next release :)
Could you update status of this task?