Closed Bug 1411045 Opened 7 years ago Closed 7 years ago

Include response stacktrace in assert_success

Categories

(Testing :: geckodriver, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: ato, Assigned: ato)

Details

Attachments

(5 files)

Until we figure out how to include a wdclient.Response’s
stacktrace by default in the pytest error messages, a good middle
ground is to log its object representation in assert_success.

This will help diagnosing errors in Travis, in particular, because
you no longer have to pass the "--webdriver-flag=-vv" flag to
surface the stacks.
Assignee: nobody → ato
Status: NEW → ASSIGNED
https://bugzil.la/1411026 is also relevant to this change.
Comment on attachment 8921224 [details]
Bug 1411045 - Add object- and string representations for WebDriverException.

https://reviewboard.mozilla.org/r/192220/#review197772
Attachment #8921224 - Flags: review?(mjzffr) → review+
Comment on attachment 8921225 [details]
Bug 1411045 - Prettify error in wdclient.Response.

https://reviewboard.mozilla.org/r/192222/#review197784
Attachment #8921225 - Flags: review?(mjzffr) → review+
Comment on attachment 8921227 [details]
Bug 1411045 - Provide response-to-error conversion.

https://reviewboard.mozilla.org/r/192226/#review197794

::: testing/web-platform/tests/tools/webdriver/webdriver/error.py:165
(Diff revision 1)
> +
> +    if "value" in response.body:
> +        value = response.body["value"]
> +    else:
> +        raise UnknownErrorException(
> +            "Expected 'value' key in response bdy:\n"

typo: bdy
Attachment #8921227 - Flags: review?(mjzffr) → review+
Comment on attachment 8921228 [details]
Bug 1411045 - Display error when response is unsuccessful.

https://reviewboard.mozilla.org/r/192228/#review197796
Attachment #8921228 - Flags: review?(mjzffr) → review+
Comment on attachment 8921226 [details]
Bug 1411045 - Fix error.get argument name.

https://reviewboard.mozilla.org/r/192224/#review197790

::: testing/web-platform/tests/tools/webdriver/webdriver/error.py:148
(Diff revision 1)
>  class UnsupportedOperationException(WebDriverException):
>      http_status = 500
>      status_code = "unsupported operation"
>  
>  
> -def get(status_code):
> +def get(error_code, stacktrace=None):

`stacktrace` isn't used anywhere. I don't see any callers of `get` providing a stacktrace either.
Attachment #8921226 - Flags: review?(mjzffr) → review+
Comment on attachment 8921226 [details]
Bug 1411045 - Fix error.get argument name.

https://reviewboard.mozilla.org/r/192224/#review197790

> `stacktrace` isn't used anywhere. I don't see any callers of `get` providing a stacktrace either.

Oops.  Leftover from working on the patch.
Comment on attachment 8921227 [details]
Bug 1411045 - Provide response-to-error conversion.

https://reviewboard.mozilla.org/r/192226/#review197794

> typo: bdy

Thanks, fixed.
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/888b2a760f2c
Add object- and string representations for WebDriverException. r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/57a159b3f5fb
Prettify error in wdclient.Response. r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/e9f277659917
Fix error.get argument name. r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/85702e6b76e1
Provide response-to-error conversion. r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/73a9ad01888b
Display error when response is unsuccessful. r=maja_zf
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: