[Chandler-dev] Script-recording/playback as test framework

Mikeal Rogers mikeal at osafoundation.org
Tue Dec 26 17:01:17 PST 2006


Many of you may have seen John Anderson's checkin of a script  
recording/playback feature.

Although there are still few kinks to work out the feature is very  
promising as a replacement for the current CATS automated tests.

I've started working on adding in some basic test framework features;  
results tracking, logging, etc.

I wanted to get a thumbs up on a few things before moving forward.

First, I want to get rid of the previous pass/fail approach and just  
use asserts. It's fairly easy to trap asserts and it has the  
advantage of being easy to program, easy to catch in the debugger,  
and we can give python tracebacks on each test failure.

Second is that I'm using the same logger as the rest of chandler. The  
downside right now is that I'm using logging.getLogger(__name__),  
which creates a logger named 'blah.scripting.script-recording', I'd  
like to name the logger something a bit more explicit to being a  
"test run" but it seems like I'll be violating some convention we  
have going. Also this means that all the log output is going into  
chandler.log, I imagine that we'll want to put another FileHandler  
for ease on tinderbox and I'd also like peoples opinion on if we  
should be putting in a StreamHandler to stdout.

Another thing I need some feedback on is the log level defaults for  
pass/fail of tests. Currently I'm using WARNING for test failures,  
CRITICAL for tracebacks during test runs, INFO for test passes, and  
DEBUG for test start/stop.

-Mikeal


More information about the chandler-dev mailing list