-
Notifications
You must be signed in to change notification settings - Fork 19
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
DebugContext - error files gets overriden on outline scenarios #130
Comments
I think using outline variables, which should be possible as we already have scenario information, is a good option. because it would help to classify the files. Maybe we should not let the outline variable values to exceed a specific length, in case there are variables with long values (currently it doesn't happen). I think having different files for different locations may produce a lot of garbage, and I don't know a clear reason to need to preserve files from older executions. |
I agree with @mistermoper on adding a outline variable to the files. However, I think it would be interesting to keep different results. Sometimes you are in a debugging session an is interesting to check the evolution. For this I would create a new folder for each execution. But this is a complete new issue (having different folders or each test run). |
The file name is calculated in the nuvoleweb library. Should we patch/contribute (nuvoleweb) it or override it as we extend it?
|
I would report it in their repo with a patch if possible, if they prefer to leave it as is we can use the patch to override it in our context. |
Probably we can propose a PR to nuvole/drupal-behat overriding the filename in the YML configuration. Something like this:
That would be the default name. Then, if we want to override it in other projects we can put
Then code is not needed to override the filename, only configuration. What do you think @rsanzante @jorgetutor ? |
Are those tokens already available or we should add code to support them? |
Both the tokens and the filename YAML property do not exist, it must be added code in the ScreenshotContext to support them. I was thinking in doing a basic str_replace |
For what I'm see in the original code only the outline identifier needs to be added. The problem is AfterStepScope has no knowledge of the outline. This means we would have create our own outline identifier on each scenario outline (I guess But this seems too complex. What about checking the filename before writing and adding a number (_1, _2, _3) if it already exists? |
When a step fails a screenshot is automatically generated using the feature + step name. The file is overridden on the next outline variable so we only have the last executed scenario (attaching screenshot).
Options:
The text was updated successfully, but these errors were encountered: