Protractor + AngularJS + Jasmine get output results on xml file -


i'm trying export protractor results xml files, found great link on web: https://github.com/angular/protractor/issues/60

after running : npm install jasmine-reporters

i added following lines protracotr config file:

require('jasmine-reporters');  jasmine.getenv().addreporter(new jasmine.junitxmlreporter(     'c:\temp\test', true, true)); 

and following error:

jasmine.console_reporter.js:2 if (! jasmine) { ^ referenceerror: jasmine not defined

i attached here config file, please advise doing wrong, , how can fix this:

require('jasmine-reporters');  jasmine.getenv().addreporter(new jasmine.junitxmlreporter(     'c:\temp\test', true, true));  // example configuration file. exports.config = {     seleniumaddress: 'http://localhost:4444/wd/hub',     chromeonly: true,    capabilities: {     'browsername': 'chrome'   },    specs: ['../test/protractor/publisher_list_e2e.js'],     allscriptstimeout: 60000,   // options passed jasmine-node.    jasminenodeopts: {     showcolors: true,     defaulttimeoutinterval: 30000   }  }; 

you have change config file looks this:

// example configuration file. exports.config = {   seleniumaddress: 'http://localhost:4444/wd/hub',   chromeonly: true,    capabilities: {     'browsername': 'chrome'   },    specs: ['../test/protractor/publisher_list_e2e.js'],   allscriptstimeout: 60000,    // options passed jasmine-node.   onprepare: function() {           require('jasmine-reporters');     jasmine.getenv().addreporter(       new jasmine.junitxmlreporter(null, true, true, '<path directory>')     );   },    jasminenodeopts: {     showcolors: true,     defaulttimeoutinterval: 30000   } 

};

the whole jasmine-reports feature has done in onprepare statement since jasmine required way that's guaranteed within onprepare function.

and based root folder of project. let me know if helps!


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -