Skip to content

Commit b4410fb

Browse files
committed
screenshot on tests taking too much also
1 parent 291e5c9 commit b4410fb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bin/runner.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,21 @@ function launchBrowser(browser, url) {
129129
if (!error && screenshot.url) {
130130
console.log('[%s] Screenshot: %s', worker.string, screenshot.url);
131131
}
132+
utils.alertBrowserStack(subject, content);
132133
});
133-
utils.alertBrowserStack(subject, content);
134134
}
135135
}, timeout * 1000);
136136

137137
setTimeout(function () {
138138
if (workers[key]) {
139139
var subject = "Tests timed out on: " + worker.string;
140140
var content = "Worker details:\n" + JSON.stringify(worker.config, null, 4);
141-
utils.alertBrowserStack(subject, content);
141+
client.takeScreenshot(worker.id, function(error, screenshot) {
142+
if (!error && screenshot.url) {
143+
console.log('[%s] Screenshot: %s', worker.string, screenshot.url);
144+
}
145+
utils.alertBrowserStack(subject, content);
146+
});
142147
}
143148
}, (timeout * 1000));
144149
}

0 commit comments

Comments
 (0)