net.sf.jsequnit.diagram
Class DiagramCreator
java.lang.Object
net.sf.jsequnit.diagram.DiagramCreator
public class DiagramCreator
- extends Object
Generates sequence diagrams based on tracing of test executions.
It uses TestMethodRunnerFactory
to generate a VirtualMachine
.
The method calls in this VM are traced similar to a debugger.
- Author:
- jacek.ratzinger
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DiagramCreator
public DiagramCreator()
createSequenceDiagram
public void createSequenceDiagram(String qualifiedTestMethod,
String qualifiedTraceMethod,
List<String> includes,
List<String> excludes,
List<String> boundaryMethods,
boolean isPublicOnly,
String testExecutionClasspath,
String outputFileName)
throws NoSuchMethodException,
IOException
- Creates a sequenced diagram based on the trace of the executed test method.
The following sequence diagram shows how this method works.
- Parameters:
qualifiedTestMethod
- The fully qualified name of the test method that should be executed.qualifiedTraceMethod
- The fully qualified name of the method, where the tracing should start.
This is the first method to appear / is called in the resulting sequence diagram.includes
- A list of packages, classes, and/or methods that should be included in the sequence diagram.
This is a simplified regular expression
that must either be an exact match or end with an asterix (*).
For example foo.Foo or baa.*.
Multiple exclude patterns are separated by a comma (,).excludes
- A list of packages, classes, and/or methods that should be excluded from the sequence diagram.
This is a simplified regular expression
that must either be an exact match or end with an asterix (*).
For example foo.Foo or baa.*.
Multiple exclude patterns are separated by a comma (,).boundaryMethods
- A list of methods where tracing should stop.
In contrast to the exclude parameter,
where method calls are excluded,
but subsequent calls of the excluded methods still appear in the sequence diagram,
the boundary methods are included in the resulting diagram,
but all its sub calls are omitted.isPublicOnly
- If true only public methods are included in the resulting sequence diagram.outputFileName
- The full path to the image file for the sequence diagram.outputFileName2
-
- Throws:
NoSuchMethodException
- if the JVM cannot find one of the given methods.
IOException
- if an error occurs while writing the image file.
- Sequence Diagram:

Copyright © 2011. All Rights Reserved.