Can I run Jasmine + Protractor tests in the browser?
I am preparing an E2E test suite using protractor and jasmine. I am currently running them from the command line using Node. I used to use Jasmine tests with a SpecRunner.html setting that shows the results in the browser as they run, lets you select individual tests or sub-tests of tests to run, etc.
Has anyone configured Jasmine + Protractor tests this way - the output goes to one browser window and the tests run in another browser window?
Alternatively, is there a Jasmine reporter that will provide a similar output format even if I still need to run tests from the command line?
source to share
For jasmine2, take a look jasmine2-screenshot-reporter
.
For jasmine 1:
I used a protractor-html-screenshot-reporter
package that generates good test reports including screenshots:
-
initialize
baseDirectory
inside the functiononPrepare
:onPrepare: function() { // Add a screenshot reporter and store screenshots to `/tmp/screnshots`: jasmine.getEnv().addReporter(new HtmlReporter({ baseDirectory: '/tmp/screenshots' })); }
-
and carefully review the test results in HTML format:
Hope this is what you asked for.
source to share