Commands Overview
This page provides App Percy commands overview.
Use this reference guide to understand and implement the essential App Percy commands that enhance your visual testing workflow.
Commands
-
percy config
- manage configuration files. -
percy build
- interact with Percy builds. -
percy exec
- Use Percy exec command to capture and upload snapshots -
percy options
- use Percy options as a part of the device capability -
run percy
- run your tests on Percy using either your make file or by utilizing the Percy start and stop commands.
This applies only when using the Percy SDK.
percy config
Percy CLI commands for creating, validating, and updating Percy configuration files:
percy config:create
percy config:validate
percy config:migrate
percy config:create
Create a Percy config file
percy config:validate
Validate a Percy config file
percy config:migrate
Migrate a Percy config file to the latest version Validate a Percy config file
percy exec
The Percy CLI is used to capture and upload snapshots to percy.io from the command line.
Installation
Command
- percy app:exec - Start and stop Percy around a supplied command
- percy app:exec:start - Starts a local Percy snapshot server
- percy app:exec:stop - Stops a local running Percy snapshot server
- percy app:exec:ping - Pings a local running Percy snapshot server
percy exec
percy app:exec:start
percy app:exec:stop
percy app:exec:ping
percy options
Percy Options is part of the device capability configured for App Automate or any similar service.
Available Percy options
'appium:percyOptions': {
enabled: true, // true by default, decides if percy is enabled for particular session or device
ignoreErrors: true // true by default, decides whether to ignore errors occurred during test
}
var capabilties = {
...,
"deviceName": "iPhone 14",
"percy.enabled": true/false,
"percy.ignoreErrors": true/false,
...
}
run percy
You can run your tests on Percy using either your make file or by utilizing the Percy start and stop commands.
Run test using exec command
Add the percy app exec
command in your make file for executing tests on Percy, as shown below:
Percy CLI command to upload a directory of static images to Percy for diffing.
Run test using Percy start stop commands
If you cannot use the percy app:exec
command in your configuration file or you want to run your test via IDE, use the percy app:exec:start
and percy app:exec:stop
commands.
(1) Execute the below command to start Percy.
Percy CLI command to upload a directory of static images to Percy for diffing.
(2) Run your tests using the IDE’s run option.
(3) On test completion, you can stop Percy.
Percy CLI command to upload a directory of static images to Percy for diffing.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!