cucumber-reports-plugin icon indicating copy to clipboard operation
cucumber-reports-plugin copied to clipboard

Classification files ignored if not below jsonReportDirectory

Open KLBonn opened this issue 2 years ago • 3 comments

Describe your use-case which is not covered by existing documentation.

We wanted to use the classificationFilePattern argument in order to supply additional metadata to be displayed in the report. However our .properties file kept getting ignored by cucumber-reporting plugin.

It took me quite some code-reading to discover why: In CucumberReportPublisher#480 you save available property files below inputReportDirectory to directoryCache, so they can be evaluated later on. However inputReportDirectory is based on plugin argument/setting jsonReportDirectory.

In our case jsonReportDirectory is set to Maven target subfolder, while the classification property file is residing in workspace root, so because of the above it never was included for the cache and subsequent processing. That was quite a surprise.

Could you add some appropriate advice in documentation, that (contrary to naming) jsonReportDirectory is not only effective for json reports, but also for classificationFilePattern parameter?

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

No response

KLBonn avatar Nov 15 '22 17:11 KLBonn

Would you like to add PR for this ?

damianszczepanik avatar Nov 15 '22 19:11 damianszczepanik

I can try, but I am not familiar at all with Jenkins plugin structure, .jelly files etc.

KLBonn avatar Nov 16 '22 09:11 KLBonn

Done :)

Noticed the Json reports path also is mentioned at Wiki page https://github.com/jenkinsci/cucumber-reports-plugin/wiki/Detailed-Configuration#notes-on-configuration. Should I propose / enter a respective hint there, too?

KLBonn avatar Nov 16 '22 10:11 KLBonn