[testng-dev] Priority support for all testNg annotaion

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

[testng-dev] Priority support for all testNg annotaion

Martin Aldrin
Hi,

One feature that I really missing in TestNg is the possibility to set priority for the before and after methods.
Today we using an ugly workaround to be able to run these methods in wanted order by naming the methods in alphabetical order. But this is a ugly solution.


The reason why we want to have this is because we using TestNg for system verification. The normal time execution is between 1 hour up to 72 hours, and therefor it is very important to control in which order we want to run our pre/post checks to get as early feedback as possible without stop the execution. Most of our pre/post checks are not allowed to stop the execution because we want to collect as much information as possible for long night/weekend runs.


So my question is if such feature would be acceptable, we could help out with the contribution the implementation. 



/Martin


--
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 https://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [testng-dev] Priority support for all testNg annotaion

Krishnan Mahadevan

Martin,

 

I would be curious to know why would you have multiple before and after methods?

 

For e.g., if you are running into a situation wherein you need to have multiple @BeforeSuite/@AfterSuite, then you could easily convert them into a listener format and perhaps even control the order of execution of the listeners.

 

Can you please help add more context around this ?

 

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/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Martin Aldrin <[hidden email]>
Reply-To: <[hidden email]>
Date: Friday, September 29, 2017 at 5:34 PM
To: testng-dev <[hidden email]>
Subject: [testng-dev] Priority support for all testNg annotaion

 

Hi,

 

One feature that I really missing in TestNg is the possibility to set priority for the before and after methods.

Today we using an ugly workaround to be able to run these methods in wanted order by naming the methods in alphabetical order. But this is a ugly solution.

 

 

The reason why we want to have this is because we using TestNg for system verification. The normal time execution is between 1 hour up to 72 hours, and therefor it is very important to control in which order we want to run our pre/post checks to get as early feedback as possible without stop the execution. Most of our pre/post checks are not allowed to stop the execution because we want to collect as much information as possible for long night/weekend runs.

 

 

So my question is if such feature would be acceptable, we could help out with the contribution the implementation. 

 

 

 

/Martin

 

 

--
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 https://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.

--
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 https://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [testng-dev] Priority support for all testNg annotaion

Martin Aldrin
Hi Krishnan,

The reason why we want to be able to use so many methods is because we want to divide each pre/ post check so we get verdict for each of them. 
Also to be able to use the TestNg groups to be able to enable/disable checks. 
It is mainly Before/After Test and Before/Aftter Method that we have multiple methods of.
Separating them into several methods also gives a good way of separating the logs which can be huge.

We have the possibility to specify all our checks in xml as well using a listener, but that does not give us the same possibilities as we get when we writing the tests in code, so in different use cases we have different needs 


Here is an example how a test case, where we lock a device in one test case and unlock it in other, we want to run all the pre checks once, and the post checks after both lock and unlock. Today we need to name the methods in alphabetical order to run all pre/post checks in wanted order.

@BeforeTest
public void checkAlarm){}

@BeforeTest
public void checkError){}

@Test
public void lockDevice(){}

@Test
public void unlockDevice(){}

@AfterMethod
public void checkAlarm){}
 
@AfterMethod
public void checkError){}




On Friday, 29 September 2017 15:13:43 UTC+2, Krishnan Mahadevan wrote:

Martin,

 

I would be curious to know why would you have multiple before and after methods?

 

For e.g., if you are running into a situation wherein you need to have multiple @BeforeSuite/@AfterSuite, then you could easily convert them into a listener format and perhaps even control the order of execution of the listeners.

 

Can you please help add more context around this ?

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="xad5Q4JgBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testn...@...> on behalf of Martin Aldrin <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="xad5Q4JgBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">martin....@...>
Reply-To: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="xad5Q4JgBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testn...@...>
Date: Friday, September 29, 2017 at 5:34 PM
To: testng-dev <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="xad5Q4JgBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testn...@...>
Subject: [testng-dev] Priority support for all testNg annotaion

 

Hi,

 

One feature that I really missing in TestNg is the possibility to set priority for the before and after methods.

Today we using an ugly workaround to be able to run these methods in wanted order by naming the methods in alphabetical order. But this is a ugly solution.

 

 

The reason why we want to have this is because we using TestNg for system verification. The normal time execution is between 1 hour up to 72 hours, and therefor it is very important to control in which order we want to run our pre/post checks to get as early feedback as possible without stop the execution. Most of our pre/post checks are not allowed to stop the execution because we want to collect as much information as possible for long night/weekend runs.

 

 

So my question is if such feature would be acceptable, we could help out with the contribution the implementation. 

 

 

 

/Martin

 

 

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="xad5Q4JgBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-dev+...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="xad5Q4JgBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testn...@....
Visit this group at <a href="https://groups.google.com/group/testng-dev" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/testng-dev&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-dev&#39;;return true;">https://groups.google.com/group/testng-dev.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 https://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.