-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
cucumber html meta data #106
Comments
These fields are provided by the Cucumber implementation. They are not meant to be set by users. More details here: https://github.com/cucumber/cucumber/blob/master/messages/messages.md#meta |
Hi @aslakhellesoy, How do we get these populated in the end report? This is all we see, we would like the product name and version displayed (plus some other custom ones if possible) |
Sorry, I don’t understand the question. What do you mean by “these”? Are you talking about the name of the product you are testing/developing with Cucumber? Do you want to add additional information to the report summary? Can you give me a concrete example (some real values) of what information you would like to add? Could you also explain why you would like to add it? |
In the cucumber messsages docs you posted this has lots of additional information (CI, Git, Product, Version, ...) Inside cucumber react which is used to generate the html report it should show this information if present: https://github.com/cucumber/cucumber/blob/master/react/javascript/src/components/app/ExecutionSummary.tsx, https://github.com/cucumber/cucumber/blob/master/react/javascript/src/components/app/CICommitLink.tsx when running from with cucumber-junit via maven none of this information is present or displayed in the html report. i would like the following displayed at the top of the html report
obviously this information needs to be passed to cucumber when its ran (via command line options or environment variables) for it to be added to the report, but there seems no way at present to do this. |
In the meta message there are 4 fields of type Meta.Product:
The Here it is, prettified: {
"meta": {
"protocolVersion": "13.0.1",
"implementation": {
"name": "fake-cucumber",
"version": "8.0.0"
},
"runtime": {
"name": "node.js",
"version": "12.16.2"
},
"os": {
"name": "linux",
"version": "4.19.76-linuxkit"
},
"cpu": {
"name": "x64"
},
"ci": {
"name": "GitHub Actions",
"url": "https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429",
"git": {
"remote": "https://github.com/cucumber-ltd/shouty.rb.git",
"revision": "99684bcacf01d95875834d87903dcb072306c9ad",
"branch": "master"
}
}
}
} As you can see, there is no
The The construction of this entire The If no CI environment is detected, the In other words, you have to run Cucumber on one of the supported CI servers in order for the You could define those environment variables in your terminal manually, but that's error-prone and cumbersome. In order to simplify generation and publishing of reports we're also offering the Cucumber Reports service, which we recommend using with your favourite CI server. Does this answer your questions? |
The report screenshot you attached displays all the information you could expect from a non-CI execution. If you run on a CI server you should also see the CI/Git information. |
Thanks that is a lot of information. We are using jenkins which does not seem supported, you can tell if its running on jenkins by the Being able to display custom fields (product name and version under test, environment under test, profiles, etc...) would make these reports more detailed. We use the https://github.com/jenkinsci/cucumber-reports-plugin that allows you to do this but we like the single html file that cucumber produces. The cucumber report service looks nice, but not something we would be able to use due to sensitive data in the reports. |
@a1dutch what's needed in order to close this issue? |
@aslakhellesoy i think the following
|
@a1dutch how would you like to specify additional metadata? How/where would you like it rendered? |
@aslakhellesoy maybe move the search/filter down onto its own line and span the whole width, you could then add them in their own box on the top right (where the filter is). Another option is to add them to the middle section (this might be pretty crowded, so it could be displayed in two columns and you could move the filter down as above). you could pass these in as command line arguments
or evironment variables
Cheers Andy |
Ok, so if we use an environment variable like |
yes seperated by
i dont know if there is a standard way to pass parameters to a plugin, cucumber-jvm only seems to accept one parameter as part of the plugin and this is the report location |
cucumber-js supports |
I don't think we should try to squeeze this in through an environment variable or through the --plugin CLI option. Depending on the OS and CI system, providing complex strucutured information this way is impossible without also having to derive one or two layers of escape characters. This doesn't make for great UX. Additionally it also limits our future options for expansion and doesn't allow others to use our code to create their own solutions. This makes the whole thing a dead end. Rather, I think we should take a programatic approach first. That is, we create a API that can create the html report from the messages. And using that API add additional information. This API can then be used by tools like jenkinsci/cucumber-reports-plugin. The current API of the html report is messages. So to add this custom information a new message is needed. And this does bring us back to the old problem. Our current message format is not extensible. |
Hi,
How is it possible to pass the product name and product version meta data so its included in the new html report?
I'm using cucumber jvm 6.9.1 and the html plugin.
Cheers
Andy
The text was updated successfully, but these errors were encountered: