I have following versions in my system
jasmine - [email protected]
node - v4.5.0
protractor - 4.0.10
and I am not able to generate any result file. for my scripts Is it some compatibility issues with these versions, I have also tried with jasmine-reporters - 2.0.0 still no luck.
Please help me thanks
my conf.js looks like
capabilities: {
'browserName': 'firefox
},
onPrepare: function() {
//The require statement must be down here, since jasmine-reporters
//needs jasmine to be in the global and protractor does not guarantee
// this until inside the onPrepare function.
browser.driver.manage().window().maximize();
require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter('testresults', true, true));
},
specs: [
'Apps/ImportApp/importEMC.js',
],
I have also tried with jasmine-reporters 2.0.0 and code was
framework: 'jasmine2',
onPrepare: function() {
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
savePath: 'testresults',
filePrefix: 'xmloutput'
}));
},
for this it gave me error as
jasmineReporters.JUnitXmlReporter is not a function
Error Log
at exports.config.onPrepare (D:\HalomemTestScripts\halosysNewScripts\localWorkspace\halosysus_halomem-newtests\conf_importapp.js:33:38) at C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\built\util.js:48:49 at Function.promise (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:682:9) at Object.runFilenameOrFn_ (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\built\util.js:38:16) at C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\built\runner.js:93:27 at _fulfilled (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54) at Promise.then.Q.nextTick.self.promiseDispatch.done (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30) at Promise.promise.promiseDispatch (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13) at C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49 at runSingle (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:137:13) [11:42:23] E/launcher - Process exited with error code 100
npm install jasmine-reporters
? – Sudharsan Selvarajnew jasmineReporters().JUnitXmlReporter({........
notjasmineReporters.JUnitXmlReporter({........
– radio_headnpm install --save-dev jasmine-reporters@^2.0.0
– Tanushreeframework: 'jasmine2', onPrepare: function() { var jasmineReporters = require('jasmine-reporters'); jasmine.getEnv().addReporter(new jasmineReporters().JUnitXmlReporter({ consolidateAll: true, savePath: 'testresults', filePrefix: 'xmloutput' })); },
I am getting this error E/launcher - Error: TypeError: jasmineReporters is not a function – Tanushree