OpKey Web is now integrated with an advanced feature called Grid Execution. With this feature, users can execute (or queue) multiple suites at a time. Here, the user can either choose an agent on which he wants to execute his run or leave the agent field blank.
OpKey Hub is a utility that allows you to execute multiple Suites parallel through Grid Execution with the help of OpKey Execution Agent. All the sessions to be executed from Grid, come in a queue in OpKey Hub and then Hub will start the execution immediately depending upon the availability of the agent. As soon as the OpKey Agent has finished the execution of the current session, it picks up the next Queued session and the process continues until the queue gets empty.
There are a few necessary settings that are required for Grid Execution. Let us apply those settings from OpKey Agent.
- Open OpKey Agent and switch to Web mode.
- Fill all required fields and login with valid credentials.
- Check Enable for Grid Execution checkbox.
- Click on Save to save the made changes.
- A popup message appears to relaunch the Agent and reflect the changes. Relaunch the Agent.
There are some Project Level Settings for Grid Execution feature that can be applied from the Project Management section in Admin.
Under the Admin section and click on the Project Management tab.
Click on the Update Project icon of the respective project to update the project for Grid Execution. Navigate to the Queued session settings and edit the number of maximum parallel runs allowed and maximum parallel runs allowed on BrowserStack. Maximum parallel runs allowed on BrowserStack should not be greater than the maximum parallel runs allowed.
Click on the Update Project icon to update the project for Grid Execution. Navigate to the Queued session settings and edit the number of maximum parallel runs allowed, maximum parallel runs allowed on BrowserStack and maximum parallel runs allowed on SauceLabs as per your requirement. Maximum parallel runs allowed on BrowserStack should not be greater than the maximum parallel runs allowed.
- Max Parallel Run Allowed field specifies the maximum number of parallel runs allowed for Queued Sessions for a particular project. Its value is 10, by Default.
- Max Parallel Run Allowed (BrowserStack) field specifies the number of parallel run allowed for Queued Sessions over BrowserStack. Its value is 2, by Default.
Click on Home to go back to the Web dashboard. To use this feature of Grid Execution in OpKey, follow the steps mentioned below:
- Go to Tools menu & click on Grid Execution.
- The Grid Execution window will open.
- When the user initiates the execution for the first time in OpKey then blank values are being displayed in the Build Name and Session Name otherwise it is auto-filled with the last Executed Build Name and Session Name.
- [Add] button is used to add new session details.
- [Delete] button is used to delete/remove the selected session details.
To Add new Session Details:
- Click Add.
- Click on Suite dropdown. The dropdown will display all the available suites. You can select the desired Suite that you want to execute.
Once the Suite has been selected, the Plugins get auto-filled with the corresponding Plugin Name. You can select the corresponding Plugin from the dropdown.
Click on the Agent dropdown list. The dropdown will get auto-populated with all the agents available for Grid Execution. You can select an agent on which you want to execute that particular session. In case, none of the agents is selected then, OpKey runs the execution randomly, on any available agent.
Click on the Browser/Devices to select the desired Browser/Devices. The dropdown will get auto-populated with various options for the Browser added in an agent from Grid Browser Settings. The Devices that are displayed in the dropdown are those devices that are configured with OpKey. Check the checkbox(s) provided to choose the desired Browser/Devices Name.
Adding Browsers from Agent for Grid Execution
Open OpKey Agent & click on Grid Browser Settings under Tools menu.
A pop-up window will get open as follows:
Click on [Add] button to add new Browser on the list. You can click on the Delete button to delete the selected Browser from the list. Click on the Save button to save the made changes.
SMTP Settings can also be configured from here. Click on the SMTP Settings button placed at the bottom Left corner of the screen.
The Advanced Settings for the session can either be Default or Custom settings. You can select the desired settings from the dropdown.
To configure the default settings for the grid execution, click on the Session Default Setting button available on the screen.
You can also click on the Settings icon to configure the custom settings of that particular session.
Once you have entered the required Session details, the session is in the ready to go state.
It is mandatory to open and connect OpKey hub for the execution of Queued Sessions.
OpKey Hub is used to execute any Queued Sessions in OpKey. You need to install it as a standalone setup corresponding to the OpKey version that you are using.
Launch the OpKey Hub. OpKey Hub window opens as follows:
Select Web Mode. Fill all required valid credentials and click on Connect.
- For Grid Execution on Local machine, check Allowed Execution For Local checkbox is checked.
- For Grid Execution on BrowserStack, make sure that Allowed Execution For BrowserStack checkbox is checked.
You can view queued and running queued sessions from OpKey Hub.
Click on Queued Sessions & Running Queued Sessions under Tools menu, to view queued and running queued sessions respectively.
Here, you can view list of queued sessions.
Here, you can view list of running queued sessions.
Click on Logs to view OpKey Hub Logs.
All the sessions added under Grid Execution, are first queued in the Queued Session list. You can view all the queued sessions in the Queued session list under Tools menu.
- Click on Queued Sessions. The Queued Sessions Details window will open as follows:
- The Sessions displayed in the above window get executed one by one on the available agent. As soon as the OpKey agent has finished executing the current session, it picks up the next Queued session and the process continues until its queue is empty.
Suppose you want to run a Test Case/Function Library/Sparkin/Gherkin but no agent is available then that execution will gets added in the Queued session list.