@Override public void run(final RunNotifier pRunNotifier) { this.notifier = pRunNotifier; this.notifier.addFirstListener(new JUnitStepListener()); super.run(this.notifier); } }
@Override public void run(RunNotifier notifier) { parallelize(options.parallelize()); if (Configuration.current().drivers.stream().anyMatch(driver -> driver instanceof GridConfiguration && driver.as(GridConfiguration.class).enableLiveStream)) { liveStreamListener = new LiveStreamListener(); notifier.addListener(liveStreamListener); } notifier.fireTestRunStarted(getDescription()); super.run(notifier); }
@Override public void run(RunNotifier notifier) { parallelize(options.parallelize()); if (Configuration.current().drivers.stream().anyMatch(driver -> driver instanceof GridConfiguration && driver.as(GridConfiguration.class).enableLiveStream)) { liveStreamListener = new LiveStreamListener(); notifier.addListener(liveStreamListener); } notifier.fireTestRunStarted(getDescription()); super.run(notifier); }
@Override public void run(RunNotifier notifier) { if (listener != null) { notifier.removeListener(listener); } List<FrameworkField> services = this.getTestClass().getAnnotatedFields(Service.class); ArrayList<FrameworkField> sortedServices = new ArrayList<>(services); Collections.sort(sortedServices, new Comparator<FrameworkField>() { @Override public int compare(FrameworkField o1, FrameworkField o2) { return Integer.compare(o1.getAnnotation(Service.class).value(), o2.getAnnotation(Service.class).value()); } }); listener = new KurentoTestListener(sortedServices); notifier.addListener(listener); listener.testRunStarted(getDescription()); if (!shutdownHook) { shutdownHook = true; Runtime.getRuntime().addShutdownHook(new Thread("app-shutdown-hook") { @Override public void run() { listener.testSuiteFinished(); } }); } // TODO Remove this if we change service management notifier = new KurentoRunNotifier(notifier); super.run(notifier); }
@Override public void run(RunNotifier notifier) { if (listener != null) { notifier.removeListener(listener); } List<FrameworkField> services = this.getTestClass().getAnnotatedFields(Service.class); ArrayList<FrameworkField> sortedServices = new ArrayList<>(services); Collections.sort(sortedServices, new Comparator<FrameworkField>() { @Override public int compare(FrameworkField o1, FrameworkField o2) { return Integer.compare(o1.getAnnotation(Service.class).value(), o2.getAnnotation(Service.class).value()); } }); listener = new KurentoTestListener(sortedServices); notifier.addListener(listener); listener.testRunStarted(getDescription()); if (!shutdownHook) { shutdownHook = true; Runtime.getRuntime().addShutdownHook(new Thread("app-shutdown-hook") { @Override public void run() { listener.testSuiteFinished(); } }); } // TODO Remove this if we change service management notifier = new KurentoRunNotifier(notifier); super.run(notifier); }