Sahi Pro - What is new in Sahi Pro v6.1.0


abstract Sahi Pro v6.1.0 is a major release and contains many new features and bugfixes.

Changes in Sahi's behaviour

warning There are some changes in Sahi's behaviour in this release which need changes in usage. Please go through the Changes needed in Usage section for details.

Fresh install with MySQL, MSSQL or Oracle databases

By default Sahi stores its reports in a H2 database which is bundled along with Sahi.

If you wish to store your reports in MySQL, MSSQL or Oracle databases, you can do so by performing some post installation steps.
Please refer to MySQL, MSSQL and Oracle sections for details.
info IMPORTANT: Please note that from SahiPro 6.1.0 onwards, you do not need to run db queries manually for any database, for a fresh installation.

Upgrade

warning Upgrading to SahiPro 6.1.0 is easier than before. Please refer to Upgrade Sahi section for details.

Key Features

Support for Shadow DOM and Custom HTML Elements

HTML5 introduced the concept of ShadowDOM and custom HTML elements which allows
developers to write their own custom tags and define the tag's behaviour.
This unfortunately breaks how most tools traverse the DOM to identify elements.
Sahi Pro 6.1.0 supports identification and recording of elements in ShadowDOM and custom HTML elements.

Support for Polymer Elements

Sahi Pro 6.1.0 has inbuilt support for identifying and working with Google Polymer elements.
This is based on the new ShadowDOM and custom HTML element support.
Working with Polymer Elements
Polymer Accessor APIs

Editor Enhancements

Editor has been enhanced for usability.

Error Notification
If your script has any syntax errors, it will now be displayed in the editor while writing the scripts. If an undefined function or a non-existent API is called, a red error sign will be shown at that line.
.

Check Errors in Scripts for more details.

Find and Replace
You can search for functions and variables in all the scripts and scenario files using the new Find Usage dialog. Click on find usage button in the top menu to get the search options.

Enter the text to be searched and select if you want to specifically search for a function or variable. If both are left unchecked, both will be searched.
You can also specify the types of file you want to search in.

If you want to replace the searched text, simply put the replacment in the 'Replace with' text box and select the files in which text should be replaced. Click on Replace button.

Please refer to the Find and Replace section for more details.

Debugging using breakpoints
You can now debug your Sahi scripts by adding breakpoints and executing from the editor. A breakpoint can be added by clicking on the left of a line in script editor.
A red dot appears signifying the breakpoint. If you execute this script from the editor, Sahi will pause the script at the breakpoint and launch the controller.
You can then step through the script to debug the behaviour. Clear Break Points can be used to clear the break points of all scripts.


Check Debugging Sahi Scripts for more details.

Context information
Context information access and usage experience has been enhanced.

Others
A bunch of other Editor enhancements mentioned below.

New Format for Scenario Files

A new format for scenario files has been added. It allows additional columns for comments and tags. Tags can be specified for each Test Case. If tags are passed during the run, only matching Test Cases will be executed.


Please refer to Scenario Editor for more details.

Sample scenario files have been changed to reflect the new format.

Sync Reports to a Central Database

You can now sync execution logs between two machines running sahi. The destination machine can be a Central machine where reports from various sources can be synced to. This is especially useful in a continuous integration setup where one wants to aggregate the reports of each build's run at a central location.

Refer to Sync Reports to Central Database section for more details.

Periodic emails

As of this release, we provide the ability to send periodic emails during the course of a suite run. This can be useful in cases where the run takes a long time to complete. Regular email updates help to know the progress.

Refer to Send Email Reports section in Editor Advanced Playback Settings.

Oracle database support for Reports

Users can now choose to store Reports in an Oracle database. Please refer to storing reports in Oracle for more details.

Improvements in Distributed runs

Smart zip
In versions prior to SahiPro 6.1.0, the entire scripts folder would get synced to different nodes. As of this release, we only sync the scripts necessary to execute a run. Please refer to Smart zip for more details.

Distribute scripts in rotation
Distribution of scripts across nodes has now been made more even. Please refer to Scripts rotation for more details.

Ability to specify Threads
Previously, the number of browsers running on a Node in a distributed run could only be controlled by the Capacity of the browser, mentioned in browser_types.xml.
As of this release, it is possible to specify Threads for a distributed run. The minimum of Threads and Capacity will determine the number of browsers to run in parallel.

Nodes monitoring
The nodes participating in a distributed run are now monitored internally for health. Please refer to Nodes monitoring to understand how this makes the run better.

Ability to register Nodes externally
It is now possible to register additional node(s) in the middle of a long running distributed run and share the workload.
Refer to Registering external nodes for details.

New APIs

Include APIs

Fetch APIs

Script Execution Control APIs

File APIs

Data Drive related APIs

Script/Suite Info APIs

Modified APIs


Other Features and Enhancements


Bug Fixes


Changes needed in Usage

warning This section assumes that you have already been using Sahi. It lists changes in Sahi's behaviour in SahiPro 6.1.0.