vitalets / playwright-bdd

BDD testing with Playwright runner
https://vitalets.github.io/playwright-bdd/
MIT License
306 stars 36 forks source link

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

Closed magarwal19 closed 1 month ago

magarwal19 commented 4 months ago

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

vitalets commented 4 months ago
  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 commented 4 months ago

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 commented 4 months ago

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 (https://github.com/cucumber/html-formatter/issues/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 commented 1 month ago

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.