in reply to Re^2: Testing A Stand Alone Application
in thread Testing A Stand Alone Application
My point was that in the code you've posted, there is nothing to test, so it's hard to demonstrate any mechanism for testing it.
The example I provide in my post is supposed to be the interface I'll use...
Interface to what? So far, the code does nothing, and you've provided no indication of what it should do. To write tests first, you have to have to know what the end point (or an intermediate point) is going to be, so that you can construct a test to verify that when yu write the code, you have achieved it.
For example, you've indicated that you'll be processing XML files some how. But how?
If so, you might verify that structure.
Maybe, by feeding in a known XML and hard coding a structural equivalent to verify against.
If so, you might test by feeding in a known XML and comparing the result against a hand-coded output.
You (we) gotta know what you are aiming for before you can construct a test that will check your code, when you write it, achieves that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Testing A Stand Alone Application
by est (Acolyte) on Mar 13, 2008 at 00:53 UTC | |
by BrowserUk (Patriarch) on Mar 13, 2008 at 01:49 UTC | |
by est (Acolyte) on Mar 13, 2008 at 05:06 UTC | |
by chromatic (Archbishop) on Mar 13, 2008 at 05:56 UTC | |
by BrowserUk (Patriarch) on Mar 13, 2008 at 10:36 UTC |