我有一个Jenkins运行几个任务,包括我的phpunit测试。一切正常,测试正在运行,但是当测试失败时,构建设置就像Succesfull,我不会收到通知。我想当测试失败时,构建也无法通知github和开发人员。
当构建失败时,通知系统正常工作,因为我的迁移也正常工作。
我的phpunit.xml文件如下所示:
<phpunit
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="bootstrap.php"
cacheTokens="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
processIsolation="false"
stopOnError="true"
stopOnFailure="true"
stopOnIncomplete="true"
stopOnSkipped="true"
stopOnRisky="true"
strict="false"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
verbose="true"
这是詹金斯的输出之一。
There was 1 error:
Undefined index: payroll
/tmp/app/test/unit/payroll/PayrollTest.php:24
FAILURES!
Tests: 311, Assertions: 392, Errors: 1.
BUILD FINISHED
Total time: 2 minutes 17.89 seconds
[INFO] HipChat notification sent to the following rooms: app
Finished: SUCCESS
提示?最好的问候。