private void run() throws Throwable { HudsonHomeLoader loader = () -> home; // run each step inside its own JenkinsRule for (Map.Entry<Statement, Boolean> entry : steps.entrySet()) { Statement step = entry.getKey(); j = createJenkinsRule(description).with(loader); try { j.apply(step, description).evaluate(); if (!entry.getValue()) { Assert.fail("The current JenkinsRule should have failed to start Jenkins."); } } catch (Exception e) { if(entry.getValue()) { throw e; } // Failure ignored as requested } } }