API Automation Testing with algoQA and Cypress
Run API automation tests using algoQA-generated scripts with Cypress UI or headless mode, and view the execution reports.
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 the Configuring Node.js Version and Cypress article.
API Test Automation When API Details Are Captured Using algoQA API Collection
For automating API tests 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. In this screen, select the E2E testing option.

-
Choose a browser screen appears. In this screen, select Chrome and click the Start E2E Testing in Electron button.

-
The Feature File will be displayed. Click the Feature File to start the execution.

-
The execution screen will be displayed.

Executing the Script in 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
- The report contains details like Feature, Scenario outline, examples, pass percentage, duration.
