Skip to main content
Transform your testing process with: Company-wide Licences, Test Observability & App Percy
No Result Found

Set environment variables

Configure your environment variables to allow Percy builds to run seamlessly

Percy integrates with your tests using both Percy and BrowserStackSDK. To establish this integration, choose the appropriate SDK and refer to the following section accordingly:

To seamlessly integrate your visual and functional testing processes for your website, execute your Percy tests on BrowserStack’s Automate. If you’re already an Automate user and wish to explore Percy, you can do so as well. Leveraging BrowserStack SDK for running your tests fulfills all requirements.

Supported parameters

Percy client libraries retrieve additional details from the environment they are running in, including the branch name, commit SHA, GitHub Pull Request number, and more. You can modify certain aspects of Percy’s behavior by configuring these environment variables within your CI environment:

Environment Variable Description
PERCY_BRANCH The branch in which the build is being executed. Default is the current git branch.
PERCY_PULL_REQUEST The pull request number to link with the build, if any.
PERCY_PARALLEL_TOTAL The total number of parallel builds to expect. \n- In most setups this is automatically discovered and does not need to be set. To know more, read Parallel test suites.
PERCY_PARALLEL_NONCE A unique identifier used to group parallel builds. This can be any string that is shared between parallel runners, such as the CI build number. \n - In most setups this is automatically discovered and does not need to be set. To know more, read Parallel test suites.
PERCY_PARTIAL_BUILD Set to 1 to indicate the build is a partial build, and that it intentionally will be a subset of the snapshots from a full build.
HTTP_PROXY Set http proxy that Percy cli should use in case you need to access internet over a corporate proxy.
HTTPS_PROXY Set https proxy that Percy cli should use in case if you need to access internet over a corporate proxy

In most cases setting only HTTP_PROXY should suffice, but if you have separate proxies for HTTP and HTTPS feel free to set both.

The format for proxy’s is http[s]://<username>:<password>@<domain.com>:<port>/ [username and password is optional].
PERCY_COMMIT Set this to the Git commit SHA to ensure that visual tests and snapshots taken by Percy are correctly linked to a specific commit in the version control system.
PERCY_GZIP Set this to true to potentially optimize resource size within the 25 MB threshold limit. The default is set to false.
PERCY_DO_NOT_USE_CAPTURED_COOKIES Set this to true to stop the use of auto-captured cookies. The default is set to false.

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