我按照jenkins-php.org创建了一个项目。一切正常,但我无法跳过PHPunit测试。 什么可能是跳过PHPUnitTest以避免错误的简单方法...最初我认为这很容易,我从代码中删除了所有实例,但我仍然能够看到此错误,如果项目我也无法生成phpdoc没有测试文件...请帮助
答案 0 :(得分:0)
一种可能性是删除目标,该目标在执行ANT时从依赖目标列表中执行PHPUnit。因此,如果ANT正在执行目标full-build
,请更改
<target name="full-build"
depends="prepare,static-analysis,phpunit,phpdox,-check-failure"
description="Performs static analysis, runs the tests, and generates project documentation"/>
到
<target name="full-build"
depends="prepare,static-analysis,phpdox,-check-failure"
description="Performs static analysis, runs the tests, and generates project documentation"/>
请注意phpunit
属性值缺少depends
。
另一种可能性是编写一个除了$this->assertTrue(true);
之外什么都不做的虚拟测试。
答案 1 :(得分:0)
在phpunit.xml中将下面的内容设置为false以避免致命错误 并删除发布xUnit测试结果报告这整个块jenkins GUI项目配置,以避免构建完成状态失败....记住构建将会成功.....还要感谢你的帮助Havelock。