Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop mocked API for running tests #39

Open
hypostulate opened this issue Feb 13, 2020 · 0 comments
Open

Develop mocked API for running tests #39

hypostulate opened this issue Feb 13, 2020 · 0 comments

Comments

@hypostulate
Copy link

Motivation
Testing an API client based on a third-party's continually-evolving API is challenging. It's made even more challenging by the fact that some API features (#38) are not available to all users. Setup/teardown may not be a viable concept for some more complex endpoints and is not necessarily sustainable. There are also no create endpoints for certain actions, such as creating schemas in the registry, precluding tests of many schema-requiring endpoints on a fresh environment.

Proposal A
There might be a possibility for soft tests that just check for syntax/types in an intercepted request's body. The V2 endpoints are variable in their finickiness, so this could take a while to get right, but would be a lightweight solution. If the underlying request-forming functions are appropriately strict, developing and testing on top of them would be much faster this way.

Proposal B
Fully mock the API with an implementation akin to moto, enabling a test workflow that could e.g. create, get, archive an object without having seen it before. The logic would still be equivalently tricky here. For example, in storage, matrix plates are created with capitalized wells, but are returned with lower-case wells.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant