Set up test environment when launching tests.