Posts

TestNG QA NextGen

   1. Explain the Difference between BeforeTest and BeforeMethod annotations BeforeTest : This method will execute only once in the entire execution before calling the first test method. It doesn’t matter how many test methods, or how many test methods are in a single class it executes only once. BeforeMethod : This method will execute before every test method. Number of executions of BeforeMethod is similar to number of executions of test methods. 2. What is TestNG? TestNG is a testing framework. 3. Explain soft assert in TestNG SoftAssert collect errors when @Test is running. It doesn’t throw errors when assertions fail. Execution will continue with the next step. If we want to throw an error we can use the assertAll() statement as the last statement of the test script. This is the package : org.testng.asserts.SoftAssert Create object from SoftAssert Class SoftAssert softassert = new SoftAssert(); softassert.assertEquals() softassert.assertNotEqual() softasser...
Recent posts