[Koha-bugs] [Bug 33492] ERM - We need EBSCO Cypress tests

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 12 08:40:06 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33492

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcook at prosentient.com.au

--- Comment #2 from David Cook <dcook at prosentient.com.au> ---
(In reply to Martin Renvoize from comment #1)
> I wonder if we could optionally run tests if an environment variable,
> containing an API key, is set?

This would be the most realistic thorough option I think.

> That way ebsco partners with a valid test key could at least run tests. 
> It's not perfect as it wouldn't be easy to run them consistently in the
> existing CI framework as I imagine sharing such a key with community would
> likely be against some terms and conditions somewhere.

One could ask EBSCO for testing credentials but I think they tend to only do
that for short-term scenarios. 

> The only other thing I can think of is to attempt to kick the ebsco APIs,
> but that negates the integration test where aiming for in the first place.
> We want to easily detect breakages caused by us or changes at the ebsco end.

Another option could be mocking the API. It wouldn't help detect breakages on
the EBSCO end, but it would cover breakages caused by us.

I have a Ruby project where I provide a HTTP API which makes a lot of backend
calls to a variety of other APIs from different vendors. In my unit tests, I
override important Net::HTTP methods so that they return what I want. 

It looks like Cypress has some options for stubbing responses:
https://docs.cypress.io/guides/guides/network-requests

--

With my Ruby project, I mock the responses for my unit tests, and then when I
want to run my integration tests, I use real credentials for real test systems,
and run tests on those real test systems. 

Those test systems are all in a client's own ecosystem though, so it's very
easy to organize. It's not like interacting with an external third-party
system.

I reckon robust integration tests for the EBSCO API aren't going to be doable.
Someone with EBSCO API credentials could test but probably not doable from a
generic community perspective...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list