Three Types of Tests

Automated testing is a good thing, but too many developers think that unit tests are the only automated testing tools available to them.

1. Acceptance Tests

Acceptance tests are end-to-end, automated tests. They test complete features by getting as close as they can to a real user's interaction with the the application under test. Their real strength, however, is that acceptance tests prevent regressions in the complete system. Once a passing acceptance test is in place its failure is a pretty good indicator that a change elsewhere caused issues with the complete system.

If you're into TDD, the first test you write is probably an acceptance test. That means setting up a Walking Skeleton to watch the first test fail.

Story Behavior Driving Development (Story BDD) seems like a good methodology for automating end to end tests. That said, no special tools are really required.

2. Integration Tests

If an application is a web of interconnected objects, procedures, and values at some point it probably has to touch the outside world. Outside world in this cause means the network, filesystem, external code (libraries), and other, similar things.

Integration tests cover the edges of the system. They test objects that touch the outside world by allowing them to do just that: interact with it. For example: if an object interacts with a database, its integration test would really communicate with the database.

Specification BDD may be a great way to run integration tests. No special tools are really required, however, as integration tests can be run with whatever testing framework.

3. Unit Tests

These are the tests everyone is used to. They work by placing a single object or procedure under test in isolation. Mocks are used to ensure that the object passes the correct message or responds correctly to messages received.

While integration and acceptance tests generally follow happy path's (nothing broken) in the application, unit tests try to cover everything.

Nearly every language has a unit test + mocking framework:

All of these frameworks can work just fine for running acceptance and integration tests.

#