testNG common comment

Common Annotations description:

  • @BeforeSuite in the test suite are all run before commenting them, run only once
  • After all the tests in the suite @AftereSuite runs in annotation method, run only once
  • @BeforeClass before calling the first test run method of the current class, annotation method to run only once
  • @AftereClass After calling the first test run method of the current class, annotation method to run only once
  • @BeforeMethod annotation methods will run before each test method
  • @AfterMethod annotation method will run after each test method
  • Before running the tests run all methods @BeforeTest annotation will belong to the class of the test label
  • After running all the test runs @AfterTest annotation methods will fall within the class label test
  • A method for marking @DataProvider test methods to provide data. Note must return a method Object [] []in which each Object []can be assigned to the parameter list of test methods. From the DataProviderreceived data @Testrequires the use of this name is equal annotation dataProvidername
  • @Parameters describes how to pass parameters to @Testmethods; xml suitable embodiment of the parameterization of the traditional values
  • @Test the class or method marked as part of the test, if the marks on this class, the class would be all public methods are as Test Method

 

Guess you like

Origin www.cnblogs.com/zddwork/p/11430898.html