Envelope/Quill DoingTests

- Last edited August 12, 2001
[Wiki.UnitTests] are what allow you to confidently make changes to your code and ensure that nothing is broken.

Worried about IntroducingTestUpFront to an existing team or code base?

The testing experience is that you write your test upfront, and then run it. It should immediately fail because you haven't written the code to implement the test yet.

It is hard to make sure you have the discipline to write tests upfront (which is why DoingPairProgramming is important); however the benefit is huge.

There are examples of DoingTests where we have been working on RealCode.

In one of our examples, you can see that a simple text compare is done to check the output from a Servlet. We think this is the simplest thing until you start using more HTML in your output. You know you've reached this point when you have to change these tests often. The tests have become dependent on your presentation, at this point you can move on to the next level. -- OliBye

You'll probably need a test framework if you're going to do _lots_ of tests, so try using cppunit (c2.com/cgi/wiki?CppUnit) or junit (www.junit.org/). Remember that these are *UNIT* tests, not necessarily acceptance tests, you'll probably need something else to test business functionality (esp GUIs).


- Last edited August 12, 2001

https://casino-brain.com/