Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a method that contains division by zero fault such that (1) every test suite that achieves 100% statement coverage but less than 100% branch
write a method that contains division by zero fault such that (1) every test suite that achieves 100% statement coverage but less than 100% branch coverage does not reveal the fault, and (2) it is possible to create a test suite that achieves 100% branch coverage and reveals the fault. Method can have any signature. If you think its not possible explain why. Create JUnit Test Cases. (Class Name: TestCase1 & TestCase2) TestCase! should achieve 100% statement coverage less than 100% branch coverage and not reveal fault therein TestCase2 should achive 100% branch coverage and reveal fault therein. Also write a method that contains division by zero fault such that (1) it is possible to create a test suite with less than 100% statement coverage that does find the fault, and (2) every test suite that achieves 100% statement coverage does not reveal the fault. Method can have any signature. If you think its not possible explain why Create JUnit Test Cases. (Class Name: TestCase&TestCase4) TestCase3 should achieve less than 100% statement coverage and reveal fault therein. TestCase4 should achieve 100% statement coverage and not reveal fault therein. write a method that contains division by zero fault such that (1) every test suite that achieves 100% statement coverage but less than 100% branch coverage does not reveal the fault, and (2) it is possible to create a test suite that achieves 100% branch coverage and reveals the fault. Method can have any signature. If you think its not possible explain why. Create JUnit Test Cases. (Class Name: TestCase1 & TestCase2) TestCase! should achieve 100% statement coverage less than 100% branch coverage and not reveal fault therein TestCase2 should achive 100% branch coverage and reveal fault therein. Also write a method that contains division by zero fault such that (1) it is possible to create a test suite with less than 100% statement coverage that does find the fault, and (2) every test suite that achieves 100% statement coverage does not reveal the fault. Method can have any signature. If you think its not possible explain why Create JUnit Test Cases. (Class Name: TestCase&TestCase4) TestCase3 should achieve less than 100% statement coverage and reveal fault therein. TestCase4 should achieve 100% statement coverage and not reveal fault therein
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started