-
Notifications
You must be signed in to change notification settings - Fork 115
Detox comparison
AbigailMcP edited this page Mar 28, 2019
·
1 revision
A common question we're asked about Cavy is how is compares to other end-to-end testing frameworks for React Native. The most obvious comparison is to Detox:
Cavy | Detox | Conclusion | |
---|---|---|---|
Installation and set up | This is a major plus for Cavy - installation and set up is identical for both iOS and Android. The only set up you need to do is wrap your app in Cavy's Tester component. | Installation and set up is different for both iOS and Android - both involve a fair amount of configuration. You also need to choose and set up a third party test runner e.g. Jest. In order to run tests you need to add app-specific configuration to your package.json , specifying by name which devices you want to test on (either simulators or real devices). |
Cavy is really lightweight, and is much easier to set up and get running quickly. There is no custom configuration. It 'just works'. |
Hooking up components | Hook up components by setting a test reference as its ref. If you're using refs for another purpose already, you can still pass these in as a second argument. | Hook up components by setting a test reference as its testID prop. Not all React components support this prop, so you may need to manually propagate it through to the correct native component. |
About the same. |
Testing functionality | Cavy is JavaScript only, so doesn't support testing functionality that needs access to native code, for example tapping at an x, y coordinate. | Detox does touch native code and therefore offers a wider range of testing functionality. | Detox has more in-built functionality. |