What will you learn in this lecture?

In this video, we will learn how to do live debugging in Sauce Labs. In the previous tutorial, we learned how to analyze tests.

How to do Live Debugging in Sauce Labs

So you know how sometimes it is really useful to be debugging your automated functional tests on your local machine. And you want to throw in a breakpoint into your solution and then have the code stop and then you play with the browser as it’s live. They’re open in your application right you like to maybe HTML maybe click on elements see how they interact.

Maybe you want to actually force your tests to fail and see how that happens. So that’s a very useful feature. But my question for you is how can you do that in a Sauce Labs or┬ávirtual machine.

Because how do you have access to that virtual machine because it just leaves in the browser it’s in your browser running and your sauce slabs account. So how can you debug? Right. Is that a problem for us. Well, the answer is actually no. It’s actually super easy and I’ll show you how to do that. So like the standard, I am going to throw in a breakpoint in my test automation here so that the test will pause and what I’m going to do here is right click and do debug select tests.

So as the test begins to run you can see that the green bar is moving up here and the test is going I’m going to go to sauce labs and look for that new test and the dashboard give it a second. So once the test loads will go inside of the test and I’ll show you how you can actually pause the test so that you can interact with it and debug live in the sauce labs.

So here goes the test I’m going to go ahead and open it up and actually my visual studio is already come up and paused. So it’s stuck at the breakpoint so I’m going to come in here and this test is running but the browser has been paused and we’re not going any further. And if you want to interact with this all you have to do is be on the watch tab. And then if I click in here you can see that now I can start interacting with the browser just like normal.

It’s simply streams everything that you’re doing it’s almost like a remote desktop connection where you’re just able to interact with the blog however you want. If you’re you know you want open developer tools you can do that here. See that. Check it out. I want to start messing with elements you can.

No problem at all.

And so you can debug just like normal and then if you want it to continue running your task you simply have to go back to your visual studio.

And then you just proceed. And I’m going to step over these 30 seconds because I don’t feel like waiting and then I’m going to continue and then the test is going to go ahead and run and then we’ll spit out the appropriate result. So this was the most successful and then if you want to watch the video it will show you everything that happened. See that. So that’s really that the debugging feature. It’s fantastic. And now you know how to use it.

Next Tutorial

In the next tutorial, you will learn about the different timeouts in Sauce Labs.

What will you learn in this course?

This course is an introduction to Sauce Labs with Selenium webdriver.

Taught by Nikolay Advolodin, CEO of www.ultimateqa.com. He had been teaching test automation for 5 years and is the author of top rated online courses to 50,000 students in over 100 countries around the globe.

In this course from Ultimate QA, you will learn:

– Why Sauce Labs is an amazing test automation tool.

– Overview of Sauce Labs.

– Sauce Labs advantages and disadvantages.

– How to analyze results.

– How to perform live debugging.

At the end of the course, you will take a final quiz along with the answers to the quiz questions for better understanding.

Take This Entire Course for Free

Nikolay Advolodkin is a self-driven SDET on a lifelong mission to create profound change in the IT world and ultimately leave a legacy for his loved ones, community, and the world at large. Today, he serves as the CEO and Test Automation Instructor at UltimateQA.com and contributes informative articles to leading test automaton websites like SimpleProgrammer.com and TechBeacon.com

Pin It on Pinterest

Shares
Share This