PDA

View Full Version : Explain exception test



warrantyau
12-18-2019, 03:15 AM
Explain exception test

Saravanan28
02-11-2020, 09:33 AM
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.