AllureStoryReporter implements StoryReporter { @VisibleForTesting protected static void closeSession(String session) { try { LOG.info("Closing session {}", session); Class.forName("com.automationrockstars.design.gir.webdriver.DriverFactory").getMethod("closeSession", String.class).invoke(null, session); } catch (ClassNotFoundException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { LOG.error("Cannot close session {} due to ", session, e); } } AllureStoryReporter(); static String storyName(); static String scenarioName(); static String stepName(); static void attachScreenshot(String name, byte[] content); static void attachScreenshot(String name); static void generateReport(); @Override void storyNotAllowed(Story story, String filter); @Override void storyCancelled(Story story, StoryDuration storyDuration); @Override void beforeStory(Story story, boolean givenStory); @Override void afterStory(boolean givenOrRestartingStory); @Override void narrative(Narrative narrative); @Override void lifecyle(Lifecycle lifecycle); @Override void scenarioNotAllowed(Scenario scenario, String filter); @Override void beforeScenario(String scenarioTitle); @Override void scenarioMeta(Meta meta); @Override void afterScenario(); @Override void givenStories(GivenStories givenStories); @Override void givenStories(List<String> storyPaths); @Override void beforeExamples(List<String> steps, ExamplesTable table); @Override void example(Map<String, String> tableRow); @Override void afterExamples(); @Override void beforeStep(String step); @Override void successful(String step); @Override void ignorable(String step); @Override void pending(String step); @Override void notPerformed(String step); @Override void failed(String step, Throwable cause); @Override void failedOutcomes(String step, OutcomesTable table); @Override void restarted(String step, Throwable cause); @Override void restartedStory(Story story, Throwable cause); @Override void dryRun(); @Override void pendingMethods(List<String> methods); static final ThreadLocal<String> currentScenario; }
@Test public void test() { AllureStoryReporter.closeSession("sadfs"); }