My question is basically the same as this SOF question, but deals with @BeforeMethod
instead of @BeforeClass
for TestNG.
Does test class inheritance play a factor when determining the order that @BeforeMethod
annotated methods will execute? If I have class A and a class B extends A and both have one @BeforeMethod
method, then will the parent's (A) run before the child's (B) or will the child's run before the parent, or does the order depend on some other factor such as alphabetical order of the method name. I'm trying to see if there is an inheritance order that I can rely on instead of having to use parameters of the annotation such as dependsOnMethods.