Refactored how tests are run in Engine.