Define the Class level priority and order of execution

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

Define the Class level priority and order of execution

vikas2.j@gmail.com
I have many test packages and many classes, I don't want to have test-suite.xml with individual class name, instead I would like to declare using group and package in the test-suite file.

The issue is I want to determine the execution of the particular class file by using priority(can use annotation).

Can some one please suggest me how to achieve this ? Tried using IMethodIntercepter that is useful for the test methods within the same class.

My current suite file looks as below.

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="5" verbose="2" name="unstable suite"
        parallel="false" annotations="JDK" configfailurepolicy="continue">
        <test name="unstable" enabled="true">
                <groups>
                        <run>
                                <include name="config" />
                                <include name="group1" />
                                <include name="group1_unstable" />
                                <include name="group2" />
                                <include name="group2_unstable" />
                                <include name="group3" />
                                <include name="group3_unstable" />
                        </run>
                </groups>
                <packages>
                        <package name="com.test.pkg1" />
                        <package name="com.test.pkg2" />
                        <package name="com.test.pkg3" />
                </packages>
        </test>
</suite>
Reply | Threaded
Open this post in threaded view
|

Re: Define the Class level priority and order of execution

Krishnan Mahadevan
I dont think I quite understand your issue yet.
Are you stating that you would like to control the order of execution of your test methods based upon the priority you assigned to each of them [perhaps via a custom annotation at the class level that you are creating in your test project ] ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


On Fri, Jul 26, 2013 at 11:39 AM, [hidden email] <[hidden email]> wrote:
I have many test packages and many classes, I don't want to have
test-suite.xml with individual class name, instead I would like to declare
using group and package in the test-suite file.

The issue is I want to determine the execution of the particular class file
by using priority(can use annotation).

Can some one please suggest me how to achieve this ? Tried using
IMethodIntercepter that is useful for the test methods within the same
class.

My current suite file looks as below.

<!DOCTYPE suite SYSTEM &quot;http://testng.org/testng-1.0.dtd&quot;>
<suite thread-count="5" verbose="2" name="unstable suite"
        parallel="false" annotations="JDK" configfailurepolicy="continue">
        <test name="unstable" enabled="true">
                <groups>
                        <run>
                                <include name="config" />
                                <include name="group1" />
                                <include name="group1_unstable" />
                                <include name="group2" />
                                <include name="group2_unstable" />
                                <include name="group3" />
                                <include name="group3_unstable" />
                        </run>
                </groups>
                <packages>
                        <package name="com.test.pkg1" />
                        <package name="com.test.pkg2" />
                        <package name="com.test.pkg3" />
                </packages>
        </test>
</suite>



--
View this message in context: http://testng.1065351.n5.nabble.com/Define-the-Class-level-priority-and-order-of-execution-tp18604.html
Sent from the testng-users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "testng-users" 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-users.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "testng-users" 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-users.
For more options, visit https://groups.google.com/groups/opt_out.