Test Summary Banner Changes

Signed-off-by: saurabh <saurabh.goyal@candelatech.com>
This commit is contained in:
saurabh
2021-08-23 12:26:11 +05:30
parent c32a26d3d9
commit 33651bbc21

View File

@@ -692,32 +692,32 @@ def pytest_runtest_makereport(item, call):
def pytest_sessionfinish(session, exitstatus):
if reporting_client is not None:
print()
skipped_amount = 0
# print('Perfecto TestCase Execution Status:', exitstatus)
passed_amount = sum(1 for result in session.results.values() if result.passed)
failed_amount = sum(1 for result in session.results.values() if result.failed)
skipped_amount = sum(1 for result in session.results.values() if result.skipped)
# print(f'There are {passed_amount} passed and {failed_amount} failed tests')
TotalExecutedCount = failed_amount + passed_amount + skipped_amount
print()
skipped_amount = 0
#print('Perfecto TestCase Execution Status:', exitstatus)
passed_amount = sum(1 for result in session.results.values() if result.passed)
failed_amount = sum(1 for result in session.results.values() if result.failed)
skipped_amount = sum(1 for result in session.results.values() if result.skipped)
# print(f'There are {passed_amount} passed and {failed_amount} failed tests')
TotalExecutedCount = failed_amount + passed_amount + skipped_amount
print('\n------------------------------------')
print('Interop Perfecto TestCase Execution Summary')
print('------------------------------------')
print('Total TestCase Executed: ' + str(TotalExecutedCount))
print('Total Passed: ' + str(passed_amount))
print('Total Failed: ' + str(failed_amount))
print('Total Skipped: ' + str(skipped_amount) + "\n")
try:
for index in range(len(testCaseNameList)):
print(str(index+1) + ") " + str(testCaseNameList[index]) + " : " + str(testCaseStatusList[index]))
print(" ReportURL: " + str(testCaseReportURL[index]))
print(" FailureMsg: " + str(testCaseErrorMsg[index]) + "\n")
except Exception as e:
print('No Interop Test Cases Executed')
print('\n------------------------------------')
print('TestCase Execution Summary')
print('------------------------------------')
print('Total TestCase Executed: ' + str(TotalExecutedCount))
print('Total Passed: ' + str(passed_amount))
print('Total Failed: ' + str(failed_amount))
print('Total Skipped: ' + str(skipped_amount) + "\n")
try:
for index in range(len(testCaseNameList)):
print(str(index + 1) + ") " + str(testCaseNameList[index]) + " : " + str(testCaseStatusList[index]))
print(" ReportURL: " + str(testCaseReportURL[index]))
print(" FailureMsg: " + str(testCaseErrorMsg[index]) + "\n")
except Exception as e:
print('No Interop Test Cases Executed')
else:
pass
print('------------------------------------------------------------------\n\n\n\n')
@pytest.fixture(scope="function")