Exception in thread “main” org.pitest.help.PitHelpError, while trying to run Android Application with Activity as Pit Mutation Testing

强颜欢笑 提交于 2019-12-12 03:31:40

问题


I have created one Android project in Eclipse, and I got successfully Pit Mutation coverage report with line and mutation coverage, while I have removed "Extend Activity" and "onCreate()". but if I'm trying to get coverage with Android Activity and its life cycle Pit Mutation Test giving me error.

Exception in thread "main" org.pitest.help.PitHelpError: All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.See http://pitest.org for more details.
    at org.pitest.coverage.execute.DefaultCoverageGenerator.verifyBuildSuitableForMutationTesting(DefaultCoverageGenerator.java:108)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:93)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:49)
    at org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:112)
    at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:101)
    at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:43)
    at org.pitest.mutationtest.commandline.MutationCoverageReport.runReport(MutationCoverageReport.java:72)
    at org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:43)
    at org.pitest.pitclipse.pitrunner.PitRunner.runPIT(PitRunner.java:49)
    at org.pitest.pitclipse.pitrunner.PitRunner.main(PitRunner.java:28)

回答1:


This happens because one of your tests failed after been mutated by PITest. IF you scroll the logs up, you will see what test is, e.g.:

2:30:13 PM PIT >> WARNING : Description [testClass=com.foo.BarTest, name=foo(com.foo.BarTest)] did not pass without mutation.


来源:https://stackoverflow.com/questions/36026911/exception-in-thread-main-org-pitest-help-pithelperror-while-trying-to-run-and

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!