Consider following two classes:

public class BaseClass {
  @BeforeSuite
  public void beforeSuite() {....}
  @AfterSuite
  public void afterSuite() {....}
  @Test
  public void f() {....}
}
public class Derived1 extends BaseClass {
  @Test
  public void testOne()  {....}
}

What methods will be executed when Derived1 is executed through xml?

testOne() will be executed
beforeSuite(), afterSuite() and testOne() will be executed.
beforeSuite(), afterSuite(),f() and testOne() will be executed.
Nothing will be executed as the @BeforeSuite and @AfterSuite are not there in Derived1 class.
Verified Answer
Correct Option - c

To get all Infosys Certified Selenium Advance Automation Tester Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram