Testing - SFilinsky/worldscapes-engine Wiki

Testing is covered from two perspectives: Engine developer and Engine user.

For Engine developer

Developing Engine comes down to extending API objects and implementing some custom functionaity over them. It's not that important to test exact implementation, instead general API object integration tests should be run against any implementation. This is how we can grant that Engine will work smoothly.

Also, some Users can replace Engine parts with custom implementations, this is why testing tools for built-in API objects should be provided with Engine.

For User

From User perspective testing in most cases comes down to unit testing Rules. This can be done simply because Rules are pure functions. You just need to provide them some mock world state and check the result.

It's also possible to do E2E testing by running Engine simulation and creating different Events on Client-side.