[SOLVED] Branch Coverage, Statement Coverage and Path Coverage | Java Unit Testing
Create a directory called “TestClassValue” Hereafter, we call this directory <dir>. Create a Java class com.work.sample.FlawedClass in directory <dir>/src. (The actual path will obviously reflect the package structure.) 100% Branch Coverage & 100% Statement Coverage Add to the class a method called flawedMethodl that contains a division by zero fault such that it is possible to create a test suite that achieves 100% branch coverage and does not reveal the fault every test suite that achieves 100% statement coverage reveals the fault. Conversely, if you were able to create the method, then create two JUnit test classes com.work.sample.FlawedClassTestBCl and com.work.sample.FlawedClassTestSCl for class FlawedClass as follows: FlawedClassTestBCl should achieve 100% branch coverage of flawedMethodl and not reveal the fault therein. FlawedClassTestSCl should achieve 100% statement coverage of flawedMethodl and reveal the fault therein. Both classes should be...
Hey Hassnain Jamil let me first thank you for the good work you are doing here you have helped me alot in studying IT.Thank you.
ReplyDeleteI was looking for this book -A gift of fire- but the link is no longer working can you fixed it please