Testcase Definition Decision
TestcaseDefinitionInterface
TestcaseDefinitionDecision ⇐ 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
object
testcaseDefinitionDecision.clone() ⇒ Clone the current testcase definition.
Kind: instance method of TestcaseDefinitionDecision
Returns: object
- A clone of this test case definition.
array
testcaseDefinitionDecision.createTags() ⇒ Returns all the tags found in this test case
Kind: instance method of TestcaseDefinitionDecision
Returns: array
- tags An Array with all the found tags
array
testcaseDefinitionDecision.createFilter() ⇒ Returns all the filter found in this test case
Kind: instance method of TestcaseDefinitionDecision
Returns: array
- filter An Array with all the found filter
array
testcaseDefinitionDecision.createGeneratorSwitches() ⇒ 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
boolean
testcaseDefinitionDecision._isTrue(val) ⇒ 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 |
object
testcaseDefinitionDecision.createTodos() ⇒ 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
string
testcaseDefinitionDecision._getGeneratorCommandForSubSection(subSection) ⇒ 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 |
object
testcaseDefinitionDecision._createGeneratorTodo(subSection, generatorCmd, key) ⇒ 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 |
object
testcaseDefinitionDecision._createStaticValueTodo(subSection, generatorCmd, key) ⇒ 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 |
array
testcaseDefinitionDecision._createMultirowSectionTodo(section) ⇒ 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 |
number
testcaseDefinitionDecision.calculate(sectionRowId, rowIds) ⇒ 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 |
string
testcaseDefinitionDecision.getValue(rowId) ⇒ 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 |
array
testcaseDefinitionDecision.validate(section) ⇒ 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 |