How to keep the unit test output in Jenkins

后端 未结 5 1448
谎友^
谎友^ 2021-01-02 12:01

We have managed to have Jenkins correctly parse our XML output from our tests and also included the error information, when there is one. So that it is possible to see, dire

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-02 12:17

    When using a declarative pipeline, you can do it like so:

    junit testResults: '**/build/test-results/*/*.xml', keepLongStdio: true
    

    See the documentation:

    If checked, the default behavior of failing a build on missing test result files or empty test results is changed to not affect the status of the build. Please note that this setting make it harder to spot misconfigured jobs or build failures where the test tool does not exit with an error code when not producing test report files.

提交回复
热议问题