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.

49 lines
2.5 KiB

3 years ago
import unittest
import os
3 years ago
from basic.program import Job
from basic.componentHandling import ComponentManager
import init_testcase
import test.constants
3 years ago
HOME_PATH = test.constants.HOME_PATH
PYTHON_CMD = "python"
3 years ago
class MyTestCase(unittest.TestCase):
def xtest_parameter(self):
3 years ago
job = Job("unit")
args = { "application" : "TEST" , "environment" : "ENV01", "modus" : "unit", "loglevel" : "debug", "tool" : "job_tool"}
job.par.setParameterArgs(args)
self.assertEqual(job.hascomponente("TestA"), True)
self.assertEqual(job.hasTool("TestA"), False)
self.assertEqual(job.hasTool("job_tool"), True)
self.assertEqual(job.getDebugLevel("file_tool"), 23)
self.assertEqual(job.getDebugLevel("job_tool"), 23)
args = { "application" : "TEST" , "environment" : "ENV01", "modus" : "unit", "loglevel" : "debug",
"tool" : "job_tool", "tsdir": os.path.join(HOME_PATH, "test", "lauf", "V0.1", "startjob", "2021-08-21_18-ß2-01")}
3 years ago
job.par.setParameterArgs(args)
def xtest_components(self):
3 years ago
print("# # # # tetsComponents # # # # #")
job = Job.resetInstance("unit")
args = { "application" : "TEST" , "environment" : "ENV01", "modus" : "unit", "loglevel" : "debug", "tool" : "job_tool"}
job.par.setParameterArgs(args)
cm = ComponentManager()
cm.createComponents("testb", 0, "")
cm.createComponents("testa", 1, "")
def test_run(self):
3 years ago
# os.system("python "+os.path.join(HOME_PATH, "check_environment.py")+" -a TEST -e ENV01")
# os.system("python "+os.path.join(HOME_PATH, "init_testset.py")+" -a TEST -e ENV01 "
# "-ts "+os.path.join(HOME_PATH, "test","lauf","V0.1","implement_2021-08-28_23-50-51")+" -dt csv -ds implement -dn firstunit")
#os.system(PYTHON_CMD+" "+os.path.join(HOME_PATH,"init_testcase.py")+" -a TEST -e ENV01 "
# "-tc "+os.path.join(HOME_PATH,"test","lauf","V0.1","TC0001","2021-08-28_23-50-51")+" -dt csv -ds implement -dn TC0001")
job = Job("unit")
3 years ago
args = { "application": "TEST", "environment": "ENV01", "modus": "unit", "loglevel": "debug", "tdtyp": "dir",
"tdsrc": "TC0001", "tdname": "xxx",
"tool": "job_tool", "tcdir": os.path.join(HOME_PATH,"test","lauf","V0.1","TC0001","2021-08-28_23-50-51")}
job.par.setParameterArgs(args)
job.setProgram("init_testcase")
init_testcase.start(job)
job.stopJob(1)
3 years ago
if __name__ == '__main__':
unittest.main()