Skip to main content
No Result Found

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

Text
Copy icon Copy

percy config:validate

Validate a Percy config file

Text
Copy icon Copy

percy config:migrate

Migrate a Percy config file to the latest version Validate a Percy config file

Text
Copy icon Copy

percy build

Commands for interacting with Percy builds:

  • percy build:finalize
  • percy build:wait

percy build:finalize

Finalize parallel Percy builds

Text
Copy icon Copy

percy build:wait

Wait for a build to be finished

Text
Copy icon Copy

percy exec

The Percy CLI is used to capture and upload snapshots to percy.io from the command line.

Installation

Text
Copy icon Copy

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

Text
Copy icon Copy

percy app:exec:start

Text
Copy icon Copy

percy app:exec:stop

Text
Copy icon Copy

percy app:exec:ping

Text
Copy icon Copy

percy options

Percy Options is part of the device capability configured for App Automate or any similar service.

Text
Copy icon Copy

Available Percy options

Text
Copy icon Copy
Text
Copy icon Copy
'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.

Text
Copy icon Copy

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.

Text
Copy icon Copy

(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.

Text
Copy icon Copy

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

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle