Skip to content
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

Bug: Cucumber json file is created as empty if the total video size for all tests is going over 1 GB #170

Closed
magarwal19 opened this issue Jul 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@magarwal19
Copy link

magarwal19 commented Jul 3, 2024

Given
I execute a test suite which has larger number of tests and video is enabled for execution

When
The total size of videos is going over 1 GB

Then
Cucumber json report is created as empty and json file size is 0 kb

But I expect
Cucumber json report should be created with proper results

Environment
playwright-bdd: v6.6.0
@playwright/test: v1.45.0
@cucumber/cucumber: v10.8.0
Playwright config file: playwright.config.js

@magarwal19 magarwal19 added the bug Something isn't working label Jul 3, 2024
@vitalets
Copy link
Owner

vitalets commented Jul 9, 2024

  1. could you check if Playwright's built-in json successfully created fro such setup?
  2. do you attach video by video option in config or you attach them manually with testInfo.attach()?

@magarwal19
Copy link
Author

playwright html file was generated successfully with all videos and screenshots..

i am attaching using video option in config..

currently i have changed the config to below and now cucumber reports creating successfully without attachments
cucumberReporter('json', {
outputFile: 'cucumber-report/report.json',
skipAttachments: true
}),

@vitalets
Copy link
Owner

skipAttachments: true

Good solution. Anyway embedding videos into json is not optimal approach imho.
There is a new feature in cucumber html reporter, allowing to externalize attachments (cucumber/html-formatter#281). I think we can adopt it to json report as well.
Lets keep this issue open for supporting external attachments in cucumber reports.

@vitalets
Copy link
Owner

vitalets commented Oct 2, 2024

Since playwright-bdd v7.5.0, json reporter has skipAttachments option, so you can skip videos.
Feel free to re-open if it does not help in your case.

@vitalets vitalets closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants