[Bug 27190] New: Debug REST API tests
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27190 Bug ID: 27190 Summary: Debug REST API tests Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org It can be tricky to debug REST API tests. You can get a "received 500 when 200 expected", but you don't have the error. There is one manual way to do it: $t->put_ok($url)->status_is(200)->json_is($expected_json)->or( sub { warn $t->tx->res->to_string }); But could we provide a generic way to add a diag in case Test::Mojo fails? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27190 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 114313 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114313&action=edit Bug 27190: [DO NOT PUSH] example of failure Apply patches from 18729 to test this change. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27190 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 114314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114314&action=edit Bug 27190: Test::Mojo - Always warn the error string on error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27190 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |jonathan.druart@bugs.koha-c | |ommunity.org CC| |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com, | |tomascohen@gmail.com Status|NEW |In Discussion --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- That's pretty ugly, and we will certainly never push it. But at least I will remember next time I need it, hopefully! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27190 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #3)
That's pretty ugly, and we will certainly never push it. But at least I will remember next time I need it, hopefully!
Should we close then? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27190 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Katrin Fischer from comment #4)
(In reply to Jonathan Druart from comment #3)
That's pretty ugly, and we will certainly never push it. But at least I will remember next time I need it, hopefully!
Should we close then?
I don't think so. It's still useful for debugging purpose and we should have something similar in master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27190 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 201085 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201085&action=edit Bug 27190: Override test Patch from commit d36f16d -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org