Schroedingers-Hat/jsphys — Issue #116: Build relativity testing framework
Author: capnrefsmmat
Created: 2011-11-01 16:38:25+00:00
State: open

This is related to issue #23.

We should have a test framework for the relativity simulator, so we have automated tests to verify that each change we make keeps the physics correct.

I have a very simple proposal for a test framework that would run the tests:

* Use the demo system to set up a situation. Have the simulator run it for a set period of time, then save all relevant information (objects, their properties, etc.).
* Switch to a new situation, and run it for another set period of time (or no time at all).
* Compare, and verify that all properties between the two demo situations are identical.

This lets us do things like create a demo, and then create a "this is what it should look like after ten seconds" demo, and compare. Or perhaps we could allow demo steps, so we'd have "run this ten seconds, reverse time, and run it backwards ten seconds, and see that we're back to where we started."

@Schroedingers-Hat: Does this sound like a useful and reasonable approach? What tests would you want to be able to run?