execute method
Executes the tests.
Implementation
Future<bool> execute() async {
if (parsedArgs.help) {
return showHelp();
}
prepare();
var testArgs = resolveTestArgs();
await bonesUICompiler.compile();
var configurationPath = resolveTestConfigurationPath(parsedArgs);
registerPlatformPlugin([
Runtime.chrome,
Runtime.firefox,
Runtime.safari,
], () => BonesUIPlatform.create(bonesUICompiler, showUI: showUI));
print(
'\n════════════════════════════════════════════════════════════════════════════════',
);
print(
'\n** Show UI: $showUI ${headless ? '(headless)' : '(showing browser)'}',
);
final enableDeferredLibraries = this.enableDeferredLibraries;
if (enableDeferredLibraries != null) {
print(
'** Deferred libraries: ${enableDeferredLibraries ? 'enabled' : 'disabled'}',
);
}
print('\n** Test ARGS: ${testArgs.join(' ')}');
print('\n** Executing tests...\n');
testArgs.insertAll(0, ['--configuration', configurationPath]);
// `main` runs the tests and then releases the signal and stdin
// listeners, and returns (it doesn't `exit`). `test_core` 0.6.21 removed
// the `runTests` + `completeShutdown` pair it used to be split into.
await test_executable.main(testArgs);
_processJsonReportFile();
bonesUICompiler.close();
return true;
}