To start with cypress automation, users will need the following prerequisites:
Download and Install NodeJS
Download and install Visual Studio Code
Here are the steps you can follow to do the setup for running the automation on different environments:
- Step 1: Navigate to The cypress.json File Located in Your Project Folder
- Step 2: Open the cypress.json File and Add The Cypress baseUrl
- Step 3: Access baseURL in Your Spec
- Step 4: Use Cypress Command Line (aka Cypress CLI) to Pass baseUrl Dynamically
Now we can run the automation using the below command on different environments:
npx cypress run --config baseUrl="url_of_application[it can be qa, staging, int, production or any other env url]"
Post a Comment