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

8328716: [TestBug] Screen capturing utility for failed tests #1415

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

andy-goryachev-oracle
Copy link
Contributor

@andy-goryachev-oracle andy-goryachev-oracle commented Mar 21, 2024

Created a JUnit5-compatible utility to capture screenshots of failed headful tests. The idea is that a certain annotation can be added to an intermittently failing test or a test that fails on a certain platform to capture the screenshot for debugging:

@ExtendWith(ScreenCaptureTestWatcher.class)

Screenshots of the primary screen will be captured in PNG format, encoded to a Base64 string, and logged to stderr.

A special utility is then needed to extract the actual screenshot image from the log file (I am thinking of Monkey Tester, but it can be a standalone app or a script).

Questions

  • stdout or stderr?
  • do we need a separate decoder script or Monkey Tester is enough?
  • should it emit a valid JSON segment to be compatible with any log viewer applications that understand JSON? i.e. { screenshot:"...base64..." }

Example (partial) of the captured screenshot (in the dedicated viewer):

Screenshot 2024-03-22 at 12 45 41


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8328716: [TestBug] Screen capturing utility for failed tests (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1415/head:pull/1415
$ git checkout pull/1415

Update a local copy of the PR:
$ git checkout pull/1415
$ git pull https://git.openjdk.org/jfx.git pull/1415/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1415

View PR using the GUI difftool:
$ git pr show -t 1415

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1415.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 21, 2024

👋 Welcome back angorya! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Mar 21, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@kevinrushforth
Copy link
Member

This needs some discussion before making it RFR. I have more questions than just the ones you listed about the design and implementation of such a feature.

@andy-goryachev-oracle
Copy link
Contributor Author

what are the questions?

@bridgekeeper
Copy link

bridgekeeper bot commented May 16, 2024

@andy-goryachev-oracle This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@andy-goryachev-oracle
Copy link
Contributor Author

keep-alive; discuss-later;

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