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:
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 serenity-bdd run command with --shortFilenames.
Hey @jan-molak thank you very much for the help. The --shortFilenames option did resolve the problem. Anyway I have created a repository where you can see this behaviour. The Problem seems to be a very long scenario name in Gherkin and multiple examples in a "Scenario Outline" test.
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