Automation Testing

How to Run a Selenium Test in SauceLabs

By Test Guild
  • Share:
Join the Guild for FREE

In this video, I'm going to show you how easy it is to get started using Sauce Labs and to run your first Selenium test on Sauce.

For those of you that don't know, SauceLabs is the exclusive sponsor of my TestTalks podcast. Accordingly, I have a special code that you can use to get 20 hours of free automation! Check out my SauceLabs page for more info.

SauceLabs is great because they allow you to focus on testing instead of worrying about maintaining a bunch of environments against which your tests need to run. To get a small taste of this sauceomeness, let's take a look at what it takes to get a Selenium script running in the SauceLabs Cloud.

Getting Started with Sauce Labs

First, log on to SauceLabs with your free account. (Check out my video on how to use my special SauceLabs promo offer.)

Under the Tools section, select the Getting Started button.

You'll be presented with three options:

  • Automated
  • Mobile
  • Manual

Select Automated


Now all you need to do is follow this quick, four-step process:


  • Choose your language.

For this example I'll be using Java, but SauceLabs supports all the Selenium language bindings.

  • Next, set up your Project.

The easiest way to get up and running is to use the sample SauceLabs project, then modify it to get your tests started. I'm using Maven and JUnit, so I'm going to copy the JUnit Maven option to create my sample project.


  • Open up a command line, paste the above code and hit Enter.


  • Maven should automatically create the SauceLabs sample project for you.


  • Next, open up your IDE and import the SauceLabs sample project.
  • Once the project is imported, open up the SampleSauceTest.java file. It contains everything you need to get started. Sauce also did a great job of documenting each line of code to help you understand how everything works.
  • For this example, I'm going to delete their Amazon test and add two of my own tests that will run against my Selenium sample test page.


  • Once you've modified, it's time to run. From your IDE, select the Maven run command.
  • Once the tests are done running, log on to SauceLabs to view the results.

What's really cool is that once your test is done running you'll have a bunch of option like screenshots, video and logs to help you check your results.


Why Sauce Labs is Awesome

When you run your test in Sauce, there's no setup on your part, and you won't have to waste time digging through never-ending log files. When your tests are done you'll get your results automatically — along with video and screenshots — so you'll know exactly what to fix if your test fails!

You can also run your tests against over 485 different combinations. Think about how much time this will save you. I work for a large company and I would normally have to request a new VM for each different configuration. Next, I would have to install and maintain all these environments. Then I'd have to go to our Continuous Integration group and pray that they would have the time to set the test up to run.

With SauceLabs, I can bypass all that and focus on what I love to do — creating automated tests.

Checkout Sauce Labs yourself by using my promo code testtalks14 and get 20 hours of automated testing for free!

Optimized Bio with Podcast Longevityfor

Maximum Credibility & SEO

A bearded man with blue glasses and a black-and-white jacket smiles at a microphone in a studio setting.

About Joe Colantonio

Joe Colantonio is the founder of TestGuild, an industry-leading platform for automation testing and software testing tools. With over 25 years of hands-on experience, he has worked with top enterprise companies, helped develop early test automation tools and frameworks, and runs the largest online automation testing conference, Automation Guild.

Joe is also the author of Automation Awesomeness: 260 Actionable Affirmations To Improve Your QA & Automation Testing Skills and the host of the TestGuild podcast, which he has released weekly since 2014, making it the longest-running podcast dedicated to automation testing. Over the years, he has interviewed top thought leaders in DevOps, AI-driven test automation, and software quality, shaping the conversation in the industry.

With a reach of over 400,000 across his YouTube channel, LinkedIn, email list, and other social channels, Joe’s insights impact thousands of testers and engineers worldwide.

He has worked with some of the top companies in software testing and automation, including Tricentis, Keysight, Applitools, and BrowserStack, as sponsors and partners, helping them connect with the right audience in the automation testing space.

Follow him on LinkedIn or check out more at TestGuild.com.

  1. Thanks for that Joe. Have you ever used BrowserStack? I find that it’s kind of unstable and they have a lot of issues on their end. Do you have the same issue with Sauce Labs?

  2. Pingback: Sauce Labs C#

Comments are closed.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Solving the Top 6 Mobile Automation Challenges Fast (DevAssure Guide)

Posted on 02/27/2025

Are you tired of struggling with the mobile test automation setups? Does managing ...

Top Software Testing Conferences (2025 Guide)

Posted on 01/19/2025

Why a list of top software testing conferences? Many testers ask me what ...

Top 8 Automation Testing Trends Shaping 2025

Posted on 01/11/2025

As we enter 2025, here are some automation testing trends I think will ...