Nanook

Nanook

  • Docs
  • API
  • GitHub

›File Processor

Logger

  • Logger Interface
  • Logger Memory

Model

  • Table Interface
  • Testcase Definition Interface
  • Todo Meta
  • Todo Static
  • Todo Generator
  • Todo Reference

Model Decision

  • Base Section Definition
  • Base Single Row Section Definition
  • Execute Section Definition
  • Never Execute Section Definition
  • Multiplicity Section Definition
  • Summary Section Definition
  • Field Section Definition
  • Field Sub Section Definition
  • Multi Row Section Definition
  • Tag Section Definition
  • Filter Section Definition
  • Generator Switch Section Definition
  • Testcase Definition Decision
  • Table Decision
  • Section Types
  • Validate Double
  • Validate Helper
  • Validate Missing

Model Matrix

  • Testcase Definition Matrix
  • Table Matrix

Importer xlsx

  • Importer xlsx

File Processor

  • Importer Interface
  • Parser Interface
  • Interface Filter
  • Simple Array Filter
  • Simple Array Ignore Filter
  • Parser Constants
  • Parser Decision Constants
  • Parser Decision
  • Parser Matrix Constants
  • Parser Matrix
  • Parser Specification Constants
  • Parser Specification
  • Parser Specification Converter

Data Generator

  • Data Generator Interface
  • Data Generator Base
  • Service Registry
  • Generator Faker

Processor

  • Interface Processor
  • Interface Writer
  • Node
  • Reference
  • Testcase Data
  • Processor
  • writeMetaData
  • writeStaticData
  • utilCartesian

Parser Decision

ParserDecision ⇐ ParserBase

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

parserDecision.parse(sheetName, importer) ⇒ object

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

ParamTypeDescription
sheetNamestringThe name of the sheet
importerobjectThe importer

parserDecision.getFieldName() ⇒ string

Creates a unique field name.

Kind: instance method of ParserDecision
Returns: string - fieldName New generated fieldName

parserDecision.parseForTestcases(table, sheetName, importer, testCaseStartColumn, startRow) ⇒ number

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

ParamTypeDescription
tableobjectThe table object. The new model
sheetNamestringThe name of the worksheet
importerobjectThe importer
testCaseStartColumnnumberThe coumn in which the testcases starts
startRownumberThe 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

ParamTypeDescription
tableobjectThe 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

ParamTypeDescription
tableobjectThe table to be updated

parserDecision._getBoolean(val) ⇒ boolean

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

ParamTypeDescription
valstringThe 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

ParamTypeDescription
tableobjectThe table to be updated

parserDecision._getMultiplicityFromValue(val) ⇒ boolean

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

ParamTypeDescription
valstringThe 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

ParamTypeDescription
tableobjectThe table to store the current sheet data
sheetNamestringThe name of the sheet
importerobjectThe importer
sectionNamestringThe name of this section
startRownumberThe row the section begins
endRownumberThe 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

ParamTypeDescription
tableobjectThe table to store the current sheet data
sheetNamestringThe name of the sheet
importerobjectThe importer
sectionNamestringThe name of this section
startRownumberThe row the section begins
endRownumberThe 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

ParamTypeDescription
tableobjectThe table to store the current sheet data
sheetNamestringThe name of the sheet
importerobjectThe importer
sectionNamestringThe name of this section
startRownumberThe row the section begins
endRownumberThe 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

ParamTypeDescription
tableobjectThe table to store the current sheet data
sheetNamestringThe name of the sheet
importerobjectThe importer
sectionNamestringThe name of this section
startRownumberThe row the section begins
endRownumberThe 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

ParamTypeDescription
tableobjectThe table to store the current sheet data
sectionNamestringThe 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

ParamTypeDescription
tableobjectThe table to store the current sheet data
sectionNamestringThe 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

ParamTypeDescription
tableobjectThe table to store the current sheet data
sectionNamestringThe 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

ParamTypeDescription
tableobjectThe table to store the current sheet data
sectionNamestringThe 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

ParamTypeDescription
tableobjectThe table to store the current sheet data
sheetNamestringThe name of the sheet
importerobjectThe importer
sectionNamestringThe name of this section
startRownumberThe row the section begins
endRownumberThe 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

ParamTypeDescription
tableobjectThe table to store the current sheet data
sheetNamestringThe name of the sheet
importerobjectThe importer
rownuberThe row where to read the data
rowIdstringThe uuid of this row

parserDecision.getNextSubSection(sheetName, importer, startRow, sectionEndRow) ⇒ object

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 }

ParamTypeDescription
sheetNamestringThe name of the sheet
importerobjectThe importer
startRownuberThe row where to start searching
sectionEndRownumberThe last row in the parent section

parserDecision.getNextSection(sheetName, importer, startRow, sheetEndRow) ⇒ object

Get the definition of the next section

Kind: instance method of ParserDecision
Returns: object - table The created table model for the sheet

ParamTypeDescription
sheetNamestringThe name of the sheet
importerobjectThe importer
startRownuberThe row where to start searching
sheetEndRownumberThe last row in this sheet
← Parser Decision ConstantsParser Matrix Constants →
  • ParserDecision ⇐ ParserBase
    • parserDecision.sectionHandler
    • parserDecision.fieldNameSequence
    • parserDecision.parse(sheetName, importer) ⇒ object
    • parserDecision.getFieldName() ⇒ string
    • parserDecision.parseForTestcases(table, sheetName, importer, testCaseStartColumn, startRow) ⇒ number
    • parserDecision._updateTestcaseExecute(table)
    • parserDecision._updateTestcaseNeverExecute(table)
    • parserDecision._getBoolean(val) ⇒ boolean
    • parserDecision._updateTestcaseMultiplicity(table)
    • parserDecision._getMultiplicityFromValue(val) ⇒ boolean
    • parserDecision.handleMultiRowSection(table, sheetName, importer, sectionName, startRow, endRow)
    • parserDecision.handleTagSection(table, sheetName, importer, sectionName, startRow, endRow)
    • parserDecision.handleFilterSection(table, sheetName, importer, sectionName, startRow, endRow)
    • parserDecision.handleGeneratorSwitchSection(table, sheetName, importer, sectionName, startRow, endRow)
    • parserDecision.handleMultiplicitySection(table, sectionName)
    • parserDecision.handleExecuteSection(table, sectionName)
    • parserDecision.handleNeverExecuteSection(table, sectionName)
    • parserDecision.handleSummarySection(table, sectionName)
    • parserDecision.handleFieldSection(table, sheetName, importer, sectionName, startRow, endRow)
    • parserDecision._readTestcaseValues(table, sheetName, importer, row, rowId)
    • parserDecision.getNextSubSection(sheetName, importer, startRow, sectionEndRow) ⇒ object
    • parserDecision.getNextSection(sheetName, importer, startRow, sheetEndRow) ⇒ object
Nanook
Docs
TutorialsGuide
More
ImprintPrivacy PolicyGitHubStar
Copyright © 2022 Nanook.io