A couple of months ago I linked to a presentation on advanced unit testing techniques for front-end JavaScript using Jasmine. This week I did a presentation for a client using QUnit instead, covering roughly the same subjects: Mocking and spy techniques to avoid dependencies on Functions, methods and constructor functions Time (new Date()) Timers (setTimeout,… Read More

I recently gave a presentation at a meetup in Pleasanton, California on fast feedback. One of the cornerstones in Agile development is fast feedback. For engineering, “fast” means “instantly” or “in 5 minutes”, not “tomorrow” or “this week”. Your engineering practices should ensure that you can answer yes to most of the following questions: Do… Read More

I recently gave a presentation for a client on how to manage database changes in a large development organization with multiple database systems, multiple databases and multiple applications. I talked about how you can streamline your database changes by versioning your database instances and your database schema, running database instances locally and implementing database changes… Read More

Unit testing front-end JavaScript presents its own unique set of challenges. Yesterday we had another event in the Test Driven Developers Bay Area meetup group. At this event I presented a number of different techniques to tackle these challenges and make our JavaScript unit tests fast and robust using Jasmine (another version using QUnit). I… Read More

I’ve previously described how to run your QUnit tests and produce a coverage report on every commit. This works great if you happen to have chosen QUnit as your unit testing framework. Jasmine is another popular JavaScript unit testing framework. Here I will show how you can get the same automated feedback from your Jasmine… Read More

Being able to get fast feedback from failing unit tests is useful. And if you could easily identify the parts of your code that you still need to write tests for, you would get more comprehensive feedback. There is a plugin for Grunt that can use the JSCoverage tool to produce a coverage report while… Read More

Being able to check the quality of your code and run all unit tests in your project on every commit is useful. If you could do it on every save you would get even faster feedback. Grunt includes a watch facility that will run a task every time some file is changed. You only need… Read More

Being able to check the quality of your code on every commit is useful. But it would be even more useful if you could also run all your unit tests on every commit. Here I will show how you can extend the automated build setup to also run all your QUnit tests. (Switch to different… Read More

Update as of April 7, 2013: This blog series has now been extended with Jasmine and Istanbul. Update as of March 28, 2013: This blog series has now been upgraded to use Grunt-0.4. A lot of projects use continuous integration these days. It is still far more common for back-end projects using C#, Java or… Read More