-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathmocha-se-example.js
More file actions
33 lines (30 loc) · 875 Bytes
/
mocha-se-example.js
File metadata and controls
33 lines (30 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import assert from 'assert';
import test from 'selenium-webdriver/testing';
var browserstack = require('browserstack-local');
var local = new browserstack.Local();
let localOptions = {
'key': 'BrowserStack Access Key Goes Here!'
};
test.before(function(done) {
this.timeout(30000);
console.log('Starting BrowserStack-Local...');
local.start(localOptions, ()=>{
console.log("Started BrowserStack-Local.");
// ...Code to start WebDriver goes here...
done();
});
});
test.after(function() {
this.timeout(30000);
// ...Code to stop WebDriver goes here...
console.log('Stopping BrowserStack-Local...');
local.stop(()=>{
console.log("Stopped BrowserStack-Local");
});
});
test.describe('Example Test Suite 1', function() {
this.timeout(30000);
test.it('Example Test Case 1', function() {
// ...Test Case Code goes here...
});
});