|
From: doug s. <hig...@ho...> - 2013-06-06 22:32:20
|
> >>> identical to pass. So there's 4 steps to testing: >>> A) generate automated test. In our case thats the .fwplay manually generated. >>> B) generate a test fixture before refactoring code, by playing the automated test >>> C) after refactoring, generate a playback file >>> D) compare B and C output files. They should be the same if your refactoring was good. If a test fails, roll back your refactoring changes, and try again. > . I make a change to freewrl, so now for -F / --fixture and -P / --playback it reads the name of the scenefile (ie 1.wrl) from the .fwplay (so don't put scenefile on command line for fixture and play, when using -N <nametest> option): . A) generate .fwplay freewrl 1.wrl -R -N fly2 (then hit "`" to toggle logging on, then off, hit 'x' to snapshot, hit 'q' to quit) creates: /recording/fly2.fwplay /freewrl_tmp/freewrl.snap.0001.bmp /freewrl_tmp/logfile.log . B) generate test fixture freewrl -F -N fly2 creates: /fixture/fly2.0001.bmp /fixture/fly2.log . C) generate playback freewrl -P -N fly2 creates: /playback/fly2.0001.bmp /playback/fly2.log . D) run a perl script to compare fixture and playback files . -Doug |