Testcase Definition Decision
TestcaseDefinitionDecision ⇐ TestcaseDefinitionInterface
A test case is one column in the test case part. This is the implementation for the decision table.
Kind: global class
Extends: TestcaseDefinitionInterface
- TestcaseDefinitionDecision ⇐
TestcaseDefinitionInterface- .isPartOfCompletion
- .data
- .execute
- .name
- .clone() ⇒
object - .createTags() ⇒
array - .createFilter() ⇒
array - .createGeneratorSwitches() ⇒
array - ._isTrue(val) ⇒
boolean - .createTodos() ⇒
object - ._getGeneratorCommandForSubSection(subSection) ⇒
string - ._createGeneratorTodo(subSection, generatorCmd, key) ⇒
object - ._createReferenceTodo(subSection, generatorCmd, key)
- ._createStaticValueTodo(subSection, generatorCmd, key) ⇒
object - ._createMultirowSectionTodo(section) ⇒
array - .calculate(sectionRowId, rowIds) ⇒
number - .setValue(rowId, value)
- .getValue(rowId) ⇒
string - .validate(section) ⇒
array
testcaseDefinitionDecision.isPartOfCompletion
Defines if this testcase is included into the completness computation
Kind: instance property of TestcaseDefinitionDecision
testcaseDefinitionDecision.data
The data of this test case
Kind: instance property of TestcaseDefinitionDecision
testcaseDefinitionDecision.execute
Should this test case be executed or is it only for a reference
Kind: instance property of TestcaseDefinitionDecision
testcaseDefinitionDecision.name
The name of this testcase. With this name the testcase could be found in the table
Kind: instance property of TestcaseDefinitionDecision
testcaseDefinitionDecision.clone() ⇒ object
Clone the current testcase definition.
Kind: instance method of TestcaseDefinitionDecision
Returns: object - A clone of this test case definition.
testcaseDefinitionDecision.createTags() ⇒ array
Returns all the tags found in this test case
Kind: instance method of TestcaseDefinitionDecision
Returns: array - tags An Array with all the found tags
testcaseDefinitionDecision.createFilter() ⇒ array
Returns all the filter found in this test case
Kind: instance method of TestcaseDefinitionDecision
Returns: array - filter An Array with all the found filter
testcaseDefinitionDecision.createGeneratorSwitches() ⇒ array
Returns a list of generator names which should not be executed
Kind: instance method of TestcaseDefinitionDecision
Returns: array - generatorNames An Array with alle the generator names to be switched off for this test case
testcaseDefinitionDecision._isTrue(val) ⇒ boolean
Checks if the given string contains a valid true value
Kind: instance method of TestcaseDefinitionDecision
Returns: boolean - res TRUE if the value is a valid boolean true value.
| Param | Type | Description |
|---|---|---|
| val | string | The expression to check |
testcaseDefinitionDecision.createTodos() ⇒ object
Create all the todos for this testcase definition const todos = { generators :[genTodo,], references: [refTodo,], static: [staticData], }
Kind: instance method of TestcaseDefinitionDecision
Returns: object - todos An object with all the todos by there type
testcaseDefinitionDecision._getGeneratorCommandForSubSection(subSection) ⇒ string
Gets the generator command for a FieldSubSection
Kind: instance method of TestcaseDefinitionDecision
Returns: string - generatorCmd The generator command from the sub section
| Param | Type | Description |
|---|---|---|
| subSection | object | The FieldSubSection |
testcaseDefinitionDecision._createGeneratorTodo(subSection, generatorCmd, key) ⇒ object
Creates the generator todo
Kind: instance method of TestcaseDefinitionDecision
Returns: object - todo A generator Todo
| Param | Type | Description |
|---|---|---|
| subSection | object | The current FieldSubSection |
| generatorCmd | string | The generator command |
| key | string | The key of the value in the subSection |
testcaseDefinitionDecision._createReferenceTodo(subSection, generatorCmd, key)
Creates a reference todo
Kind: instance method of TestcaseDefinitionDecision
| Param | Type | Description |
|---|---|---|
| subSection | object | The current FieldSubSection |
| generatorCmd | string | The reference command |
| key | string | The key of the value in the subSection |
testcaseDefinitionDecision._createStaticValueTodo(subSection, generatorCmd, key) ⇒ object
Creates the todo for static values
Kind: instance method of TestcaseDefinitionDecision
Returns: object - todo A static Todo
| Param | Type | Description |
|---|---|---|
| subSection | object | The current FieldSubSection |
| generatorCmd | string | The generator command |
| key | string | The key of the value in the subSection |
testcaseDefinitionDecision._createMultirowSectionTodo(section) ⇒ array
Create a meta todo
Kind: instance method of TestcaseDefinitionDecision
Returns: array - todos Aa array of meta Todos
| Param | Type | Description |
|---|---|---|
| section | object | The current multiRowSection |
testcaseDefinitionDecision.calculate(sectionRowId, rowIds) ⇒ number
Claculates how many entries per section are defined
Kind: instance method of TestcaseDefinitionDecision
Returns: number - count The number of entries
| Param | Type | Description |
|---|---|---|
| sectionRowId | string | The id of the section containing these rows |
| rowIds | array | All the arrays of this section |
testcaseDefinitionDecision.setValue(rowId, value)
Set a value for a row in this testcase
Kind: instance method of TestcaseDefinitionDecision
| Param | Type | Description |
|---|---|---|
| rowId | string | The rowId for this value |
| value | string | The value to be set |
testcaseDefinitionDecision.getValue(rowId) ⇒ string
Set a value for a row in this testcase
Kind: instance method of TestcaseDefinitionDecision
Returns: string - value The value of this row id
| Param | Type | Description |
|---|---|---|
| rowId | string | The rowId for this value |
testcaseDefinitionDecision.validate(section) ⇒ array
Validates this section definition.
- A testcase must have a name
- A fieldSection must have at least one subSection
- If mandatory = true for a section, it must have at least one entry
- if multiple = false it must have only one entry per section
Kind: instance method of TestcaseDefinitionDecision
Returns: array - issues An array of issues found
| Param | Type | Description |
|---|---|---|
| section | object | The section to be validated |