Opkey Named Workday Partner | Read more
Advisory for Oracle Cloud 24B Release | Download now
Running tests on Remote Linux machines with Opkey Personal Edition

Running Tests on Remote Linux Machines With Opkey Personal Edition

October 7, 2016
Iffat Ara Khanam

Opkey Personal Edition comes with underlying testing tool Selenium Webdriver. Although Opkey can only be installed on a windows machine, but Selenium Webdriver has capabilities to automate applications across different operating systems. So does Opkey limits the Selenium web driver to windows? The answer is a definite NO.
Opkey ensures that the underlying plug-in capabilities are enhanced. Over a period of time we received a list of queries on our support Forums about how with Opkey we can perform test runs on linux as well. This Blog post will guide you to execute your Opkey tests on Linux machine with Selenium Web Driver as the underlying plug-in. We have to be clear about a thing although Opkey can do whatever the underlying tool can do and much more. But if the underlying tool doesn’t support different OS test automation, Opkey with that tool will also not support.

The below Flow give you an idea about the communication between Opkey, Selenium Hub and Selenium Node.

Linux Machine- Let’s start with Linux machine.- Steps to Start Hub and Node on Linux machine

Starting HubOpen Terminal in Linux and type following commandsJava -jar <absolute path to selenium-server-standalone.jar> -role hub
The hub by default starts using port 4444. To change the default port, you can add the optional parameter -port when you run the above command. You can view the running status of the hub by opening the URL http://localhost:4444/grid/console on a browser window.

Starting Node Now open another terminal start the node from the same *Selenium standalone server package with following commandsJava -jar <absolute path to selenium-server-standalone.jar> -role node -hub http://localhost:4444/grid/register
*We are using same Selenium standalone package as this package itself includes Hub, Webdrivers and RC.

Windows MachineNow return to Windows machine where Opkey is installed.We need to provide some specific settings in Opkey Plug-in setup wizard.

Settings required in Opkey:1. Provide Host Name of Linux machine.2. Provide Port No. on which Selenium Hub is started on Linux machine. (By default Hub automatically starts on port 4444.)3. If you want to execute your flow on Chrome Just provide Chrome driver path in Plug-in Setup Wizard. (No settings are required for Mozilla Firefox.)

So as we see the above settings we understand that the Selenium webdriver host is a linux machine. So as the test run is scheduled, Opkey will pass on the selenium command to the selenium server host machine, in this case Linux. And the automation of the application under test will be executed over linux machine, where as Opkey will be on the windows machine.

One thing to note in here is, as this topic is created purely for How with Opkey Personal Edition you can run tests on linux machine so, for the same reason you will only be able to use one machine. With Opkey higher editions we get distributed test execution power by using Opkey Agent. There is also a simpler way of running your tests on different browsers and OS and that too in parallel. Now do your test run on the Opkey Cloud.

Please feel free to share your thoughts on this topic in the comments section.

Contact us