HTML and CSS Reference
In-Depth Information
Tools of the Trade
I n Chapter 1, Automated Testing, we developed a very simple testCase
function, capable of running basic unit tests with test case setup and teardown
methods. Although rolling our own test framework is a great exercise, there are
many frameworks already available for JavaScript and this chapter explores a few
of them.
In this chapter we will take a look at “the tools of the trade”—essential and
useful tools to support a test-driven workflow. The most important tool is of course
the testing framework, and after an overview of available frameworks, we will spend
some time setting up and running JsTestDriver, the testing framework used for most
of this topic's example code. In addition to a testing framework, this chapter looks
at tools such as coverage reports and continuous integration.
3.1 xUnit Test Frameworks
In Chapter 1, Automated Testing , we coined xUnit as the term used to describe
testing frameworks that lean on the design of Java's JUnit and Smalltalk's SUnit,
originally designed by Kent Beck. The xUnit family of test frameworks is still the
most prevalent way of writing automated tests for code, even though the past few
years have seen a rise in usage for so-called behavior-driven development (or BDD)
testing frameworks.
Search WWH ::

Custom Search