Copying Krishantha

On Wed, Oct 22, 2014 at 6:10 PM, Malithi Edirisinghe <[email protected]>
wrote:

> Hi,
>
> I am creating tests dynamically with @Factory annotation for various set
> of parameters with the use of a data provider. I want these tests to be
> executed exactly in the order of the array of objects returned by the data
> provider method.
>
> Ex:
> @Factory(dataProvider = "dp")
> public FactoryDataProviderSampleTest(int n) {
>   this.n = n;
> }
>
> @DataProvider
> static public Object[][] dp() {
>   return new Object[][] {
>     new Object[] { 1 },
>     new Object[] { 2 },
>   };
> }
>
> Here I want to execute the tests first for 1 and then for 2.
>
> I found [1] when searching the web. But setting the attribute
> 'group-by-instances' that they mention in the testng.xml didn't solve this
> problem, and the IDE complains that attribute is not allowed.
>
> Could someone please help me to solve this problem.
>
> [1] http://fruzenshtein.com/testng-dataprovider-run-tests-sequentially/
>
> Thanks,
> Malithi
>
> --
>
> *Malithi Edirisinghe*
> Senior Software Engineer
> WSO2 Inc.
>
> Mobile : +94 (0) 718176807
> [email protected]
>



-- 

*Malithi Edirisinghe*
Senior Software Engineer
WSO2 Inc.

Mobile : +94 (0) 718176807
[email protected]
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to