[testng-dev] InnovationCount and DependsOnMethods issue or which way ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[testng-dev] InnovationCount and DependsOnMethods issue or which way ?

Leonard Mudrock

When I execute TestNG as shown below:

@test(innovationCount=100) 
public void Test1()  {
   System.out.println(" Test1");
}

@test (dependsOnMethods={"Test1"}, innovationCount=100)
public void Test_CPU() {
   System.out.println(" Test_CPU ");
}

Result:
100  Test1  on the list
then
100  Test_CPU on the list

But, I prefer that the result should be as below:

Test1
Test_CPU
Test1
Test_CPU
... continue loop

Do you know which proper annotation or something that can be shown in a proper order?  

Thanks,
Leonard

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[testng-dev] Re: InnovationCount and DependsOnMethods issue or which way ?

Jan Mewes
What about this:

@Test(innovationCount=100)
public void myTestFrame() {
       myFirstTest();
       mySecondTest();
}

private void myFirstTest() {
    System.out.println(" Test1");
}

private void mySecondTest() {
    System.out.println(" Test_CPU ");
 
}


Kind regards,

Jan

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.