558 src_dst=[], |
558 src_dst=[], |
559 pmd_files=self.pmd_files, |
559 pmd_files=self.pmd_files, |
560 trace_path=self.atp.file_store.joinpath(u"§RUN_NAME§" + os.sep + u"§RUN_START_DATE§_§RUN_START_TIME§", "traces", "set0", "tracelog.blx"), |
560 trace_path=self.atp.file_store.joinpath(u"§RUN_NAME§" + os.sep + u"§RUN_START_DATE§_§RUN_START_TIME§", "traces", "set0", "tracelog.blx"), |
561 trace_activation_files=self.trace_activation_files, |
561 trace_activation_files=self.trace_activation_files, |
562 ctc_enabled=self.atp["ctc_enabled"], |
562 ctc_enabled=self.atp["ctc_enabled"], |
563 custom_dir=None, |
563 custom_dir=None, |
|
564 dll_files={}, |
564 component_path=self.component_path) |
565 component_path=self.component_path) |
565 assert self.atp.sets[1] == dict(name="set1", |
566 assert self.atp.sets[1] == dict(name="set1", |
566 image_files=self.image_files, |
567 image_files=self.image_files, |
567 engine_ini_file=self.engine_ini_file, |
568 engine_ini_file=self.engine_ini_file, |
568 sis_files=self.sis_files, |
569 sis_files=self.sis_files, |
572 pmd_files=self.pmd_files, |
573 pmd_files=self.pmd_files, |
573 trace_path=self.atp.file_store.joinpath(u"§RUN_NAME§" + os.sep + u"§RUN_START_DATE§_§RUN_START_TIME§", "traces", "set1", "tracelog.blx"), |
574 trace_path=self.atp.file_store.joinpath(u"§RUN_NAME§" + os.sep + u"§RUN_START_DATE§_§RUN_START_TIME§", "traces", "set1", "tracelog.blx"), |
574 trace_activation_files=self.trace_activation_files, |
575 trace_activation_files=self.trace_activation_files, |
575 ctc_enabled=self.atp["ctc_enabled"], |
576 ctc_enabled=self.atp["ctc_enabled"], |
576 custom_dir=None, |
577 custom_dir=None, |
|
578 dll_files={}, |
577 component_path=self.component_path) |
579 component_path=self.component_path) |
578 |
580 |
579 assert self.atp.sets[2] == dict(name="set2", |
581 assert self.atp.sets[2] == dict(name="set2", |
580 data_files=self.data_files, |
582 data_files=self.data_files, |
581 config_files=self.config_files, |
583 config_files=self.config_files, |
1153 self.src_dst0 = [] |
1158 self.src_dst0 = [] |
1154 self.custom_dir = None |
1159 self.custom_dir = None |
1155 self.component_path = None |
1160 self.component_path = None |
1156 self.custom_files = None |
1161 self.custom_files = None |
1157 self.ctc_run_process_params = None |
1162 self.ctc_run_process_params = None |
|
1163 self.dll_files = {} |
1158 |
1164 |
1159 def generate_xml(self, harness, trace_enabled="False"): |
1165 def generate_xml(self, harness, trace_enabled="False"): |
1160 """Generates XML""" |
1166 """Generates XML""" |
1161 def files(*paths): |
1167 def files(*paths): |
1162 """generates paths for the files""" |
1168 """generates paths for the files""" |
1163 return [TEST_PATH.joinpath("tsrc", tpath) for tpath in paths] |
1169 return [TEST_PATH.joinpath("tsrc", tpath) for tpath in paths] |
1164 self.src_dst1 = [] |
1170 self.src_dst1 = [] |
1165 self.data_files = files("data/file1", "data/file2", "data/file3") |
1171 self.data_files = files("data/file1", "data/file2", "data/file3") |
1166 self.config_files = files("conf/file1.cfg", "conf/file2.cfg") |
1172 self.config_files = files("conf/file1.cfg", "conf/file2.cfg") |
1167 self.testmodule_files = files("testmodules/file1.dll", "testmodules/file2.dll") |
1173 self.testmodule_files = files("testmodules/file1.dll", "testmodules/file2.dll") |
|
1174 self.dll_files["file1.dll"] = "EUNIT" |
|
1175 self.dll_files["file2.dll"] = "" |
1168 self.image_files = files("output/images/file1.fpsx", "output/images/file2.fpsx") |
1176 self.image_files = files("output/images/file1.fpsx", "output/images/file2.fpsx") |
1169 self.engine_ini_file = files("init/TestFramework.ini")[0] |
1177 self.engine_ini_file = files("init/TestFramework.ini")[0] |
1170 self.report_email = "test.receiver@company.com" |
1178 self.report_email = "test.receiver@company.com" |
1171 self.file_store = path("path/to/reports") |
1179 self.file_store = path("path/to/reports") |
1172 self.diamonds_build_url = "http://diamonds.nmp.company.com/diamonds/builds/1234" |
1180 self.diamonds_build_url = "http://diamonds.nmp.company.com/diamonds/builds/1234" |
1236 mocker.expect(test_plan.sets).result([ |
1244 mocker.expect(test_plan.sets).result([ |
1237 dict(name="set0", image_files=self.image_files, data_files=self.data_files, |
1245 dict(name="set0", image_files=self.image_files, data_files=self.data_files, |
1238 config_files=self.config_files, testmodule_files=self.testmodule_files, |
1246 config_files=self.config_files, testmodule_files=self.testmodule_files, |
1239 engine_ini_file=self.engine_ini_file, test_harness=harness0,src_dst=self.src_dst0, |
1247 engine_ini_file=self.engine_ini_file, test_harness=harness0,src_dst=self.src_dst0, |
1240 ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, |
1248 ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, |
1241 custom_dir = self.custom_dir, component_path=self.component_path), |
1249 custom_dir = self.custom_dir, dll_files = self.dll_files, component_path=self.component_path), |
1242 dict(name="set1", image_files=self.image_files, data_files=self.data_files, |
1250 dict(name="set1", image_files=self.image_files, data_files=self.data_files, |
1243 config_files=self.config_files, testmodule_files=self.testmodule_files, |
1251 config_files=self.config_files, testmodule_files=self.testmodule_files, |
1244 engine_ini_file=self.engine_ini_file, test_harness=harness1, src_dst=self.src_dst1, |
1252 engine_ini_file=self.engine_ini_file, test_harness=harness1, src_dst=self.src_dst1, |
1245 ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, |
1253 ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, |
1246 custom_dir = self.custom_dir, component_path=self.component_path), |
1254 custom_dir = self.custom_dir, dll_files = self.dll_files, component_path=self.component_path), |
1247 ]) |
1255 ]) |
1248 else: |
1256 else: |
1249 mocker.expect(test_plan.sets).result([ |
1257 mocker.expect(test_plan.sets).result([ |
1250 dict(name="set0", image_files=self.image_files, data_files=self.data_files, |
1258 dict(name="set0", image_files=self.image_files, data_files=self.data_files, |
1251 config_files=self.config_files, testmodule_files=self.testmodule_files, |
1259 config_files=self.config_files, testmodule_files=self.testmodule_files, |
1252 engine_ini_file=self.engine_ini_file, test_harness=harness0, src_dst=self.src_dst0, |
1260 engine_ini_file=self.engine_ini_file, test_harness=harness0, src_dst=self.src_dst0, |
1253 pmd_files=self.pmd_files, trace_activation_files=self.trace_activation_files, |
1261 pmd_files=self.pmd_files, trace_activation_files=self.trace_activation_files, |
1254 trace_path=self.file_store.joinpath("traces", "set0", "tracelog.blx"), |
1262 trace_path=self.file_store.joinpath("traces", "set0", "tracelog.blx"), |
1255 ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, |
1263 ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, |
1256 custom_dir = self.custom_dir, component_path=self.component_path), |
1264 custom_dir = self.custom_dir, dll_files = self.dll_files, component_path=self.component_path), |
1257 dict(name="set1", image_files=self.image_files, data_files=self.data_files, |
1265 dict(name="set1", image_files=self.image_files, data_files=self.data_files, |
1258 config_files=self.config_files, testmodule_files=self.testmodule_files, |
1266 config_files=self.config_files, testmodule_files=self.testmodule_files, |
1259 engine_ini_file=self.engine_ini_file, test_harness=harness1, src_dst=self.src_dst1, |
1267 engine_ini_file=self.engine_ini_file, test_harness=harness1, src_dst=self.src_dst1, |
1260 pmd_files=self.pmd_files, trace_activation_files=self.trace_activation_files, |
1268 pmd_files=self.pmd_files, trace_activation_files=self.trace_activation_files, |
1261 trace_path=self.file_store.joinpath("traces", "set1", "tracelog.blx"), |
1269 trace_path=self.file_store.joinpath("traces", "set1", "tracelog.blx"), |
1262 ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, |
1270 ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, |
1263 custom_dir = self.custom_dir, component_path=self.component_path), |
1271 custom_dir = self.custom_dir, dll_files = self.dll_files, component_path=self.component_path), |
1264 ]) |
1272 ]) |
1265 mocker.expect(test_plan.post_actions).result([ |
1273 mocker.expect(test_plan.post_actions).result([ |
1266 ("SendEmailAction", (("subject", "email subject"), |
1274 ("SendEmailAction", (("subject", "email subject"), |
1267 ("type", "ATS3_REPORT"), |
1275 ("type", "ATS3_REPORT"), |
1268 ("send-files", "true"), |
1276 ("send-files", "true"), |
1415 assert step.findtext("./command") == "execute" |
1423 assert step.findtext("./command") == "execute" |
1416 params = step.findall("./params/param") |
1424 params = step.findall("./params/param") |
1417 assert params[0].get("file") == path(r"z:" + os.sep + "sys" + os.sep + "bin" + os.sep + "EUNITEXERUNNER.EXE") |
1425 assert params[0].get("file") == path(r"z:" + os.sep + "sys" + os.sep + "bin" + os.sep + "EUNITEXERUNNER.EXE") |
1418 assert params[1].get("result-file") == path(r"c:" + os.sep + "Shared" + os.sep + "EUnit" + os.sep + "logs" + os.sep + "file1_log.xml") |
1426 assert params[1].get("result-file") == path(r"c:" + os.sep + "Shared" + os.sep + "EUnit" + os.sep + "logs" + os.sep + "file1_log.xml") |
1419 assert params[2].get("parameters") == "/E S60AppEnv /R Off /F file1 /l xml file1.dll" |
1427 assert params[2].get("parameters") == "/E S60AppEnv /R Off /F file1 /l xml file1.dll" |
1420 assert params[3].get("timeout") == "60" |
1428 assert params[3].get("timeout") == "60" |
1421 step = steps.next() |
|
1422 file_ = self.testmodule_files[1] |
|
1423 assert step.get("name") == "Execute test: %s" % file_.name |
|
1424 assert step.findtext("./command") == "execute" |
|
1425 params = step.findall("./params/param") |
|
1426 assert params[0].get("file") == path(r"z:" + os.sep + "sys" + os.sep + "bin" + os.sep + "EUNITEXERUNNER.EXE") |
|
1427 assert params[1].get("result-file") == path(r"c:" + os.sep + "Shared" + os.sep + "EUnit" + os.sep + "logs" + os.sep + "file2_log.xml") |
|
1428 assert params[2].get("parameters") == "/E S60AppEnv /R Off /F file2 /l xml file2.dll" |
|
1429 assert params[3].get("timeout") == "60" |
|
1430 |
1429 |
1431 def test_steps_trace_enabled(self): |
1430 def test_steps_trace_enabled(self): |
1432 """checks if traing is enabled""" |
1431 """checks if traing is enabled""" |
1433 test_harness = ["STIF"] |
1432 test_harness = ["STIF"] |
1434 for thar in test_harness: |
1433 for thar in test_harness: |