Centralized common test logic