@@ -6,10 +6,17 @@ from pathlib import Path
|
||||
|
||||
root = Path(__file__).resolve().parent.parent
|
||||
out = root / 'storage/app/private/investmoz-v2/portal-audit'
|
||||
result = subprocess.run(['C:/Users/macbook/.config/investmoz/php-8.5.11/php.exe', 'vendor/bin/phpunit',
|
||||
'tests/Feature/InvestorPathTest.php', '--no-progress'], cwd=root, capture_output=True)
|
||||
command = ['C:/Users/macbook/.config/investmoz/php-8.5.11/php.exe', 'vendor/bin/phpunit']
|
||||
if '--source-before' in sys.argv:
|
||||
command += ['tests/Feature/PortalServicesTest.php', '--filter', 'service_intake_preserves_same_origin_entry_page']
|
||||
filename = 'form-entry-source-before-fix-qa.json'
|
||||
else:
|
||||
command += ['tests/Feature/InvestorPathTest.php', 'tests/Feature/PortalServicesTest.php', '--filter', 'InvestorPathTest|service_intake_preserves_same_origin_entry_page']
|
||||
filename = 'ab-country-final-regression-qa.json'
|
||||
command += ['--no-progress']
|
||||
result = subprocess.run(command, cwd=root, capture_output=True)
|
||||
receipt = json.loads(result.stdout.decode('utf-8-sig'))
|
||||
(out / 'balcao-prefill-after-fix-qa.json').write_text(json.dumps(receipt, ensure_ascii=False, indent=2), encoding='utf-8')
|
||||
(out / filename).write_text(json.dumps(receipt, ensure_ascii=False, indent=2), encoding='utf-8')
|
||||
print(json.dumps({'exit': result.returncode, 'tests': receipt['tests'], 'assertions': receipt['assertions'],
|
||||
'failures': receipt.get('failures', [])}, ensure_ascii=True))
|
||||
sys.exit(result.returncode)
|
||||
|
||||
Reference in New Issue
Block a user