Data-Test-Executer Framework speziell zum Test von Datenverarbeitungen mit Datengenerierung, Systemvorbereitungen, Einspielungen, ganzheitlicher diversifizierender Vergleich
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
4.9 KiB

import basic.constants as B
import tools.config_tool
# -------------------------------------------------------------
# values and keywords
KEY_PRECOND = "precond"
KEY_POSTCOND = "postcond"
KEY_RESULT = "result"
KEY_ORIGIN = "origin"
KEY_PARTS = "parts"
KEY_SUMFILE = "sumfile"
KEY_BACKUP = "backup"
KEY_REFFILE = "reffile"
KEY_TESTCASE = "tc"
KEY_TESTSUITE = "ts"
KEY_CATALOG = "catalog"
KEY_MODEL = "model"
KEY_USER = "user"
KEY_DEBUGNAME = "debugname"
KEY_LOGNAME = "logname"
KEY_BASIC = "basic"
""" keyword for basic config in components """
KEY_COMP = "comp"
""" keyword for individual component """
KEY_TOOL = "tool"
""" keyword for technical tools """
KEY_ENV = B.SUBJECT_ENVIRONMENT
""" keyword for environment """
VAL_TOOLS = "tools"
""" subdir for any technical tools """
VAL_TABLES = "tables"
""" subdir for any technical tables """
VAL_TEST = "test"
""" subdir for any unit-tests """
VAL_CONFIG = "config"
""" subdir for any place of config-files """
VAL_COMPS = "components"
""" subdir for the plugin components """
VAL_USER = "user"
""" subdir for the created user """
VAL_BASIC = "basic"
""" subdir for the basic job-framework """
VAL_BASE_DATA = "data"
""" subdir for the basis data-folder """
VAL_TDATA = "testdata"
""" subdir for the basis data-folder """
# -------------------------------------------------------------
# parameter with arguments
PAR_APP = "job.par." + B.PAR_APP
PAR_ENV = "job.par." + B.PAR_ENV
PAR_REL = "job.par." + B.PAR_REL
PAR_TSDIR = "job.par." + B.PAR_TSDIR
PAR_TCDIR = "job.par." + B.PAR_TCDIR
PAR_XPDIR = "job.par." + B.PAR_XPDIR
PAR_TDTYP = "job.par." + B.PAR_TDTYP
PAR_TDSRC = "job.par." + B.PAR_TDSRC
PAR_TDNAME = "job.par." + B.PAR_TDNAME
PAR_LOG = "job.par." + B.PAR_LOG
PAR_MODUS = "job.par." + B.PAR_MODUS
PAR_COMP = "job.par." + B.PAR_COMP
PAR_FCT = "job.par." + B.PAR_FCT
PAR_TOOL = "job.par." + B.PAR_TOOL
PAR_STEP = "job.par." + B.PAR_STEP
PAR_DESCRIPT = "job.par." + B.PAR_DESCRIPT
PAR_TESTCASE = "job.par." + B.PAR_TESTCASE
PAR_TESTCASES = "job.par." + B.PAR_TESTCASES
PAR_TESTSUITE = "job.par." + B.PAR_TESTSUITE
PAR_TCTIME = "job.par." + B.PAR_TCTIME
PAR_TSTIME = "job.par." + B.PAR_TSTIME
PAR_TESTINSTANCES = "job.par." + B.PAR_TESTINSTANCES
# -------------------------------------------------------------
# attributes
ATTR_PATH_MODE = "mode"
""" This constant defines the home-folder in filesystem of test """
ATTR_PATH_HOME = "home"
""" This constant defines the home-folder in testing-filesystem """
ATTR_PATH_DEBUG = "debugs"
""" This constant defines the debug-folder in testing-filesystem """
ATTR_PATH_ARCHIV = "archiv"
""" This constant defines the folder in testing-filesystem for results and log of execution """
ATTR_PATH_PROGRAM = "program"
""" This constant defines the program-folder in the workspace """
ATTR_PATH_COMPONENTS = "components"
""" This constant defines the program-folder in the workspace """
ATTR_PATH_MODEL = KEY_MODEL
""" This constant defines the folder in model """
ATTR_PATH_ENV = "environment"
""" This constant defines the folder in testing-filesystem, used for configs related to environments """
ATTR_PATH_RELEASE = "release"
""" This constant defines the folder in testing-filesystem, used for configs related to release """
ATTR_PATH_TDATA = "testdata"
""" This constant defines the folder in testing-filesystem with the testcase-specifications """
ATTR_PATH_TEMP = "temp"
""" This constant defines the debug-folder in testing-filesystem """
ATTR_PATH_PATTN = "pattern"
""" This constant defines the debug-folder in testing-filesystem """
# -------------------------------------------------------------
# structure - nodes
P_DEBUGS = "debugs"
P_ENVBASE = "envbase"
P_ENVLOG = "envlog"
P_ENVPARFILE = "envparfile"
P_TCBASE = "tcbase"
P_TCLOG = "tclog"
P_TCRESULT = "tcresult"
P_TCPARFILE = "tcparfile"
P_TCDIFF = "tcdiff"
P_TCPREDIFF = "tcprediff"
P_TCRUNDIFF = "tcrundiff"
P_TCPRECOND = "tcprecond"
P_TCPOSTCOND = "tcpostcond"
P_TSBASE = "tsbase"
P_TSLOG = "tslog"
P_TSPARFILE = "tsparfile"
P_TSSUM = "tssum"
P_XPBASE = "xpbase"
P_XPRESULT = "xpresult"
P_XPBACKUP = "xpbackup"
P_TDROOT = "tdroot"
P_TDBASE = "tdbase"
# -------------------------------------------------------------
# exception texts
EXP_COMP_MISSING = "Component is missing for {}"
""" excetion for the case that a specific component doesnt exist, 1 parameter (context) """
EXP_CONFIG_MISSING = "Configuration is missing for {}"
""" excetion for the case that a specific configuration is missing, 1 parameter (context) """
class PathConf:
"""
this class contains the structure-informations of the testrelevant directories
"""
__instance = None
def __init__(self, job=None):
confs = tools.config_tool.getConfig(job, "tool", "path", ttype="tool")
self.pattern = confs["pattern"]
PathConf.__instance = self
@staticmethod
def getInstance(job = None):
if (PathConf.__instance is None):
PathConf(job)
return PathConf.__instance