tcases:api

Full name:

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

Description:

Runs Tcases for OpenAPI. For full details on the Tcases for OpenAPI - what it does and how it works - see Tcases for OpenAPI: From REST-ful to Test-ful.

Attributes:

  • Requires a Maven project to be executed.

Optional Parameters

Name Type Since Description
<apiDef> String - Defines a single pattern that matches the OpenAPI definition files read by Tcases for OpenAPI, relative to the directory specified by the inputDir. If omitted, the default value matches all files of the form "*.json", "*.yaml", or "*.yml".
User property is: apiDef.
<apiDefs> Set - Defines a set of patterns that match the OpenAPI definition files read by Tcases for OpenAPI. By default, Tcases for OpenAPI uses the single pattern defined by the apiDef parameter.
User property is: apiDefs.
<contentType> String - Defines the default content type for API definition files. The contentType must be one of "json" or "yaml". 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 "json".
User property is: contentType.
<html> boolean - If true, generate test cases in the form of an HTML report.
Default value is: false.
User property is: html.
<inputDir> String - Defines the path to the directory where OpenAPI definition files are located. A relative path is applied relative to the ${basedir} of the project.
Default value is: ${basedir}/src/test/tcases/openapi.
User property is: inputDir.
<inputModels> boolean - If true, generate Tcases input models for each OpenAPI definition. Otherwise, generate test case models.
Default value is: false.
User property is: inputModels.
<junit> boolean - If true, generate test cases in the form of JUnit/TestNG test methods.
Default value is: false.
User property is: junit.
<maxTries> int - Defines the maximum attempts made to resolve a request test case input value before reporting failure.
Default value is: 10000.
User property is: maxTries.
<onCondition> String - Deprecated. Replace with "onModellingCondition"
Default value is: log.
User property is: onCondition.
<onModellingCondition> String - Defines how input modelling conditions are handled. Valid values are "log", "fail", or "ignore".
Default value is: log.
User property is: onModellingCondition.
<onResolverCondition> String - Defines how request case resolver conditions are handled. Valid values are "log", "fail", or "ignore".
Default value is: log.
User property is: onResolverCondition.
<outDir> String - Defines the path to the directory where Tcases for OpenAPI output is written. A relative path is applied relative to the ${project.build.directory} of the project.
Default value is: ${project.build.directory}/tcases/openapi.
User property is: outDir.
<project> String - A short-hand form of the apiDefs parameter that makes it easier to select the OpenAPI definition for a specific project. Equivalent to setting apiDefs to ∗∗/${project}.json,∗∗/${project}.yaml,∗∗/${project}.yml.
User property is: project.
<random> Long - Defines the random number generator seed for request case resolution.
User property is: random.
<readOnlyEnforced> boolean - Defines if the API will strictly enforce the exclusion of "readOnly" properties from requests.
Default value is: false.
User property is: readOnlyEnforced.
<requestCases> boolean - Defines if resolved request test cases will be produced for API requests.
Default value is: false.
User property is: requestCases.
<source> String - Defines the source of API input definitions. Valid values are "schemas", or "examples".
Default value is: schemas.
User property is: source.
<transformDef> String - Defines the path to an XSLT transform file applied to the XML form of generated test cases. A relative path is applied relative to the directory containing the corresponding OpenAPI definition file. This path name may contain references to the certain substitution parameters. Any occurrence of "$B" (the base) will be replaced by the base name of the corresponding OpenAPI definition file. Any occurrence of "$P" (the perspective) will be replaced by "Requests" or "Responses" when generating test cases for API requests or responses, respectively.
User property is: transformDef.
<transformOutFile> String - Defines name of the output file produced when applying an XSLT transform to generated test cases - see the transformDef parameter for details. This file name may contain references to the certain substitution parameters. Any occurrence of "$B" (the base) will be replaced by the base name of the corresponding OpenAPI definition file. Any occurrence of "$P" (the perspective) will be replaced by "Requests" or "Responses" when generating test cases for API requests or responses, respectively.
User property is: transformOutFile.
<transformParams> Map - Defines values for the transform parameters used by the transform file.
User property is: transformParams.
<writeOnlyEnforced> boolean - Defines if the API will strictly enforce the exclusion of "writeOnly" properties from responses.
Default value is: false.
User property is: writeOnlyEnforced.

