Bug 20757 - Capture a screenshot on selenium errors
Summary: Capture a screenshot on selenium errors
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Josef Moravec
URL:
Keywords:
Depends on: 19802
Blocks: 28250
  Show dependency treegraph
 
Reported: 2018-05-11 19:57 UTC by Jonathan Druart
Modified: 2021-04-28 14:44 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 20757: Capture and upload screenshot on selenium errors (2.32 KB, patch)
2018-05-11 20:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20757: Capture and upload screenshot on selenium errors (2.37 KB, patch)
2018-05-22 13:11 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 20757: Capture and upload screenshot on selenium errors (2.42 KB, patch)
2018-06-04 14:20 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 20757: Add pod for ->capture (897 bytes, patch)
2018-07-23 14:30 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2018-05-11 19:57:05 UTC
It can be a real pain to debug selenium errors, especially when it is not reproducible locally.
It would be great to capture a screenshot when an element is not found on the page for instance.
Comment 1 Jonathan Druart 2018-05-11 20:00:58 UTC
Created attachment 75287 [details] [review]
Bug 20757: Capture and upload screenshot on selenium errors

It is a real pain to debug selenium errors, especially when it is
not reproducible locally.

This patch capture a screenshot when an error occurred and upload it
using the excellent lut.im service provided by framasoft
(We could host our own later).

Test plan:
Modify a selenium script to make it fails (search for find_element)
You will see a stack trace followed by a link to framapic.org
Comment 2 Jonathan Druart 2018-05-11 20:18:40 UTC
delete-day=1 means unlimited, would be nicer to lower it (7 should be enough).
Comment 3 Mark Tompsett 2018-05-22 13:11:41 UTC
Created attachment 75465 [details] [review]
Bug 20757: Capture and upload screenshot on selenium errors

It is a real pain to debug selenium errors, especially when it is
not reproducible locally.

This patch capture a screenshot when an error occurred and upload it
using the excellent lut.im service provided by framasoft
(We could host our own later).

Test plan:
Modify a selenium script to make it fails (search for find_element)
You will see a stack trace followed by a link to framapic.org

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 4 Josef Moravec 2018-06-04 14:20:05 UTC
Created attachment 75772 [details] [review]
Bug 20757: Capture and upload screenshot on selenium errors

It is a real pain to debug selenium errors, especially when it is
not reproducible locally.

This patch capture a screenshot when an error occurred and upload it
using the excellent lut.im service provided by framasoft
(We could host our own later).

Test plan:
Modify a selenium script to make it fails (search for find_element)
You will see a stack trace followed by a link to framapic.org

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Nick Clemens (kidclamp) 2018-07-23 13:34:36 UTC
Please add POD for capture
Comment 6 Jonathan Druart 2018-07-23 14:30:49 UTC
Created attachment 77182 [details] [review]
Bug 20757: Add pod for ->capture
Comment 7 Nick Clemens (kidclamp) 2018-07-23 15:38:17 UTC
Awesome work all!

Pushed to master for 18.11
Comment 8 Martin Renvoize (ashimema) 2018-08-03 13:32:29 UTC
Pushed to 18.05.x for 18.05.03.

Although it's an enhancement, it's a developer only one and aids in identifying causes for test failures so I decided it was worthwhile backporting.
Comment 9 Fridolin Somers 2018-09-21 09:43:01 UTC
Depends on Bug 19802 not in 17.11.x