软件测试_实验一
软件测试第一次实验报告
a) The brief description that you install junit, hamcrest and eclemma.
①创建一个java project,下载junit 4.12,hamcrest-core 1.3的jar包,并将其复制到project的lib文件夹下,右键点击这两个文件并将其‘build path’ to the project。
②下载eclemma,打开eclipse ->help ->install new software ->add ->local ->选择你下载的eclemma位置,点OK就可以安装,然后按提示重启
b) The test result and coverage report (print screen) of your tests on triangle problem.
测试用例如上图,结果如下:
①junit测试:
②eclemma测试:
源码:
可以看到源码中有些条件并没有被完全覆盖,所以测试用例还不够完整,应该在今后的测试中加以完善。
测试代码: