Adds support for running tests in headless mode