generalize integration test hierarchy construction