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
serenity-bdd long context value #597
Comments
Hey @TKlauenberg the repeated values don't sound right. Would you be able to provide a minimal reproducible example based on Serenity/JS Protractor Cucumber template so that I could try to reproduce the issue? The issue with report generation could be due to Windows not supporting files with long names. What you can do is to shorten the filenames Serenity BDD produces by invoking the |
Hey @jan-molak thank you very much for the help. The As far as my understanding of the code base is, the problem is that serenity refers to multiple tests in a Scenario Outline as one test and then appends the Platform and Browser Tag to the context on every execution. The Code is from the SceneReport.ts in the serenity-bdd reporter .when(BrowserTag, (browserTag: BrowserTag) => {
report.context = [report.context, browserTag.browserName].filter(part => !! part).join(',');
report.driver = browserTag.browserName;
report.id = new SceneReportId(browserTag.name, report.id).value;
})
.when(PlatformTag, (platformTag: PlatformTag) => {
report.context = [report.context, platformTag.name].filter(part => !! part).join(',');
report.id = new SceneReportId(platformTag.name, report.id).value;
}) |
Hey @TKlauenberg and thanks for helping me to reproduce the issue. It has been addressed in version 2.10.3. Please let me know if you spot anything else. |
Hey @jan-molak thank you that fixes the error |
TKlauenberg commentedJun 15, 2020
tldr: the context value of a test is too long when using serenity-bdd report
I am using cucumber-js and protractor and the problem is shown like this:
I have a Scenario Outline with 4 examples and for these 4 examples the serenity-bdd reporter generates one report. But in the context value, the browser and platform is added 4 times. So in my example it is "chrome,windows,chrome,windows,chrome,windows,chrome,windows". When I now try to generate the report with the serenity-bdd cli I get the error that some file could not be generated. The file has a really long filename which I think is the error there.
From my point of view I don't know if the error is in the serenity-js/serenity-bdd reporter or in the report creation in serenity-bdd itself (that the file name should be shortened there).
So first: is it desired that the context value in the report is so long and that it repeats itselft multiple times?
The text was updated successfully, but these errors were encountered: