1. Home
  2. Opkey Help
  3. 15. Execution & Result
  4. 15.1 Execution

15.1 Execution

OpKey allows you to execute your Test Case file, Function Library file, Test Suite file and Gherkin file by clicking on ‘Run Now’ or ‘Debug Now’ button. You need to follow few simple steps for execution. Usually, Run Now is used for execution but you can use Debug Now as well, which is mostly used by developers in order to quickly debug the issue. When execution gets completed, you can go to the Execution Result and analyze your result.

Execution Agent Configuration – 

Before running execution on OpKey (Web), you need to configure OpKey Execution Agent.

Switch Toggle button from Desktop to Web mode.

Enter Server URL, Agent name, Username and Password > Click Login. 

A popup message appears as shown below. Click on Yes to relaunch the OpKey Agent and reflect made changes.

Agent Message

15.1.1 Execution through Run Now

Go to Project Workspace > Select your test  script file to be executed > Click on Run Now.

Execute Now Wizard opens. Fill data in all required fields as shown below. You can create or choose build. You can select “Show Advanced Settings” checkbox which helps you configure Snapshot of steps (along with quality and step timeout), session tags and global variables.

Set advanced execution settings from here & click on Next.

noteYou can now set an option Highlight Object under Advanced Execution Wizard as shown in above image. It highlights objects before performing action on it during test execution. This feature is now available only with Selenium-JS plugin only. Thus, you can easily identify the object on which action is being performed during test execution using Selenium-JS.

Here, you can add session’s tags which helps you to recognize your sessions from execution result quickly and easily. Click on Next to proceed.

If you want to change or modify any of the global variables, used in your test script, then you can do it from below displayed screen. You can edit desired global variable and click on Finish to proceed.

Just after few seconds, you get a message that your execution started successfully. Further, you can see the execution process running on your screen.

15.1.2 Execution through Debug Now

Go to Project Workspace > Select your test script file to be executed > Click on Debug Now.

It is an alternative way of execution which allows developers to execute test and debug existing bugs quickly and easily. Click on Debug Now button and follow steps which are similar to the execution through Run Now.

When execution through Debug now gets completed, you can go through the execution result which contains detailed logs about all the steps. With the help of these logs, developer can easily analyze bugs and debug them as well.

Execute Now Wizard opens. Fill data in all required fields as shown below. You can create or choose build. You can select “Show Advanced Settings'” checkbox which helps you configure Snapshot of steps (along with quality and step timeout), session tags and global variables.

noteDebug Now is similar to Run Now way of execution, the only difference is in the display of execution result & logs.

 

15.1.3 Execution through Run with Tag Version

Now, OpKey users can execute their Suite based on tags added to the Function Libraries (added to Test Cases which are further added to the Suite). This feature is very useful in case you want to replace the execution of mapped Function Library with another Function Library having similar Tags, name & other parameters.

A Practical Scenario:

Suppose there is a Suite (name Suite-1) which has a Test Case (name TC-1) and this Test Case has multiple Function Libraries (FL1, FL2 & FL3) with tags (Tag-1, Tag-2 & Tag3) as per the build version. Suppose you are ready to release a new build of new version and there is a Function Library (name FL3, not mapped with TC) having the similar tags, values, input parameters etc. and you want to execute this new Function Library while replacing the FL3 (added in TC & TC mapped with the Suite) then you can click on the Run with Tag version button and select the Tag & respective value of the mapped Function Library. In this case, it will skip the execution of mapped Function Library and will execute the corresponding Function Library existing in Project workspace having similar tags, values, input parameters etc. Thus, you need not to open the Suite, its Test Case and Function Libraries and replace old Function Library with the new one automatically.

Both Function Libraries must have the following similar parameters:

  • Name of Function Library
  • Name of Input Parameter(s) added to Function Library
  • Name of Input Parameter(s) added to Function Library
  • Data Type of Input Parameter(s) added to Function Library

Let us create a Suite by adding Test Cases. Here, you can see that there is a new button added in Suite as Run with Tag Version.

  • Click on Run with Tag Version button. Tag Version popup window opens. Select Tag & corresponding value from the dropdown.
  • Click on OK to proceed test execution based on selected tag version.

15.1.4 Execution using Spock Agent on Windows machine

There is a Cloud-based agent named as Spock Agent in OpKey which enables you to execute your test execution on this cloud agent. It is visible on the Local Execution Wizard. You can select Any, India or United States-based cloud agent from the Region option and browser (Chrome, Fire or IE) from the Browser option. Once you triggered test execution in this way, the execution will be performed on the chosen cloud agent but the live execution on the browser will be performed on your system. This cloud agent has been created for our new users so that the initial agent downloading and installation process can be eliminated.

