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

Add tests #14

Open
ConnorMac opened this issue Jul 12, 2017 · 4 comments
Open

Add tests #14

ConnorMac opened this issue Jul 12, 2017 · 4 comments

Comments

@ConnorMac
Copy link
Contributor

ConnorMac commented Jul 12, 2017

We should ideally have tests that we can run before compiling and releasing a new version into the wild.

EDIT (by @OdinsPlasmaRifle ) The goal of this issue is to add a basic unit testing framework for the SDK.

@ConnorMac
Copy link
Contributor Author

A note on this. It could be worth having a test mode flag(ENV variable) which stubs out all calls the SDK makes so any service can easily write tests without manually stubbing all the calls it needs.

@OdinsPlasmaRifle
Copy link
Contributor

This sounds like a really awesome idea, would allow users to build software without having to make a Rehive account.

@ConnorMac
Copy link
Contributor Author

Indeed. That would be a pretty cool use case. The primary just being a great way to save a lot of grunt work in the future.

It does mean we have a whole lot more to maintain in the SDK though. Since the stubbed calls would need to be kept up to date(but they will need to be updated on every service that has tests anyway). We could consider writing something that automates making a company and then runs through all endpoints getting the response and saving the diff. This could be useful for docs as well.

@OdinsPlasmaRifle
Copy link
Contributor

Could this perhaps work by using the Swagger schema to generate stubs in some way? 🤔

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

No branches or pull requests

3 participants