Bamboo CI Server - 如何配置PHPUnit测试
问题描述:
我想设置Bamboo CI Server。我创建了两个阶段:Bamboo CI Server - 如何配置PHPUnit测试
- 阶段1:使用代码签出的“代码签出”。
- 阶段2:通过phpunit进行测试的“PHPunit”。
阶段1是好的,但在阶段2我有一个错误。在生成日志,我有:
Starting task 'PHPUnit Testing' of type 'com.atlassian.bamboo.plugins.php:task.builder.phpunit'
12-paź-2014 10:45:49
Beginning to execute external process for build 'CCP - CI - Unit Testing Build - Default Job #4 (CCPCI-UTB-JOB1-4)'
... running command line:
/usr/local/bin/phpunit --log-junit test-reports/phpunit.xml --coverage-html test-reports/coverage/html --bootstrap /var/www/html/ccp/core/tests/bootstrap.php --no-configuration /var/www/html/ccp/core/tests
... in: /home/bamboo/bamboo_home/xml-data/build-dir/CCPCI-UTB-JOB1
12-paź-2014 10:45:49 X-Powered-By: PHP/5.5.11
12-paź-2014 10:45:49 Content-type: text/html
12-paź-2014 10:45:49
12-paź-2014 10:45:49 Failing task since text 'OK' was not found in last 250 log entries
12-paź-2014 10:45:49 Parsing test results...
12-paź-2014 10:45:49 Finished task 'PHPUnit Testing'
如果在服务器端执行我的命令的PHPUnit(在/ usr/local/bin目录/ PHPUnit的--log-JUnit测试的报告/ phpunit.xml --coverage-HTML测试报告/ coverage/html --bootstrap /var/www/html/ccp/core/tests/bootstrap.php --no-configuration/var/www/html/ccp/core/tests),一切正常(有OK响应)。
这是怎么回事?
上生成的总览画面有两种错误:
(Job results summary) No failed tests found, a possible compilation error occurred.
(Error summary) Could not find test result reports in the /home/bamboo/bamboo_home/xml-data/build-dir/CCPCI-UTB-JOB1 directory.
我会感谢任何帮助。如发表在OP评论
答
解决方案:
我已经解决了我的问题。
我不得不添加一个环境变量文件
setenv.sh
:JVM_SUPPORT_RECOMMENDED_ARGS="-Datlassian.bamboo.builder.successMarker='OK'"
一切都运行得非常好。
我已经解决了我的问题。我不得不将环境变量(JVM_SUPPORT_RECOMMENDED_ARGS =“ - Datlassian.bamboo.builder.successMarker ='OK'”)添加到文件setenv.sh中。一切运作良好。 – 2014-10-13 12:36:17
用这些信息回答你自己的问题(和漂亮的格式),并接受你自己的答案,将问题标记为已解决。它可能会让你等到明天才能真正接受它。 – Will 2016-07-16 13:33:27
这个问题仍然列为未解决。我们可以解决这个问题吗?如果威尔的建议太麻烦了:现在就像点击一个按钮一样简单...... – 2017-04-14 20:52:03