Prerequisites of OpKey Spock Agent:

  • Supported OS: Microsoft Windows 7, 8.1, 10 & Mac
  • Supported Browsers (Windows systems): Latest versions of Chrome, Mozilla Firefox or IE
  • Supported Browsers (Mac systems): Latest versions of Chrome, Mozilla Firefox or Safari
  • Java: Java 8, 9, 10 or 11

Let us execute a test using Spock Agent –

  • Open a Test Case.
  • Click on Run Now.
  • Select Spock Agent from the dropdown list of Execution Agent.

  • Region & Browser options appear.
  • Select Region and Browser type from the dropdown list.
  • Click Finish to proceed.
  • If you are using Spock Agent first time, OpKey Teleporting Tunnel jar file gets downloaded. A popup message appears that Please Wait for OpKeyTeleportingTunnel…

  • OpKeyTeleportingTunnel jar file is downloading.

  • Once, it gets downloaded successfully, keep it and launch to establish a secure connection between server & your local machine for test execution.

  • OpKey Teleporting Tunnel downloads some important files. Let it install those required files.

  • In case OpKey Teleporting Tunnel jar file is already downloaded then you need to click on “Open OpKeyTeleportingTunnelLauncher” tab to launch OpKeyTeleportingTunnel.

  • You can mark Always open these types of links in the associated app checkbox which will launch the OpKeyTeleporting Tunnel automatically.
  • Here, you can have a look at the execution logs.

15.1.5 Execution using Spock Agent on Mac machine

OpKey Spock Agent also allows test execution on Mac machines. Here, you need to apply the required Security and Privacy Settings so that the OpKey Teleporting Tunnel jar file can be downloaded, saved and then used to establish a secure connection between server & your local machine for test execution.

Let us execute a test using Spock Agent –

  • Open a Test Case.
  • Click on Run Now.
  • Select Spock Agent from the dropdown list of Execution Agent.
  • Region & Browser options appear. Select Region and Browser type from the dropdown list.
  • You can apply advanced execution settings by checking the Show Advanced Settings checkbox.
  • Click Finish to proceed.

  • If you are using Spock Agent first time, the OpKey Teleporting Tunnel jar file gets downloaded. A popup message appears.
  • Save this file.

  • OpKeyTeleportingTunnel jar file is downloading.

  • Once, it gets downloaded successfully, launch it to establish a secure connection between server & your local machine for test execution.
  • A security popup message appears as shown below. Click OK.

  • Now, you need to configure the required Security and Privacy Settings.

Appy the required settings as shown below:

  • Click Open to open the downloaded OpKey Teleporting Tunnel Utility.

  • OpKey Teleporting Tunnel updating utility.

  • OpKey Teleporting Tunnel updating libs of utility.

  • Your test execution takes a while. Once it gets completed, you can view complete logs and execution result.

 

noteOpKey Spock Agent (cloud agent) now supports test execution on the locally hosted OpKey Web. If you need to use Spock Agent then contact with our OpKey support team (support@opkey.com). OpKey support team with coordinate with you and install Spock Agent in your locally hosted OpKey environment.

Multiplugin Support with Spock Agent

OpKey Spock Agent now supports multiple OpKey plugins. Earlier to this, it was supporting selenium-JS plugin only. The list of Spock Agent supported plugins for Windows & Mac systems are given below:

Spock Agent supported plugins for Windows machine

Spock Agent supported plugins for Mac machine

OpKey Desktop

Oracle Fusion

Oracle Fusion

Salesforce

Salesforce

Selenium-JS

Web

Utility

Visual

Workday

Utility

Workday

IE Plugin

Appium

OpKey OracleEBS

OpKeyMobility-Android

OpKeyMobility-iOS

PeopleSoft

 

For common error scenarios related to Spock Agent, please refer: Prerequisites & common error scenarios in OpKey Spock Agent

 

Implementation of Chromium Edge Browser in Local Execution Wizard

We have included Microsoft Edge as an additional browser in the Local Execution Wizard along with Chrome, Firefox, and Internet Explorer. When the user executes the run through Spock Agent, they will be able to view the above four options as Browser to choose from and can select Microsoft Edge as their browser.

 

When the run is executed, the details of the Browser get reflected as Edge. Users can also generate Validation Reports through the Browser.

Was this article helpful to you? Yes 1 No 1