【发布时间】:2017-08-20 22:14:44
【问题描述】:
我正在使用 pipline 构建和运行单元测试。
这是我的管道:
pipeline {
agent any
stages {
stage('Build') {
steps {
sh '''
./system/fuge/ci/docker-up.sh
./system/fuge/ci/docker-down.sh
'''
}
}
stage('Test') {
steps {
sh '''
./system/fuge/ci/docker-up-test.sh
'''
}
}
}
post {
always {
junit 'build/reports/**/*.xml'
}
}
}
我得到了这个错误:
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] junit
Recording test results
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: No test report files were found. Configuration error?
Finished: FAILURE
有人知道是什么问题吗?
我也使用node.js、lab.js进行测试
【问题讨论】:
-
当您在 jenkins 之外运行
./system/fuge/ci/docker-up-test.sh时,build/reports/**/*.xml中是否会显示一些 xml 文件? -
看起来您的存档文件夹错误,请确保您在特定路径上有一些 xml。您可以在完成后检查运行管道的机器并找到xml,而不是修复存档的命令。
-
测试报告在我的 docker 容器中,如何访问它们?