Replace e2e tests with Maestro (#3983)
* Setup maestro tests and convert some initial tests * Remove detox * Replace all tests with maestro
This commit is contained in:
parent
5cd4ac3a34
commit
d49b93dc7e
41 changed files with 882 additions and 1730 deletions
|
@ -16,10 +16,6 @@
|
|||
- Add `eval "$(rbenv init - zsh)"` to your `~/.zshrc`
|
||||
- From inside the project directory:
|
||||
- `bundler install` (this will install Cocoapods)
|
||||
- Setup your environment [for e2e testing using detox](https://wix.github.io/Detox/docs/introduction/getting-started):
|
||||
- `yarn global add detox-cli`
|
||||
- `brew tap wix/brew`
|
||||
- `brew install applesimutils`
|
||||
- After initial setup:
|
||||
- Copy `google-services.json.example` to `google-services.json` or provide your own `google-services.json`. (A real firebase project is NOT required)
|
||||
- `npx expo prebuild` -> you will also need to run this anytime `app.json` or native `package.json` deps change
|
||||
|
@ -120,10 +116,7 @@ To open the [Developer Menu](https://docs.expo.dev/debugging/tools/#developer-me
|
|||
|
||||
### Running E2E Tests
|
||||
|
||||
- Make sure you've set your environment following the above
|
||||
- Make sure Metro and the dev server are running
|
||||
- Run `yarn e2e`
|
||||
- Find the artifacts in the `artifact` folder
|
||||
See [testing.md](./testing.md).
|
||||
|
||||
### Polyfills
|
||||
|
||||
|
|
|
@ -3,13 +3,19 @@
|
|||
Make sure you've copied `.env.example` to `.env.test` and provided any required
|
||||
values.
|
||||
|
||||
### Using Maestro E2E tests
|
||||
## Using Maestro
|
||||
|
||||
1. Install Maestro by following [these instructions](https://maestro.mobile.dev/getting-started/installing-maestro). This will help us run the E2E tests.
|
||||
2. You can write Maestro tests in `__e2e__/maestro` directory by creating a new `.yaml` file or by modifying an existing one.
|
||||
3. You can also use [Maestro Studio](https://maestro.mobile.dev/getting-started/maestro-studio) which automatically generates commands by recording your actions on the app. Therefore, you can create realistic tests without having to manually write any code. Use the `maestro studio` command to start recording your actions.
|
||||
2. You can write Maestro tests in `/.maestro/flows/` directory by creating a new `.yml` file or by modifying an existing one.
|
||||
3. You can also use [Maestro Studio](https://maestro.mobile.dev/getting-started/maestro-studio) which automatically generates commands by recording your actions on the app. Therefore, you can create realistic tests without having to manually write any code. Use the `maestro studio` command to start recording your actions.
|
||||
|
||||
### Running Maestro tests
|
||||
|
||||
### Using Flashlight for Performance Testing
|
||||
- In one tab, run `yarn e2e:mock-server`
|
||||
- In a second tab, run `yarn e2e:metro`
|
||||
- In a third tab, run `yarn e2e:run`
|
||||
|
||||
## Using Flashlight for Performance Testing
|
||||
1. Make sure Maestro is installed (optional: only for automated testing) by following the instructions above
|
||||
2. Install Flashlight by following [these instructions](https://docs.flashlight.dev/)
|
||||
3. The simplest way to get started is by running `yarn perf:measure` which will run a live preview of the performance test results. You can [see a demo here](https://github.com/bamlab/flashlight/assets/4534323/4038a342-f145-4c3b-8cde-17949bf52612)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue