Mark tests as passed or failed

You can mark an Appium test session’s result as passed or failed using our REST API for your internal reference. This is particularly useful when a test successfully completed on BrowserStack (i.e. Completed status) but there was a failed assertion in the test case. If a test has failed, you can also record a reason for its failure.

Capability Description Value
status Test result for the session. Values: passed/ failed
reason A small note to explain why test failed (or passed). Example: Order status incorrect

Here is a REST API request to update the status and reason for an example test session :

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X PUT "https://api-cloud.browserstack.com/app-automate/sessions/f97f02bf39d592f5fc349cee419294fdfb7593a2.json" \
-H "Content-Type: application/json" \
-d '{"status":"failed", "reason":"Element not found on the login page"}' 

The status and reason passed are visible on the test session details page of the App Automate dashboard:

ststus