联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2018-04-18 04:38

Task: Control Flow Oriented Coverage Test Procedures

In the so-called branch coverage test, the test case quantity for a Program P be compiled so that each edge of the control flow graph of P (see, for example, Fig. 1: You already know an equivalent representation as a program flowchart) at least once, so each condition / branch at least once to true and (possibly in another test case) is evaluated too wrong at least once.


To capture what parts of the code during the execution of the test cases. Some tools instrument the code similarly as in the method newSpielfeld the class SchiffVersenken. The

calls made to Log.log (...) log the execution of the instruction blocks shown in Fig. 1 by equally numbered circles being represented.


Implement a simplified test case class based on Junit SchiffVersenkenZweigueberdeckungsTest. The test cases have to be included represented by non-static methods without arguments, which are additionally marked with the given annotation test (this Annotation is greatly simplified and does not support parameters such as timeout or exceptions!).


After running all test cases, you should have a complete branch coverage (C1 = 100%) all methods of "SUT"(System under test). Additionally, check on every call of all non-void Methods immediately return their value using the default Assert.assertEquals method.


Tip: A good test case is minimalistic! They should be in each test method accordingly create at most one instance of the "SUT" ship sinking, then, if necessary, into the desired one

Bring state and finally call the method to be tested.

Important notes: Do not use classes, methods or annotations from the official JUnit package, otherwise your submission will be awarded 0 points, because it is not alone translatable.

Instead, use the annotations / classes provided by the AuD team. After processing this task you should exclude them from the class path of future tasks, otherwise you may not be able to perform any given public test cases!



相关文章

版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp