factored out base class
Fix require path in example
Exit with status 1 when tests fail