@AfterTest not getting executed in framework | Selenium Forum
Pravin V. Kumbhare Posted on 06/09/2021

Hello sir,


I'm studying the Testng Datadriven Framework module and I have completed it partially till now. Attached is my code.

After executing the "PortfolioSuite.xml" file, my @AfterTest method is not getting called (I have a failure in my first Test out of two). Because of this, my Extent Report is not getting generated (as my report.flush() code is in @AfterTest method).

If I mention alwaysRun=true for the @AfterTest, code runs smooth. 


However, in the video, you have't used alwaysRun=true for the @AfterTest, and still your @AfterTest method is executed.


Why is this behavior different?

Pravin V. Kumbhare Replied on 07/09/2021

Hello sir,

A reminder to look into this please.

Ashish Thakur Replied on 15/09/2021

Please use testng 7

Related Posts