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.
1.0.0-SNAPSHOT
Not yet published. Source code only.
$ mvn clean install- Install graphviz for the executable
dotto/usr/local/bin/dot. On a Mac you can do this with homebrew from a terminal with:
brew install graphviz- Use the
testng-dependency-reporter-{version}.jaras 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>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:pngAll 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/.
Inspired by this work of Tomek Kaczanowski