Understanding Java Component Testing UML Sequence Diagrams

Component Testing for Java

During the execution of the test, Component Testing for Java generates trace data this is used by the UML/SD Viewer. The sequence diagram uses standard UML notation to represent JUnit test results.

When using Runtime Tracing with Component Testing for Java, all results are generated in the same sequence diagram.

The following example illustrates typical results generated by a JUnit test script:

 

 

Instances

Each of the following classes are represented as a distinct object instance:

You can click an instance to highlight the corresponding statement in the Text Editor window.

Checks

JUnit assert and verify primitives are displayed as Passed ("") or Failed ("") glyphs attached to the instances.

You can click any of these glyphs to highlight the corresponding statement in the Text Editor window.

Exceptions

Component Testing for Java generates UNEXPECTED EXCEPTION Notes whenever an unexpected exception is encountered.

Comments

Calls to verifyLogMessage generate a white note, attached to the corresponding instance.

Messages

Messages can represent either a run or a call statement as shown below:

Related Topics

UML Sequence DiagramsUnderstanding Java Test ReportsOpening a ReportAbout the UML/SD Viewer