[TIP] Automated Test Framework in python

Nicolas Chauvat nicolas.chauvat at logilab.fr
Sun Aug 22 10:11:24 PDT 2010


On Fri, Aug 20, 2010 at 12:11:09PM -0700, Amit Uttamchandani wrote:
> The test scripts I am talking about can vary quite a bit, although to be
> fair on the framework most of it is in python:
> 
>  1. Python scripts
>   - tests uploading of firmware via FTP, make sure firmware is loaded.
>   - tests various SNMP get/sets
>  
>  2. TCL scripts
>   - Communicate with IXIA packet gen to generate packets. Expected
>     results include number of packets sent/received/filtered out, etc.
> 
> So the framework ideally should be able to "manage" all these scripts
> and report fails/pass, etc.

What do you call "manage" ? How is it different from "run" or
"execute" ? How is what your are looking for different from running a
test suite and reporting the results ?

If your problem is about managing the script in the sense of "writing,
sharing, modifying, tracing versions", just use mercurial for the
management part and an existing framework for the execution/reporting part.

> So this is testing not for unit tests of the software but the actual
> final integrated product.

Forget about the difference between 'unit tests' and 'integration
test'. If each of your scripts is a test, it makes not much of a difference to
the framework that runs it if the test is low-level or high-level. The
framework will only care about the result.

> The answers I've gathered:
> 
>  1. Unittest with custom modules
>  2. Robot framework
> 
> Any other ideas? Am I asking too much of the framework?

http://www.logilab.org/project/apycot

See running example at http://apycot.hg-scm.org/

-- 
Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  



More information about the testing-in-python mailing list