Reputation: 493
I want to print time measures for each test. There is a way to do it using SBT - http://www.scalatest.org/user_guide/using_scalatest_with_sbt
However looking at this page - http://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin I can't figure out what to add to pom.xml so every test will show it's duration.
I want to configure this inside pom.xml so my teammates will not have to run maven with special flags. I don't know if this one even possible so a negative answer will do as well :)
Here is a part of the pom.xml configuring ScalaTest:
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<filereports>ProductionCommons.txt</filereports>
</configuration>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
Upvotes: 0
Views: 865
Reputation: 3659
It is in the single-letter configuration parameters in front of your filename for your file reporter. In the example it is:
<filereports>WDF TestSuite.txt</filereports>
These config params are described here:
http://doc.scalatest.org/2.1.5/index.html#org.scalatest.tools.Runner$@configuringReporters
The one you want is the D, which enables the durations to be printed out, so:
<filereports>D ProductionCommons.txt</filereports>
Upvotes: 4