Discussion:
[Cucumber] [Cucumber-JVM] example of EventListner and Plugin after Formatter is depricated
Add Reply
Chetan Dewangan
2018-10-29 17:45:35 UTC
Reply
Permalink
I see Formatter is deprecated in latest cucumber version, I could not found
the example or documentation for alternative approach. Can someone please
help me provide it.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
George Dinwiddie
2018-10-29 21:58:33 UTC
Reply
Permalink
Post by Chetan Dewangan
I see Formatter is deprecated in latest cucumber version, I could not
found the example or documentation for alternative approach. Can someone
please help me provide it.
Chetan, use Plugin instead.

- George
--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Chetan
2018-11-14 00:09:25 UTC
Reply
Permalink
I tried following way but steup and teardown seems to be executed only for
reports at the end. The setup is not called before @Before. Can you please
share the snippet which you used with Plugin, basically I want my method to
be called only once before each scenario (before @Before) in parallel run
and only once after @After

public class CucumberSetupHooksPlugin implements EventListener {
private EventHandler<TestRunStarted> setup = event -> {
log.info("CucumberSetupHooksPlugin - setup called .....");
};

private EventHandler<TestRunFinished> teardown = event -> {
log.info("CucumberSetupHooksPlugin - teardown called .....");
};

@Override
public void setEventPublisher(EventPublisher publisher) {
publisher.registerHandlerFor(TestRunStarted.class, setup);
publisher.registerHandlerFor(TestRunFinished.class, teardown);
}
}
Post by George Dinwiddie
Post by Chetan Dewangan
I see Formatter is deprecated in latest cucumber version, I could not
found the example or documentation for alternative approach. Can someone
please help me provide it.
Chetan, use Plugin instead.
- George
--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to a topic in the
Google Groups "Cukes" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/cukes/UKDEPov1huc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
Regards,
Chetan
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MP Korstanje
2018-11-14 18:51:12 UTC
Reply
Permalink
Have a look at the release announcement for 4.0.0 as to why events come after the test run and how to resolve it.

https://cucumber.io/blog/2018/09/24/announcing-cucumber-jvm-4-0-0
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Chetan
2018-11-14 19:07:07 UTC
Reply
Permalink
Thanks MP,

I referred it earlier but it doesn't give much info, I in fact asked the
question in the comment of this article too.

Can you please point me where I can refer the example or provide me here?

Thanks,
Chetan
Post by MP Korstanje
Have a look at the release announcement for 4.0.0 as to why events come
after the test run and how to resolve it.
https://cucumber.io/blog/2018/09/24/announcing-cucumber-jvm-4-0-0
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to a topic in the
Google Groups "Cukes" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/cukes/UKDEPov1huc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
Regards,
Chetan
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MP Korstanje
2018-11-17 10:30:56 UTC
Reply
Permalink
This should help you:

https://github.com/cucumber/cucumber-jvm/blob/master/core/src/main/java/cucumber/runtime/formatter/ProgressFormatter.java
Post by Chetan
Thanks MP,
I referred it earlier but it doesn't give much info, I in fact asked the
question in the comment of this article too.
Can you please point me where I can refer the example or provide me here?
Thanks,
Chetan
Post by MP Korstanje
Have a look at the release announcement for 4.0.0 as to why events come
after the test run and how to resolve it.
https://cucumber.io/blog/2018/09/24/announcing-cucumber-jvm-4-0-0
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to a topic in the
Google Groups "Cukes" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/cukes/UKDEPov1huc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
Regards,
Chetan
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...