gpt4 book ai didi

unit-testing - 如何在 Jenkins 中保持单元测试输出

转载 作者:行者123 更新时间:2023-12-04 11:29:32 26 4
gpt4 key购买 nike

我们已经设法让 Jenkins 从我们的测试中正确解析我们的 XML 输出,并且还包括错误信息,如果有的话。这样就可以直接在 Jenkins 的 TestCase 中看到发生的错误。

我们想要做的是让 Jenkins 保留一个日志输出,这基本上是控制台输出,与每个案例相关联。这将使任何人都能看到每个测试用例的实际控制台输出,无论是否失败。

我还没有看到这样做的方法。

* 编辑 *

澄清 - 我希望能够直接在 Jenkins 界面中看到实际的测试输出,与出现错误时的方式相同,但对于整个输出。我不希望只有 Jenkins 将文件保留为工件。

* 编辑结束 *

任何人都可以帮助我们吗?

最佳答案

发布 JUnit 测试结果报告 (构建后操作)勾选 Retain long standard output/error复选框。

If checked, any standard output or error from a test suite will be retained in the test results after the build completes. (This refers only to additional messages printed to console, not to a failure stack trace.) Such output is always kept if the test failed, but by default lengthy output from passing tests is truncated to save space. Check this option if you need to see every log message from even passing tests, but beware that Jenkins's memory consumption can substantially increase as a result, even if you never look at the test results!



enter image description here

关于unit-testing - 如何在 Jenkins 中保持单元测试输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6944907/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com