DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • The Emergence of Low Code No Code Approach for SAP Platform Testing
  • Spice Up Your 'CI/CD Process' With Automation Using Cucumber, Selenium, and Kotlin
  • Testing Jedis API Using Junit Test Case in Eclipse IDE
  • Selenium and Selenium IDE Migration | Testing Made Easier

Trending

  • Secure by Design: Modernizing Authentication With Centralized Access and Adaptive Signals
  • 5 Subtle Indicators Your Development Environment Is Under Siege
  • Event-Driven Architectures: Designing Scalable and Resilient Cloud Solutions
  • Chat With Your Knowledge Base: A Hands-On Java and LangChain4j Guide
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. How To Run Selenium IDE Test Over Online Selenium Grid?

How To Run Selenium IDE Test Over Online Selenium Grid?

Learn how to install Selenium IDE, a record and playback testing tool, and run tests over online Selenium Grid in this tutorial.

By 
Himanshu Sheth user avatar
Himanshu Sheth
DZone Core CORE ·
Jul. 09, 20 · Tutorial
Likes (14)
Comment
Save
Tweet
Share
5.2K Views

Join the DZone community and get the full member experience.

Join For Free

The Selenium IDE is a popular record and playback testing tool that is used for automated browser testing. It makes it easy to get started with automation testing as the IDE is a simple turn-key solution that is web-ready and works out of the box.

The development of Selenium IDE picked up pace in the last few years and an interesting set of features such as editing test scripts, performing cross-browser testing using SIDE runner, parallel testing, extensibility with plugins, etc. has made the Selenium IDE a worthy proposition for performing cross-browser testing. Know more about, what is Selenium, and how to get started with it. 

In the previous Selenium IDE tutorial, we covered what is Selenium IDE and talked about the features responsible behind the comeback of Selenium IDE in the QA world?. Today, I am going to give you a practical insight into how you could run the Selenium IDE test over an online Selenium Grid.

Prerequisites To Install Selenium IDE 

So before getting started with performing Selenium test automation, you’ll have to install few dependencies for SIDE runner :

  • Node — Node.js programming language (version 8 or 10) [Download Link]

  • NPM — Node.js Package Manager that is typically installed with Node. The download link is here.

  • Selenium IDE Plugin — Selenium IDE is available for Google Chrome and Mozilla Firefox. You can install Selenium IDE in chrome by downloading the chrome extension from here. To install Selenium IDE in firefox you can download the add-on from here.

  • Selenium IDE (SIDE) Runner — You can install Selenium IDE Runner or SIDE runner by using the command stated below on the terminal.

npm install -g selenium-side-runner

  • Working account on LambdaTest — As automation testing with Selenium IDE will be performed on LambdaTest, you would need a valid account on the platform.

access token

The Selenium IDE runner (or SIDE Runner)

The SIDE runner is a command-line tool that lets you run a .side project on a Node.js platform. Automated browser testing can be executed in parallel using the SIDE runner by inputting the number of parallel processes that have to be executed. The -w option is used to control the number of parallel processes that are running.

As we’ll perform automated browser testing on a cloud Selenium Grid i.e. LamdaTest, the throughput will depend on the maximum number of tests that can be executed in parallel on the platform. As shown below, my plan supports 5 parallel tests. In case you’re wondering why you’d need parallel tests, you can refer to this blog on parallel testing.

timeline

As automated browser testing is performed on a Selenium Grid, there is no necessity for installing the browser drivers on the local machine from where the tests would be triggered.

Exporting The Test From Selenium IDE

For the demonstration of executing tests on the Selenium grid in this Selenium IDE tutorial, I'll create a test suite that comprises four test cases. Two test cases will perform a search for ‘LambdaTest’ on Google and DuckDuckGo, whereas the other two tests will perform a search for ‘LambdaTest Blog’ on Google and DuckDuckGo.

The test cases are recorded using the Selenium IDE plugin for Google Chrome. Once the project is saved, navigate to the Test Suites that are available in the left-side panel.

lambdatest

To enable parallel testing for this Selenium IDE tutorial, you need to right-click on the test suite and navigate to Settings. In the Settings window, enable Test in Parallel. It is important to note that parallel testing on the Cloud Selenium Grid only works when tests are executed using the SIDE Runner (and not the Selenium IDE GUI).

LambdaTest

run in parallel

Now save the SIDE project so that it can be executed using the SIDE runner for this Selenium IDE tutorial.

Running The Test On Selenium Grid Online

For this Selenium IDE tutorial, we are executing the test on the Chrome browser (version 72.0) for Windows 10. The Selenium Desired Capabilities Generator is used to generate capabilities. You can choose any language as the required cross-browser configuration has to be supplied on the SIDE Runner command. Here are the desired capabilities used in this Selenium IDE tutorial for the required test combination (in the Python Language):

Python
 




x


 
1
capabilities = {
2
        "platform" : "Windows 10",
3
        "browserName" : "Chrome",
4
        "version" : "83.0"
5
}
6

          



