INCLUDE_DATA

Quick Testing Tips Your daily feed of short software testing tips…

22Jun/09Off

Beware of letting your unit tests become integration tests

Today's tip comes from Dustin Sparks. As soon as you have a test dependent on something other than the unit of code you're testing, or a mock, you might have an integration test. That's ok, just be aware you're doing it.

Unit tests are designed to execute very quickly, on a single unit of code. Once you introduce dependencies you typically slow them down. That makes people less likely to run them. Also, unit tests should be focused. It's feedback on your test design. If you're trying to write a unit test, and you get an integration test, you might be having an issue framing the problem space.

Posted By Michael Kelly
Filed under: Unit Testing Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.

Categories

Authors

Pages

Site Optimization by PHP Speedy Site Optimization by PHP Speedy