extent-framework / extentreports-cucumber4-adapter

Cucumber4 Adapter for Extent Framework
http://extentreports.com/docs/versions/4/java/cucumber2.html
Apache License 2.0
39 stars 22 forks source link

URLOutputStream is being imported from an invalid location #17

Closed ebailey-vp closed 4 years ago

ebailey-vp commented 5 years ago

ExtentCucumberAdapter.java is importing UrlOutputStream as follows:

import cucumber.runtime.io.URLOutputStream;

in cucumber-jvm core, this file is actually located at

cucumber.runtime.formatter.URLOutputStream;

See: https://github.com/cucumber/cucumber-jvm/blob/174c62ee9c03b18920dbe8afdb945f15459b33b0/core/src/main/java/cucumber/runtime/formatter/URLOutputStream.java

foursyth commented 5 years ago

This is due to https://github.com/cucumber/cucumber-jvm/commit/eb1a90bd5488421b06acfab4d2b32bf851cdf1db

the adapter is using version:

<cucumber.version>4.0.1</cucumber.version>

foursyth commented 5 years ago

@anshooarora please upgrade the cucumber dependency

kathyrollo commented 5 years ago

Hi @foursyth

Can confirm this issue happens from Cucumber-JVM 4.2.1 and above. ExtentReports is being generated properly using 4.2.0 and below. I am also using the AbstractTestNGCucumberTests runner.

Is this an issue with Cucumber-JVM or extentreports-cucumber4-adapter?

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running runners.RunCukesTest
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.433 s <<< FAILURE! - in runners.RunCukesTest
[ERROR] setUpClass(runners.RunCukesTest)  Time elapsed: 1.241 s  <<< FAILURE!
java.lang.NoClassDefFoundError: cucumber/runtime/io/URLOutputStream
Caused by: java.lang.ClassNotFoundException: cucumber.runtime.io.URLOutputStream

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   RunCukesTest>AbstractTestNGCucumberTests.setUpClass:16 » NoClassDefFound cucum...
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.
chik145 commented 4 years ago

Any update about the issue ?

I Am Using Cucumber Version Is: 4.7.4 Getting "java.lang.NoClassDefFoundError: cucumber/runtime/io/URLOutputStream"

anshooarora commented 4 years ago

This is now resolved for Cucumber version 4.7.4. Here are the changes: https://github.com/extent-framework/extentreports-cucumber4-adapter/commit/4dba85727a15ddca5d2afacdb64c7a25b36f62a6