Open tronghieu opened 6 years ago
Any solution for this issue? I got same problem
cucumber.runtime.CucumberException: Couldn't load plugin class: com.cucumber.listener.ExtentCucumberFormatter. It does not implement cucumber.api.Plugin at cucumber.runtime.formatter.PluginFactory.loadClass(PluginFactory.java:179) at cucumber.runtime.formatter.PluginFactory.pluginClass(PluginFactory.java:166) at cucumber.runtime.formatter.PluginFactory.getPluginClass(PluginFactory.java:223) at cucumber.runtime.formatter.PluginFactory.isFormatterName(PluginFactory.java:201) at cucumber.runtime.RuntimeOptionsFactory.addPlugins(RuntimeOptionsFactory.java:94) at cucumber.runtime.RuntimeOptionsFactory.buildArgsFromOptions(RuntimeOptionsFactory.java:41) at cucumber.runtime.RuntimeOptionsFactory.create(RuntimeOptionsFactory.java:26) at cucumber.api.junit.Cucumber.
(Cucumber.java:74) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:87) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:73) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:46) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:522) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
As mentioned above the plugin still not supports cucumber 2.0. I'm yet to start work on this.
I appreciate a PR.
Thanks Vimalraj
On 23-Jan-2018 3:53 PM, "athoriq" notifications@github.com wrote:
Any solution for this issue? I got same problem
cucumber.runtime.CucumberException: Couldn't load plugin class: com.cucumber.listener.ExtentCucumberFormatter. It does not implement cucumber.api.Plugin at cucumber.runtime.formatter.PluginFactory.loadClass( PluginFactory.java:179) at cucumber.runtime.formatter.PluginFactory.pluginClass( PluginFactory.java:166) at cucumber.runtime.formatter.PluginFactory.getPluginClass( PluginFactory.java:223) at cucumber.runtime.formatter.PluginFactory.isFormatterName( PluginFactory.java:201) at cucumber.runtime.RuntimeOptionsFactory.addPlugins( RuntimeOptionsFactory.java:94) at cucumber.runtime.RuntimeOptionsFactory.buildArgsFromOptions( RuntimeOptionsFactory.java:41) at cucumber.runtime.RuntimeOptionsFactory.create( RuntimeOptionsFactory.java:26) at cucumber.api.junit.Cucumber.(Cucumber.java:74) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance( NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance( DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.junit.internal.builders.AnnotatedBuilder.buildRunner( AnnotatedBuilder.java:104) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass( AnnotatedBuilder.java:86) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass( RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder .runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass( RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner( ClassRequest.java:33) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader. createUnfilteredTest(JUnit4TestLoader.java:87) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest( JUnit4TestLoader.java:73) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests( JUnit4TestLoader.java:46) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. runTests(RemoteTestRunner.java:522) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. runTests(RemoteTestRunner.java:760) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. run(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. main(RemoteTestRunner.java:206)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/email2vimalraj/CucumberExtentReporter/issues/75#issuecomment-359746006, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKI3pGjwbhu8qMWiVMMN1LMtsv8W4Xaks5tNbMsgaJpZM4RTCyb .
After implementing workaround for #59, I also faced this error as of 3.1.0
.
Cucumber-JVM is now at 3.x.x (which I am currently using). This is an excellent reporting tool but may be lagging behind other reporting alternatives.
CucumberOptions:
@RunWith(Cucumber.class)
@CucumberOptions(features = { "src/test/resources/jcucumberng/project/features" }, tags = { "not @ignore" }, glue = {
"jcucumberng/project/typeregistry", "jcucumberng/project/stepdefs", "jcucumberng/project/hooks" }, plugin = {
"pretty", "com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-html-extent/report.html",
"html:target/cucumber-html-default", "json:target/cucumber-report.json",
"junit:target/cucumber-report.xml" }, snippets = SnippetType.UNDERSCORE, monochrome = true, strict = true, dryRun = false)
Output
cucumber.runtime.CucumberException: Couldn't load plugin class: com.cucumber.listener.ExtentCucumberFormatter. It does not implement cucumber.api.Plugin
@kathyrollo : I'm currently working on this and expected to release a new version in a week. Now the recent version of cucumber-jvm removed many things which were directly accessible in earlier versions. So the delay is.
@email2vimalraj: I would like to ask you, if you have any solution for the Bug?
best regards
any update please?
@email2vimalraj I would also like to know, if you have any update on this? Thanks.
@email2vimalraj I would also like to know any update for this issue. Or can you please just tell us some workaround for now? I don't want to downgrade the cucumber-jvm version to 1.2.5 Thanks
Hello everyone,
I understand the pain of everyone waiting for the update. But I've got busy as I moved to a different country and still settling down. So not able to spend much time on contributing, but I would definitely wanted to give an update.
And most importantly, the recent cucumber-jvm upgraded their APIs massively which leads to understanding and trying to back support what I was providing as a feature. So it will take sometime.
I would be very happy if any one of you can come forward and send me a PR which can support the latest version.
So right now, I don't have any timeline to promise you, but will try my level best to get this done as quick as possible.
Thanks Vimalraj
On Tue 21 Aug, 2018, 2:14 PM Bhavik-Selenium, notifications@github.com wrote:
@email2vimalraj https://github.com/email2vimalraj I would also like to know any update for this issue. Or can you please just tell us some workaround for now? I don't want to downgrade the cucumber-jvm version to 1.2.5 Thanks
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/email2vimalraj/CucumberExtentReporter/issues/75#issuecomment-414561537, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKI3oG0zazJ7pr9njJljbw-tRrYwCJiks5uS6VUgaJpZM4RTCyb .
Hi @email2vimalraj , Congratulations on the move and take your time. Happy to know it is still being actively worked on. This will definitely be a fine addition to my cucumber-jvm-3 framework.
@email2vimalraj - Any update on this. We are fighting to generate the extend reports with latest cucumber-jvm version.
@email2vimalraj can we have some alternative solution like downgrading the cucumber jvm version and extent report. will that help meanwhile?
fyi all - Cucumber-jvm v5 will be available soon.. I think creating the latest would be considered at this point. I am working on the v5 port for internal reports but love this framework and Extent so would love to contribute.
Hello, does some one have a working workaround POM example for this? Do we need to downgrade all Cucumber related libraries or are there some specific ones?
Any solution to this problem?
fyi all - @anshooarora will be releasing Extent Framework support for cucumber2 and cucumber4 this week. Stay tuned.
Cucumber 2 - https://github.com/extent-framework/extentreports-cucumber2-adapter
<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports-cucumber4-adapter -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports-cucumber2-adapter</artifactId>
<version>1.0.0</version>
</dependency>
Cucumber 4 - https://github.com/extent-framework/extentreports-cucumber4-adapter
<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports-cucumber4-adapter -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports-cucumber4-adapter</artifactId>
<version>1.0.1</version>
</dependency>
Currently, usage docs are only available for cucumber4 but they are exactly the same for cucumber2 as well. Please use the same concepts with your version of cucumber.
Usage docs - http://extentreports.com/docs/versions/4/java/cucumber4.html
Cucumber 2 - https://github.com/extent-framework/extentreports-cucumber2-adapter
<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports-cucumber4-adapter --> <dependency> <groupId>com.aventstack</groupId> <artifactId>extentreports-cucumber2-adapter</artifactId> <version>1.0.0</version> </dependency>
Cucumber 4 - https://github.com/extent-framework/extentreports-cucumber4-adapter
<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports-cucumber4-adapter --> <dependency> <groupId>com.aventstack</groupId> <artifactId>extentreports-cucumber4-adapter</artifactId> <version>1.0.1</version> </dependency>
Currently, usage docs are only available for cucumber4 but they are exactly the same for cucumber2 as well. Please use the same concepts with your version of cucumber.
Usage docs - http://extentreports.com/docs/versions/4/java/cucumber4.html
Thank you, @foursyth ! I don't seem to be able to figure out how to correctly use the Adapter from the documentation. By any chance do you have a working project you could share with us?
Hello @adrian-arg
See the test/ package of this project, and the below runner:
In the example, only the relevant runner is added and everything else goes on as usual:
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:", "json:target/cucumber-report.json"})
public class RunCukesTest {
}
Under your src/test/resources/
, you need an extent.properties
so the adapter knows which reporters you are using:
Similarly, in the same extent.properties
file, you can refer to any configuration you would like to load.
In a nutshell:
extent.properties
with the needed reportersAlso see here: http://extentreports.com/docs/versions/4/java/cucumber2.html
You can do use System.setProperty()
too, but I prefer the properties route as its more manageable and requires less interference with code.
@foursyth Would there be no adapter for Cucumber3?
PS. I am working with our team in improving the documentation on the website.
@kathyrollo cucumber-3 adapter will be released before this week's end.
Our plan was to start with version 2, and go all the way to 4 but our professional users wanted version 4 released before others, so cucumber-3 adapter got delayed.
@kathyrollo apparently this was being released while we were conversing. It may take a bit for mvnrepository to show this artifact but it has been deployed to central already.
Cucumber3 - https://github.com/extent-framework/extentreports-cucumber3-adapter
<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports-cucumber3-adapter -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports-cucumber3-adapter</artifactId>
<version>1.0.0</version>
</dependency>
Usage is exactly the same as cucumber2 and cucumber4 adapters. See my earlier posts starting here.
In a nutshell:
- Add the reference to the adapter in your runner
- Mark
extent.properties
with the needed reporters- Specify path of configuration XMLs (if needed)
Thanks for the quick reply! I have gone through these steps but I don't get any Report from the adapter. I've pretty much copied and pasted the code from the runner and properties.
Hello @adrian-arg
Please open the issue here: https://github.com/extent-framework/extentreports-cucumber2-adapter
I will work with you to resolve.
Hello @adrian-arg
Please open the issue here: https://github.com/extent-framework/extentreports-cucumber2-adapter
I will work with you to resolve.
Thank you, foursyth, I appreciate it! I'm using Cucumber4-Adapter, so I opened the issue in that git. https://github.com/extent-framework/extentreports-cucumber4-adapter/issues/1
Hi,
Did anyone try with AbstractTestNGCucumberTests? testng-6.14.3 io.cucumber-2.3.1 cucumber testng 2.3.1 extentreports 4.0.5 cucumber-extentsreport 3.0.2 extentreports-cucumber4-adapter 1.0.4
I am getting below error while running my tests with testng with below plugin:
@CucumberOptions(
monochrome = true, // display
plugin = { "html:test-output/cucumber-reports/cucumber-report.html",
"json:test-output/json-reports/json-report.json",
"com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:test-output/extent-rep
public class TestRunner extends AbstractTestNGCucumberTests {
@AfterClass
public static void setup() {
Reporter.loadXMLConfig(new File("src/test/resources/extent-config.xml"));
Reporter.setSystemInfo("user", System.getProperty("username"));
Reporter.setTestRunnerOutput("Sampleout");
}
} Error:
[RemoteTestNG] detected TestNG version 6.14.3 FAILED CONFIGURATION: @BeforeClass setUpClass java.lang.NoClassDefFoundError: cucumber/api/event/ConcurrentEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
I think you should use extentreports-cucumber2-adapter for io.cucumber 2x.
@deena-p -Thanks! I could resolve that with your help but with below configuration my scenarios are passed- but reporting has issues with incompatible gherkin. testng-6.14.3 io.cucumber-2.3.1 cucumber testng 2.3.1 extentreports 4.0.5 cucumber-extentsreport 3.0.2 extentreports-cucumber4-adapter 1.0.4 gherkin 5.0.0
FAILED CONFIGURATION: @AfterClass setup java.lang.NoClassDefFoundError: gherkin/formatter/Reporter at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
I am using cucumber-jvm - 3.0.2 and facing this issue.
cucumber.runtime.CucumberException: Couldn't load plugin class: com.cucumber.listenerener.ExtentCucumberFormatter
at cucumber.runtime.formatter.PluginFactory.loadClass(PluginFactory.java:181)
at cucumber.runtime.formatter.PluginFactory.pluginClass(PluginFactory.java:166)
at cucumber.runtime.formatter.PluginFactory.getPluginClass(PluginFactory.java:223)
at cucumber.runtime.formatter.PluginFactory.isFormatterName(PluginFactory.java:201)
at cucumber.runtime.RuntimeOptionsFactory.addPlugins(RuntimeOptionsFactory.java:94)
at cucumber.runtime.RuntimeOptionsFactory.buildArgsFromOptions(RuntimeOptionsFactory.java:41)
at cucumber.runtime.RuntimeOptionsFactory.create(RuntimeOptionsFactory.java:26)
Hi, after run , the report doesn't display correctly. I search in google, it said I should use the local mode to generate the report. But cucumber doesn't support it.
htmlReporter.config().setResourceCDN(ResourceCDN.EXTENTREPORTS); or extent=new ExtentReports(workDir+"/ExtentReportResults.html", true, NetworkMode.OFFLINE); If I add dependency of extentreport 3.1.5, it does support the local way, but when running, error will be prompt. "Caused by: java.lang.ClassNotFoundException: com.aventstack.extentreports.reporter.ConfigurableReporter" 4.0.5 will run correctly, but html format wrong. So, how should I do to solve this? Can anyone help?
Hi @anshooarora @adrian-arg
My project built on cucumber-sprint 2.3.1. To generate extent report, I have added below gradle dependencies
name: 'cucumber-extentsreport', version: '3.1.1' name: 'extentreports-cucumber2-adapter', version: '1.0.0' to generate extent report.
Note: I have created extent.properties and the below code snippet in the runner class plugin = {"com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:output/report.html"}
public static void teardown() { Reporter.loadXMLConfig(new File("src/test/resources/extent.properties")); Reporter.setSystemInfo("user", System.getProperty("user.name")); Reporter.setSystemInfo("os", "Mac OSX"); Reporter.setTestRunnerOutput("Sample test runner output message"); }
But I am getting below error when I ran my runner test
cucumber.runtime.CucumberException: Couldn't load plugin class: com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter
at cucumber.runtime.formatter.PluginFactory.loadClass(PluginFactory.java:181)
at cucumber.runtime.formatter.PluginFactory.pluginClass(PluginFactory.java:166)
at cucumber.runtime.formatter.PluginFactory.getPluginClass(PluginFactory.java:223)
at cucumber.runtime.formatter.PluginFactory.isFormatterName(PluginFactory.java:201)
at cucumber.runtime.RuntimeOptionsFactory.addPlugins(RuntimeOptionsFactory.java:94)
at cucumber.runtime.RuntimeOptionsFactory.buildArgsFromOptions(RuntimeOptionsFactory.java:41)
at cucumber.runtime.RuntimeOptionsFactory.create(RuntimeOptionsFactory.java:26)
at cucumber.api.junit.Cucumber.<init>(Cucumber.java:74)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:49)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.ClassNotFoundException: com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at cucumber.runtime.formatter.PluginFactory.loadClass(PluginFactory.java:174) ... 21 more
Any update on this issue ? still i am facing the same issue
im finding this issue when i try to run. i have set all the plugins to v5.5.0. Caused by: java.lang.ClassNotFoundException: cucumber.api.event.ConcurrentEventListener
CucumberJVM 2.3. require plugins implement Plugin class
In cucumber.runtime.formatter.PluginFactory, method loadClass