Visual Script Runner Service
Table of Contents
Installing the Server
Starting the Server
Running Remote Scripts
Locking the Screen
Running Scripts from Jenkins
Continuous Integration Server Setup
Running From a Headless Machine
EyeServer is a web service that runs visual EyeAutomate scripts created in EyeStudio. The Dashboard reveals the current test results, coverage and product quality.
The EyeServer can be used for:
EyeServer is 100% pure Java and contains no native code. This means that you will be able to use it on any platform that supports Java.
EyeServer can be installed on any machine that can be accessed from all clients. Follow the steps below to install the server on a new machine.
Start the EyeServer by double-clicking on the "EyeServer.jar" file or using the command:
"java -jar EyeServer.jar"
The server uses port 1234 by default. Change the port by passing a parameter to the "EyeServer.jar" file, for example:
"java -jar EyeServer.jar -p 1235"
Verify that the server is running using the hello command:
Stop the server by stopping the process or using the kill command:
Scripts can be executed from a script using the CallRemote command or using a HTTP request from, for example, a web browser. Run a script using the URL:
The Dashboard provides easy access to most of the reports and features of the EyeServer. Use the Dashboard to run scripts, follow the progress, view test results, and adjust settings.
Open the dashboard using the URL:
EyeServer requires a license or a trial license key.
Purchase a license from: eyeautomate.com/purchaseeyeserver.html
or request a trial license from: eyeautomate.com/download.html
Paste or type the license key into the License Key field on the Settings page. Press the Save button to activate the license key.
Run a script directly from the Dashboard using the Run Script page. Start a script by pressing the Run button. Note that you may queue scripts for execution by pressing the Run button for other scripts.
The progress of the currently running script is displayed in the Progress option on the Dashboard. Click the Progress option to view the progress for all scripts.
Schedule a script for recurring execution using the Schedule page. Select a script and select when to run the script.
Receive email notifications when a run fails by filling out the form on the Email Notifications page.
Use the Test Summary or Test Step Duration options from the Dashboard to view the current status. You may also generate a report using on of the REST calls below.
Generate a Test Summary report using:
Generate a Test Step Duration report using:
Generate a Test Steps report using:
Any of the generated reports can be viewed in your web browser by typing its address, for example:
Here are some useful REST commands to evaluate the status of the script execution.
Check if the web service is idle, not running any script, using:
Get the number of script in the queue (not including the one executing) using:
Get a link to the last executed script using:
Get the current status of a script using:
http://[server address]:[port]/GetScriptStatus?script=[script path]
Get the progress, in percent, of a running script using:
http://[server address]:[port]/GetProgress?script=[script path]
EyeServer has a built-in screen lock to prevent unauthorized people from using the computer after a script has been completed or failed.
Enable the screen lock by providing a password using the Settings/Lock Screen Password option in the Dashboard. You may also set the password by assigning a value to the “lock_screen_password” property in the “webservice.properties” file.
Simply type the password to unlock the screen lock. The password is digits only.
Note that you might in some cases need to click on the screen to give the focus to the lock panel before typing the password.
Use the command below to manually lock the screen:
EyeServer may be configured to prevent unauthorized access to the dashboard and other commands. Edit the “webservice.properties” file and add the “website_root” property that should contain an additional path required to access the commands.
The “website_root” value needs to be specified in the beginning of all command calls to the EyeServer:
For example, if the “website_root” is set to “9876543210”, the dashboard is accessed by:
Managing scripts and images can be difficult in a larger team. This problem can be handled by using a version control system. Teams that do not have a version control system in place or find it difficult to use such a system can benefit from using the file synchronization feature.
The “change_repository.csv” file in the “logs” folder contains all changes received from the clients when synchronizing files. Removing this file will reset all changes with the result that no clients will receive any updates.
Note that the server will not send all changes to all clients only the latest change for each file since the last synchronization.
Run a test script using the “eyeautomate_xunit.jar” plugin for Jenkins that is provided with the EyeServer installation.
The plugin will send an HTTP request to the EyeServer with the script to run. The result of the execution is stored in an xml file (named Xresult.xml) and can be retrieved by Jenkins. This requires that you are running the EyeServer on some machine within the network. The “eyeautomate_xunit.jar” plugin takes two parameters. The first is the address and port to the EyeServer and the second is the script to run.
Example of a configuration in Jenkins running on Windows:
Build / Execute Windows batch command / Command:
java -jar C:\EyeServer\eyeautomate_xunit.jar localhost:1234 scripts/images.txt
Post-build Actions / Publish JUnit test result report / Test report XML:s:
Our recommended setup when using a CI Server with EyeServer is described below:
A headless machine does not have a user interface. Use a Virtual Frame Buffer to simulate a display in Linux. Use, for example, the commands below to start the EyeAutomate Web Service:
java -jar EyeServer.jar