On this page
Recorder.jar
recorder.jar
is the primary mechanism we prefer you to use to upload
screenshots to screenshotbot. It's a simple script you run at the end
of a test. The code for this script is available on GitHub.
You can build this script manually, or you can download the latest version at any time from https://screenshotbot.io/recorder-master.jar. For instance, this might be convenient in a CircleCI job.
You may also build your own client using the Screenshotbot API.
Command line options
usage: java -jar recorder.jar [options]
Process and record screenshots/snapshots to Screenshotbot.io
--api-key <arg> Screenshotbot API key, otherwise we read from
~/.screenshotbot
--api-secret <arg> Screenshotot API secret, otherwise we read from
~/.screenshotbot
-b,--branch <arg> Branch
-c,--channel <arg> Channel name under which the screenshots should
go under
-d,--dir <arg> Directory with screenshots, can also be a
bundle.zip
-h,--help Display this help message
-m,--metadata <arg> Metadata file, defaults to dir/metadata.xml
-p,--is-production Is `production`. For instance, CI runs. Only CI
runs on master or release branches will be
`promoted`. All other runs can still be viewed on
screenshotbot.io
-r,--repo <arg> Github repository
Feel free to contact support@screenshotbot.io for any questions
Example usage for Android Project:
java -jar recorder-master.jar --dir ${CIRCLE_ARTIFACTS}/*/*/artifacts/screenshot_bundle.zip \
--channel screenshotbot-example-circleci-test \
--metadata ${CIRCLE_ARTIFACTS}/*/*/artifacts/metadata.xml \
--is-production \
--branch ${CIRCLE_BRANCH} \
--api-key ${SCREENSHOTBOT_API_KEY} \
--repo ${CIRCLE_REPOSITORY_URL} \
--api-secret ${SCREENSHOTBOT_API_SECRET}
This example is taken from https://github.com/tdrhq/screenshotbot-example/blob/master/.circleci/config.yml.
The metadata.xml file is generated by screenshot-tests-for-android. If you're using iOSSnapshotTestCase, then you can skip this line.