Bug 22930 - Make TestBuilder more strict about wrong arguments
Summary: Make TestBuilder more strict about wrong arguments
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 15339
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-16 15:51 UTC by Jonathan Druart
Modified: 2020-06-04 20:32 UTC (History)
3 users (show)

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


Attachments
Bug 22930: Make TestBuilder->build_object explodes if parameters are wrong (3.37 KB, patch)
2019-05-16 17:58 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22930: Make TestBuilder->build_object explodes if parameters are wrong (3.46 KB, patch)
2019-05-17 08:42 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 22930: (QA follow-up) Add two test descriptions (1.29 KB, patch)
2019-05-17 08:42 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2019-05-16 15:51:03 UTC
It happens to me too often to call TestBuilder->build[_object] without 'value':

$builder->build_object({ class => 'Koha::Patrons', { categorycode => $category->categorycode });

Then I am loosing minutes to understand what my tests do not fail (yes, fail).

We could make it display a warning or croak or whatever.
Comment 1 Jonathan Druart 2019-05-16 17:58:17 UTC
Created attachment 89864 [details] [review]
Bug 22930: Make TestBuilder->build_object explodes if parameters are wrong

This patch implements bug 15339 for build_object.
We want it to warn if the call is wrong.

Test plan:
Make sure the tests are still returning green
Comment 2 Marcel de Rooy 2019-05-17 08:42:24 UTC
Created attachment 89882 [details] [review]
Bug 22930: Make TestBuilder->build_object explodes if parameters are wrong

This patch implements bug 15339 for build_object.
We want it to warn if the call is wrong.

Test plan:
Make sure the tests are still returning green

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2019-05-17 08:42:28 UTC
Created attachment 89883 [details] [review]
Bug 22930: (QA follow-up) Add two test descriptions

No more than that ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2019-05-17 08:43:06 UTC
Simple patch. Passing QA rightaway.
Comment 5 Nick Clemens 2019-05-17 14:55:07 UTC
Awesome work all! 

Pushed to master for 19.05
Comment 6 Martin Renvoize 2019-05-30 19:32:47 UTC
Pushed to 18.11.x for 18.11.06