Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty reports after compiling .json file #31

Closed
ghost opened this issue Aug 13, 2012 · 15 comments
Closed

empty reports after compiling .json file #31

ghost opened this issue Aug 13, 2012 · 15 comments

Comments

@ghost
Copy link

ghost commented Aug 13, 2012

Hi,

i'm trying to get this really cool plugin (v.0.0.14) running on jenkins (v1.397). I'm using cucumber-jvm-1.0.4 and run my tests via ant (seem's there's no way to quote xml here... :/ )

Unfortunately the resulting report is always empty although the generated json file contains definitely the right results. The jenkins console only displays the following messages (I have to leave out the reports directory here but this is fine anyway)

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] copying json to reports directory:
[CucumberReportPublisher] Generating HTML reports

Seems to me that the json report can't be read for some reason... ?!

@ghost
Copy link
Author

ghost commented Aug 14, 2012

Any suggestions what to check in the configuration? I've really got no clue what I've done wrong because I followed the steps in the documentation.

@kingsleyh
Copy link
Contributor

Does the report give a 404 page when accessed? or does the plugin generate a report page which is empty?

could you send me your json file and I will have a look? kingsley@mindflowsolutions.com

--K

On 13 Aug 2012, at 16:45, rolandjuelich notifications@github.com wrote:

Hi,

i'm trying to get this really cool plugin (v.0.0.14) running on jenkins (v1.397). I'm using cucumber-jvm-1.0.4 and run my tests via

[...]

[...]

Unfortunately the resulting report is always empty although the generated json file contains definitely the right results. The jenkins console only displays the following messages (I have to leave out the reports directory here but this is fine anyway)

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] copying json to reports directory:
[CucumberReportPublisher] Generating HTML reports

Seems to me that the json report can't be read for some reason... ?!


Reply to this email directly or view it on GitHub.

@ghost
Copy link
Author

ghost commented Aug 14, 2012

No there's no 404. This just seem to happen in case of real errors during execution. Actually my report just comes up with empty charts and an empty summary. I've sent you the json file...

@steintore
Copy link

I'm experiencing the exact same problem. I've just upgraded from 0.0.12 to 0.0.14 today. 0.0.12 worked perfectly, but 0.0.14 gives me empty reports, just as described above. The json-file is the same as earlier and holds all the correct data.
I'll send you the json file.

@kingsleyh
Copy link
Contributor

hmm strange - I'll take a look
On 14 Aug 2012, at 14:49, Stein Tore notifications@github.com wrote:

I'm experiencing the exact same problem. I've just upgraded from 0.0.12 to 0.0.14 today. 0.0.12 worked perfectly, but 0.0.14 gives me empty reports, just as described above. The json-file is the same as earlier and holds all the correct data.
I'll send you the json file.


Reply to this email directly or view it on GitHub.

@ghost
Copy link
Author

ghost commented Aug 15, 2012

okay I've downgraded to 0.0.12. Now have the overview page with the right step summary but the charts are still missing and the page seems to miss some of the css. Maybe this is local browser problem because when I open the report the browser shows a "This page requires AC_RunActiveContent.js." popup. But I tried on different machines with different browsers always with the same result. Furthermore I'm also missing the application screenshots as stated in issue 32 ;)

@kingsleyh
Copy link
Contributor

hmm very strange - have you checked on your jenkins server in the .jenkins/plugins directory that there is only 1 cucumber reports there? I'm super busy with work at the moment - but will try to have a look over the next couple of days.
On 15 Aug 2012, at 09:08, Roland Jülich notifications@github.com wrote:

okay I've downgraded to 0.0.12. Now have the overview page with the right step summary but the charts are still missing and the page seems to miss some of the css. Maybe this is local browser problem because when I open the report the browser shows a "This page requires AC_RunActiveContent.js." popup. But I tried on different machines with different browsers always with the same result. Furthermore I'm also missing the application screenshots as stated in issue 32 ;)


Reply to this email directly or view it on GitHub.

@steintore
Copy link

I've found the reason for my reports being empty. We are using Cucumber with Gherkin in Norwegian, meaning that the check in cucumber-reporting, Util-class that the file contains "Feature" will never pass. In Norwegian this is "Egenskap".
Is this something you can fix, or should i fork the project and fix it myself?

@kingsleyh
Copy link
Contributor

HI

I had planned to add language support - but you are welcome to provide language support and send me a pull request :)

I was thinking of passing the language choice to the ReportBuilder and then having a resource bundle with different locales and selecting the right locale based on the passed in language choice. Or something like this. Then we can support any language that has a locale language file.

--K

On 21 Aug 2012, at 07:57, Stein Tore notifications@github.com wrote:

I've found the reason for my reports being empty. We are using Cucumber with Gherkin in Norwegian, meaning that the check in cucumber-reporting, Util-class that the file contains "Feature" will never pass. In Norwegian this is "Egenskap".
Is this something you can fix, or should i fork the project and fix it myself?


Reply to this email directly or view it on GitHub.

@ghost
Copy link
Author

ghost commented Aug 21, 2012

Hey guys! Seems the same thing caused my troubles because I wrote the specification with Gherkin in German. ;) Now I've switched default and everything is fine. Thanks for helping! :)

@ghost ghost closed this as completed Aug 21, 2012
@huug
Copy link

huug commented Nov 28, 2012

My features are written in Dutch, but when I translated just 1 of my feature files to English all features suddenly appeared in the reports.

Having just 1 feature file in English is enough!

@kingsleyh
Copy link
Contributor

Hi

The plugin only works with English at the moment - so it generates English

Sent from my iPhone

On 28 Nov 2012, at 11:58, Hugues Huygens notifications@github.com wrote:

My features are written in Dutch, but when I translated just 1 of my feature files to English all features suddenly appeared in the reports.

Having just 1 feature file in English is enough!


Reply to this email directly or view it on GitHub.

@huug
Copy link

huug commented Nov 28, 2012

Hi @kingsleyh,

I meant that it works fine when you have all your feature files in another language but at least 1 feature file in English.
All features, also the Dutch ones, are shown in the reports.
So it seems to work just fine for other languages.

Tnx for the awesome work!

@massahud
Copy link

Hi,

I had the same issue with portuguese, and found that what is causing this is that cucumber-reports looks for json files with the string "Feature" inside to consider it a cucumber json report. So until it has multi language support on that, you need to make one feature file with the word "Feature" anywhere inside it.

At net.masterthought.cucumber.util.Util.java

public static boolean isValidCucumberJsonReport(String fileContent) {
        return fileContent.contains("Feature");
}

@kingsleyh
Copy link
Contributor

yep thats correct. I will be making that better soon :)
On 11 Apr 2013, at 15:57, massahud notifications@github.com wrote:

Hi,

I had the same issue with portuguese, and found that what is causing this is that cucumber-reports looks for json files with the string "Feature" inside to consider it a cucumber json report. So until it has multi language support on that, you need to make one feature file with the word "Feature" anywhere inside it.

At net.masterthought.cucumber.util.Util.java

public static boolean isValidCucumberJsonReport(String fileContent) {
return fileContent.contains("Feature");
}

Reply to this email directly or view it on GitHub.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants