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

Incorrect parameter value passed to test when using TestNG DataProvider with attribute parallel set to true #350

Open
p-khandelwal opened this issue Mar 19, 2018 · 5 comments

Comments

@p-khandelwal
Copy link

p-khandelwal commented Mar 19, 2018

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

@christophd
Copy link
Member

Parallel data provider is not supported yet

@svettwer
Copy link
Contributor

svettwer commented Oct 6, 2018

Reminder: #501 contains another solid refinement of this issue!

@mischcon
Copy link

mischcon commented Oct 8, 2018

Would be really awesome if this could be fixed in the next release :)

@mmarciniuk
Copy link

It would be great if you introduce this fix in the next release :)

@mmarciniuk
Copy link

Could you update status of this task?

@christophd christophd removed the READY label Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants