Closed dwursteisen closed 8 years ago
Hello @dwursteisen
what you mean under "which doesn't use the encoding from the serenity.properties.". What property do you use?
We specifiy which encoding to use in the serenity.properties
file :
feature.file.encoding=UTF-8
serenity.report.encoding=UTF-8
see https://github.com/dwursteisen/serenity-bug-report/blob/encoding-reporting-fix/serenity.properties
Thanks @dwursteisen.
We do not use feature.file.encoding=UTF-8
during serenity-bdd execution.
according manual serenity.report.encoding
used only for generating generating the CSV reports.
Serenity BDD by default generate json, html, and csv reports. It seems that you create this bug about HTML reports.
As I understand, when you clone (or store) you files under windows, they are in some different encoding (default for your system), as result all reports will contains string in some different encoding in HTML files with UTF-8 encoding (as default).
I think that it is not bug of serenity-maven plugin, you should execute tests (and this is configuration of mvn plugin, not serenity-maven-plugin) and after that aggregate plugin with correct encoding, because "tests" prepare some base data for aggregation report. Try to execute all your java process (and build as well) with default file encoding
Also I agree with you that for now all reports should change encoding of data to their default encoding (json-reports to system default, html-reports to utf-8), about this we already have ticket serenity-bdd/serenity-core/issues/254
Please close this issue, if you feel that is was resolved
Hello
Your workaround, using JAVA_TOOLS_OPTIONS
solve the issue. But I don't think that the "right" solution.
Our feature file is in UTF-8. If serenity use the default system encoding, Serenity won't ever be able to render the name of the feature. And, because the link is generated from the name, cliking on the name lead to a file not found.
If you're thinking I'm wrong. No big deal : as your workaound works, I'm happy with that. but it should be documented, at least I think.
Regards
@dwursteisen I agree with you that it may be should work without UTF-8 "default system encoding", and this was described under serenity-bdd/serenity-core#254.
Lets close this issue (because it is not about maven plugin), and continue this discussion under serenity-core
Thanks
The index.html is not displayed correctly
To reproduce the problem :
mvn clean install
index.html
fromtarget/site/serenity
: test with accents won't be displayed correctly (notes : you should run you test under a Windows environnement with CP1252)The problem seems to be in the JSONTestOutcomeReporter which doesn't use the encoding from the serenity.properties. So it read the file with CP1252 encoding instead of UTF-8
The bug is in
serenity-core
, but the bug occur only when we use the maven-plugins