ca.nanometrics.maven.plugins:testtime-maven-plugin

Maven plugin to display how long tests took to run

License

License

Categories

Categories

Maven Build Tools Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

ca.nanometrics.maven.plugins
ArtifactId

ArtifactId

testtime-maven-plugin
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

ca.nanometrics.maven.plugins:testtime-maven-plugin
Maven plugin to display how long tests took to run

Download testtime-maven-plugin

How to add to project

<plugin>
    <groupId>ca.nanometrics.maven.plugins</groupId>
    <artifactId>testtime-maven-plugin</artifactId>
    <version>1.0.0</version>
</plugin>

Dependencies

compile (4)

Group / Artifact Type Version
ca.nanometrics.maven.plugins : testtime jar 1.0.0
org.apache.maven : maven-core jar 3.5.0
org.apache.maven : maven-plugin-api jar 3.5.0
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5.1

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.apache.maven.shared : maven-verifier jar 1.6
org.hamcrest : java-hamcrest jar 2.0.0.0

Project Modules

There are no modules declared in this project.

Maven Test Time Profiler

TestTime consists of a maven plugin and extension that show the top N slowest unit tests and suites.

Apache License, Version 2.0, January 2004 Maven Central Build Status

Single Module Projects

For single module builds, use the plugin. It will display the 5 slowest suites and tests in the log after the test phase, and it will create a testtimes.txt file in the target directory with the 20 slowest.

  <build>
    <plugins>
      <plugin>
        <groupId>ca.nanometrics.maven.plugins</groupId>
        <artifactId>testtime-maven-plugin</artifactId>
        <version>1.0.0</version>
        <executions>
          <execution>
            <goals>
              <goal>display</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

Multi-Module Projects

For multi-module builds, you can use the extension to get a single testtimes.txt file in the top level project target directory, if you want.

In the top-level pom, put:

  <build>
    <extensions>
      <extension>
        <groupId>ca.nanometrics.maven.plugins</groupId>
        <artifactId>testtime-maven-extension</artifactId>
        <version>1.0.0</version>
      </extension>
    </extensions>
  </build>

You can still use the plugin above on multi-module projects too, and get individual project reports, if desired.

Properties

There are 2 system properties to control the number of results that are shown.

  • testtime.loglimit - the number of slow tests/suites to show in the log
  • testtime.filelimit - the number of slow tests/suites to show in the file

e.g. mvn -Dtesttime.loglimit=10 install

ca.nanometrics.maven.plugins

Nanometrics

Versions

Version
1.0.0