Testem CI Mode Screencast

Hello all! Here's another screencast on Testem. This one is on the continous integration (CI) mode.

What is CI?

Continous integration is something that is great to do once you've gotten comfortable with the basics of TDD. With CI, you setup a separate machine - usually called the CI server - to run your tests automatically every time new code is checked in. If tests fail, the CI machine can be setup to notify members of the team by email. Once you set up the CI server, it's set it and leave it. CI takes test automation one step further and makes running your tests an even more frequent occurrence.

But Do You Really Need CI?

Let's be the devil's advocate for a second.

Why do you need CI if you already make your tests green before you check in code?

It's true that if you make passing the tests a prerequisite to committing code, CI is not as critical. However, there are at least two situations where CI is helpful.

#1: If not every member in your team is test conscious

A common situation is that not everyone in your team is on board with TDD yet and you are trying to champion it. Another is that some members will simply never get into TDD, maybe because they are already set in their ways or they don't really consider themselves developers - for example, designers often work in the same codebase with developers. CI will help you catch breakage introduced by these folks early.

#2: If you are coding for many platforms

When you are developing software for multiple platforms, whether it's Mac/Windows/Unix, Playstation/XBox/Wii, or IE/Firefox/Safari/Chrome, it's impractical to expect developers run their tests on each target platform before committing, this is where CI really shines.

The CI Mode

Testem has a CI mode - which rather than giving you a full-blown UI, simply launches each browser in succession and outputs the test results in the TAP format. There are already TAP plugins out there for popular CI servers like Jenkins and Teamcity which parse the TAP output and format them into nice web pages, and so Testem can be straightforwardly integrated with them.

The Screencast (4:24)

Without further ado, here's the screencast

More Info

For more info checkout the docs on CI.

blog comments powered by Disqus