jeudi 27 février 2020

Is there a way to run all BeforeMethods(even when it fails) only if BeforeSuite succeeds in TestNG?

Currently, if an exception occurs in BeforeSuite, I don't want tests in my testlist to run. So, it will stop execution and BeforeMethods aren't run.

If the BeforeSuite succeeds and then BeforeMethod throw an exception, I want it to keep executing BeforeMethod for all tests in my test list.

Is this possible?

Currently, I have configfailurepolicy=continue. It'll successfully stop after BeforeSuite exception, but if BeforeMethod exception occurs it will only run once.

Thanks

Aucun commentaire:

Enregistrer un commentaire