Google Open Sources Testacular, a JavaScript Test Runner
Google has open sourced Testacular, a JavaScript test runner based on Node.js. The tool can be used to test all major web browsers, can be integrated with CI tools, and it works with any code editor.
Testacular runs JavaScript code tests on various desktop or mobile device browsers, locally, on a device or on a continuous integration server. Testacular supports Chrome, ChromeCanary, Safari, Firefox, IE, Opera, PhantomJS, and knows how to capture the browsers using default paths which can be overridden in the launcher configuration files. Testacular is just a test runner being able to work with various testing frameworks, having adapters for Jasmine, Mocha and AngularJS. It can also be integrated with Jenkins or Travis for running continuous integration tests.
One of the power features of this testing tool is the ability to monitor a set of files for changes and immediately initiate tests on a saved file without the user having to leave the text editor. The test results are usually displayed at the command line and not within the code editor, making Testacular able to work basically with any JavaScript editor. For better results, it can be integrated with WebStorm which provides stack trace for errors and unit test debugging support.
In order to run, Testacular needs Node.js and a configuration file containing information regarding the files to be tested, those to be ignored, base path, web server port, logging level, etc. (A configuration file sample.)
Regarding its performance, Vojta Jína, a Google engineer, has demoed running about 1,500 AngularJS tests in WebStorm against Chrome Canary and Chrome in less than 5 seconds.
Jína wrote that Testacular was inspired by JS Test Driver, but they decided to write a different test runner due to the “many problems [they had] with JSTD”, wanting “a simple tool just for executing JavaScript tests that is both stable and fast. That's why we use the awesome Socket.io library and Node.js.”
So after running a set of tests based on this....
by
Porter Woodward
Educational Content
Intro to CLP with core.logic
Ryan Senior Jun 18, 2013
Spock: A Highly Logical Way To Test
Howard Lewis Ship Jun 18, 2013
Java Garbage Collection Distilled
Martin Thompson Jun 17, 2013
C++11 The Future is Here
Bjarne Stroustrup Jun 16, 2013
The Big Data Revolution
Claudia Perlich Jun 16, 2013




Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think