Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
order of execution of tests
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
shashank ( shantaram )  
View profile  
 More options Nov 8, 9:18 am
From: "shashank ( shantaram )" <svwaingan...@gmail.com>
Date: Sun, 8 Nov 2009 06:18:33 -0800 (PST)
Local: Sun, Nov 8 2009 9:18 am
Subject: order of execution of tests
Is there a guarantee that multiple tests in a testng.xml file will be
executed in the order they are declared in the file ?
Assume parallel option is none and no dependson annotations are used.

I have exhaustively tested this and the test are getting executed in
right order.
But wanted a confirmation before my team gets down to writing the
xml's
 eg -- in follopwing example, will method2 always run after method1

<suite name="TESTNG-59 Suite" >
        <test name="TESTNG-1">
                <classes>
                <class name="test.class1">
                        <methods>
                                <include name="method1"/>
                        </methods>
                </class>
                </classes>
        </test>
        <test name="TESTNG-2">
                <classes>
                <class name="test.class2">
                        <methods>
                                <include name="method2"/>
                        </methods>
                </class>
                </classes>
        </test>

</suite>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cédric Beust ♔  
View profile  
 More options Nov 8, 10:53 am
From: Cédric Beust ♔ <cbe...@google.com>
Date: Sun, 8 Nov 2009 07:53:54 -0800
Local: Sun, Nov 8 2009 10:53 am
Subject: Re: [testng-users] order of execution of tests

On Sun, Nov 8, 2009 at 6:18 AM, shashank ( shantaram ) <

svwaingan...@gmail.com> wrote:

> Is there a guarantee that multiple tests in a testng.xml file will be
> executed in the order they are declared in the file ?

No, the XML file only contains the list of classes to be analyzed by TestNG.

If you need a specific ordering, you should use
dependsOnGroups/dependsOnMethods.

--
***Cédric
*


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shantaram  
View profile  
 More options Nov 25, 2:04 am
From: Shantaram <svwaingan...@gmail.com>
Date: Wed, 25 Nov 2009 12:34:29 +0530
Local: Wed, Nov 25 2009 2:04 am
Subject: Re: [testng-users] Re: order of execution of tests

Please suggest how i can implement the following requirement.
I have 3 @test methods A,B and C testing three tasks.

I want to test multiple test flows
eg
test 1  - run A -> run B -> run C
test 2  - run A -> run C -> run B
test 3  - run B -> run C -> run A

I want to write many such flows
I dont mind writing an xml for each flow but i should be able to do it
without changing the annotations in the java test code (needing re
compiling)

--
Regards,

Shantaram Waingankar
9969035764
www.shantaram.co.nr

Twenty years from now you will be more disappointed by the things you didn't
do than by the ones you did do.
So throw off the bowlines. Sail away from the safe harbor. Catch the trade
winds in your sails.
Explore. Dream. Discover.

2009/11/8 Cédric Beust ♔ <cbe...@google.com>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Harihara Vinayakaram  
View profile  
 More options Nov 25, 2:35 am
From: Harihara Vinayakaram <hvr...@gmail.com>
Date: Wed, 25 Nov 2009 13:05:33 +0530
Local: Wed, Nov 25 2009 2:35 am
Subject: Re: [testng-users] Re: order of execution of tests

Technically the order of tests in testng.xml can change. But for now in a
sequential flow this works .  So you can write your testng.xml as

<test .... >
   <include name="A" />
</test>
<test ...>
    <include name="B" />
</test>

and you can pass the appropriate testng.xml to your TestNG ant task

etc.
But beware that this is not fixed and can change as Cedric mentioned in a
post some time back.

Regards
Hari


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
anil raju  
View profile  
 More options Nov 25, 3:27 am
From: anil raju <anillr...@gmail.com>
Date: Wed, 25 Nov 2009 13:57:57 +0530
Local: Wed, Nov 25 2009 3:27 am
Subject: Re: [testng-users] Re: order of execution of tests
As a part of our test framework we have multiple test files and some
of the workflows demand to include the tests of a particular suite
into another one and also ensure that the tests of the included suite
files are run in the sequence of inclusion.

On looking up what i see is that the suite-files tag can have multiple
test files and all the tests in them run too. But the sequence of
running the tests is not guaranteed.

A standard testng file with included suites will look like this.
eg.
<suite name="Suite1" verbose="1">
 <suite-files>
             <suite-file path="testng1.xml" />
              <suite-file path="testng2.xml" />
  </suite-files>
<test name="test1">
<classes>
                                <class name="com.abc.test">
                                        <methods>
                                                <include name="test1()" />
                                        </methods>
                                </class>
                        </classes>

<./test>
</suite>

What i want to ensure is that the tests in testng1.xml are run before
testng2.xml and the tests in this file needs to be run at the end. Is
there any existing method which i could use to make the tests run in
this order.

Regards,
Anil

--
Don't talk unless you can improve the silence.
Visit my blog at
http://anilraju.co.nr

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google