Unit testing JS/HTML webapp
I was wondering what you guys do for unit testing HTML/JS web apps. At my previous company we just did system level tests using HTML unit. Current company we don't have any practices for this.
Didn't realize this post is almost 2 years old and on the first page. Ugh
Our testing repository is here is you want to see what we have done. Most of our testing is done from the specs folder.
When you get a good base of tests they run rather quickly and our developers don't pull in the code if the tests don't pass.
Just an update,
I'm working at a company where I've implemented a TestSwarm. It's a pretty good runner for doing real browsers, and adding any new real browsers to the swarm. It's not good for fake browsers when you want to run tests in the back ground or get back results super fast. But overall we like it as it's good for quickly adding support for new browsers the day they come out, and it's pretty simple in design.
I think in terms of Runners that have the feature set I like, Karma is probably my favorite at the moment. It can run with both real and headless browsers, although browser support might lag behind test swarm, it does a good job at supporting the popular browsers. It's easy to configure Karma to run on WebStorm to automatically run tests in the background every time a file is changed.
Last edited by dlai; 03-11-2014 at 05:17 AM.