Skip to end of metadata
Go to start of metadata

After you've run your tests, you may notice in your Sauce Labs dashboard that the test status is Complete, rather than Passed/Failed. This is because Selenium doesn't have a way to interpret test results, only whether the test ran to completion or not. You have a few ways to set the Pass/Fail status of your tests.

You must use the the update_job method in the Sauce Labs REST API after the test has run.

This logic should be part of your Test Automation Framework so that the update_job method will be called appropriately depending on whether the test passes or fails.

The saucelabs-sample-test-frameworks GItHub repo contains examples for popular scripting languages and frameworks, including Appium and Selenium website and mobile native application testing that contains the logic to set test status to pass or fail.