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.

13 lines
611 B

19 hours ago
# -*- coding: utf-8 -*-
import json, io, sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
d = json.load(open(r'e:\code\crm-backend-matt\.scratch\customer-e2e\demo-smoke-r2-result.json', encoding='utf-8'))
print('ts:', d['ts'], '| all_pass:', d['all_pass'])
print('console_errors:', len(d['console_errors']), 'page_errors:', len(d['page_errors']))
rs = d['results']
print('steps:', len(rs))
for i, r in enumerate(rs, 1):
ok = 'PASS' if r['ok'] else 'FAIL'
note = r.get('note') or ''
print(str(i).rjust(2) + '. ' + ok + ' | ' + r['step'] + ((' | ' + note[:70]) if note else ''))