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.
 
 
 

43 lines
1.4 KiB

#!/usr/bin/python
# program to collect results from the system
# PARAM: --environment --application --tcdir [ testcase, tctime ]
# main functions
# + collect_testcase() : system --> data --> archiv.result
# + post_testcase() : comp-config --> system
# ---------------------------------------------------
import sys#
# import jsonpickle # pip install jsonpickle
import yaml # pip install pyyaml
import basic.program
import basic.componentHandling
import basic.message
import utils.tdata_tool
PROGRAM_NAME = "collect_testcase"
def startPyJob(job):
cm = basic.componentHandling.ComponentManager.getInstance(job)
cm.initComponents()
comps = cm.getComponents(job, PROGRAM_NAME)
print(" relevant components for this job: " + str(comps))
tdata = utils.tdata_tool.getTestdata(job)
job.m.setMsg("# components initialized with "+str(comps))
for c in comps:
comp = cm.getComponent(c)
comp.collect_Artifacts(B.PAR_TESTCASE)
job.m.merge(comp.m)
if __name__ == '__main__':
x = basic.program.Job(PROGRAM_NAME)
x.startJob()
x.m.logInfo("hier eine LogInfo")
x.m.logDebug("hier eine DbugMeldung")
x.m.logDebug(str(vars(x.par)) + "\n" + str(vars(x.conf)))
if x.m.isRc("fatal"):
print("fatal Error at begin")
x.stopJob()
exit(x.m.rc * (-1) + 3)
# now in theory the program is runnable
startPyJob(x)
x.stopJob()
# See PyCharm help at https://www.jetbrains.com/help/pycharm/