Search in sources :

Example 1 with AfterScenario

use of org.jbehave.core.annotations.AfterScenario in project jbehave-core by jbehave.

the class FailureCorrelationStories method afterScenarioFailure.

@AfterScenario(uponOutcome = Outcome.FAILURE)
public void afterScenarioFailure(UUIDExceptionWrapper failure) throws Exception {
    System.out.println("After Failed Scenario ...");
    File file = new File("target/failures/" + failure.getUUID().toString());
    file.getParentFile().mkdirs();
    file.createNewFile();
    failures.add(file.toString());
    System.out.println("Failure: " + file);
}
Also used : File(java.io.File) AfterScenario(org.jbehave.core.annotations.AfterScenario)

Aggregations

File (java.io.File)1 AfterScenario (org.jbehave.core.annotations.AfterScenario)1