S Patchamatla S Patchamatla - 10 months ago 79
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?


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.