-
What is this toolkit for? ======= In an attempt to create a real-time debug tool that could run on any CI servers, can capture failed tests trace and screenshot. I create this. Well, the most
awesome
term here isrealtime
, but sadly to say that I have not completed this part :sosad: -
Usage =======
- Define location to store screenshot and trace logs on your machine via env variable:
$ANDROID_SCREENSHOT
Sample:
export ANDROID_SCREENSHOT="~/ubuntu/ci_screenshots"
- Run
git clone git@github.com:toantran-ea/adb-ci-bridge.git && cd adb-ci-bridge/ && ./setup_bridge.sh
Done!
- What is the
science
behind? ======
After running setup_bridge.sh
script, there are few steps taken:
- The script will check if directory $ANDROID_SCREENSHOT is existing and create if not.
- Python webserver will be run in background via
nohup
on localhost at port9001
- Set system environment variable named
$ANDROID_SCREENSHOT
to be1
. You can take advantage of this varible to know if you could contact the bridge-server.
- Availble endpoints from bridge server ======
POST /screenshot
- request content:
{"tag": <your screenshot tag>, "trace": <Your screenshot stracktrace if any>}
- request content:
POST /unlock
with empty body.
- Sample: =======
curl -H "Content-Type: application/json" -X POST -d '{"tag":"sample tag value","trace":"TooAwesomeException foo bar"}' http://localhost:9001/screenshot