What are the different attributes for @Test annotation in testNG?

0 votes
What are the different attributes for @Test annotation in testNG?
Jun 25 in Selenium by Iqbal
259 views

1 answer to this question.

0 votes

Hey @Iqbal, some of the most common attributes for @Test annotations are:

  • description: gives information about the test it is attached to.
  • timeOut: maximum number of milliseconds for a test run.
  • priority: specifies when to run a test. The test with the lowest priority runs first, then the one with the next priority, and so on.
  • dependsOnMethods: specify when you want to run a test, only after another test has run successfully, making the second test’s run dependent on the first test’s successful outcome.
  • enabled: this attribute has boolean values, and by default is ‘true’. Only worth specifying explicitly when you don’t want a certain test method or class to be run, by setting the attribute to false.
  • groups: useful for grouping together tests that relate to the same functionality, are of the same importance or are of the same type.
answered Jun 25 by Gulshan

Related Questions In Selenium

0 votes
1 answer

What are the different types of TestNG listeners in Selenium Webdriver?

Hello Jagrati, some of the TestNG listeners ...READ MORE

answered Jun 12 in Selenium by Anvi
• 13,960 points
127 views
0 votes
1 answer
0 votes
1 answer

What are the different tools used for Compatibility testing?

For compatibility testing you can use the ...READ MORE

answered Feb 15 in Selenium by Nandita
42 views
0 votes
1 answer

What are the different tools that can be used for Security Testing?

The different tools used for security testing ...READ MORE

answered Feb 19 in Selenium by Ria
84 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,110 points
1,014 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
1,158 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
894 views
0 votes
1 answer