Setting Up a Windows Test Environment with Cygwin for Response Time Measurement
This guide explains how to configure a Windows-based testing environment using Cygwin, install necessary tools, create shortcuts, access Windows drives, and execute shell scripts to record videos, extract frames, compare images, and calculate average response times for Android applications.
Background: To test response time of a business scenario on Windows, a Unix-like environment is required to run .sh scripts, which is achieved using Cygwin.
Required software includes Python 2.7, Git, Cygwin (download from https://www.cygwin.com/), adb, ffmpeg, Notepad++, and Excel (or Numbers) for data handling. Environment variables for Python, Git, adb, Cygwin, and ffmpeg are added to the system PATH.
Installation of Cygwin can follow two methods; the guide shows screenshots for each step, including selecting download site, choosing packages, and completing installation. If the shortcut is not created, a manual shortcut is made by creating a Cygwin.bat file containing D:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico – .
Within Cygwin, Windows drives are accessed via commands such as cd /cygdrive/c and cd /cygdrive/c/Users/58/Desktop/aa .
Response‑time testing procedure consists of a practical part and a theoretical part. The practical part runs a shell script, e.g., sh AndroidUserTimging.sh case1 10 , which records a video via adb, extracts frames with ffmpeg, compares consecutive frames using imagecompare.py , and selects frames based on a 95% similarity threshold.
Theoretical part organizes recorded videos in a ShotVideo folder, extracted images in Shotimage , and stores selected frames in an Excel/Numbers sheet. The response time for each round is calculated by subtracting the first and last frame numbers and dividing by 30 (frames per second), then averaging over three rounds.
转转QA
In the era of knowledge sharing, discover 转转QA from a new perspective.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.