Reputation: 1454
I am preparing a suite of E2E tests using protractor and Jasmine. Currently I'm running these from the command line using Node. In the past I've used Jasmine tests with the SpecRunner.html setup, which shows the results in the browser as they are run, allows you to select individual tests or sub-suites of tests to run, etc.
Has anyone set up Jasmine + Protractor tests in that way - output going into one browser window, while tests run in another browser window?
Alternatively, is there a Jasmine reporter that will provide a similar output format even if I still have to run the tests from the command line?
Upvotes: 3
Views: 1127
Reputation: 473873
For jasmine2, look into jasmine2-screenshot-reporter
package.
For jasmine1:
I've used protractor-html-screenshot-reporter
package that generates nice test reports including screenshots:
initialize a baseDirectory
inside the onPrepare
function:
onPrepare: function() {
// Add a screenshot reporter and store screenshots to `/tmp/screnshots`:
jasmine.getEnv().addReporter(new HtmlReporter({
baseDirectory: '/tmp/screenshots'
}));
}
and observe a nicely HTML formatted test results:
Hope this is what you were asking about.
Upvotes: 4