Skip to content

Dasi-Rakesh/PercyJavaDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PercyJavaDemo

Initial Steps

Sign in to Percy and create a new project. You can name the project "todo" if you'd like. After you've created the project, you'll be shown a token environment variable.

Step 3

In the shell window you're working in, export the token environment variable:

Unix

$ export PERCY_TOKEN="<your token here>"

Windows

$ set PERCY_TOKEN="<your token here>"

# PowerShell
$ $Env:PERCY_TOKEN="<your token here>"

To Execute Test in Percy:

Step 1 : Install the @percy/cli

npm install --save-dev @percy/cli

Step 2 : Execute the Test with below command :

We can pass the URL in runtime with the below command

npx percy exec -- mvn test -Durl=https://www.browserstack.com/

To execute the Test in Non-Prod Environment use the below command:

npx percy exec -- mvn test -Durl=https://k8s.bsstag.com/

To Compare 2 URLS to each Other

Set PERCY_BRANCH to Production PERCY_BRANCH=production npx percy exec -- mvn test

Compare to the Baseline

Change the URL in TestWebsite.java file

PERCY_BRANCH=staging PERCY_TARGET_BRANCH=production npx percy exec -- mvn test

Verify the Build in Percy

About

PercyJavaDemo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors