From eee1b7e22ea12635fbb3db06dc873fa39427db8a Mon Sep 17 00:00:00 2001 From: Joris van der Wel Date: Thu, 8 Mar 2018 12:23:09 +0100 Subject: [PATCH] Document the new, easier way to start openrunner. Using the new CLI scripts. --- README.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9896b05..f5c56dd 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,22 @@ Openrunner can be used for benchmark and functional testing for frontend-heavy w ## Getting started: -First of all, browse to https://github.com/computestdev/Openrunner/releases to download the latest release. Currently, releases come in form of a profile for Firefox. Since our plugin is not an official browser plugin yet you'll have to download Firefox Nightly: https://nightly.mozilla.org/. +First of all, because this project is not an official browser extension yet, you will have to download and install Firefox Nightly: [https://nightly.mozilla.org/](https://nightly.mozilla.org/) (You can also use Firefox "Unbranded" or "Developer Edition", but not the regular firefox). -Once you have both files installed/extracted you can run Firefox with Openrunner from the command line: ` --no-remote --profile ` +Then you must make sure that you have node.js installed (version 8 or higher): [https://nodejs.org/en/download/](https://nodejs.org/en/download/). -For example on OSX: `/Applications/Nightly.app/Contents/MacOS/firefox --no-remote --profile /Users/JohnDoe/Documents/openrunner-profile` +You can now install Openrunner using your terminal: + +```bash +npm install --global openrunner +``` + +Using a different command you can open the Openrunner IDE whenever you would like to use it: + +```bash +openrunner-ide --firefox /Applications/Nightly.app/Contents/MacOS/firefox +``` +(Update the path to firefox as needed) After starting you'll see Firefox with an icon of a running person in the menu bar, click this to launch the Openrunner browser extension. @@ -22,3 +33,12 @@ After executing a script you'll be presented with the outcome. The top half of t The bottom half of the screen shows the result of the run in json-format. Also, there's a 'view breakdown' button, this will open a complete breakdown of every step/event/object loaded that happened during the script execution. Much more documentation on how to create scripts is available on the wiki on github: https://github.com/computestdev/Openrunner/wiki/Scripting-guide-(with-examples) + +## Running scripts using your terminal +Assuming Openrunner has been installed (see [Getting started](#getting-started)), you can run saved scripts using your terminal: + +```bash +openrunner --firefox /Applications/Nightly.app/Contents/MacOS/firefox --script myScript.js --result myResult.json --headless +``` + +After this command has completed, you can inspect/parse all the results in the `myResult.json` file.