Skip to content

mach6/testng-dependency-reporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Dependency Reporter for TestNG

An IReporter and IResultLisener for TestNG that can analyze the test ISuite, determine the dependency graph, and produce .dot (graphviz), .png, or .json representations of the graph at each node.

example png

Current version

1.0.0-SNAPSHOT

Availability

Not yet published. Source code only.

License

Apache Software License v2.0

Compilation

$ mvn clean install

Installation

  1. Install graphviz for the executable dot to /usr/local/bin/dot. On a Mac you can do this with homebrew from a terminal with:
brew install graphviz
  1. Use the testng-dependency-reporter-{version}.jar as a test dependency for your project by adding it to the CLASSPATH. With Maven, this looks like:
<dependency>
  <groupId>net.mach6</groupId>
  <artifactId>testng-dependency-reporter</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <scope>test</scope>
</dependency>

Usage

With Maven Surefire

$ mvn test [-DdependecyReporter=[report options]] [surefire options]

With vanilla java, assuming all jars are in your CLASSPATH

$ java [-DdependencyReporter=[report options]] org.testng.TestNG [testng options]

Report Options

All "command line" options for this reporter are passed via the JVM system property dependencyReporter. The format is option:value[,option:value...]

Option Values (bold is the default)
enabled true, false
prescan true, false
mode all, suites, tests, classes, methods
output all, dot, png, json

For example:

$ mvn test -DdependencyReporter=prescan:true,output:png

Output

All output will be in a sub-folder named DependencyReporter whose parent folder is the folder that contains other TestNG output.

  • In a maven-surefire project this will typically be target/surefire-reports/.
  • In a non-maven project, this will typically be test-output/.

Credits

Inspired by this work of Tomek Kaczanowski

Releases

No releases published

Packages

No packages published

Languages