1 Answer
- Newest
- Most votes
- Most comments
0
Hello,
For iOS, you an collect performance metrics for automation runs using xctrace command. Currently, it will only be possible via custom test environment.
Implement following sample approach in test spec file to run xctrace:
# To start instruments after launching WebdriverAgent:
- xcrun xctrace record --device $DEVICEFARM_DEVICE_UDID_FOR_APPIUM --template 'Activity Monitor' --output $DEVICEFARM_LOG_DIR/appium.trace --time-limit 9000000ms --all-processes > $DEVICEFARM_LOG_DIR/trace.log 2>&1 &
- echo $! > $DEVICEFARM_LOG_DIR/trace_pid.txt
- cat $DEVICEFARM_LOG_DIR/trace_pid.txt
- tail -f $DEVICEFARM_LOG_DIR/trace.log &
# Then, at the end, terminate once and watch the log:
- |-
PID=$(cat $DEVICEFARM_LOG_DIR/trace_pid.txt)
COUNT=0;
MAX_COUNT=1800;
kill -SIGINT $PID;
while [[ $(cat $DEVICEFARM_LOG_DIR/trace.log | grep "Output file saved as" | wc -l) -lt 1 ]] && [[ $COUNT < $MAX_COUNT ]];
do
sleep 1;
kill -SIGINT $PID;
COUNT=$((COUNT + 1));
echo "waiting...";
done;
Please test this implementation in your testing environment
Sources
Custom test environments in AWS Device Farm - AWS Device Farm
Test environments in AWS Device Farm - AWS Device Farm
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
