Hi,
I have a test which will be ran a number of time. Is it possible to impose a group of tests or simply a test to run after this test? The graph is the following: @Test(invocationCount = 10)
public void TestA() { ......................... } @Test public void TestB() { ................................... }
So the plan of execution is : TestA TestB ---------- TestA TestB --------- .........
Thank for your attention. You received this message because you are subscribed to the Google Groups "testng-users" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/testng-users?hl=en. |
Have TestB (dependsOnMethods = "TestA").
By the way: methods should start with a lowercase letter ("testA"). -- Cédric On Fri, Jul 27, 2012 at 9:53 AM, nguyenkim thuat <[hidden email]> wrote: Hi, You received this message because you are subscribed to the Google Groups "testng-users" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/testng-users?hl=en. |
Hi Cédric,
It didn't work as i wanted.
-- Maybe my question is not very concrete. What i want is something like this scenario: I have a testA @Test(invocationCount=1) public void testA() The parameter invocationCount is modified in the moment of execution by Transformer. And i have also the testB @Test(dependsOnMethods = "testA")
public void testB() All i want is the testB will run just after the testA like the figure below: testA I testB I ---------- I
testA I invocationCount times testB I --------- I I ......... I With your suggestion the testB will run just one time, but in my intention, the testB must run invocationCount times. On Fri, Jul 27, 2012 at 6:59 PM, Cédric Beust ♔ <[hidden email]> wrote: Have TestB (dependsOnMethods = "TestA"). You received this message because you are subscribed to the Google Groups "testng-users" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/testng-users?hl=en. |
In this case, you should probably have one method that calls testA and testB and use "invocationCount" on that wrapping method.
-- Cédric On Mon, Jul 30, 2012 at 6:51 AM, nguyenkim thuat <[hidden email]> wrote: Hi Cédric, You received this message because you are subscribed to the Google Groups "testng-users" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/testng-users?hl=en. |
Yes, you are right, but in my case, the testA will be followed by a group of test case (which i named in general testB):
testA testB1 testB2 testB3 .......... if i use a wrapping method, if there's a test case fail for exemple testB1, i cannot verify if the testB2 and testB3 is successful or not. i'm thinking about generating a report like: testA: pass testB1: pass testB2: fail testB3: fail testA: pass testB1: fail
testB2: pass testB3: pass ................................Is it possible? On Mon, Jul 30, 2012 at 5:34 PM, Cédric Beust ♔ <[hidden email]> wrote: In this case, you should probably have one method that calls testA and testB and use "invocationCount" on that wrapping method. You received this message because you are subscribed to the Google Groups "testng-users" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/testng-users?hl=en. |
Free forum by Nabble | Edit this page |