views:

94

answers:

4

I'm writing a tool to run a series of integration tests on my product. It will install it and then run a bunch of commands against it to make sure its doing what it is supposed to. I'm exploring different options for how to markup the commands for each test case and wondering if folks had insight to share on this. I'm thinking of using YAML and doing something like this (kinda adapted from rails fixtures):

case:
    name: caseN
    description: this tests foo to make sure bar happens
    expected_results: bar should happen
    commands: |
        command to run
        next command to run
    verification: command to see if it worked

Does anyone have another, or better idea? Or is there a domain specific language I'm unaware of? Thanks!

A: 

Is there a reason you are not going for the obvious approach of XML?

Craig H
+1  A: 

You might want to check out CPAN. It does for Perl scripts exactly what it sounds like your utility will do for your app.

Hank Gay
+1  A: 

G'day,

Go and have a look at the XUnit suite of test tools. This framework was originally designed for Smalltalk by Kent Beck and, I think, Erich Gamma, and it has now been ported to a whole stack of other languages, e.g. CUnit

cheers,

Rob

Rob Wells
+1  A: 

Did you take a look at RSpec?

http://rspec.info/

Željko Filipin