REST API Testing framework
Created attachment 42043 [details] [review] Bug 14748: REST API Testing framework Introduces the Swagger2TestRunner which takes care of authentication and API consumer creation behind the scenes, and makes sure all API endpoints get test coverage. This way the test automator can focus on testing the business logic instead of duplicating authentication and API consumer creation in various test scripts. Run t/db_dependent/Api/V1/testREST.pl and it will tell you what you need to do.
Patch complexity is 'Medium' because this change has many architectural connections
Created attachment 42562 [details] [review] Bug 14748: (follow-up) Fix $testPackageName
Above patch fixes the following errors in testREST.pl: No test package defined for API route ... You must define it in t::db_dependent::Api::Apiv1::Borrowers-> ....
Hi, trying to test. 1) Need to install YAML::XS 2) Can't find Koha/ApiKeys.pm. Are there other dependencies for this bug? Listed one (Bug 13799) is already in master. Can't locate Koha/ApiKeys.pm in @INC (you may need to install the Koha::ApiKeys module)
Hi! This depends on the authentication system of the REST API which was under much scrutiny last time I checked. Bug 13920
(In reply to Olli-Antti Kivilahti from comment #6) > Hi! > > This depends on the authentication system of the REST API which was under > much scrutiny last time I checked. > Bug 13920 That is in discussion, but not listed as dependency. Anyway, more qa fails now FAIL t/lib/RESTTest.pm FAIL t/db_dependent/Api/V1/Borrowers.pm FAIL t/db_dependent/Api/V1/testREST.pl FAIL t/lib/Swagger2TestRunner.pm and still the message "Can't locate Koha/ApiKeys.pm in @INC"
As bug 13920 was closed as WONTFIX, should this be closed as well?
As we now have some reasonable API testing patterns in place using test::mojo and testbuilder I think we can safely close this one.