Hi,
I am trying to migrate from 6.14.3 to 7.4.
One
of the differences I am seeing is that I used to throw an exception in
IAnnotationTransformer, that would interrupt the tests. This seems to
have changed.
The exceptions I would throwing 6.14.3 would interrupt the suite. However in 7.4 it does not seem to interrupt the tests.
What I am trying to do is to analyze my tests in IAnnotationTransformer, and throw an overrall exception if there are some unwanted configs.
Basically when I ran my test under certain circumstances my ITestAnnotationListener would throw an exception. My unit test for the listener would check that running suite would generate this exception:
assertThrows(NestedTestClassForbiddenException.class, () -> myTestNG.run());
In 6.14.3 the exception in the Listener would fail the suite. But it seems that the failure is not specific to my test causing it.
My question is : How can I fail the suite in 7.4?
Best regards,
Baubak