How to start testing?

When I Grow Up, I Want To Test! ☺

I love the concept of tests.  

I love that they automate something very useful.  
I love the idea of developing a modular test suite I can use across projects, and simply write any project-specific tests on top. 
I love the idea of being able to make a change in a given project and have an automatic way of being absolutely confident that changes are moving the code forward without breaking anything.

Alas, Testing Eludes Me
…But I’ve never used tests in my own projects.  I just don’t know how to get started.  

Other than very general ideas about testing, I can’t find resources to help an absolute beginner (like me) to the minimum proficiency to be comfortable enough to self-teach from that point onwards.

The other major problem is that most resources about XML testing tell me what to write, not how to write.  That is, they describe the syntax for a particular test grammar, but not how to think in order to start writing tests from scratch.  (Or, they offer a very brief and general description that makes sense, but is not enough to get started when I open up a new XML document and start starting at a blank screen.)


What I know About Testing
I’ve done tons of reading in my attempts to learn how to use testing in my projects.  I haven’t been able to put anything into practice, but I have learned a few things along the way:

Of the various testing “schools of thought”, Behavior Driven Development (BDD) makes the most sense to me.
There’s tons of resources for testing in other programming languages.  I dabble in other programming languages, but my experience is too broad (and not deep) enough for me to feel qualified to judge whether they are candidates for gleaning any useful concepts from.
To quote the awesome Mark Pilgrim, there are “a metric f***-ton” of ways to test XML:
Normal validation (sometimes against several different types of schemas)
Schematron
NVDL
Xspec 
Online Validation via REST (e.g., validator.nu , Test Everything!, etc.)
Xproc’s various steps for validation
…and probably even more I haven’t found yet

OMFG
I am overwhelmed by the sheer number of options!

Do I start with just one of these things?  
Do I manage these things separately?  Or is there a way to declare at a higher level, “run NVDL, then XSpec, then Schematron, etc.”?  
Do any of these (partially or completely) obsolete others?
And apart from this problem of overflow, the most important thing I am missing is the mental process of writing tests.


Help?
Any help for this would be greatly appreciated!

If it helps, most of my XML work tends to include XHTML 1 (Strict), XHTML5 (or my best attempt at polyglot, at any rate), and DocBook5.  I’m also dabbling more and more with data-scraping from websites.  Either way, my primary focus on web content & DocBook.  



Thanks!

—Tony

Received on Friday, 6 May 2011 17:18:53 UTC