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.

36 lines
1.9 KiB

3 years ago
import unittest
import os
from ulrich.program import Job
from ulrich.componentHandling import ComponentManager
class MyTestCase(unittest.TestCase):
def test_parameter(self):
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": "/home/ulrich/6_Projekte/Programme/pythonProject/test/lauf/V0.1/startjob/2021-08-21_18-ß2-01"}
job.par.setParameterArgs(args)
def test_components(self):
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):
os.system("python /home/ulrich/6_Projekte/Programme/pythonProject/check_environment.py -a TEST -e ENV01")
# os.system("python /home/ulrich/6_Projekte/Programme/pythonProject/init_testset.py -a TEST -e ENV01 "
# "-ts /home/ulrich/6_Projekte/Programme/pythonProject/test/lauf/V0.1/implement_2021-08-28_23-50-51 -dt csv -ds implement -dn firstunit")
# os.system("python /home/ulrich/6_Projekte/Programme/pythonProject/init_testset.py")
if __name__ == '__main__':
unittest.main()