pixielabs / cavy

An integration test framework for React Native.
https://cavy.app
MIT License
1.37k stars 115 forks source link
android automation e2e-testing e2e-tests hacktoberfest integration-testing ios javascript react react-native testing

Cavy logo

Cavy

npm version CircleCI

Cavy is a cross-platform, integration test framework for React Native, by Pixie Labs.

Cavy tests allow you to programmatically interact with deeply nested components within your application. Write your tests in pure JavaScript and run them on both Android and iOS.

Cavy tests look like this:

export default function(spec) {
  spec.describe('A list of the employees', function() {
    spec.it('can be filtered by search input', async function() {
      await spec.exists('EmployeeList.JimCavy');
      await spec.fillIn('SearchBar.TextInput', 'Amy');
      await spec.press('Button.FilterSubmit');
      await spec.notExists('EmployeeList.JimCavy');
      await spec.exists('EmployeeList.AmyTaylor');
    });
  });
}

πŸ“‹ Requirements

πŸ‘Ά Getting started

Get set up with Cavy by following our installation guide.

You might also want to check out some articles and watch talks about Cavy to find out a bit more before you write code.

If you need some inspiration, head over to Cavy's sample app, follow the instructions in the README, and see Cavy in action.

πŸ“˜ Documentation

Full documentation and guides for Cavy can be found on our website.

πŸ—ΊοΈ Development roadmap

Take a look at our public Pivotal Tracker to see what we're currently working on, and what features we plan to add to Cavy next.

πŸ’― Contributing

When making changes to Cavy, it's useful to have the CavyTester app running in development for regression testing.

Follow the instructions it's own README on how to get the tester app running against a local version of the Cavy library.

Here you'll also find instructions on adding new test cases to ensure your functionality is fully tested. Please do this :)

Before contributing, please read the code of conduct.