|
From: Ian S. A. <ia...@ae...> - 2013-04-18 13:29:23
|
On 18/04/13 09:09 AM, doug sanden wrote: >> > >> > We don't have an automated test suite. So perhaps that could/should be a >> > first step. >> > >> > But even then, >> > Q1. how to set up unit testing to test all the platforms including >> > smartphones and tablets, and 64bit, from any one single platform, in a >> > fast, convenient feedback way? >> >> I don't think it's possible, in the same way that I don't think it's >> possible to use one common build system. >> >> >> > Q2. And how to do unit testing on computer graphics, with input devices >> > and rendered output, and multiple frames and events involved? >> >> also don't think it's possible, at least in an automated way. We can >> test on a benchmarking system what the differences are for output of the >> test .wrl files, but that's the closest we can do I think. >> > > Unit Testing - might be a faint hope of doing something, although I > don't ambitious enough myself to implement it. > > For comparison test fixtures: > - there are a few dump-scene functions in freewrl > - and a snapshot function. > The snapshots might render a bit different on each platform / computer? > If so then you would generate the trusted snapshot fixtures on each > testing platform before beginning refactoring. > > So one idea is to have a special unit test interface -to augment normal > SAI/EAI and scene loading- that would include some things like: > 0. specify number of mainloop loops to advance > 1. send in a keyboard input char - to trigger dumpscene or snapshot (or > direct functions) > 2. send in mouse / input device sequence > 3. file compare to test fixture > 4. some way to capture mouse sequences, keyboard input, number of > frames for replay, when generating test fixtures > Michel was doing similar things, iirc -- one of the driving reasons for being able to provide a string of characters to freewrl via the command line, back in the day: scripted .wrl/x3d loading, manipulation, and snapshotting , so that different freewrl instances can be directly compared. I don't know if he had an automated image comparison or not; that would be the next step. The issue is, as you said, the images from one machine to the next won't be the same so we'd need to generate the trusted/reference snapshots first and then test using the same machine (probably including machine configuration, ie mesa version etc). |