Parameter Details

<apiDef>

Defines a single pattern that matches the OpenAPI definition files read by Tcases for OpenAPI, relative to the directory specified by the inputDir. If omitted, the default value matches all files of the form "*.json", "*.yaml", or "*.yml".
  • Type: java.lang.String
  • Required: No
  • User Property: apiDef

<apiDefs>

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

<contentType>

Defines the default content type for API definition files. The contentType must be one of "json" or "yaml". 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 "json".
  • Type: java.lang.String
  • Required: No
  • User Property: contentType

<html>

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

<inputDir>

Defines the path to the directory where OpenAPI 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/openapi

<inputModels>

If true, generate Tcases input models for each OpenAPI definition. Otherwise, generate test case models.
  • Type: boolean
  • Required: No
  • User Property: inputModels
  • Default: false

<junit>

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

<maxTries>

Defines the maximum attempts made to resolve a request test case input value before reporting failure.
  • Type: int
  • Required: No
  • User Property: maxTries
  • Default: 10000

<onCondition>

Deprecated. Replace with "onModellingCondition"
(Obsolete) Defines how input modelling conditions are handled.
  • Type: java.lang.String
  • Required: No
  • User Property: onCondition
  • Default: log

<onModellingCondition>

Defines how input modelling conditions are handled. Valid values are "log", "fail", or "ignore".
  • Type: java.lang.String
  • Required: No
  • User Property: onModellingCondition
  • Default: log

<onResolverCondition>

Defines how request case resolver conditions are handled. Valid values are "log", "fail", or "ignore".
  • Type: java.lang.String
  • Required: No
  • User Property: onResolverCondition
  • Default: log

<outDir>

Defines the path to the directory where Tcases for OpenAPI 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/openapi

<project>

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

<random>

Defines the random number generator seed for request case resolution.
  • Type: java.lang.Long
  • Required: No
  • User Property: random

<readOnlyEnforced>

Defines if the API will strictly enforce the exclusion of "readOnly" properties from requests.
  • Type: boolean
  • Required: No
  • User Property: readOnlyEnforced
  • Default: false

<requestCases>

Defines if resolved request test cases will be produced for API requests.
  • Type: boolean
  • Required: No
  • User Property: requestCases
  • Default: false

<source>

Defines the source of API input definitions. Valid values are "schemas", or "examples".
  • Type: java.lang.String
  • Required: No
  • User Property: source
  • Default: schemas

<transformDef>

Defines the path to an XSLT transform file applied to the XML form of generated test cases. A relative path is applied relative to the directory containing the corresponding OpenAPI definition file. This path name may contain references to the certain substitution parameters. Any occurrence of "$B" (the base) will be replaced by the base name of the corresponding OpenAPI definition file. Any occurrence of "$P" (the perspective) will be replaced by "Requests" or "Responses" when generating test cases for API requests or responses, respectively.
  • Type: java.lang.String
  • Required: No
  • User Property: transformDef

<transformOutFile>

Defines name of the output file produced when applying an XSLT transform to generated test cases - see the transformDef parameter for details. This file name may contain references to the certain substitution parameters. Any occurrence of "$B" (the base) will be replaced by the base name of the corresponding OpenAPI definition file. Any occurrence of "$P" (the perspective) will be replaced by "Requests" or "Responses" when generating test cases for API requests or responses, respectively.
  • Type: java.lang.String
  • Required: No
  • User Property: transformOutFile

<transformParams>

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

<writeOnlyEnforced>

Defines if the API will strictly enforce the exclusion of "writeOnly" properties from responses.
  • Type: boolean
  • Required: No
  • User Property: writeOnlyEnforced
  • Default: false