@Test annotation should be replaced with @Method annotation in testng java script

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

@Test annotation should be replaced with @Method annotation in testng java script

Manoj
Hi,

I am using TestNG framework for my testing projects and appreciate user friendliness and modularity of its features.

But, here is one suggestion as wish list item to testng.org team that instead of @Test annotation it should be changed to @Method to avoid confusion. Since currently @Test represents single method and it would be in sync with @BeforeMethod and @AfterMethod annotations when applied.

Presently @BeforeTest and @AfterTest annotations could be subjected to and applied for test in suite which can hold more than 1 java classes for execution, but @Test is applicable for method of that particular class. Hence to maintain proper hierarchy I suggest to substitute @Test with @Method.

Thanks!

Regards,
Manoj

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

Re: @Test annotation should be replaced with @Method annotation in testng java script

Cédric Beust ♔-2
Hi Manoj,

You are right that this is not very consistent but it's a legacy coming from 2004. At the very least, `@Test` would have to remain, even if `@Method` gets introduced (which I don't think is worth it).


-- 
Cédric


On Wed, Feb 22, 2017 at 3:44 AM, Manoj <[hidden email]> wrote:
Hi,

I am using TestNG framework for my testing projects and appreciate user friendliness and modularity of its features.

But, here is one suggestion as wish list item to testng.org team that instead of @Test annotation it should be changed to @Method to avoid confusion. Since currently @Test represents single method and it would be in sync with @BeforeMethod and @AfterMethod annotations when applied.

Presently @BeforeTest and @AfterTest annotations could be subjected to and applied for test in suite which can hold more than 1 java classes for execution, but @Test is applicable for method of that particular class. Hence to maintain proper hierarchy I suggest to substitute @Test with @Method.

Thanks!

Regards,
Manoj

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

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