Skip to content

Commit

Permalink
chore(e2e): create basic e2e script
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiCalazans committed Jun 19, 2024
1 parent 80dcd0c commit 054ee81
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
20 changes: 20 additions & 0 deletions e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
appId: com.rnctvexample
---
- launchApp
- tapOn: .*FlashList.*
- assertVisible: "Scroll Y is: 0.00"
- swipe:
direction: UP
duration: 300
- swipe:
direction: LEFT
duration: 150
- swipe:
direction: LEFT
duration: 150
- swipe:
direction: UP
duration: 150
- swipe:
direction: UP
duration: 150
24 changes: 24 additions & 0 deletions perf_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

if [ -z "$1" ]; then
echo "Error: deviceId is not defined."
exit 1
fi

deviceId="$1"
appId="com.rnctvexample"

echo "Testing $appId"

flashlight test --bundleId $appId \
--testCommand "maestro --device $deviceId test -e APP_ID=$appId e2e.yaml" \
--iterationCount 10 \
--resultsTitle $appId \
--resultsFilePath $appId.json

adb -s $deviceId shell am force-stop $appId
adb -s $deviceId shell pm clear $appId
sleep 0.2

version_report_files=$(printf " %s.json" "${versions[@]}")
flashlight report$version_report_files

0 comments on commit 054ee81

Please sign in to comment.