jfx
jfx copied to clipboard
8328716: [TestBug] Screen capturing utility for failed tests
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):
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] 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
:wave: 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.
❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.
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.
what are the questions?
@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!
keep-alive; discuss-later;
@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!
keep-alive
@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!
has to wait for the next test sprint