|
|
@ -17,11 +17,12 @@ TABLE_NAME = "step" |
|
|
|
""" system-name for this entity """ |
|
|
|
FIELD_ID = "spid" |
|
|
|
FIELD_NAME = "name" |
|
|
|
FIELD_DESCRIPTION = B.SUBJECT_DESCRIPTION |
|
|
|
FIELD_REFERENCE = B.SUBJECT_REFERENCE |
|
|
|
FIELD_COMPONENT = B.SUBJECT_COMP |
|
|
|
FIELD_VARIANT = B.SUBJECT_VARIANT |
|
|
|
FIELD_SORTNR = "sortnr" |
|
|
|
FIELD_STEPNR = "stepnr" |
|
|
|
FIELD_DATAREF = "dataref" |
|
|
|
FIELD_ATTRIBUTES = B.NODE_ATTRIBUTES |
|
|
|
LIST_FIELDS = [FIELD_ID, FIELD_NAME, FIELD_DESCRIPTION, FIELD_REFERENCE, FIELD_COMPONENT] |
|
|
|
LIST_FIELDS = [FIELD_ID, FIELD_NAME, FIELD_VARIANT, FIELD_SORTNR, FIELD_STEPNR, FIELD_DATAREF] |
|
|
|
""" list of object-attributes """ |
|
|
|
LIST_NODES = [B.NODE_ATTRIBUTES, B.DATA_NODE_TOPICS] |
|
|
|
LIST_SUBTABLES = [] |
|
|
@ -32,35 +33,6 @@ UNIQUE_FIELDS = [FIELD_NAME] |
|
|
|
IDENTIFYER_FIELDS = [FIELD_ID] |
|
|
|
""" unique technical field as technical identifer """ |
|
|
|
|
|
|
|
STEP_ATTR_NR = "nr" |
|
|
|
""" unique number in test-specification / in comp the array-position """ |
|
|
|
STEP_ATTR_GROUP = "step" |
|
|
|
""" step-number in test-specification / in comp the block itself """ |
|
|
|
STEP_ATTR_COMP = "comp" |
|
|
|
""" comp-name which executes the step """ |
|
|
|
STEP_ATTR_FCT = "fct" |
|
|
|
""" fct-name which executes the step in the component """ |
|
|
|
STEP_ATTR_TOOL_TYPE = "type" |
|
|
|
""" interface of the tool, values cli, dbi """ |
|
|
|
STEP_ATTR_TOOL_NAME = "type" |
|
|
|
""" name of the tool, values cli, dbi """ |
|
|
|
STEP_ATTR_ARGS = "args" |
|
|
|
|
|
|
|
LIST_STEP_ATTR = [STEP_ATTR_NR, STEP_ATTR_GROUP, STEP_ATTR_COMP, STEP_ATTR_FCT, |
|
|
|
STEP_ATTR_TOOL_TYPE, STEP_ATTR_TOOL_NAME, STEP_ATTR_ARGS] |
|
|
|
FIELDS = { |
|
|
|
STEP_ATTR_NR : "nr", |
|
|
|
STEP_ATTR_GROUP : "group", |
|
|
|
STEP_ATTR_COMP : "comp", |
|
|
|
STEP_ATTR_FCT : "fct", |
|
|
|
STEP_ATTR_TOOL_TYPE : "tool", |
|
|
|
STEP_ATTR_TOOL_NAME : "toolname", |
|
|
|
STEP_ATTR_ARGS : "args" |
|
|
|
} |
|
|
|
# step |
|
|
|
# testsuite | testcase | component |
|
|
|
#---------------------------------- # ---------------------------------- # ---------------------------------- |
|
|
|
# start programs # start function # |
|
|
|
|
|
|
|
class Step(model.entity.Entity): |
|
|
|
""" |
|
|
@ -79,13 +51,12 @@ class Step(model.entity.Entity): |
|
|
|
variant = "" |
|
|
|
sortnr = 0 |
|
|
|
""" sorting, alternative step may have the same sortnr, then the correct step is selected by program-variant """ |
|
|
|
progstep = 0 |
|
|
|
stepnr = 0 |
|
|
|
""" in order to filter the steps for specific program-executions """ |
|
|
|
dataref = "" |
|
|
|
component = "" # the name of the component or of the parameter "testcases" |
|
|
|
arguments = {} |
|
|
|
topic = "" # is set by component-configuration |
|
|
|
type = "" # is set by component-configuration |
|
|
|
attributes = {} |
|
|
|
topics = "" # is set by component-configuration |
|
|
|
|
|
|
|
def __init__(self, job, project="", name="", obj=None): |
|
|
|
""" |
|
|
@ -101,10 +72,6 @@ class Step(model.entity.Entity): |
|
|
|
self.project = project |
|
|
|
if len(name) > 1: |
|
|
|
self.name = name |
|
|
|
if obj is not None: |
|
|
|
self.setEntity(LIST_STEP_ATTR, name, obj) |
|
|
|
else: |
|
|
|
self.getEntity(job, name) |
|
|
|
|
|
|
|
def read_unique_names(self, job, project, application, gran, args): |
|
|
|
""" |
|
|
@ -143,10 +110,36 @@ class Step(model.entity.Entity): |
|
|
|
print(str(comp)) |
|
|
|
|
|
|
|
def getFieldList(self): |
|
|
|
""" |
|
|
|
returns a list of scalar attributes |
|
|
|
:return: LIST_FIELDS |
|
|
|
""" |
|
|
|
return LIST_FIELDS |
|
|
|
|
|
|
|
def getNodeList(self): |
|
|
|
""" |
|
|
|
returns a list of sub-nodes - which can be persisted in a clob-field |
|
|
|
:return: LIST_NODES |
|
|
|
""" |
|
|
|
return LIST_NODES |
|
|
|
|
|
|
|
def getSubtableList(self): |
|
|
|
""" |
|
|
|
returns a list of sub-tables |
|
|
|
:return: LIST_SUBTABLES |
|
|
|
""" |
|
|
|
return LIST_SUBTABLES |
|
|
|
|
|
|
|
def getName(self): |
|
|
|
""" |
|
|
|
returns the name - maybe build from other attributes |
|
|
|
:return: |
|
|
|
""" |
|
|
|
return self.variant |
|
|
|
|
|
|
|
def getIDName(self): |
|
|
|
""" |
|
|
|
it returns the name as unique-id - maybe build from few attributes |
|
|
|
:return: |
|
|
|
""" |
|
|
|
return "{:02d}_{}".format(int(self.sortnr), self.variant) |