从命令行运行Pitest [英] Run Pitest from the command line

查看:582
本文介绍了从命令行运行Pitest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Pitest的文档,似乎这应该很简单,但它是给我有些麻烦。我应该能够拥有

  java -cp< your classpath> \ 
org.pitest.mutationtest.commandline.MutationCoverageReport \
--reportDir c:\\mutationReports \
--targetClasses example.foo。* \
--sourceDirs c:\\myProject\\\src \
--targetTests example.foo *

但我不知道这些东西应该用于我的项目,例如< your classpath>。



我的项目的文件结构如下所示:





最终我想把它放在一个.bat文件中,并在我的CI的TeamCity上运行

$ p

解决方案

命令行参数应涵盖构建项目所需的每个jar当在IDE中创建项目时,它应该提供一个类路径,您可以在命令行中使用)。


According to Pitest's documentation, it seems that this should be simple, but it is giving me some trouble. I should be able to have

java -cp <your classpath> \
     org.pitest.mutationtest.commandline.MutationCoverageReport \
    --reportDir c:\\mutationReports \
    --targetClasses example.foo.* \
    --sourceDirs c:\\myProject\\src \
    --targetTests example.foo*

but I don't know what some of those things should be for my project, such as "<your classpath>".

My project's file structure looks like this:

Ultimately I want to put this in a .bat file and run it on TeamCity for my CI

Any help would be appreciated!

解决方案

The command line parameter should cover every single jar you would need to build your project (when making the project inside an IDE it should provide a classpath for you that you can use in command line).

这篇关于从命令行运行Pitest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