新的Scala和Scalatest用户。如何使用Scalatest生成html报告?
我已经写了一些使用Scalatest库的测试,我已经运行了它。如何以html(或其他)格式获取测试报告的转储?
thx。
新的Scala和Scalatest用户。如何使用Scalatest生成html报告?
我已经写了一些使用Scalatest库的测试,我已经运行了它。如何以html(或其他)格式获取测试报告的转储?
thx。
对于HTML报表,你会使用-h的亚军或SBT:
http://www.artima.com/docs-scalatest-2.0.RC1/#org.scalatest.tools.Runner $
HTML报告需要ScalaTest 2.0。如果您正在使用Ant任务或Maven插件,那么它也有特殊的语法。你如何运行你的测试?
为了得到这个配置节并获得成功,我的报告:
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<filereports>TestSuite.txt</filereports>
</configuration>
<executions>
请参阅:http://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin
感谢。我正在使用Eclipse插件。我可以在哪里指定Runner参数? 斯卡拉IDE Eclipse的\t 3.0.1.v-2_10-201307110731-b1c1861 ScalaTest斯卡拉IDE \t 2.9.3.v-3-2_10-201309130846-55f5c32 – partheinstein
比尔 - 你发布的链接了陈旧。我认为你写的文档(我在我的回答中已经提供)提供了正确的答案。 Scalatest是一个伟大的工具..感谢你的贡献。 /克里斯 –