Hi Krishantha,

Thanks for the reply. Will do as you have suggested.

Thanks,
Malithi.

On Mon, Oct 27, 2014 at 3:12 PM, Krishantha Samaraweera <[email protected]
> wrote:

> Hi Malithi,
>
> Data provider returns array objects in order they specified in the array.
> To overcome to problem, can you use dependsOnMethods annotation  [1] and
> make your test method sequence well defined.
>
> Seems like 'group-by-instances' is introduced in latter version of
> TestNG. We are still using 6.1.1 version.
>
> [1]http://www.tutorialspoint.com/testng/testng_dependency_test.htm
>
> Thanks,
> Krishantha.
>
>
> On Thu, Oct 23, 2014 at 1:40 PM, Malithi Edirisinghe <[email protected]>
> wrote:
>
>> 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]
>>
>
>
>
> --
> Krishantha Samaraweera
> Senior Technical Lead - Test Automation
> Mobile: +94 77 7759918
> WSO2, Inc.; http://wso2.com/
> lean . enterprise . middlewear.
>



-- 

*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