Parser Decision
ParserBase
ParserDecision ⇐ The parser implementation to parse decision tables.
Kind: global class
Extends: ParserBase
- ParserDecision ⇐
ParserBase
- .sectionHandler
- .fieldNameSequence
- .parse(sheetName, importer) ⇒
object
- .getFieldName() ⇒
string
- .parseForTestcases(table, sheetName, importer, testCaseStartColumn, startRow) ⇒
number
- ._updateTestcaseExecute(table)
- ._updateTestcaseNeverExecute(table)
- ._getBoolean(val) ⇒
boolean
- ._updateTestcaseMultiplicity(table)
- ._getMultiplicityFromValue(val) ⇒
boolean
- .handleMultiRowSection(table, sheetName, importer, sectionName, startRow, endRow)
- .handleTagSection(table, sheetName, importer, sectionName, startRow, endRow)
- .handleFilterSection(table, sheetName, importer, sectionName, startRow, endRow)
- .handleGeneratorSwitchSection(table, sheetName, importer, sectionName, startRow, endRow)
- .handleMultiplicitySection(table, sectionName)
- .handleExecuteSection(table, sectionName)
- .handleNeverExecuteSection(table, sectionName)
- .handleSummarySection(table, sectionName)
- .handleFieldSection(table, sheetName, importer, sectionName, startRow, endRow)
- ._readTestcaseValues(table, sheetName, importer, row, rowId)
- .getNextSubSection(sheetName, importer, startRow, sectionEndRow) ⇒
object
- .getNextSection(sheetName, importer, startRow, sheetEndRow) ⇒
object
parserDecision.sectionHandler
Stores the handler for the different kind of sections.
Kind: instance property of ParserDecision
parserDecision.fieldNameSequence
This sequence is used to give each field a unique name.
Kind: instance property of ParserDecision
object
parserDecision.parse(sheetName, importer) ⇒ Parses the sheet with the given name und uses the given importer to access the data.
Kind: instance method of ParserDecision
Returns: object
- tableModel The created tablemodel
Param | Type | Description |
---|---|---|
sheetName | string | The name of the sheet |
importer | object | The importer |
string
parserDecision.getFieldName() ⇒ Creates a unique field name.
Kind: instance method of ParserDecision
Returns: string
- fieldName New generated fieldName
number
parserDecision.parseForTestcases(table, sheetName, importer, testCaseStartColumn, startRow) ⇒ Reads the first line until no testcase name found. This column is the last column which will be read. By the way create emtpy testcases and add them to the table.
Kind: instance method of ParserDecision
Returns: number
- The testcase end column
Param | Type | Description |
---|---|---|
table | object | The table object. The new model |
sheetName | string | The name of the worksheet |
importer | object | The importer |
testCaseStartColumn | number | The coumn in which the testcases starts |
startRow | number | The row in which the testcase names are defined |
parserDecision._updateTestcaseExecute(table)
After the table was loaded it must be checked if there is a 'ExecuteSection'. If so the values must be set in the testcase.execute property
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to be updated |
parserDecision._updateTestcaseNeverExecute(table)
After the table was loaded it must be checked if there is a 'ExecuteSection'. If so the values must be set in the testcase.execute property
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to be updated |
boolean
parserDecision._getBoolean(val) ⇒ Converts a string value into a boolen value
Kind: instance method of ParserDecision
Returns: boolean
- bool true is the string is a true value else false
Param | Type | Description |
---|---|---|
val | string | The value to be checked for a boolean |
parserDecision._updateTestcaseMultiplicity(table)
If this section exists the multiplicity of an testcase must be updated
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to be updated |
boolean
parserDecision._getMultiplicityFromValue(val) ⇒ Tries to convert a string into a multiplicity value
Kind: instance method of ParserDecision
Returns: boolean
- bool true is the string is a true value else false
Param | Type | Description |
---|---|---|
val | string | The value to be checked for a boolean |
parserDecision.handleMultiRowSection(table, sheetName, importer, sectionName, startRow, endRow)
Adds a new MultiRowSection to the table. Updates the data for all the testcases
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to store the current sheet data |
sheetName | string | The name of the sheet |
importer | object | The importer |
sectionName | string | The name of this section |
startRow | number | The row the section begins |
endRow | number | The row the next section begins |
parserDecision.handleTagSection(table, sheetName, importer, sectionName, startRow, endRow)
Adds a new TagSection to the table. Updates the data for all the test cases
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to store the current sheet data |
sheetName | string | The name of the sheet |
importer | object | The importer |
sectionName | string | The name of this section |
startRow | number | The row the section begins |
endRow | number | The row the next section begins |
parserDecision.handleFilterSection(table, sheetName, importer, sectionName, startRow, endRow)
Adds a new TagSection to the table. Updates the data for all the test cases
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to store the current sheet data |
sheetName | string | The name of the sheet |
importer | object | The importer |
sectionName | string | The name of this section |
startRow | number | The row the section begins |
endRow | number | The row the next section begins |
parserDecision.handleGeneratorSwitchSection(table, sheetName, importer, sectionName, startRow, endRow)
Adds a new GeneratorSwitch to the table. Updates the data for all the test cases
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to store the current sheet data |
sheetName | string | The name of the sheet |
importer | object | The importer |
sectionName | string | The name of this section |
startRow | number | The row the section begins |
endRow | number | The row the next section begins |
parserDecision.handleMultiplicitySection(table, sectionName)
Adds a new SummarySection to the table. Updates the data for all the testcases
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to store the current sheet data |
sectionName | string | The name of this section |
parserDecision.handleExecuteSection(table, sectionName)
Adds a new ExecuteSection to the table. Updates the data for all the testcases
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to store the current sheet data |
sectionName | string | The name of this section |
parserDecision.handleNeverExecuteSection(table, sectionName)
Adds a new NeverExecuteSection to the table. Updates the data for all the testcases
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to store the current sheet data |
sectionName | string | The name of this section |
parserDecision.handleSummarySection(table, sectionName)
Adds a new SummarySection to the table. Updates the data for all the testcases
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to store the current sheet data |
sectionName | string | The name of this section |
parserDecision.handleFieldSection(table, sheetName, importer, sectionName, startRow, endRow)
Adds a new FieldSection to the table. Updates the data for all the testcases
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to store the current sheet data |
sheetName | string | The name of the sheet |
importer | object | The importer |
sectionName | string | The name of this section |
startRow | number | The row the section begins |
endRow | number | The row the next section begins |
parserDecision._readTestcaseValues(table, sheetName, importer, row, rowId)
reads the data for the testcases from the spreadsheet
Kind: instance method of ParserDecision
Param | Type | Description |
---|---|---|
table | object | The table to store the current sheet data |
sheetName | string | The name of the sheet |
importer | object | The importer |
row | nuber | The row where to read the data |
rowId | string | The uuid of this row |
object
parserDecision.getNextSubSection(sheetName, importer, startRow, sectionEndRow) ⇒ Get the definition of the next sub section
Kind: instance method of ParserDecision
Returns: object
- table A definition/boundaries of this subSection { startRow, endRow, fieldName }
Param | Type | Description |
---|---|---|
sheetName | string | The name of the sheet |
importer | object | The importer |
startRow | nuber | The row where to start searching |
sectionEndRow | number | The last row in the parent section |
object
parserDecision.getNextSection(sheetName, importer, startRow, sheetEndRow) ⇒ Get the definition of the next section
Kind: instance method of ParserDecision
Returns: object
- table The created table model for the sheet
Param | Type | Description |
---|---|---|
sheetName | string | The name of the sheet |
importer | object | The importer |
startRow | nuber | The row where to start searching |
sheetEndRow | number | The last row in this sheet |