How to set test cases priority (Java test cases integrated in TestNG framework)

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

How to set test cases priority (Java test cases integrated in TestNG framework)

Vikas
Hi All,


    We have 100+ test cases written in java on testNG framework. No test cases have priority set (P0/P1/P2) at the moment. My query is how to set these priorities across all test cases unsing TestNG feature? 
What is that feature which would help to complete this task? 


Regards
Vikas

--
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.
Reply | Threaded
Open this post in threaded view
|

RE: How to set test cases priority (Java test cases integrated in TestNG framework)

Alexander Poulikakos

Maybe you could use groups? See chapter 5.2 http://testng.org/doc/documentation-main.html#test-groups

 

/Alex

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of vikas shitole
Sent: den 10 september 2013 11:04
To: [hidden email]
Subject: [testng-users] How to set test cases priority (Java test cases integrated in TestNG framework)

 

Hi All,

 

 

    We have 100+ test cases written in java on testNG framework. No test cases have priority set (P0/P1/P2) at the moment. My query is how to set these priorities across all test cases unsing TestNG feature? 

What is that feature which would help to complete this task? 

 

 

Regards

Vikas

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: How to set test cases priority (Java test cases integrated in TestNG framework)

Vikas
Hi Alex,

 Thanks a lot for your input. I have some followup questions 

1. By using groups feature. : 

  My tests are designed as follows:
>>>Every test have i)test setup method  ii)actual test method iii)cleanup method
>>>I need to use annotation (@Test) for each method. am I right?
>>>If say, this test class extends one base class. do we need to add @Test annotation with groups even for super class method as well? 

2. we use ANT tool to execute our testNG suite (all tests) through command line. can we send groups value( in our case priority) dynamically as one parameter. so that it would automatically execute specified priority test cases from test suite? we do not want to create separate test suites for each priority level.

Thanks in advance.


-Vikas


On Wednesday, 11 September 2013 12:02:29 UTC+5:30, drapostolos wrote:

Maybe you could use groups? See chapter 5.2 http://testng.org/doc/documentation-main.html#test-groups

 

/Alex

 

From: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="N3gvnIK4vN4J">testng...@... [mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="N3gvnIK4vN4J">testng...@googlegroups.com] On Behalf Of vikas shitole
Sent: den 10 september 2013 11:04
To: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="N3gvnIK4vN4J">testng...@...
Subject: [testng-users] How to set test cases priority (Java test cases integrated in TestNG framework)

 

Hi All,

 

 

    We have 100+ test cases written in java on testNG framework. No test cases have priority set (P0/P1/P2) at the moment. My query is how to set these priorities across all test cases unsing TestNG feature? 

What is that feature which would help to complete this task? 

 

 

Regards

Vikas

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="N3gvnIK4vN4J">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="N3gvnIK4vN4J"> testn...@....
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.
Reply | Threaded
Open this post in threaded view
|

Re: How to set test cases priority (Java test cases integrated in TestNG framework)

Venkatesh Singh
you need @Test only for actual test method, super class method does not need @Test.

@Test signifies the test you intend to run don't use it for helper methods.

On Thursday, 12 September 2013 22:57:12 UTC+5:30, vikas shitole wrote:
Hi Alex,

 Thanks a lot for your input. I have some followup questions 

1. By using groups feature. : 

  My tests are designed as follows:
>>>Every test have i)test setup method  ii)actual test method iii)cleanup method
>>>I need to use annotation (@Test) for each method. am I right?
>>>If say, this test class extends one base class. do we need to add @Test annotation with groups even for super class method as well? 

2. we use ANT tool to execute our testNG suite (all tests) through command line. can we send groups value( in our case priority) dynamically as one parameter. so that it would automatically execute specified priority test cases from test suite? we do not want to create separate test suites for each priority level.

Thanks in advance.


-Vikas


On Wednesday, 11 September 2013 12:02:29 UTC+5:30, drapostolos wrote:

Maybe you could use groups? See chapter 5.2 http://testng.org/doc/documentation-main.html#test-groups

 

/Alex

 

From: [hidden email] [mailto:testng...@googlegroups.com] On Behalf Of vikas shitole
Sent: den 10 september 2013 11:04
To: [hidden email]
Subject: [testng-users] How to set test cases priority (Java test cases integrated in TestNG framework)

 

Hi All,

 

 

    We have 100+ test cases written in java on testNG framework. No test cases have priority set (P0/P1/P2) at the moment. My query is how to set these priorities across all test cases unsing TestNG feature? 

What is that feature which would help to complete this task? 

 

 

Regards

Vikas

--
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 testng-users...@googlegroups.com.
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.