I have SeleniumWebdriver / TestNG / Maven / Java continuous integration tests that run every time after deployment. Sometimes there is no element in the user interface, and tests throw an exception (which later gets into the code because I turned off the browser in the catch statement), so the assembly is marked as successful.
The strange thing is: I also had failures in tests caused by exceptions, and the build was still considered successful.
How can I configure the maven pom.xml file or jenkins assembly so that it can flag every test that throws an exception, FAILURE?
EDIT: after receiving the robjohncox response, I now have one more thing I need to do:
How can I reset the error again?
} catch (Exception e) {
Is this done so?
throw e;
source share