Explain exception test
Explain exception test
Exception Test in TestNG. In TestNG we use expectedException with @Test annotation and we need to specify the type of exceptions that are expected to be thrown when executing the test methods. A below example which throws an exception called “ArithmeticException” when dividing two numbers with denominator value as 0.
|
Bookmarks