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

Frames from a previous test/suite are being added to the next test/suite #94

Closed
Diazole opened this issue Jan 19, 2023 · 3 comments
Closed

Comments

@Diazole
Copy link

Diazole commented Jan 19, 2023

Describe the bug
The last frame from the previous test is incorrectly saved as the first frame of the current test.

On the last test, a screenshot was taken after the call to ffmpeg.

I'm not sure where to start looking to help diagnose this issue as it appears to be a sync problem.

Log
I have trimmed some of the incoming commands as I don't believe they add value.

--- New suite: Test Suite 1 ---


--- New test: Test 1 ---
Incoming command: /session/:sessionId/screenshot => [screenshot]
- Screenshot!! (frame: 0)
Incoming command: /session/:sessionId/screenshot => [screenshot]
- Screenshot!! (frame: 1)
Incoming command: /session/:sessionId/screenshot => [screenshot]
- Screenshot!! (frame: 2)
Incoming command: /session/:sessionId/screenshot => [screenshot]
- Screenshot!! (frame: 3)
ffmpeg command: "ffmpeg.exe" ...



--- New suite: Test Suite 2 ---


--- New test: Test 1 ---
Incoming command: /session/:sessionId/screenshot => [screenshot]
- Screenshot!! (frame: 4)
Incoming command: /session/:sessionId/screenshot => [screenshot]
- Screenshot!! (frame: 0)
Incoming command: /session/:sessionId/element/55a8bedc-cca0-4e40-bdfc-9f70884dec4b/text => [text]
ffmpeg command: "ffmpeg.exe" ...



--- New suite: Test Suite 3 ---


--- New test: Test 1 ---
Incoming command: /session/:sessionId/screenshot => [screenshot]
- Screenshot!! (frame: 1)
Incoming command: /session/:sessionId/screenshot => [screenshot]
- Screenshot!! (frame: 0)
ffmpeg command: "ffmpeg.exe" ...
Incoming command: /session/:sessionId/screenshot => [screenshot]
- Screenshot!! (frame: 1)
Incoming command: /session/:sessionId => [:sessionId]

To Reproduce
I'll attempt to create an example repo and update this issue soon

Expected behavior
Frames from a previous test/suite shouldn't be added to the current test/suite

Environment (please complete the following information):

  • wdio-video-reporter version: 3.4.0
  • WebdriverIO version: 8.0.13
  • Mode: WDIO Testrunner
  • If WDIO Testrunner, running sync/async: async
  • Node.js version: v18.12.1
  • NPM version: 8.19.2
  • Browser name and version: Chrome 109
@wadjei
Copy link
Contributor

wadjei commented Jan 26, 2023

I saw this behaviour as well when working on other issues in video-reporter, but the previous test frames were always saved into the correct folder - they were just returned late. Everything happens asynchronously internally, so the screenshots are received some time after they are requested. I also noticed that onTestStart for the next test was called before onTestEnd for the preceding test had completed in many cases.

Following the log output gave the impression of frames for different tests being mixed but examining the filesystem following the suite run showed everything to be in order.

Are you seeing different behaviour?

@christian-bromann
Copy link
Contributor

@Diazole thanks for raising the issue. Mind providing a minimal reproducible example to help us investigate the issue?

@christian-bromann
Copy link
Contributor

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants