|
From: doug s. <hig...@ho...> - 2013-06-01 18:17:19
|
testing I added a commandline option for setting the name of the .fwplay test file: -N or --nametest <string> If the option is omitted, it defaults to 1_wrl.fwplay for a scenefile 1.wrl This is in addition to the other 3 options -R --record (records .fwplay file as you mouse and keyboard in the scene) -F --fixture (plays the .fwplay saving any 'x' snapshots to /fixture/testname.0001.png) -P --playback (same as -F except saves 'x' snapshots to /playback/testname.0001.png) . Benefits: - can use the same scene file for multiple tests without name-clash freewrl 1.wrl -R -N test1 (do some fly navigation tests - generates recording/test1.fwplay) freewrl 1.wrl -R -N test2 (do some examine tests - generates recording/test2.fwplay) . I also added the scenefile name to the .fwplay file format, so it has 2 special lines before the per-frame records start. . test1.fwplay: window_wxh = 600, 400 scenefile = 1.wrl 1 42482.281000 "" "" 2 42482.781000 "" "6,0,491,147,0;" 3 42483.296000 "" "6,0,319,223,0;" ... . In the -N --nametest scenario, a perl script running automated tests needs a list of the .fwplay files. Then it would open the .fwplay and read the scenefile name and set it on the freewrl command line (rather than parsing the name of the scene file from the .fwplay name ie 1_wrl.fwplay -> 1.wrl) freewrl 1.wrl -P -N test1 . If the window width x height is unusual, it could be set on the commandline from perl: freewrl 1.wrl -P -N test1 -g 600x400 . The fixture and playback image files would be named fixture/test1.0001.png playback/test1.0001.png . and if the test went well graphicsmagick gm compare should show the images equal. . -Doug |