I just started using nightwatch with browserstack and I'm noticing that when we get a failed test, nightwatch registers the failure, but browserstack does not. sample test I am using. Also I am using free trial version of BrowserStack.
My question is:
- Are there any ideas how to tell browserstack when a test run failed ?
From BrowserStack doc:
REST API
It is possible to mark tests as either a pass or a fail, using the following snippet:
var request = require("request");
request({
uri: "https://user:[email protected]/automate/sessions/<session-id>.json",
method: "PUT",
form: {
"status": "completed",
"reason":""
}
});
The two potential values for status can either be completed or error. Optionally, a reason can also be passed.
My questions are:
- How I can get 'session-id' after test execution ?
- What if I can see "completed" status in dashboard already ?