UNPKG

@openfin/automation-cli

Version:

CLI for running automation tests within the OpenFin ecosystem

297 lines (173 loc) 6.16 kB
# Changelog ## 1.2.0 * Moved jasmine, jest, mocha, webdriver packages to peerDependencies * Update dependencies * Use require for jest-environment-dom otherwise rollup breaks the inheritance ## 1.1.11 * Version alignment ## 1.1.10 * Version alignment ## 1.1.9 * Version alignment ## 1.1.8 * Version alignment ## 1.1.7 * Version alignment ## 1.1.6 * Change - Remove node-fetch usage ## 1.1.5 * Change - Improved glob handling for jest * Change - Strip single quotes if enclosing test spec on command line ## 1.1.4 * Fixed - Jest parsing when test path included `{a,b}` glob patterns * Added - Command line test specs can be `;` separated for additional folders * Updated `glob` package ## 1.1.3 * Version alignment ## 1.1.2 * Package exports `types` instead of `typings` ## 1.1.1 * Version alignment ## 1.1.0 * Added - Support for chromedriver v115 and above which have a new download location ## 1.0.13 * Version alignment ## 1.0.12 * Version alignment ## 1.0.11 * Add `chromeDriverOverride` command line option ## 1.0.10 * Version alignment ## 1.0.9 * Added `--notifications <version>` command line option, to pin a specific version in DOS, defaults to stable ```shell of-automation none ./tests/**/*.spec.ts --notifications 1.20.2 ``` ## 1.0.8 * Dependency Update ## 1.0.7 * Version alignment ## 1.0.6 * Dependency Update ## 1.0.5 * Version alignment ## 1.0.4 * Version alignment ## 1.0.3 * Added `none` option for `manifestUrl` command line parameter, this will launch a dummy platform which means you can control all the other manifest launching from your tests. When using this options it is recommended to also supply the `defaultRuntimeVersion` unless stable works in your scenario. ```shell of-automation none ./tests/**/*.spec.ts --defaultRuntimeVersion 29.108.73.14 ``` ## 1.0.2 * Version alignment * Dependency Update ## 1.0.1 * Doc fixes ## 1.0.0 * First public release ## 0.3.10 * Jasmine fixed reporter load in mono-repos ## 0.3.9 * Improved hooks file loading to support different module formats. * Jasmine call setup at different point of lifecycle to be able to handle errors. * Exit signals are only hooked once ## 0.3.8 * Fixed - The CLI cleanup sequence is only run once on multiple termination events. * Added `hooks` option, which can specify a .js/.ts file containing `setup`, `teardown`, `beforeEach` and `afterEach` methods. By default the options will look for the existence of a `automation-hooks.js` or `automation-hooks.ts` file from the same folder as the execution. You can also point to a specific file by providing a full path. An object `globalVars` is passed to all methods in the hooks, and the same variables can be accessed inside tests using `globalThis.automation.globalVars`. An example `automation-hooks.js` hooks file is shown below: ```js exports.setup = async (globalVars) => { console.log(`Global Setup`); globalVars.startTime = Date.now(); } exports.teardown = async (globalVars) => { console.log(`Global Teardown`); console.log(`Time taken`, Date.now() - globalVars.startTime); } exports.beforeEach = async (globalVars, currentTestName) => { console.log("Before", currentTestName); } exports.afterEach = async (globalVars, currentTestName) => { console.log("After", currentTestName); } ``` An example `automation-hooks.ts` hooks file is shown below: ```ts export async function setup(globalVars: { [id: string]: unknown }): Promise<void> { console.log(`Global Setup`); globalVars.startTime = Date.now(); } export async function teardown(globalVars: { startTime: number;[id: string]: unknown }): Promise<void> { console.log(`Global Teardown`); console.log(`Time taken`, Date.now() - globalVars.startTime); } export async function beforeEach(globalVars: { [id: string]: unknown }, currentTestName: string): Promise<void> { console.log("Before", currentTestName); } export async function afterEach(globalVars: { [id: string]: unknown }, currentTestName: string): Promise<void> { console.log("After", currentTestName); } ``` ## 0.3.7 * Dependency Update ## 0.3.6 * Update to use new helpers ## 0.3.5 * Added `devToolsPort` and `openFinRVMPath` to `globals.automation` object ## 0.3.4 * Added alpha MacOS support ## 0.3.3 * Fixed glob handling in jest ## 0.3.2 * Update to use new helpers ## 0.3.1 * Added version to help info ## 0.3.0 * Reformatted source ## 0.2.11 * Add CLI `verbosity` option * `all` - Displays all output (default) * `none` - Displays no output * `results` - Displays only the test results ## 0.2.10 * Jest fix glob test folder support ## 0.2.9 * CLI now supports `file://` prefix for manifest url. ## 0.2.8 * Update to use new helpers ## 0.2.7 * Update to use new helpers ## 0.2.6 * Update to use new helpers ## 0.2.5 * Added sleep during wait for chromedriver. ## 0.2.4 * Added `testFailCount` option, which will abort the runner if the specified number of failures is reached. ## 0.2.3 * Update to use new helpers ## 0.2.2 * Added `screenshotFolder` option as location to store screen shots during tests defaults to `/reports/screenshots/` * Added Mocha listener to provide test names to screen shot storage. * Added Jasmine reporter to provide test names to screen shot storage. * Added Jest environment setup to provide test names to screen shot storage. * Added additional Rollup output for Jest environment setup `jestEnvironment.js`. ## 0.2.1 * Update to use new helpers ## 0.2.0 * Update to use new helpers ## 0.1.9 * Update to use new helpers ## 0.1.8 * Update to use new helpers ## 0.1.7 * Add new option `--dos <file.json>` which can be pointed to a custom DOS json file * Add new option `--reporter <file.json>` which can supply additional reporter config ## v0.1.6 * Align version with helper with pinned dependencies. ## v0.1.4 * Added `closeRuntime` option, which can be set to * Never - Never close any OpenFin runtimes * Start - Close OpenFin runtimes on runner start only * End - Close OpenFin runtimes on runner end only * Both - Close OpenFin runtimes on runner start and end (default)