NBOCampbellToets / CampbellSoup

CampbellSoup, the web-based archive of Campbell test questions.
0 stars 1 forks source link

Functional test suite #12

Closed jgonggrijp closed 7 years ago

jgonggrijp commented 7 years ago

Probably using PhantomJS and possibly Protractor.

jgonggrijp commented 7 years ago

After some study, I'm homing in on grunt-protractor-runner, initially using this page as a source of hints.

If that turns out unsuccessful, I will probably go with Casper. It is actively maintained and works with PhantomJS (which we already use).

There are some Grunt plugins for Casper available, but unfortunately, none of them appears to be well maintained or widely used. Among them, grunt-casperjs seems to be the most promising; we could try that first. If it does not work, it should be possible to create our own wrapper using grunt-shell.

jgonggrijp commented 7 years ago

839cbf0

I decided to go with CasperJS first, anyway. A Protractor-based solution could potentially be run against more different stock browsers; CasperJS only supports headless WebKit and headless Gecko (SlimerJS), where the latter is supported only experimentally. However, CasperJS requires fewer software layers, which means there are fewer potential sources of headaches as well. End-to-end testing against real-world browsers is definitely necessary, but I think it can be left to human testers at a later stage, when all headless functional tests have already succeeded.

In the commit above I did run into one issue. If this turns out to be hard to solve, I will try my luck with Protractor after all.