Cypress Architecture

Profile picture for user arilio666

Most tests in different automation tools like Selenium runs outside the browser and execute the remote commands through the network. Cypress stands out as unique from others by running tests inside the browser where your applications run. Cypress tests perform on the actual browser without the requirement for driver binaries. The automated code and application code share the same platform, which fully controls the application under test.

Also, at the browser level, Cypress can access everything from DOM, Dev Tools, local storage, network layer, and window objects.

Cypress Architecture Diagram

Node server operates after the Cypress on the client-side. Thus, the node server and Cypress interact, accompany and carry out tasks to help the execution. Cypress can access both the front and back end applications, which enables it to act on real-time incidents on the applications and, at the exact time, execute tasks outside the browser that requires additional special privilege.

The Node server and browser communication are through the Web Socket, which starts execution after the proxy is created. Cypress sends HTTP requests and responses from the node server to the browser. Cypress works in the network layer; it helps to change the code that might interfere with the automation of the web browser. Cypress interacts with the network layer and captures commands by reading and altering the web traffic. 

Cypress controls all the commands that run on and off the browsers. It directly talks with operating systems to capture screenshots, record videos, access the network layer, and perform file system operations.

Video Tutorial: Cypress Architecture