TESTS: Add tests for ShowErrorsMiddleware. Also add a shell script to do code coverage.