Copyright by Kent Beck

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 18. First Steps to xUnit

Driving a testing tool using the testing tool itself to run the tests may seem a bit like performing brain surgery on yourself. (“Don't touch those motor centers—oh, too bad, game over.”) It will get weird from time to time. However, the logic of the testing framework is more complicated than the wimpy money example of Part I. You can read Part II as a step toward test-driven development of “real” software. You can read it as a computer-sciency exercise in self-referential programming.

First, we need to be able to create a test case and run a test method. For example: TestCase("testMethod").run(). We have a bootstrap problem: we are writing test cases to test a framework that we will be using to write the test ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required