This repository was archived by the owner on Feb 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
Julien Giovaresco edited this page May 21, 2013
·
2 revisions
The first step to use this doclet is to clone the project in order to build the jar. This step will be deleted when the artifact will be in the Maven Central Repository.
This doclet could be used with the Maven Javadoc plugin or directly with the commandline javadoc
## Maven
The plugin declaration is
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>install</id>
<phase>install</phase>
<goals>
<goal>test-javadoc</goal>
</goals>
</execution>
</executions>
<configuration>
<doclet>com.github.testplandoclet.HtmlTestPlanDoclet</doclet>
<docletArtifact>
<groupId>com.github</groupId>
<artifactId>testplan-doclet</artifactId>
<version>0.0.1-SNAPSHOT</version>
</docletArtifact>
<useStandardDocletOptions>false</useStandardDocletOptions>
<additionalparam>-debug -file sample_testplan.html</additionalparam>
</configuration>
</plugin>
The options to use the doclet with the javadoc commandline are
javadoc -doclet org.github.testplandoclet.HtmlTestPlanDoclet -docletpath /path/to/doclet/testplan-doclet-0.0.1-SNAPSHOT-jar-with-dependencies.jar -classpath /path/to/junit/junit-4.10.jar -debug -file target/toto.html -sourcepath src/it/java/ -subpackages fr
The options availables for the doclet are
- -application : used to the the application name in the test plan.
- -debug : used to activate the debug logging (logs are present in the file testplan-doclet.log)
- -file : used to set the file name of the test plan. This parameter is optional, if it isn't there the doclet generate a file testplan.html.
- -template : used to set the Velocity's template to use.
| Tag | Cardinality | Location | Description |
|---|---|---|---|
| @service | 1 | in the javadoc of a test class | used to define the service tested by this class |
| @service | 1 | in the javadoc of a constant in a class defining requirements | used to define the service covered by the requirement |
| @title | 1 | in the javadoc of a test method (annoted with @Test) | used to define the title of the test case |
| @requirement | * | in the javadoc of a test method (annoted with @Test) | used to define the list of requirement covered by the test case |
| @requirement | 1 | in the javadoc of a constant in a class defining requirements | used to define a requirement |
| @prerequisite | 1 | in the javadoc of a test method (annoted with @Test) | used to define the prerequisite of the test case |
| @input | 1 | in the javadoc of a test method (annoted with @Test) | used to define the input data of the test case |
| @result | 1 | in the javadoc of a test method (annoted with @Test) | used to define the expected result of the test case |