tcases:tcases

Full name:

org.cornutum.tcases:tcases-maven-plugin:4.0.5:tcases

Description:

Runs Tcases to generate test cases from one or more system input definition documents. For full details on Tcases - what it does and how it works - see Tcases: The Complete Guide at www.cornutum.org.

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: generate-test-resources.

Optional Parameters

Name Type Since Description
<contentType> String - Defines the default content type for files that are read and produced. The contentType must be one of "json" or "xml". The default content type is assumed for any file that is not specified explicitly or that does not have a recognized extension. If omitted, the default content type is derived from the input definition file name.
User property is: contentType.
<defaultTupleSize> Integer - If defined, use the given default tuple size for all generators. This updates the generator definitions specified by the genDef parameter.
User property is: defaultTupleSize.
<genDef> String - Defines the name for the generator definition file read by Tcases for an input definition file. This file name may contain at most one "*" wildcard character, in which case the "*" is replaced by the project name of the corresponding input definition file - see the inputDef parameter for details. The default value is "*-Generators.xml" or "*-Generators.json" (depending on the contentType).
User property is: genDef.
<html> boolean - If true, generate test cases in the form of an HTML report.
Default value is: false.
User property is: html.
<inputDef> String - Defines a single pattern that matches the system input definition files read by Tcases, relative to the directory specified by the inputDir. If omitted, the default value matches all files of the form "*-Input.xml" or "*-Input.json". An input definition file defines a project name that is used to form the default names for other associated files. For an input definition file of the form "${prefix}-Input.xml", the project name is "${prefix}". Otherwise, the project name is the basename of the input definition file.
User property is: inputDef.
<inputDefs> Set - Defines a set of patterns that match the system input definition files read by Tcases. By default, Tcases uses the single pattern defined by the inputDef parameter.
User property is: inputDefs.
<inputDir> String - Defines the path to the directory where system input definition files are located. A relative path is applied relative to the ${basedir} of the project.
Default value is: ${basedir}/src/test/tcases.
User property is: inputDir.
<junit> boolean - If true, generate test cases in the form of JUnit/TestNG test methods.
Default value is: false.
User property is: junit.
<newSeed> boolean - If true, choose a new random number for all generators. This updates the generator definitions specified by the genDef parameter.
Default value is: false.
User property is: newSeed.
<newTests> boolean - If true, ignore any initial test definitions. Otherwise, generate new test definitions that extend the initial test definitions found in the file defined by the testDef parameter.
Default value is: false.
User property is: newTests.
<outDir> String - Defines the path to the directory where Tcases output is written. A relative path is applied relative to the ${project.build.directory} of the project.
Default value is: ${project.build.directory}/tcases.
User property is: outDir.
<outFile> String - Defines the name for the output file generated by Tcases from an input definition file. This file name may contain at most one "*" wildcard character, in which case the "*" is replaced by the project name of the corresponding input definition file - see the inputDef parameter for details. The default value is "*-Test.xml" or "*-Test.json" (depending on the contentType) or, if the junit parameter is true, "*Test.java".
User property is: outFile.
<project> String - A short-hand form of the inputDefs parameter that makes it easier to select the system input definition for a specific project. Equivalent to setting inputDefs to ∗∗/${project}-Input.xml,∗∗/${project}.xml,∗∗/${project}-Input.json,∗∗/${project}.json.
User property is: project.
<seed> Long - If defined, use the given random number for all generators. This updates the generator definitions specified by the genDef parameter.
User property is: seed.
<showEffectiveInput> boolean - If true, no test definitions are produced. Instead, a JSON document containing the effective system input definition is written to the outDir. The effective system input definition, which is used to generate test definitions, is the result of normalizing all input schemas and adding any schema-derived value definitions.
Default value is: false.
User property is: showEffectiveInput.
<testDef> String - Defines the name for the initial test case definition files read by Tcases for an input definition file. This file name may contain at most one "*" wildcard character, in which case the "*" is replaced by the project name of the corresponding input definition file - see the inputDef parameter for details. The default value is "*-Test.xml" or "*-Test.json" (depending on the contentType).
User property is: testDef.
<transformDef> String - Defines the path to the transform file applied by Tcases to the output for an input definition file. A relative path is applied relative to the directory containing the corresponding input definition file. This path name may contain at most one "*" wildcard character, in which case the "*" is replaced by the project name of the corresponding input definition file - see the inputDef parameter for details.
User property is: transformDef.
<transformParams> Map - Defines values for the transform parameters used by the transform file.
User property is: transformParams.

Parameter Details

<contentType>

Defines the default content type for files that are read and produced. The contentType must be one of "json" or "xml". The default content type is assumed for any file that is not specified explicitly or that does not have a recognized extension. If omitted, the default content type is derived from the input definition file name.
  • Type: java.lang.String
  • Required: No
  • User Property: contentType

