我在 Microsoft Visual Studio Team Services 中设置了持续集成服务器。我能够构建我的代码并运行我的测试分级测试.
但是,我不知道如何以 JUnit 格式输出结果。我见过很多使用 SBT 的人的结果,但没有人使用过Maven.
在配置下,“junitxml”标签是否应该生成正确的文件?这意味着这是微软的问题。
我的 scalatest 插件目前看起来像:
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>${maven.plugin.scalatest.version}</version>
<configuration>
<reportsDirectory>${project.build.directory}/scalatest-reports</reportsDirectory>
<junitxml>jUnitResults</junitxml>
<filereports>SparkTestSuite.txt</filereports>
</configuration>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
更新1:
结果文件无效。确保文件“C:/a/1/s/common/target/scalatest-reports/jUnitResults/TEST-org.scalatest.tools.DiscoverySuite-2d5739be-0653-4b9d-a8ed-41b6d0f82e48.xml”的结果格式匹配“JUnit”测试结果格式。
我想我能够弄清楚这一点。我的问题在于我对 VSTS 的误解。但是,我的测试生成了 JUnit 格式的测试结果以及非 JUnit 格式的结果。因此,在我的构建配置中,我需要删除不必要的测试结果文件。 VSTS 不是最直观的工具,因此我对测试结果的去向感到困惑。我的构建文件显示了通过的测试数量,但没有显示详细信息。我发现如果测试在构建过程中失败,失败的详细信息将显示在构建页面上。如果我想查看通过的测试的实际名称,我需要转到“测试”选项卡并在“运行”下查看。在那里我会看到更详细的结果。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)