This project contains 2 sides - framework and device sides.
The framework side implements the core method of PIRLTest, while the device side implements the interaction with devices and the whole process of PIRLTest.
The framework side implements an HTTP server for the device side.
- 📦 Install the requirements.
pip install -r requirements.txt- ⚙️ Config OCR. Modify the
ocr()method inimg_process/ocr_canny.py(use your own id and keys). ▶️ Run the app.
./run.sh✅ It is deployed on http://localhost:5000.
The device side is an application. It can run on a server connected to Android devices for Android testing, or on a computer with Chrome installed for Web testing.
🔐 We use SSH as the protocol to connect server where the framework side deploys. So make sure that SSH service is running on your server.
- 📦 Install the requirements.
pip install -r requirements.txt- 🔐 Config SSH: modify
configs/ssh_config.json. Specify ip, port, username and password. - 📝 Test config: create a test config file under
configsfolder. - 💡 Take
configs/android/wikipedia.jsonandconfigs/web/webogram.jsonas examples.platform:androidorwebserial_no: the serial number of the Android devicescreen_size: the screen size of the devicepre_interact: whether to manually log in the app before testingserver_proj_dir: the path of where the framework side deploysserver_screenshot_dir:screenshotsonlylocal_screenshot_path: where the screenshot saves locallywindow_keys: not usedtotal_time: testing time in secondsbanner_height: The height of the top status bar of Android device.remote_port: the port of the framework sideapp.name: the name of the app under testapp.pkg: the package of the Android appapp.main_activity: the main activity of the Android appapp.url: the url of the Web app
- 🌐 Update chromedriver.exe if testing web application.
For Android app testing, use the following command:
python pirltest_android.py <config_path>For Web app testing, use the following command:
python launcher.py <config_path>For Android apps, if instrumented properly, the .exec coverage data files would be pulled to coverages folder.
For Web apps, if instrumented properly, the .json coverage data file would be downloaded under $HOME/Download folder.
📄 The log of the device side would be under logs folder.
📸 All the screenshots and the framework side logs would be on the server.