|
From: doug s. <hig...@ho...> - 2013-04-18 13:09:48
|
> > > > 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 'Refactoring' means you are changing the structure of the code but not the functionality. If you see bugs or opportunities for functional improvements while refactoring, you'd make a note and do them later, or regenerate test fixtures. |