Scriptworks is completely flexible in the way tests are executed. Tests can be run locally on a users workstation, on networked Selenium or Appium infrastructure or on cloud infrastructure providers such as Saucelabs or Bitbar.
There is a simple client application that facilitates this, shown in the diagram below:
This is a NodeJS Application that can be run on any platform, Windows, MacOS or Linux.
Step 1 – Install NodeJS
NodeJS is a popular platform for cross-platform applications. Scriptworks uses this for its client component. You may already have NodeJS installed, if not then go to the NodeJS website: https://nodejs.org/
Download the appropriate NodeJS installer for your platform and complete installation, all common OS platforms are supported.
Step 2 – Use Node Package Manager (NPM) to Install Scriptworks Client
The Node Package Manager allows you to install Node based applications using a simple command line process.
Open a Command Line Window or Terminal Window and type:
npm i -g scriptworks-client
You should be presented with a successful install message. You can run the client by simply typing:
You will be presented with a message showing the client running and the port number:
The Client is now up and running ready to relay tests to your selenium server.
Troubleshooting the Install Process
In some environments extra steps may need to be taken to ensure that Global packages are installed.
Installing npm packages globally on some environments requires the use of a package manager, such as nvm: https://github.com/creationix/nvm
NVM will enable global packages to be installed on these environments.
Alternatively Scriptworks can be installed without the Global tag:
npm install scriptworks-client
Then from a CLI, cd to the package folder:
Then run the client using:
This will start up the Scriptworks Client in this environment.
Scriptworks can also be started with a Proxy set if your organisation requires the use of a corporate proxy to receive and send data, the client can be started with a –proxy paramater specifying the URL and port of the proxy:
node main.js –proxy https://188.8.131.52:808
Step 3 – Install Selenium Components and Run Selenium Server
The Scriptworks client relays tests to a Selenium server, this can be a local server or a hub connected to your network, even a remote infrastructure provider such as Saucelabs or Bitbar. Setting up a Selenium server can be done easily as below:
Download the Selenium Standalone Server from: https://docs.seleniumhq.org/download/
(NB – You may also need to install Java for running the Java Selenium Server).
Selenium Driver Configuration
Selenium Webdriver requires specific Browser Drivers to run tests on the Browser of choice, the Browser Drivers are required to be installed in the same Directory as the Selenium Server is run from.
The Browser specific Drivers can be found below at:
Chrome (ChromeDriver): http://chromedriver.chromium.org
Firefox (GeckoDriver): https://github.com/mozilla/geckodriver/releases
IE (IEDriver): https://www.seleniumhq.org/download/
Edge (Microsoft Wedriver): https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Safari (AppleSafariDriver): https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari
For some Drivers such as Firefox (GeckoDriver) the location of the Driver will need to be registered in the Path Environment Variable, this will require the parent folder of the Selenium components for example:
C:\Program Files (x86)\Selenium
Running the Selenium Server
Copy the downloaded files to a convenient folder and run the Selenium Server from a command line or shell window using:
java -jar selenium-server-standalone-3.xx.x.jar
You should be presented with a message showing the selenium server running:
The Selenium server is now up and running ready to receive commands. You should be all set and ready to Run Tests!
Step 4 – Browser Choice for Scriptworks
The Scriptworks Visual Testing interface can be utilised on all major browsers, however for an optimal experience we strongly recommend Google Chrome as the best browser for accessing the Scriptworks Visual Testing interface.