# --------------------------------------------------------------------------------------------------------- # Author : Ulrich Carmesin # Source : gitea.ucarmesin.de # --------------------------------------------------------------------------------------------------------- import os import basic.toolHandling import basic.constants as B import model.entity import tools.path_const as P import tools.config_tool import tools.file_tool import tools.git_tool 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): nr = 0 name = "" description = "" project = "" group = 0 comp = "" fct = "" tool = "" toolname = "" args = {} def __init__(self, job, project="", name="", obj=None): """ to be initialized by readSpec :param job: """ self.job = job if len(project) > 1: self.project = project if len(name) > 1: self.name = name if obj is not None: self.setEntity(LIST_STEP_ATTR, obj) else: self.getEntity(job, name) def setEntity(self, keys, obj): for k in keys: if k in obj: setattr(self, k, obj[k])