I looked around and couldn't find anything describing this, other than perhaps the AnnotationTransformer, but it looks to only modify the value of an annotation, not the actual annotation.
I have a base class which has a bunch of @BeforeClass setup methods:
class TestTemplate {
public WebDriver driver;
@BeforeClass
public void setupDriver() {
driver = new ChromeDriver();
}
}
I now have a test class which extends it, however for this particular class I want to run its method in parallel. This involves making sure drivers are setup before the method, not before the class:
class Test extends TestTemplate {
// Can I tell setupDriver() to run beforeMethod instead of beforeClass()?
@BeforeMethod
public void setupDriver() {
super.setupDriver(); ?? or something similar?
}
}