[Tutor] the art of testing

Serdar Tumgoren zstumgoren at gmail.com
Tue Nov 24 21:41:04 CET 2009

Lie and Kent,

Thanks for the quick replies.

I've started writing some "requirements", and combined with your
advice, am starting to feel a bit more confident on how to approach
this project.

Below is an excerpt of my requirements -- basically what I've learned
from reviewing the raw data using ElementTree at the command line.

Are these the types of "requirements" that are appropriate for the
problem at hand? Or am I not quite hitting the mark for the data
validation angle?

I figured once I write down these low-level rules about my input, I
can start coding up the test cases...Is that correct?

<< requirements snippet>>

Root node of every XML file is PublicFiling
Every PublicFiling node must contain at least one Filing node
Every Filing must contain 'Type' attribute
Every Filing must contain 'Year' attribute, etc.
Filing node must be either a Registration or activity Report
Filing is a Registration when 'Type' attribute equals 'Registration'
or 'Registration Amendment'
Registration must not have an 'Amount' attribute
Registration must not have an 'is_state_or_local_attrib'

<< end requirements>>

More information about the Tutor mailing list