1

I am facing an unexpected issue while trying to generate reports with Eclipse (Neon 3). I am using NoraUi V2.x.x which is a combination of Selenium,Cucumber,etc.

As you can see in [my attached screenshot below], I have added the following to my class:

@CucumberOptions(monochrome = true, glue = { "noraui.application.steps", 
"noraui.browser.steps", "com.soprasteria.cdk.ACEWS.application.steps.ACEWS"}, 
plugin = { "html:target/reports/html", "junit:target/reports/junit/cucumber.xml", "json:target/reports/json/cucumber.json" },
    features = { "src/test/resources" })

However, at the end of my execution, Eclipse says:

[INFO] --- maven-antrun-plugin:1.7:run (copy-gherkin-formatter-file) @ ACEWS ---
[INFO] Executing tasks
copy:[copy] Copying 1 file to D:\Profiles\rdesplats\workspace\ACEWS\target\reports\html

But there is no generation of the json file or xml file. Has anyone already faced this issue and knows how to resolve this ?

My attached screenshot

Screen Shot

Many thanks,

Rama

Sham Dhiman
  • 1,348
  • 1
  • 21
  • 59
  • In your screenshot I see the Windows Explorer showing the `reports` directory with the subdirectory `html` and wonder what's in it (is it really empty)? – howlger Oct 31 '17 at 11:15
  • @howlger in this folder there is the html report but no json or xml file. According to the schema, the repository should have contained a junit folder and a json folder but none are present – Rama Desplats Oct 31 '17 at 11:36
  • I see. What does your `pom.xml` file look like? – howlger Oct 31 '17 at 11:44
  • @howlger you can find the file here : http://s000.tinyupload.com/download.php?file_id=41185378352362133505&t=4118537835236213350529295 – Rama Desplats Oct 31 '17 at 12:08
  • _"However, at the end of my execution, Eclipse says: ..."_ <- caused by your `pom.xml`, line 228ff. – howlger Oct 31 '17 at 12:27
  • 1
    @howlger I saw it also when you asked me to send you the pom.xml. However I checked the src/test/ressources folder but there is no json file. In addition, it's just doing a copy as a PostIC which means they must have been created in the first place – Rama Desplats Oct 31 '17 at 12:39
  • What NoraUi version ? You need use NoraUi V3.x.x or more... – Stéphane GRILLON Sep 21 '18 at 07:19

1 Answers1

0

You have to enable Cucumber reporting in your pom.xml file as described here.

howlger
  • 31,050
  • 11
  • 59
  • 99
  • Thank you for all your answers but I tried thislink already. When i add the cucumber junit dependency, the build fails and it says "import cucumber.api.junit.Cucumber;" does not exist and then the "When", "Given" are not recongized in my feature – Rama Desplats Oct 31 '17 at 13:22
  • I don't think there's something wrong with your ``, but a `` is missing. – howlger Oct 31 '17 at 13:28
  • I even added the plugin [as described here](https://github.com/damianszczepanik/maven-cucumber-reporting) but it didn't change anything – Rama Desplats Oct 31 '17 at 14:08
  • Did you add the `maven-cucumber-reporting` plugin and configured ``? Did you get an error or has the `` JSON not be generated? – howlger Oct 31 '17 at 14:15
  • I did and I have a warning "cucumber.json does not exist". From the link you gave me, I have the feeling the cucumber-reporting is using the json file to display an enhanced report. I might be wrong but nevertheless I have no error on JSON file not being generated – Rama Desplats Oct 31 '17 at 14:46
  • Did you run it via Maven `clean test`? – howlger Oct 31 '17 at 17:07
  • @howlger's link doesn't seem to work, This one works: https://www.damienfremont.com/2016/05/09/how-to-cucumber-test-report-plugin-2-with-maven-and-java – MiB Mar 27 '22 at 10:54
  • Note that in that linked article `cucumberOutput` needs to be replaced with `**/cucumber.json`. Also, skippedFails and enableFlashCharts seem to be invalid now. – MiB Mar 27 '22 at 12:48