using CodePro coverage With JUnit
codepro coverage插件没有特别针对JUnit, 所以直接右键在Test class 'AllTests.java'上运行菜单‘CodePro Tools->Run code coverage' 会报错
Launch Failed The selection does not contain a main type
这是因为运行这种方法是通过查找main方法。
通过查看 Evaluation Guide 找到了运行JUnit之后查看代码覆盖率的方法,
(原来没有看仔细,下面这种方法已经在introduction页面的Full Featured Code Coverage讲到)
1,InthePackageExplorer,right-clickontheprojectandfromtheCodeProToolssub-menuselectInstrumentCode.
2.runtheJUnittestasnormalway.
3.in the converage view, a result is shown第一步会在Project的'.project'文件中增加一个builder/nature
<buildCommand> <name>com.instantiations.assist.eclipse.coverage.instrumentationBuilder</name> <arguments> </arguments> </buildCommand> <nature>com.instantiations.assist.eclipse.coverage.codeCoverageNature</nature>
相关推荐
shirleypaddy 2020-10-19
qingmumu 2020-10-19
lustdevil 2020-10-18
ganlulululu 2020-10-12
lustdevil 2020-08-03
lustdevil 2020-07-18
lustdevil 2020-06-25
lustdevil 2020-06-21
zhengzf0 2020-06-21
宿命java 2020-06-15
JackYin 2020-06-14
dongxurr 2020-06-07
snowphy 2020-06-06
zhengzf0 2020-05-28
81901836 2020-05-26
Julywhj 2020-05-26