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.
Powered by vBulletin® Version 4.2.4 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.