<defaultTupleSize>

If defined, use the given default tuple size for all generators. This updates the generator definitions specified by the genDef parameter.
  • Type: java.lang.Integer
  • Required: No
  • User Property: defaultTupleSize

<genDef>

Defines the name for the generator definition file read by Tcases for an input definition file. This file name may contain at most one "*" wildcard character, in which case the "*" is replaced by the project name of the corresponding input definition file - see the inputDef parameter for details. The default value is "*-Generators.xml" or "*-Generators.json" (depending on the contentType).
  • Type: java.lang.String
  • Required: No
  • User Property: genDef

<html>

If true, generate test cases in the form of an HTML report.
  • Type: boolean
  • Required: No
  • User Property: html
  • Default: false

<inputDef>

Defines a single pattern that matches the system input definition files read by Tcases, relative to the directory specified by the inputDir. If omitted, the default value matches all files of the form "*-Input.xml" or "*-Input.json". An input definition file defines a project name that is used to form the default names for other associated files. For an input definition file of the form "${prefix}-Input.xml", the project name is "${prefix}". Otherwise, the project name is the basename of the input definition file.
  • Type: java.lang.String
  • Required: No
  • User Property: inputDef

<inputDefs>

Defines a set of patterns that match the system input definition files read by Tcases. By default, Tcases uses the single pattern defined by the inputDef parameter.
  • Type: java.util.Set
  • Required: No
  • User Property: inputDefs

<inputDir>

Defines the path to the directory where system input definition files are located. A relative path is applied relative to the ${basedir} of the project.
  • Type: java.lang.String
  • Required: No
  • User Property: inputDir
  • Default: ${basedir}/src/test/tcases

<junit>

If true, generate test cases in the form of JUnit/TestNG test methods.
  • Type: boolean
  • Required: No
  • User Property: junit
  • Default: false

<newSeed>

If true, choose a new random number for all generators. This updates the generator definitions specified by the genDef parameter.
  • Type: boolean
  • Required: No
  • User Property: newSeed
  • Default: false

<newTests>

If true, ignore any initial test definitions. Otherwise, generate new test definitions that extend the initial test definitions found in the file defined by the testDef parameter.
  • Type: boolean
  • Required: No
  • User Property: newTests
  • Default: false

<outDir>

Defines the path to the directory where Tcases output is written. A relative path is applied relative to the ${project.build.directory} of the project.
  • Type: java.lang.String
  • Required: No
  • User Property: outDir
  • Default: ${project.build.directory}/tcases

<outFile>

Defines the name for the output file generated by Tcases from an input definition file. This file name may contain at most one "*" wildcard character, in which case the "*" is replaced by the project name of the corresponding input definition file - see the inputDef parameter for details. The default value is "*-Test.xml" or "*-Test.json" (depending on the contentType) or, if the junit parameter is true, "*Test.java".
  • Type: java.lang.String
  • Required: No
  • User Property: outFile

<project>

A short-hand form of the inputDefs parameter that makes it easier to select the system input definition for a specific project. Equivalent to setting inputDefs to ∗∗/${project}-Input.xml,∗∗/${project}.xml,∗∗/${project}-Input.json,∗∗/${project}.json.
  • Type: java.lang.String
  • Required: No
  • User Property: project

<seed>

If defined, use the given random number for all generators. This updates the generator definitions specified by the genDef parameter.
  • Type: java.lang.Long
  • Required: No
  • User Property: seed

<showEffectiveInput>

If true, no test definitions are produced. Instead, a JSON document containing the effective system input definition is written to the outDir. The effective system input definition, which is used to generate test definitions, is the result of normalizing all input schemas and adding any schema-derived value definitions.
  • Type: boolean
  • Required: No
  • User Property: showEffectiveInput
  • Default: false

<testDef>

Defines the name for the initial test case definition files read by Tcases for an input definition file. This file name may contain at most one "*" wildcard character, in which case the "*" is replaced by the project name of the corresponding input definition file - see the inputDef parameter for details. The default value is "*-Test.xml" or "*-Test.json" (depending on the contentType).
  • Type: java.lang.String
  • Required: No
  • User Property: testDef

<transformDef>

Defines the path to the transform file applied by Tcases to the output for an input definition file. A relative path is applied relative to the directory containing the corresponding input definition file. This path name may contain at most one "*" wildcard character, in which case the "*" is replaced by the project name of the corresponding input definition file - see the inputDef parameter for details.
  • Type: java.lang.String
  • Required: No
  • User Property: transformDef

<transformParams>

Defines values for the transform parameters used by the transform file.
  • Type: java.util.Map
  • Required: No
  • User Property: transformParams