For running the tests on the LmbdaTest Cloud Selenium Grid, you have to specify the desired WebDriver capabilities along with the URL to the Grid

selenium-side-runner --server <LambdaTest Grid URL> --capabilities <Browser Capabilities>

Grid URL: https://user-name:access-key@hub.lambdatest.com/wd/hub

The user-name and access key are available in the Profile section of LambdaTest.

Specify The Number Of Parallel Processes

To exploit parallel testing for this Selenium IDE tutorial, the –w <n> (or --max-workers <n>) option is used to specify the maximum number of workers that will run your tests.

Python
 




xxxxxxxxxx
1


 
1
selenium-side-runner --max-workers <num of parallel processes> --server https://user-name:access-key@hub.lambdatest.com/wd/hub



Executing The Test 

Let us assume that the project is executed on LambdaTest in this Selenium IDE tutorial is LambdaTest-IDE.side and the test has to be executed on ‘Windows 10| Chrome 72.0’. The number of tests that would be executed in parallel is set to 4. The command that has to be triggered on the terminal is below:

Python
 




xxxxxxxxxx
1


 
1
selenium-side-runner -w 4 "LambdaTest-IDE.side" --server https://user-name:acces-key@hub.lambdatest.com/wd/hub -c "browserName='chrome' version='72.0' platform='Windows 10'"



The browser capabilities are passed  in this Selenium IDe tutorial as a single string are shown below:

Python
 




xxxxxxxxxx
1


 
1
"browserName='chrome' version='72.0' platform='Windows 10'"



The test results for this Selenium IDE tutorial are available in the automation timeline where you can see the results for Selenium test automation you have performed. As shown below, four tests are executing in parallel.

timeline

Here is the execution snapshot which indicates that the execution is successful.

code snippet

automation

Using Configuration Files For Automated Browser Testing with Selenium IDE

Instead of remembering all the command-line arguments that have to be passed for test execution, there is an option offered by the SIDE runner where the run-time parameters can be stored in a simple configuration file.

There are two options when it comes to configuration files in Selenium IDE:

Using .side.yml

By default, the SIDE runner looks for a configuration file named .side.yml. The desired capabilities and server details used in the earlier test can be moved to .side.yml. Here are the contents of .side.yml for the earlier example:

Java
 




xxxxxxxxxx
1


 
1
capabilities:
2
   browserName: "Chrome"
3
   version: "72.0"
4
   platform: "Windows 10"
5
server: "https://user-name:access-key@hub.lambdatest.com/wd/hub"
6

          



We place the .side.yml file in the same folder where the .side project is present. The following command is used for triggering the tests:

selenium-side-runner -w 4 "LambdaTest-IDE.side"

In case if you still want to ignore the contents of .side.yml and instead use command-line arguments, you can use --no-sideyml along with the command triggered from the terminal. Here is the execution snapshot using the .side.yml configuration file for this Selenium IDE tutorial:

code

Using a Custom Configuration File

There is an option to specify the run-time parameters in a custom YAML file (instead of .side.yml). The location and name of the custom configuration file has to be specified using --config-file option

selenium-side-runner --config-file

"location of custom yaml file"

When --config-file flag is used, the default .side.yml (even if present) will be ignored. Shown below is the directory structure used for our Selenium IDE tutorial:

Python
 




xxxxxxxxxx
1


 
1
Code/
2
    LambdaTest-IDE.side
3
    .side.yml
4
    config/
5
            chrome72.windows10.yml
6

          



The following command is triggered once we are inside the Code directory

Java
 




xxxxxxxxxx
1


 
1
selenium-side-runner -w 4 --config config\chrome72.windows10.yml "LambdaTest-IDE.side"



Here is the execution snapshot using the custom configuration file.

default

The Selenium IDE runner has other additional options, details about the same can be found on the Selenium IDE official documentation.

Wrapping It Up

Automated browser testing with Selenium IDE has become much more effective as the IDE can be used to execute automation tests on Selenium Grid. As the SIDE runner supports parallel test execution, it enables the parallelism feature of a cloud Selenium Grid.

Default (.side.yml), as well as, custom configuration files make it easy to perform automated browser testing on Selenium Grid online as you no longer need to specify the configuration parameters (and the browser capabilities) along with the SIDE runner command. Learn more about the best tips for Selenium testing, in the blog linked/

That’s all for now! I hope you enjoyed this Selenium IDE tutorial on running your first test on Selenium Grid. Help us reach out to your peers by sharing this Selenium IDE tutorial with them. In case of any doubts, you can reach out to us in the comments section down below.  Do not forget to retweet or share this article on LinkedIn.

Happy Testing!

Integrated development environment Testing

Published at DZone with permission of Himanshu Sheth. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • The Emergence of Low Code No Code Approach for SAP Platform Testing
  • Spice Up Your 'CI/CD Process' With Automation Using Cucumber, Selenium, and Kotlin
  • Testing Jedis API Using Junit Test Case in Eclipse IDE
  • Selenium and Selenium IDE Migration | Testing Made Easier

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!