Many front end developers and programmers also want to create their own automated tests to get quick feedback on whether or not they’ve broken a code in their application while checking in new code or make changes to the exiting code base.
I spoke with Rob Friesel, author of PhantomJS Cookbook on TestTalks last year, and he said his main use of PhantomJs is to run a battery of unit test against code changes, so that as developers are committing new code, they quickly gain a high degree of confidence that the code they’re checking doesn’t have any effect on the current code base.
Because the testing is headless, the scripts run much faster than a traditional browser-based approach would.
This is a good practice; it’s great to use before your functional test scripts run, since they act as a quick and dirty sanity test to catch any issues before regression testing starts.
Based on some quick research I would say that PhantomJS is the most popular headless automation framework available at this time.
In my TestTalk with Derick, he mentioned that he knows it's not the most up-to-date framework out there; there are other frameworks that push forward faster and more frequently, but he’s not necessarily interested in staying on the cutting edge (or even the leading edge) of the testing world. Derick is more interested in long term stability, support and simplicity, which he finds in Jasmine, which is why he continues to stick with it.
• 11,087 GitHub Stars
• 1,385,198 NPM downloads in the last month
Protractor is an automated testing framework for testing AngularJs applications in the browser.
It’s also frequently described as a framework that falls somewhere in the middle of a unit testing and end-to-end test tool that is regularly by both Developers and QA testers.
Protractor is a layer that sits on top of Selenium; it runs Selenium in the background, and as a result you get all sorts of really cool hooks into your Angular application. This enables you to start grabbing your data bindings and using some of the Angular goodness like ng-repeats, etc.
You can also grab those elements by the Angular semantics and you can add to them, read from them and verify that your page has the right data. And, it does so whether you're sitting there or not.
According to Nate, it simply runs when you tell it to.
Nightwatch.js describes itself as an easy-to-use Node.js-based end-to-end (E2E) testing solution for browser-based apps and websites. It uses the Selenium WebDriver API to perform commands and assertions on DOM elements for front end testing.
Nightwatch.js test runner can execute tests in parallel. It also works with Selenium Grid and Sauce Labs, and sometimes more importantly, it has good documentation.
As a tool that an awesome job of abstracting away a lot of the complicated, asynchronous stuff you deal with when you’re creating PhantomJS scripts.
The code is also highly readable for creating functional tests, making it easy to use for folks that don’t necessarily have a strong technical background.
Nemo.js is an open-source, Node.js automation framework that was developed by PayPal. Nemo.js provides a simple way to add Selenium automation to your Node.js web projects. It also provides plugin architecture to incorporate custom features into your tests.
For whatever its worth, however, DalekJS has one of the coolest website designs among the frameworks — especially if you’re a Dr. Who fan.
This should give you an idea of what is out there already, and hopefully give you enough info to check out more.
If one of your favorite automation frameworks is not listed, please let me know and I’ll add it.