S Patchamatla S Patchamatla - 1 year ago 131
Javascript Question

Unable to generate Report when using jasmine-reporters in protractor

i Used the following code in config

var jasmineReporters = require('jasmine-reporters');
onPrepare: function() {
//For output reports
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter('./test', true, true));


When i ran the tests it ran successfully, but im not seeing any reports generated.

Any Suggestions?

Answer Source

Not sure it would help but here is what is working for me:

onPrepare: function () {

    // junit reporter
    var capsPromise = browser.getCapabilities();
    capsPromise.then(function (caps) {
        var browserName = caps.caps_.browserName.toUpperCase();
        var browserVersion = caps.caps_.version;
        var prePendStr = browserName + "-" + browserVersion + "-";
            jasmine.JUnitXmlReporter("test-results", true, true, prePendStr));

Using jasmine 1.3, jasmine-reporters 1.0.1, protractor 2.0.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download