Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

How do you handle expected exception using testNG?

Category: TestNG
@Test(expectedExceptions = ArithmeticException.class)
 public void testException() {
 System.out.println(""SoftwareTestingMaterial.com"");
 int i = 1 / 0; 
 }

Leave a Reply

Your email address will not be published. Required fields are marked *