-
-
Save FrankyBoy/d9ad3be86e456499c82a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ScreenShotReporter = require('protractor-screenshot-reporter'); | |
var path = require('path'); | |
var moment = require('moment'); | |
exports.config = { | |
seleniumAddress: 'http://localhost:4444/wd/hub', | |
// top secret settings were here ;) | |
onPrepare: function() { | |
browser.driver.manage().window().setSize(480, 800); | |
var startTime = moment().format("YY-MM-DD - HH-mm-ss"); | |
var basePath = path.join('.','reports', startTime); | |
// add xml-reporter | |
require('jasmine-reporters'); | |
jasmine.getEnv().addReporter( | |
new jasmine.NUnitXmlReporter({savePath:basePath}) | |
//new jasmine.JUnitXmlReporter(basePath, true, true) | |
); | |
// add screenshot reporter | |
jasmine.getEnv().addReporter( | |
new ScreenShotReporter({ | |
baseDirectory: path.join(basePath, 'screenshots'), | |
pathBuilder: function pathBuilder(spec, descriptions, results, capabilities) { | |
return moment().format("HH.mm.ss.SSS") + " - " + descriptions.join(' '); | |
} | |
}) | |
); | |
}, | |
jasmineNodeOpts: { | |
showColors: true | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1702 | |
throw error; | |
^ | |
TypeError: Cannot set property 'executed' of undefined | |
at Object.jasmine.NUnitXmlReporter.reportSpecResults (D:\svn\M2\Protractor\node_modules\jasmine-reporters\src\jasmine.nunit_reporter.js:99:31) | |
at jasmine.NestedResults.totalCount [as reportSpecResults] (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminen | |
ode\lib\jasmine-1.3.1.js:1892:39) | |
at jasmine.Spec.finishCallback (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:244 | |
8:21) | |
at jasmine.Spec.finish (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2453:8) | |
at jasmine.Spec.execute (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2471:10) | |
at jasmine.Queue.next_ (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2200:31) | |
at jasmine.Queue.start (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2153:8) | |
at jasmine.Suite.execute (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2627:14) | |
at jasmine.Queue.next_ (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2200:31) | |
at jasmine.Queue.start (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2153:8) | |
==== async task ==== | |
run test preparers | |
at Runner.runJasmine_ (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:91:35) | |
at driverprovider_.setupEnv.then.then.then.testResult (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:393:34) | |
at _fulfilled (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:797:54) | |
at self.promiseDispatch.done (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:826:30) | |
at Promise.promise.promiseDispatch (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:759:13) | |
at C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:525:49 | |
at flush (C:\Users\ihayden\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:108:17) | |
at process._tickCallback (node.js:415:13) | |
at Function.Module.runMain (module.js:499:11) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Something', function() { | |
var ptor; | |
beforeEach(function () { | |
ptor = protractor.getInstance(); | |
}); | |
afterEach(function () { | |
browser.executeScript('window.sessionStorage.clear();'); | |
browser.executeScript('window.localStorage.clear();'); | |
browser.driver.manage().deleteAllCookies(); | |
}); | |
describe('Sub-Something', function() { | |
it('does whatever', function() { | |
//some assertions | |
}); | |
}); | |
// ddescribe for focus! | |
ddescribe('Something I want to focus on', function() { | |
it('is doing something weird', function() { | |
//some assertions | |
}); | |
}); | |
// again copy/pasta from "active" | |
describe('Something else', function() { | |
it('does whatever', function() { | |
//some assertions | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment