@BeforeClass and inheritance - order of execution

前端 未结 16 2044
梦如初夏
梦如初夏 2020-12-02 11:39

I have an abstract base class, which I use as a base for my unit tests (TestNG 5.10). In this class, I initialize the whole environment for my tests, setting up database map

16条回答
  •  失恋的感觉
    2020-12-02 12:29

    Why don't you try to create an abstract method doSpecialInit() in your super class, called from your BeforeClass annotated method in superclass.

    So developpers inheriting your class is forced to implement this method.

提交回复
热议问题