Generator accepts requests in JSON format.
Example:
{ "method":"testMethod1", "model":"KVT1-EG52-56D8-O1L7-87E1", "userData":"{ 'dataSource':'genNWise' }" }
model
This field defines model UUID (unique model number).
method
This field defines test function taken into account in generation.
It may consist of:
template
This field defines template for export. When user defines this parameter, generator returns test cases formatted with the template.
When this parameter is absent, standard generator format is used.
Templates have been described in documentation section "Export templates".
responseFormat
This field defines generator general response format.
If parameter responseFormat is not defined, the standard generator format is used.
Possible values of responseFormat are: JSON1, JSON2. These formats have been described in documentation section:
"Generator responses in JSON format".
sessionId
This field defines test session. Test sessions are used to describe chunks of data when test results are written back to ecFeed (feedback).
userData
This field will be described in details in the next section.
.
Field userData defines additional parameters used for data generation.
User data has structure similar to JSON syntax, except that double quotation mark is replaced with the single one.
Example: {'dataSource':'genNWise'}
The example above tells the generator to use for generation the N-Wise generator.
dataSource
Field data source defines where input data would come from
For data for generation or static test cases come from method and model defined in main fields.
constraints
This field defines constraints which would be taken into account during generation.
Example: 'constraints':['constraint1', 'constraint2']
There are also special values: ALL and NONE
If this field is omitted, all constraints would be taken into account.
choices
This field defines parameters and choices which would be taken into account during data generation.
If this field is not defined, all choices would be taken into account.
The value of choices tag is a map with parameter names as map keys, and arrays of choice names as map values.
Example:
'choices' : { 'param1':['choice11', 'choice12', 'choice13'], 'param2':['choice21', 'choice22', 'choice23']}
testSuites
This field defines test suites which would be taken into account when test source is static (readout of test cases generated earlier).
Example:
'dataSource':'static','testSuites':['first','second']
ambiguousTestCases
This field defines how to treat test cases which are ambiguous.
Ambiguous test cases contain randomized choices and result of their evaluation against constraint is uncertain - can be true or false.
Field can have the following values:
The default value is INCLUDE.
feedback
Field feedback defines a flag denoting whether results from execution of tests should be sent back to the generator. By default, this functionality is switched off.
label
Field label defines additional label associated with feedback.
properties
Field properties defines additional parameters.
Format of this field is a map of keys/values: { 'key1':'value1', 'key2':'value2'}
Example: 'dataSource':'genNWise', 'properties':{'n':'2', 'coverage':'90'}
.
n
Field n defines tuple size required in the NWise algorithm. The default is 2 (pairwise).
coverage
Field coverage defines the percentage of N-tuples that the generator will try to cover. The default is 100.
length
Field length defines number of tests to be generated by random generator. The default value is 1.
duplicates
Field duplicates defines behavior of random generator.
If its value is set to true, many identical tests case are allowed to be generated.
If set to 'false', the generator will stop after creating all possible combinations.
The default value is 'true'.
adaptive
Field duplicates defines behavior of random generator.
If set to true, the generator will try to provide tests that are farthest (in the means of the Hamming distance) from the ones already generated.
The default value is 'false'.
suiteSize
This field defines maximum test suite size generated by random generator.