Table Decision
TableInterface
TableDecision ⇐ The table implementation for a decision table.
Kind: global class
Extends: TableInterface
- TableDecision ⇐
TableInterface
- .testcaseOrder
- .testcases
- .sections
- .sectionOrder
- .singleCheck
- .sectionNames
- .tableType ⇒
string
- .getTestcaseForName(testcaseName) ⇒
object
- .getTestcasesForExecution()
- .processRanges(testcaseName) ⇒
array
- .calculate()
- .validate()
- ._validateSection(section, issues)
- ._validateTestcase(section, issues)
- ._buildSectionRows(section)
- ._addNewSection(sectionDefinition, position)
- .addNewTestcase(name, position) ⇒
object
- .addNewFieldSection(name, position) ⇒
object
- .addNewMultiRowSection(name, position) ⇒
object
- .addNewTagSection(name, position) ⇒
object
- .addNewFilterSection(name, position) ⇒
object
- .addNewGeneratorSwitchSection(name, position) ⇒
object
- .addNewSummarySection(name, position) ⇒
object
- .addNewExecuteSection(name, position) ⇒
object
- .addNewNeverExecuteSection(name, position) ⇒
object
- .addNewMultiplicitySection(name, position) ⇒
object
- ._checkParameterAddSection(position)
tableDecision.testcaseOrder
The order of test cases. A list of test case ids
Kind: instance property of TableDecision
tableDecision.testcases
Stores the testcases by there id
Kind: instance property of TableDecision
tableDecision.sections
The section definitions stored by there id
Kind: instance property of TableDecision
tableDecision.sectionOrder
The order of the sections. A list of section ids
Kind: instance property of TableDecision
tableDecision.singleCheck
This map is used to verify if sections which must only exists once are used more often. The map stores the sections by there sectionType.
Kind: instance property of TableDecision
tableDecision.sectionNames
Stores all the section names per type. This is
only to make sure that a section name is not used twice per table.
The value is ${sectionType}-${sectionName}
Per type the name must be unique
Kind: instance property of TableDecision
string
tableDecision.tableType ⇒ Stores the type of the table
Kind: instance property of TableDecision
Returns: string
- The type of this table.
object
tableDecision.getTestcaseForName(testcaseName) ⇒ Returns the testcase for the given name. If not found it will throw an exception
Kind: instance method of TableDecision
Returns: object
- testcaseDefinition returns the testcase definition
Param | Type | Description |
---|---|---|
testcaseName | string | The name of the testcase |
tableDecision.getTestcasesForExecution()
This generator returns all the testcases which should be executed
Kind: instance method of TableDecision
array
tableDecision.processRanges(testcaseName) ⇒ Parses a testcase name given in a reference. If the name is a range it will return an Array of names. For example the name 'tc12-14' will be expended to: tc12, tc13, tc14
Kind: instance method of TableDecision
Returns: array
- tcNames An array of test case names
Param | Type | Description |
---|---|---|
testcaseName | string | The reference test case name |
tableDecision.calculate()
Calculates the summary for each section. The results will be added to the section rows and to the summary section
Kind: instance method of TableDecision
tableDecision.validate()
Validates the model. Only field sections are validated. All the validation issues will be returned. The issue has the following format:
- A table must have one and only one summary section
- A table must have at least one field section
- The names of the fields must be unique per table
- A table must have at least one testcase
Kind: instance method of TableDecision
tableDecision._validateSection(section, issues)
Validates a given section and stores the issues in the given array
Kind: instance method of TableDecision
Param | Type | Description |
---|---|---|
section | object | The section to validate |
issues | array | The array to store the found issues |
tableDecision._validateTestcase(section, issues)
Validates a given testcase for the given section
Kind: instance method of TableDecision
Param | Type | Description |
---|---|---|
section | object | The section to validate |
issues | array | The array to store the found issues |
tableDecision._buildSectionRows(section)
Build an internal mapping for rowIds to the objects
Kind: instance method of TableDecision
Param | Type | Description |
---|---|---|
section | object | The section to get the rowIDs from |
tableDecision._addNewSection(sectionDefinition, position)
Adds a generic section and definition to the model
Kind: instance method of TableDecision
Param | Type | Description |
---|---|---|
sectionDefinition | object | The sectionDefinition to be added |
position | integer | The position where to add the section |
object
tableDecision.addNewTestcase(name, position) ⇒ Adds a new testcase to the table. If there are already existing sections these will be added to the testcase
Kind: instance method of TableDecision
Returns: object
- testcase The created testcase
Param | Type | Description |
---|---|---|
name | string | The name of the new testcase |
position | integer | (optional) The position where to add the new testcase. |
object
tableDecision.addNewFieldSection(name, position) ⇒ Adds a new FieldSection to the model. For each existing testcase a section will be added.
Kind: instance method of TableDecision
Returns: object
- sectionDefinition The created section definition
Param | Type | Description |
---|---|---|
name | string | The name for the new section. The name must not be used before |
position | integer | (optional) The position where to add the new section. |
object
tableDecision.addNewMultiRowSection(name, position) ⇒ Adds a new MultiRowSection to the model. For each existing testcase a section will be added.
Kind: instance method of TableDecision
Returns: object
- sectionDefinition The created section definition
Param | Type | Description |
---|---|---|
name | string | The name for the new section. The name must not be used before |
position | integer | (optional) The position where to add the new section. |
object
tableDecision.addNewTagSection(name, position) ⇒ Adds a new MultiRowSection to the model. For each existing testcase a section will be added.
Kind: instance method of TableDecision
Returns: object
- sectionDefinition The created section definition
Param | Type | Description |
---|---|---|
name | string | The name for the new section. The name must not be used before |
position | integer | (optional) The position where to add the new section. |
object
tableDecision.addNewFilterSection(name, position) ⇒ Adds a new MultiRowSection to the model. For each existing testcase a section will be added.
Kind: instance method of TableDecision
Returns: object
- sectionDefinition The created section definition
Param | Type | Description |
---|---|---|
name | string | The name for the new section. The name must not be used before |
position | integer | (optional) The position where to add the new section. |
object
tableDecision.addNewGeneratorSwitchSection(name, position) ⇒ Adds a new GeneratorSectionDefinition to the model. For each existing testcase a section will be added.
Kind: instance method of TableDecision
Returns: object
- sectionDefinition The created section definition
Param | Type | Description |
---|---|---|
name | string | The name for the new section. The name must not be used before |
position | integer | (optional) The position where to add the new section. |
object
tableDecision.addNewSummarySection(name, position) ⇒ Adds a new SummarySection to the model. Testcases needs not be updated
Kind: instance method of TableDecision
Returns: object
- sectionDefinition The created section definition
Param | Type | Description |
---|---|---|
name | string | The name for the new section. The name must not be used before |
position | integer | (optional) The position where to add the new section. |
object
tableDecision.addNewExecuteSection(name, position) ⇒ Adds a new ExecuteSection to the model. Testcases needs not be updated
Kind: instance method of TableDecision
Returns: object
- sectionDefinition The created section definition
Param | Type | Description |
---|---|---|
name | string | The name for the new section. The name must not be used before |
position | integer | (optional) The position where to add the new section. |
object
tableDecision.addNewNeverExecuteSection(name, position) ⇒ Adds a new ExecuteSection to the model. Testcases needs not be updated
Kind: instance method of TableDecision
Returns: object
- sectionDefinition The created section definition
Param | Type | Description |
---|---|---|
name | string | The name for the new section. The name must not be used before |
position | integer | (optional) The position where to add the new section. |
object
tableDecision.addNewMultiplicitySection(name, position) ⇒ Adds a new MultiplicitySection to the model. Testcases needs not be updated
Kind: instance method of TableDecision
Returns: object
- sectionDefinition The created section definition
Param | Type | Description |
---|---|---|
name | string | The name for the new section. The name must not be used before |
position | integer | (optional) The position where to add the new section. |
tableDecision._checkParameterAddSection(position)
validates the parameter for adding a new section
Kind: instance method of TableDecision
Param | Type | Description |
---|---|---|
position | integer | (optional) The position where to add the new section. |