-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconf.js
53 lines (41 loc) · 1.38 KB
/
conf.js
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
var env = require('./env.js');
exports.config = {
framework: 'jasmine2',
// seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {'browserName': 'chrome'},
specs: ['FJ-about-smoke-spec.js'],
//
sauceUser: "flapjack",
sauceKey:'2f025b43-99f8-4674-9570-ee5319147cae',
//////suites: {
// homepage: 'tests/e2e/homepage/**/*Spec.js',
// search: ['tests/e2e/contact_search/**/*Spec.js']
//},
onPrepare: function() {
var jasmineReporters = require('jasmine-reporters');
var mkdirp = require('mkdirp');
var SpecReporter = require('jasmine-spec-reporter');
// add jasmine spec reporter
jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: true}));
browser.driver.manage().window().setSize(1600, 800);
browser.ignoreSynchronization = true;
// var folderName = (new Date()).toString().split(' ').splice(1, 4).join('-');
var newFolder = "reports/"
mkdirp(newFolder, function( err ) {
if (err) {
console.error(err);
} else {
var jUnitXmlReporter = new jasmineReporters.JUnitXmlReporter(
{consolidateAll: true,
savePath: newFolder,
filePrefix: 'test-results'}
);
jasmine.getEnv().addReporter(jUnitXmlReporter);
}
});
}
}
;
//protractor protractor.conf.js --suite homepage
//npm install jasmine-reporters
//npm install mkdirp