EyeServerLogo50h.png

Visual Script Runner Service

Table of Contents

EyeServer

Pure Java

Installing the Server

Starting the Server

Running Remote Scripts

Dashboard

License

Run Script

Progress

Schedule

Email Notifications

Reports

REST Commands

Locking the Screen

Secure Access

File Synchronization

Change Repository

Continuous Integration

Running Scripts from Jenkins

Continuous Integration Server Setup

Running From a Headless Machine

EyeServer

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:

Pure Java

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.

Installing the Server

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.

  1. Download and install EyeServer.
  2. Start EyeServer (using the EyeServer.jar file).
  3. Enter a license key using the Settings option on the Dashboard.

Starting the Server

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:

http://[server address]:[port]/hello

Stop the server by stopping the process or using the kill command:

http://[server address]:[port]/kill

Running Remote Scripts

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:

http://[server address]:[port]/[scriptpath]/[scriptfilename]

for example:

http://localhost:1234/scripts/script.txt

Dashboard

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.

EyeServer.png

Open the dashboard using the URL:

http://[server address]:[port]

for example:

http://localhost:1234

License

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 Script

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.

Progress

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

Schedule a script for recurring execution using the Schedule page. Select a script and select when to run the script.

Email Notifications

Receive email notifications when a run fails by filling out the form on the Email Notifications page.

Reports

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:

http://[server address]:[port]/TestSummary

Generate a Test Step Duration report using:

http://[server address]:[port]/TestStepDuration

Generate a Test Steps report using:

http://[server address]:[port]/TestSteps?script=scripts/myscript.txt

Any of the generated reports can be viewed in your web browser by typing its address, for example:

http://localhost:1234/reports/test_summary.htm

REST Commands

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:

http://[server address]:[port]/IsIdle

Get the number of script in the queue (not including the one executing) using:

http://[server address]:[port]/GetQueueSize

Get a link to the last executed script using:

http://[server address]:[port]/GetLastReport

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]

Locking the Screen

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:

http://[server address]:[port]/lock

for example:

http://localhost:1234/lock

Secure Access

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:

http://[server address]:[port]/[website_root]/[command]

For example, if the “website_root” is set to “9876543210”, the dashboard is accessed by:

http://localhost:1234/9876543210

File Synchronization

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.

Change Repository

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.

Continuous Integration

Running Scripts from Jenkins

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:

del *.xml

java -jar C:\EyeServer\eyeautomate_xunit.jar localhost:1234 scripts/images.txt

Post-build Actions / Publish JUnit test result report / Test report XML:s:

*result.xml

Continuous Integration Server Setup

Our recommended setup when using a CI Server with EyeServer is described below:

CISetup.png

Running From a Headless Machine

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:

Xvfb :10

export DISPLAY=:10

java -jar EyeServer.jar