Product Update
May 30, 2019

What’s New in Sahi Pro v8.0

Sahi Pro recently launched a new version v8.0, packed with powerful features to make your test automation easier, better and more effective. Here is an overview of all the new features of this release- The core focus of this release has been the areas of controlled playback – that is - features wherein you can control how your scripts and suites run.

Depends

This feature allows you to define a dependency between different scripts in a suite and control their run based on the status of the depended script. In the data-driven suite (known as ddcsv files in Sahi), a new column has been added called ‘Depends’ in which we can write the complete name of the depended script OR we can use the tag PREV (indicating that the script depends on the PREVIOUS script in the sequence) In previous releases, if we had such a dependency, we could add these scripts in separate suite files and then run those suites in a sequence to ensure that depended scripts do not begin to run parallelly or in incorrect order. But the disadvantage there was that we would get separate run reports. In v8.0, by adding the depends tag we achieve several benefits-

  • You can define the script dependencies upfront within your suite
  • If the depended script fails, the dependent script will not be unnecessarily executed or failed, it will be marked as SKIPPED
  • Furthermore, you get a single consolidated log and report which clearly indicates the status of all scripts

So, if the first script failed, all other depended scripts are marked as SKIPPED, while if the first script passed, all depended scripts are run as required.

Retry

As a feature, retry refers to attempting to rerun any script that failed.  As of v7.5, retry for a failed script would happen once the entire suite run has been completed. But with the addition of the DEPENDENCY feature, a failed script may cause all dependent scripts to be skipped. To avoid this, we must attempt retry of a failed script as soon as it fails. So, this option of Retry has been added in the ADVANCED RUN SETTINGS of a suite. The number of retries to be attempted for ABORTED or FAILURE status scripts is now configurable. This feature also applies to single script files.

Modes

In distributed playback, different nodes or systems may have specific browsers or environments. For example, some nodes may be connected to iOS or Android devices. During distributed playback of a test suite, every script may have different needs for its execution like a specific browser (say chrome) or specific devices (say IOS or Android) Sahi Pro version 8.0 introduces the MODES setting in Data driven suites wherein you can specify the mode of run against the script name in a separate column titled MODES wherein you can specify the Mode as BROWSER / DESKTOP or iOS Android against the script name in the column. Each script in the suite will be executed when and where its “Mode” requirements are met. If any matching node is available, scripts will be queued for execution on such matching nodes. If no matching node is found, the script will be marked as NOT_SUPPORTED.
More details at - Sahi Pro Data Driven Suites

Suite Analysis

Let’s say you had 12 scripts run as a part of the suite and 10 of them failed. To find out what failed in each of them and analyze the root cause of each failure you would have to click each one and go see the “Steps failed”. If a single step was the cause of failure of all these scripts, it would take a longer time and more clicks to realize the same. In v8.0 Sahi pro brings you a SUITE ANALYSIS Report at the click of a button here on the same screen. With this you can find out which step caused the failure of the scripts and if a single step caused multiple failures, it can be clearly seen here. Clicking on the step takes you directly to the exact line of code in the script which can now be investigated. This Suite Analysis also shows you the Failed Scripts History - I.e. the scripts which failed in this run and their status across previous runs. It shows the pass percentage and their status of runs within SAHI from recent to old.

Sample Suite analysis More details at - Sahi Pro Suite Analysis

Consolidated Reports

Multiple run reports can now be consolidated into a Consolidated report with a single click, directly from the suites logs page. This report shows me a report with details of all runs, number of scripts executed, status summary of each script and test cases passed and failed. This can prove very useful when sending reports to management. These Consolidated Reports are also downloadable as Excel for easy sharing.

Sample Consolidated Report More details at – Sahi Pro Reports

Passing named Parameters

In Sahi Pro you can directly create Test Scenarios where you can call functions and pass test data directly as parameters to those methods. The limitation here in previous release was that in case you had a bunch of parameters and you wanted to pass value only to a few of them, you had to follow the same sequencing as per your defined function and remember which column meant which parameter. You had to leave out blank columns for the parameters you wanted to ignore. This has now been overcome with the passing of named parameters. You can specify the parameter value along with the name and placing a colon: You can use the Set field value checkbox in function details dialog which adds the parameter names with their values in the data columns. You can also do this directly by typing in the format- parameter name : value

Example of Passing Named Parameters This feature has several benefits for the script creators and editors -

  • The Test Scenario file is now more readable as you know directly from here which value means what
  • You only need to name and specify the parameters that you need to pass, and others need not be specified at all – so no blanks needed
  • The sequencing of parameters does not matter as they are named
  • Makes the passing as well as the omission of parameters very easy.
  • You can begin creation of such test scenarios even before your application is ready, thus supporting your Test first approach.

More details at- Sahi Script Editor

CSV as Accessor Repository

Sahi Pro already provides automatic creation of Accessor repositories or AR files as you record your script, thus enabling separation between the steps code and Accessors list. In version 8.0 Sahi Pro brings the capability for creation of a CSV file as an Accessor Repository or AR. This is more readable and easily manageable. Herein we can have a single keyword correspond to multiple columns in which we can keep different accessors of the same element- for example corresponding to different languages or localizations.

Example- CSV as AR having different languages accessors This file will have the AR values for all possible locales of the application and when needed for script execution, we can call the relevant locale’s AR by using _include(AR file name , column name of that particular locale) So essentially your scripts remain the same in flow or steps code for all platforms. At execution time, you can include the relevant AR column as per your run mode or language. This feature helps in cross platform execution of your scripts as well as localization testing. More details at – Sahi Script Editor

New APIs

_addResponseSubstitutionRule() and _removeResponseSubstitutionRule() Previously you could write the substitution rules in configuration file which was applicable to the entire SAHI installation and all scripts therein. But these two new APIs now allow you to add substitution rules for a specific portion of code and you can later remove once your work is complete. _getLayout()– has been added for verifying the layout as a part of UI verification APIs For more details on these please refer the documentation - New APIs

Type script

A Type script API has been added, the details of which can be found in the documentation link shown here - Sahi Pro Playback

REST Upload File Feature

SAHI already supports testing your REST APIs and the latest release version 8.0 has added the support of file upload using REST. Check out the details at - Sahi Pro REST API Editor The latest release of Sahi Pro v8.0 brings you some awesome features and exciting new functionalities to make your test automation smoother and crisper.

For a detailed description of all these features, check out the demo video.

Get a Free Demo of Sahi Pro

Please feel free to reach the support team at support@sahipro.com Or  sales@sahipro.com

Continue reading