You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM mrsheepuk/protractor
RUN npm install --save-dev jasmine-reporters@^2.0.0
RUN npm install --save jasmine-spec-reporter
when I use TerminalReporter I get nice colorful output. Unfortunately, with JUnitXmlReporter the output is:
Warning: writing junit report failed for '..', 'junitresults-foo.xml'. Reasons:
PhantomJs attempt: window is not defined
NodeJS attempt: Unexpected token {
My config:
var reporters = require('jasmine-reporters');
var junitReporter = new reporters.JUnitXmlReporter({
savePath: '..',
consolidateAll: false
});
var terminalReporter = new reporters.TerminalReporter({
verbosity: 3,
color: true,
showStack: true
});
var myReporter = {
specDone: function(result){
fs = require('fs');
fs.writeFile('result.txt', 'Suite: ' + result.description + ' was ' + result.status);
for(var i = 0; i < result.failedExpectations.length; i++) {
fs.writeFile('target/result.txt', 'AfterAll ' + result.failedExpectations[i].message);
fs.writeFile('target/result.txt', result.failedExpectations[i].stack);
}
}
};
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
framework: "jasmine2",
specs: ['*.spec.js'],
// Chrome is not allowed to create a SUID sandbox when running inside Docker
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['no-sandbox']
}
},
// Options to be passed to Jasmine.
jasmineNodeOpts: {
showColors:true,
defaultTimeoutInterval: 400000,
isVerbose: true,
includeStackTrace: true
},
onPrepare: function() {
jasmine.getEnv().addReporter(junitReporter);
}
};
Can you please help me to fix it?
Many thanks
The text was updated successfully, but these errors were encountered:
Hello there,
I'm running protractor e2e tests in docker image.
when I use
TerminalReporter
I get nice colorful output. Unfortunately, withJUnitXmlReporter
the output is:My config:
Can you please help me to fix it?
Many thanks
The text was updated successfully, but these errors were encountered: