Refactored test execution