brodycj / create-react-native-module

MIT License
665 stars 52 forks source link

Document acceptance testing process #98

Open brodycj opened 5 years ago

brodycj commented 5 years ago

In response to discussion in PR #91 (adding tvOS platform support)

/cc @dlowder-salesforce @dsyne

brodycj commented 5 years ago

Automatic testing

The existing test automation which I think needs some formal documentation is intended to ensure that code refactoring and other cleanup does not break working behavior. I generally use snapshots to capture the current behavior, which can be updated according to behavior changes as needed. The automatic testing is in the following parts under the tests subdirectory:

Here are the main things that are needed to maintain the automatic testing:

I recently introduced Stryker mutation testing which seems to catch most cases of code not covered by the automatic testing (I discussed some exceptions in #89).

Manual release testing

Here are some sanity test cases that I run whenever I am ready to publish a new package release, with create-react-native-module installed using npm i -g github:brodybits/create-react-native-module#mybranchname:

(I am starting to skip some of these steps when I feel they are not all needed.)

I generally do similar manual testing, sometimes to a limited extent, before merging significant updates.

Motivation is to avoid making releases with stupid mistakes like #12.

There may be ways to do this automatically, using Sauce Labs for example. I think the existing manual and automatic testing process should be good enough for now (at least).

/cc @dlowder-salesforce @dsyne