API Automation Testing with algoQA and Cypress

Modified on Tue, 11 Jun at 1:30 PM

TABLE OF CONTENTS

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

  1. 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.

  2. Run the following command to launch the Cypress UI.
    npx cypress open
    
  3. Cypress UI screen appears with Cypress configured. as shown. In this screen, select E2E testing option.



  4. Choose a browser screen appears. In this screen, select Chrome and Click Start E2E Testing in Electron button.


  5. Feature File will be displayed as follows. Click the Feature File to start the execution.
  6. 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: 

  1. Navigate to the same folder where you saved your algoQA generated scripts. Type 'cmd' on the navigation bar to open the command prompt.

  2. Run the following command to execute the scripts:
    npx cypress run --headless
    
    
  3. 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article