2013-10-03 97 views

回答

1

對於HTML報表,你會使用-h的亞軍或SBT:

http://www.artima.com/docs-scalatest-2.0.RC1/#org.scalatest.tools.Runner $

HTML報告需要ScalaTest 2.0。如果您正在使用Ant任務或Maven插件,那麼它也有特殊的語法。你如何運行你的測試?

+1

感謝。我正在使用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

+0

比爾 - 你發佈的鏈接了陳舊。我認爲你寫的文檔(我在我的回答中已經提供)提供了正確的答案。 Scalatest是一個偉大的工具..感謝你的貢獻。 /克里斯 –

0

爲了得到這個配置節並獲得成功,我的報告:

<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