Saturday, June 5, 2010

Introducing VeriPyX: An Integration Testing Framework

For the last couple of months, I've been automating the integration testing of some command line tools, and developing my own framework and philosophy for such testing in tandem. The result is VeriPyX, an open source integration testing framework developed in Python and based on the idea of configuring test definitions as XML documents.


  • It is oriented towards testing free standing executables such as command line tools.

  • It allows for quite complex pre-test setup and post-test validation.

  • It is oriented towards test steps that consume and/or generate files, and need the generated files (including standard output and error) to be validated.

  • Test definitions are expressed in XML, making tests easier to pre-validate allowing you to use standard tools for finding, organizing and transforming tests. This example shows the structure of a test description, divided into setup, body and validate sections.

<test>
<setup>
<copy dir="${root}/data/TestValidate/Store" />
</setup>
<exec
command="Store.py -s Store -f ne > find_result.txt">
<expected status="0" />
</exec>
<validate>
<exec command="sort find_result.txt" >
<expected status="0"
out="TestValidate-expected-out.txt"/>
</exec>
</validate>
</test>
There are lots of things I want to do that VeriPyX doesn't support yet, so please (once again) watch this space ...

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.