Skip to content

Commit e9dc840

Browse files
tcases-maven-plugin: Add "Using JSON" to doc site
1 parent c6aa61f commit e9dc840

2 files changed

Lines changed: 19 additions & 9 deletions

File tree

tcases-maven-plugin/src/site/apt/usage.apt

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ Usage
1212

1313
Each project defines the input space model and coverage model for a specific system-under-test.
1414
The {{{./tcases-mojo.html}tcases:tcases}} goal refers to all of the input files for a project named
15-
<<$\{projectName\}>> using the following default conventions.
15+
<<$\{projectName\}>> using the following default conventions. The file <<$\{type\}>> extension can be
16+
either "xml" or {{{http://www.cornutum.org/tcases/docs/Tcases-Json.htm#intro} "json"}}.
1617

17-
* <<$\{projectName\}-Input.xml>>: the {{{http://www.cornutum.org/tcases/docs/Tcases-Guide.htm#functions} system input definition}} file
18+
* <<$\{projectName\}-Input.$\{type\}>>: the {{{http://www.cornutum.org/tcases/docs/Tcases-Guide.htm#functions} system input definition}} file
1819

19-
* <<$\{projectName\}-Generators.xml>>: the {{{http://www.cornutum.org/tcases/docs/Tcases-Guide.htm#higherCoverage} generator definition}} file (optional)
20+
* <<$\{projectName\}-Generators.$\{type\}>>: the {{{http://www.cornutum.org/tcases/docs/Tcases-Guide.htm#higherCoverage} generator definition}} file (optional)
2021

21-
* <<$\{projectName\}-Test.xml>>: the {{{Extending_Previous_Test_Cases_Or_Not} base test case definition}} file (optional)
22+
* <<$\{projectName\}-Test.$\{type\}>>: the {{{Extending_Previous_Test_Cases_Or_Not} base test case definition}} file (optional)
2223

2324
[]
2425

@@ -27,16 +28,24 @@ Usage
2728

2829
When {{{./tcases-mojo.html}tcases:tcases}} runs, it executes each project by reading its input
2930
files and generating test cases for the system-under-test in the <<outDir>> specified by the plugin configuration. By default,
30-
the <<outDir>> is assumed to be <<$\{project.build.directory\}/tcases>>. By default, the generated test definition file is named
31-
<<$\{projectName\}-Test.xml>>.
31+
the <<outDir>> is assumed to be <<$\{project.build.directory\}/tcases>>. By default, the name of the generated test definition file is either
32+
<<$\{projectName\}-Test.xml>> or <<$\{projectName\}-Test.json>>, depending on the
33+
{{{./tcases-mojo.html#contentType}content type configuration}}.
3234

3335

36+
* {Using JSON}
37+
38+
Tcases can read and write documents using either XML or JSON data formats. Because XML is the original default format used by
39+
Tcases, all of the examples in this guide assume you are using XML. But everything described here can also be done using JSON
40+
files instead. To learn how, see {{{http://www.cornutum.org/tcases/docs/Tcases-Json.htm}Tcases: The JSON Guide}}.
41+
42+
3443
* {Generating Test Cases}
3544

3645
Let's assume you are using the default Tcases configuration. Suppose you have a Tcases project
3746
defined by a system input definition file named
3847
<<<$\{basedir\}/src/test/tcases/org/cornutum/tcases/find-Input.xml>>> that looks like
39-
{{{http://www.cornutum.org/tcases/docs/examples/find-Input.xml}this}}.
48+
{{{http://www.cornutum.org/tcases/docs/examples/xml/find-Input.xml}this}}.
4049

4150
What happens when you run the following command?
4251

@@ -82,7 +91,7 @@ mvn tcases:tcases
8291

8392
Suppose you have a Tcases project defined by a system input definition file named
8493
<<<$\{basedir\}/src/test/tcases/org/cornutum/tcases/find-Input.xml>>> that looks like
85-
{{{http://www.cornutum.org/tcases/docs/examples/find-Input.xml}this}}.
94+
{{{http://www.cornutum.org/tcases/docs/examples/xml/find-Input.xml}this}}.
8695

8796
What happens when you run the following command?
8897

@@ -99,7 +108,7 @@ mvn tcases:tcases -Dhtml=true
99108

100109
Suppose you have a Tcases project defined by a system input definition file named
101110
<<<$\{basedir\}/src/test/tcases/org/cornutum/tcases/find-Input.xml>>> that looks like
102-
{{{http://www.cornutum.org/tcases/docs/examples/find-Input.xml}this}}.
111+
{{{http://www.cornutum.org/tcases/docs/examples/xml/find-Input.xml}this}}.
103112

104113
What happens when you run the following command?
105114

tcases-maven-plugin/src/site/site.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
</menu>
1616

1717
<menu name="Examples">
18+
<item name="Using JSON" href="usage.html#Using_JSON"/>
1819
<item name="Generating Test Cases" href="usage.html#Generating_Test_Cases"/>
1920
<item name="Generating An HTML Report" href="usage.html#Generating_An_HTML_Report"/>
2021
<item name="Generating JUnit Tests" href="usage.html#Generating_JUnitTestNG_Tests"/>

0 commit comments

Comments
 (0)