TABLE OF CONTENTS
- Cypress Overview
- Prerequisite
- API Test Automation when API details are Captured using algoQA API Collection
- Executing the Script using Cypress UI
Cypress Overview
Cypress is an advanced end-to-end testing framework built with JavaScript, allowing developers to create and execute tests directly within the browser environment.
Prerequisite
For detailed prerequisites, refer to Configuring Node.Js Version and Cypress article.
API Test Automation when API details are Captured using algoQA API Collection
For automating API Test Automation using API collection, refer to the article Automating API Using API Collection.
Executing the Script using Cypress UI
- Navigate to the folder where you downloaded the scripts to open the command prompt from the same folder.
Make sure Cypress is configured on your system. For more details, refer to the prerequisite section. - Run the following command to launch the Cypress UI.
npx cypress open
- Cypress UI screen appears with Cypress configured. as shown. In this screen, select E2E testing option.
- Choose a browser screen appears. In this screen, select Chrome and Click Start E2E Testing in Electron button.
- Feature File will be displayed as follows. Click the Feature File to start the execution.
- Execution screen will be displayed as follows:
Executing the Script in the Headless Mode
With headless mode, tests run quickly without displaying the browser window. This means you can get test results faster, speeding up your testing process. Additionally, you can view the generated report. Ensure that Cypress is configured on your system.
Perform the following:
- Navigate to the same folder where you saved your algoQA generated scripts. Type 'cmd' on the navigation bar to open the command prompt.
- Run the following command to execute the scripts:
npx cypress run --headless
- Following is a sample report:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article