基于 ANT 的詹金斯工作问题

Issue with ANT based Jenkins job

我按照jenkins-php.org创建了一个项目。一切正常,但我无法跳过 PHPunit 测试。 跳过 PHPUnitTest 以避免错误的简单方法是什么......最初我认为这很容易并且我从代码中删除了所有实例但是我仍然能够看到这个错误,而且如果项目我无法生成 phpdoc没有测试文件...请帮助

一种可能是删除目标,该目标在执行 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"/>

注意 depends 属性值缺少 phpunit

另一种可能性是编写一个虚拟测试,它只做 $this->assertTrue(true);

在 phpunit.xml 中将下面设置为 false 以避免致命错误 并删除发布 xUnit 测试结果报告这整个块 jenkins GUI 项目配置以避免构建完成状态失败......请记住构建会成功......也感谢您的帮助 Havelock。