|
From: doug s. <hig...@ho...> - 2013-07-14 21:10:15
|
I put the command line option summary on http://freewrl.sourceforge.net/use.html page for now, but I think it needs a separate page. I've found the GraphicsMagick command: gm compare -metric mse file1 file2 very helpful, as about 20% of screen shots differ by a few pixels and up to 10% of color value on each of those pixels, more so with stretched texture maps. The mse (mean square error) returns 0.0 for these small differences, and .1 or greater for 'truly' different files. For example if I move something even slightly in a scene, mse will be .1. I find the whole system useful, and time saving, but a bit verbose, and needing lots of folders, utilities and supporting files: perl graphicsmagick tlist.txt - a list of test scene files ie 1.wrl 2.wrl .. KeySensor/KeySensorTestAll.x3d .. gen_test_scripts.pl - a perl script that reads the list of test scenes, and generates 4 shell scripts / batch files: - record_script.bat ---- interactively runs through tests so you generate .fwplay recordings - fixture_script.bat ---- automatically generates fixture .bmp/.png and/or .log files in /fixture for all tests - playback_script.bat ---- automatically generates playback .bmp/.png and/or .log files in /playback for all tests - compare_script.bat ---- calls a compare script on each test, and echoes PASS ~PASS or FAIL for each test compare.pl - complex compare script. It tries simple perl file compare. If that fails, it tries the graphicsmagick compare. if that fails the test FAILs. Else it PASSes. I just wish it was a bit less clumsy, with a simple push-button gui. In case someone wants to play with it, here's my two .pl scripts (open/MIT) and /recording/*.fwplay for tests 1-52.wrl http://dug9.users.sourceforge.net/web3d/testing/testing1.zip -Doug |