In my code , I Have a BaseTest.java
class which is extended by multiple classes . I declared a @BeforeTest
before class method to be run before every class . Now if I also declare some class specific before class in respective classes . What is priority of execution of the before classes . Does the before class method in base class is taken into account . In my piece of code the one in base class not even seem to be invoked . What am I doing wrong .
Asked
Active
Viewed 266 times
0

Raedwald
- 46,613
- 43
- 151
- 237

Aravind Shankar
- 43
- 9
-
can you show your code what you did yet – harkesh kumar Sep 24 '19 at 04:53
-
Possible duplicate of [@BeforeClass and inheritance - order of execution](https://stackoverflow.com/questions/2132734/beforeclass-and-inheritance-order-of-execution) – Kris Sep 24 '19 at 04:57
1 Answers
0
If there is class A and you have a BeforeClass method and if class B extends A with the Beforeclass method too. The execution of class A Beforeclass occurs first and the latter.

Balaji Sigamani
- 11
- 2