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

Testing Suite #56

Open
paintedbicycle opened this issue Mar 22, 2018 · 7 comments
Open

Testing Suite #56

paintedbicycle opened this issue Mar 22, 2018 · 7 comments

Comments

@paintedbicycle
Copy link
Contributor

Currently we don't have any automated testing to help protect against regressions. We should add tests.

@paintedbicycle
Copy link
Contributor Author

@joshuapinter Are you still thinking about this? Would you be using Jest? I have no experience in testing, but I am interested in learning Jest and Enzyme. Maybe you can get something installed and configured the way you like and then I can help write tests?

@joshuapinter
Copy link
Owner

Absolutely. I've been making improvements to Android recently, including SelectContact, which is really slick.

The more I think about testing, the more I think that Jest and Enzyme won't cut it. We use those in a project at work but mostly to render Components. In this library, we mostly need to test the access and response of the native Contacts on various device/OS combinations.

The only way I can think of to test this is through emulators, via Travis or CircleCI or something, where we can specify a testing matrix and confirm all supported OS and versions are passing the tests. Maybe we use Jest or something else for the actual tests but we'll need to have them run in an emulator to confirm they're working in the device environment. i.e. it can't just be standalone testing.

What do you think?

@joshuapinter
Copy link
Owner

I think the two obvious ones are CircleCI and Travis CI.

Here is an example CircleCI project for React Native:

https:/CircleCI-Public/circleci-demo-react-native

Might be a good starting place.

Plus, they offer free services for Open Source projects:

What if I am building open-source?
We offer a total of four free linux containers ($2400 annual value) for open-source projects. Simply keeping your project public will enable this for you!

We also offer the Seed plan free (at 1x concurrency) for OS X open source projects. Contact us at [email protected] for access. If you are building a bigger open-source project and need more resources, let us know how we can help you!

@paintedbicycle
Copy link
Contributor Author

Very interesting. I'd like to learn this stuff. It's a bit over me at the moment but I'm willing to follow along and help out here and there where I can. I agree that testing in a real/emulated device is superior as most of our problems have stemmed from weirdness on device.

@joshuapinter
Copy link
Owner

Sounds good. Well, I'll get things setup and get the first couple tests done so that there is a pattern and let you finish it off from there.

@joshuapinter
Copy link
Owner

Started playing around with this on the tests branch: https:/joshuapinter/react-native-unified-contacts/tree/tests

Much more difficult than anticipated. Will require a whole weekend to get this working right so have to put this off until more time opens up.

It's important, though, so I'm keen to get it up and running eventually.

@paintedbicycle
Copy link
Contributor Author

Awesome. Yep, there is only so much time in a week!

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

2 participants