Testing instructions #
Make sure you've copied .env.example to .env.test and provided any required
values.
Install dependencies in /dev-env
cd dev-env && pnpm i
Using Maestro #
- Install Maestro by following these instructions. This will help us run the E2E tests.
- You can write Maestro tests in
/__e2e__/flows/directory by creating a new.ymlfile or by modifying an existing one. - You can also use 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 studiocommand to start recording your actions.
Running on Android #
You will need to allow your device access to the port that the mock server is running on.
adb reverse tcp:3000 tcp:3000
adb reverse tcp:1986 tcp:1986
adb reverse tcp:8082 tcp:8082
Group invite Maestro suite #
The production-shaped group invite flows live in
__e2e__/flows/group-invite/. They reset the existing dev-env manager with a
scenario-specific local fixture and use real local feed-generator records.
Point the client at that fixture while starting Metro; the value is read by
the app at runtime and does not change the existing build commands.
EXPO_PUBLIC_ACORN_SERVICE_URL=http://localhost:1986 pnpm e2e:start
EXPO_PUBLIC_ACORN_SERVICE_URL=http://localhost:1986 pnpm e2e:run __e2e__/flows/group-invite
Build the E2E app once with the existing pnpm e2e:build command. The local
fixture checks that accept requests carry a Bearer header, but it does not
validate the production service-auth signature. A disposable real Acorn,
OpenFGA, and feed-service journey is still required for that enforcement
boundary.
Running Maestro tests #
- In one tab, run
pnpm e2e:mock-server - In a second tab, run
pnpm e2e:build - In a third tab, run
pnpm e2e:run __e2e__
Using Flashlight for Performance Testing #
- Make sure Maestro is installed (optional: only for automated testing) by following the instructions above
- Install Flashlight by following these instructions
- The simplest way to get started is by running
pnpm perf:measurewhich will run a live preview of the performance test results. You can see a demo here - The
pnpm perf:test:measurewill run thescroll.yamltest located in__e2e__/maestro/scroll.yamland give the results in.perf/results.jsonwhich can be viewed by runningpnpm perf:results - You can also run your own tests by running
pnpm perf:test <path_to_test>where<path_to_test>is the path to your test file. For example,pnpm perf:test __e2e__/maestro/scroll.yamlwill run thescroll.yamltest located in__e2e__/maestro/scroll.yaml.