Chapter 17. Unit Testing

In This Chapter

The Tested Code




Software quality is an important subject. Improving software quality is a big task, which includes code reviews, team meetings, code quality tools, QA, and more. The one task that you, as a developer, can do to make sure your code works as expected even before it leaves your development machine is to test it. By that, I don’t mean to run it once, see that it works, and move on. I mean to write unit tests for it.

A unit test is a piece of code that runs the software and tests its output. Usually a unit test tests the smallest portion of code it can. For example, every method will be tested to make sure it works as expected. By having code ...

Get IronRuby Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.