增加信息打印

Signed-off-by: deveco_xdevice <liguangjie1@huawei.com>
This commit is contained in:
deveco_xdevice 2022-09-01 20:26:10 +08:00
parent 40a3d03002
commit 077ea8e768
2 changed files with 10 additions and 4 deletions

View File

@ -2278,8 +2278,8 @@ class JSUnitTestDriver(IDriver):
tests_dict = dict()
test_count = 0
if suite_info:
LOG.debug("Suites info: %s" % suite_info)
json_str = "".join(suite_info)
LOG.debug("Suites info: %s" % json_str)
try:
suite_dict_list = json.loads(json_str).get("suites", [])
for suite_dict in suite_dict_list:

View File

@ -1245,8 +1245,14 @@ class OHJSUnitTestParser(IParser):
if len(test_des_list) == len(report_listener.result[pos][1]):
continue
interval = len(test_des_list) - len(report_listener.result[pos][1])
if len(test_des_list) > 0:
LOG.info("{} tests in {} had missed.".format(
interval, suite.suite_name))
else:
LOG.info("The count of tests in '{}' is incorrect! {} test "
"form dry run and {} tests have run."
"".format(suite.suite_name, len(test_des_list),
len(report_listener.result[pos][1])))
for test_des in test_des_list:
is_contain = False
for case in report_listener.result[pos][1]:
@ -1282,7 +1288,7 @@ class OHJSUnitTestParser(IParser):
suite_name_set.add(suite.suite_name)
un_suite_set = all_suite_set.difference(suite_name_set)
if un_suite_set:
LOG.info("{} suites had missed.".format(len(un_suite_set)))
LOG.info("{} suites have missed.".format(len(un_suite_set)))
for name in un_suite_set:
self.state_machine.running_test_index = 0
test_des_list = self.runner.expect_tests_dict.get(