Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我之前在 Jenkins 中运行过 Junit 测试,记得看到日志信息显示为控制台输出的一部分。现在我正在 Sonar 中运行测试(从 Jenkins 开始),但在任何地方都看不到 Junit 测试的日志输出。你能给我一个关于如何在声纳中记录这个输出的建议吗?在最坏的情况下,我知道我可以运行 Junit 测试两次——一次在 Jenkins 中记录日志记录,第二次在 Sonar 中(记录静态代码分析和测试覆盖率),但我正在寻找一种解决方案,它可以同时实现这两个目标单次执行。
Sonar 不像 Jenkins 那样保留测试的控制台输出。它只是在出现测试失败/错误时保留堆栈跟踪。