Jenkins JUnit 测试结果报告插件指出 4 个测试报告文件被发现带有模式 '**/unit-tests.xml'?

Jenkins JUnit Test Result Report plugin states 4 test report file(s) were found with the pattern '**/unit-tests.xml'?

INFO: Starting to record. INFO: Processing JUnit INFO: [JUnit] - 4 test report file(s) were found with the pattern '**/unit-tests.xml' relative to 'E:\Jenkins-ws{foldername}' for the testing framework 'JUnit'.

我在 Jenkins 中处理 JUnit 时收到上述消息。由于这个问题,我的测试成功了,詹金斯失败了。这是我的 karma.config 文件。

basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
  require('karma-jasmine'),
  require('karma-chrome-launcher'),
  require('karma-jasmine-html-reporter'),
  require('karma-coverage-istanbul-reporter'),
  require('@angular-devkit/build-angular/plugins/karma'),
  require('karma-junit-reporter')
],
client: {
  clearContext: false // leave Jasmine Spec Runner output visible in browser
},
junitReporter: {
        outputDir: "test-results",
        outputFile: "unit-tests.xml"
},
coverageIstanbulReporter: {
  dir: require('path').join(__dirname, '../coverage'),
  reports: ['html', 'lcovonly'],
  fixWebpackSourcePaths: true
},
reporters: ['progress', 'junit', 'kjhtml'],

问题出在我在 CI 脚本

中给出的模式
xunit([JUnit(deleteOutputFiles: true, failIfNotNew: true, pattern: '**/unit-tests.xml', skipNoTestFiles: false, stopProcessingIfError: true)])

我们有四个不同的 Angular 项目,每个项目都有 unit-tests.xml 文件。我已重命名文件并更新了 CI 脚本,如下所示。

 xunit([JUnit(deleteOutputFiles: true, failIfNotNew: true, pattern: '**/unit-tests-project1.xml', skipNoTestFiles: false, stopProcessingIfError: true)])

现在,同名文件夹中只有一个文件,测试成功。