I've established a considerable set of protractor test suites and I'm looking to implement it into jenkins to run these tests with each new build. To handle the output, simply outputting it to a text file doesn't suffice anymore e.g. protractor conf.js --suite [suiteName] > output.text
I've found protractor reporters here and here but I haven't found any information on manually manipulating the protractor output to represent it more clearly and attractively without the use of external frameworks / libraries.
Appreciate any input!
It sounds like you want to create a custom Jasmine reporter. The reporter API is explained in the Jasmine docs.
Since you only want to do stuff with test results, you only need to implement the specDone
callback. Your reporter would look something like this:
var myReporter = {
specDone: function(results)( {
writeToFile('Suite started: ' + result.description + ' whose full description is: ' + result.fullName);
}
};
Then you can add your reporter to Jasmine in your conf file:
jasmine.getEnv().addReporter(myReporter);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With