Closed
Bug 854549
Opened 12 years ago
Closed 12 years ago
Robocop screenshots
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 22
People
(Reporter: gbrown, Assigned: gbrown)
Details
Attachments
(4 files)
1.11 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
2.91 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
119.84 KB,
image/jpeg
|
Details | |
28.88 KB,
image/jpeg
|
Details |
In some of our intermittent robocop failures, a screenshot from the time of failure would be a great aid to debugging.
![]() |
Assignee | |
Comment 1•12 years ago
|
||
Taking the screenshot on assertion failure or exception is easy. Unfortunately, this doesn't work for content (the jpg is all black where content would be), but at least it gives us something. (Will attach examples...)
Assignee: nobody → gbrown
Attachment #729160 -
Flags: review?(jmaher)
![]() |
Assignee | |
Comment 2•12 years ago
|
||
This pulls the jpg off the device, base64 encodes it and dumps the result. You can see this in action here:
https://tbpl.mozilla.org/?tree=Try&rev=6fd6e65589df
(search the logs for "SCREENSHOT"). It's fairly straight-forward, but a little awkward, to copy the screenshot data, decode it and display the resulting jpg.
As an alternative, we could copy the jpg somewhere and have a link to the jpg in the log...I just don't know where to store it.
Attachment #729161 -
Flags: review?(jmaher)
![]() |
Assignee | |
Comment 3•12 years ago
|
||
![]() |
Assignee | |
Comment 4•12 years ago
|
||
Updated•12 years ago
|
Attachment #729160 -
Flags: review?(jmaher) → review+
Comment 5•12 years ago
|
||
Comment on attachment 729161 [details] [diff] [review]
base64 encode screenshot jpg and dump to log output; cleanup screenshot files
Review of attachment 729161 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/mochitest/runtestsremote.py
@@ +435,5 @@
> + def printScreenshot(self):
> + try:
> + image = self._dm.pullFile("/mnt/sdcard/Robotium-Screenshots/robocop-screenshot.jpg")
> + encoded = base64.b64encode(image)
> + print "SCREENSHOT: data:image/jpg;base64,%s" % encoded
This is assuming there is a screenshot. I know there is a try/except around it. Is that what you are using if image is '' ?
Attachment #729161 -
Flags: review?(jmaher) → review+
![]() |
Assignee | |
Comment 6•12 years ago
|
||
(In reply to Joel Maher (:jmaher) from comment #5)
> This is assuming there is a screenshot. I know there is a try/except around
> it. Is that what you are using if image is '' ?
Right. If a test passes, no screenshot is generated and pullFile() throws; we catch that and continue silently. The obvious alternative is to call fileExists(), but that ends up generating more sut traffic (check that the directory exists, then pulls down a directory listing).
I will add a comment before landing to explain this.
![]() |
Assignee | |
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/11fba5efef16
https://hg.mozilla.org/mozilla-central/rev/1567285fca98
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•