是否有现有的方法可以使用 simple-build-tool 生成可靠的报告?

发布于 2024-08-26 18:49:33 字数 226 浏览 5 评论 0原文

我正在开发一个使用 Scala 运行 Selenium 测试的项目,作为持续集成过程的一部分。 Hudson 根据 Surefire 报告中的结果显示非常有用的信息,但我更喜欢使用 sbt 到 Maven。是否有现有的方法可以让 sbt 从 sbt 测试生成可靠的报告?

I'm working on a project using Scala running Selenium tests as part of a continuous integration process. Hudson displays very helpful information based on the results in the surefire reports but I would much prefer using sbt to Maven. Is there an existing way to get sbt to generate surefire reports from sbt tests?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼中杀气 2024-09-02 18:49:34

可以通过三种方法来实现这一目标。我认为第一个将为 SBT 做出巨大贡献!

为 SBT 编写 TestsListener 以生成 Surefire XML 报告

目前没有按照 Maven Surefire 插件的统一报告。可以使用自定义 测试监听器

将参数传递给测试框架以触发 XML 生成

我认为 Specs 或 ScalaTest 不直接支持 Surefire XML 格式。它是最近请求 ScalaTest。

使用 JUnit 适配器进行测试,并使用 JUnitRunner

ScalaTest 和 Specs 提供的特征可以混合到测试中,以便它们与 JUnit 兼容。 SBT 中的 JUnit 支持现在正在重新集成,但我不知道它是否会支持这一点。

Specs 本身使用 Maven + Surefire 进行 Hudson 构建。

There are three approaches to achieve this. I think the first would be a great contribution to make to SBT!

Write a TestsListener for SBT to generate Surefire XML reports

There is currently no unified reporting, as per the Maven surefire plugin. It would be possible to add this to SBT with a custom TestsListener.

Pass arguments to the test framework to trigger XML generation

I don't think Specs or ScalaTest support the Surefire XML format directly. It was recently requested for ScalaTest.

Use a JUnit adapter for your tests, and use the JUnitRunner

ScalaTest and Specs provide traits you can mix in to your tests so they are compatible with JUnit. JUnit support in SBT is being re-integrated right now, but I don't know if it will support this.

Specs itself uses the Maven + Surefire for it's Hudson build.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文