English 中文(简体)
Cypress - Architecture and Environment Setup
  • 时间:2024-03-24 12:06:58

Cypress - Architecture and Environment Setup

Previous Page Next Page  

图2

Cypress Architecture

以上图表的来源是:http://www.tutorialspoint.com/cypress-architecture-test-automation”https://www.tutorialspoint.com/cypress-architecturetest-automation

诸如Selenium等自动化工具在浏览器之外运行。 然而,热带风暴具有不同的结构。 它设在浏览器内。 风暴基本上以服务器为基础——Node.js。

热带风暴与Node.js继续相互交流,相互协调。 因此,可以利用Cypress测试申请的门面和背后。

因此,Cypress公司能够实时处理在ID公司执行的任务,同时能够在浏览器之外开展行动。

Difference between Cypress and Selenium

The basic differences between Cypress and Selenium are psted below -

Cypress Selenium
It is based on Javascript. It is based on Java, C#, Python and JavaScript.
It has small community support It has big community support.
It includes an in-built video capture feature. There is no in-built video capture feature.
No APIs are available to handle the tabs/child windows. APIs available to handle tabs/child windows.
No parallel execution can be performed. Parallel execution can be performed.
Only installation of npm needed. Supplemental Jars, pbraries, and so on are required to be added as project dependencies.

Cypress Environment Setup

For Cypress environment setup, visit the connection - 。 屏幕如下:

Nodejs

应为Windows和macOS Installer。 我们必须按照当地作业制度获得一揽子计划。

对于64轨Windows配置,下面的安装是为了节省安装机。

Node.v14.15

一旦安装完毕,在方案档案中就建立了 no子档案。 应当注意到这一档案的道路。 之后,从启动阶段进入环境变量如下:

Environment Variables

在该系统中,有人到高级,点击环境变量。 然后点击科索沃。

System Properties Advance

在环境变量中,可渗透到系统变量部分,点击新。

System Variables

进入NODE_HOME and the node.js path (前注) in the Variable name and the Variable Value areas each in the New System Variable pop-up。

New System Variables

这条路一经走。 j 档案是固定的,我们将在任何预期地点制造一个空洞的夹(例如气压)。

其次,我们需要有一位 Java本编辑来撰写《风暴守则》。 为此,我们可以从https://code.icstudio.com/上下载《演播室视觉守则》。

按照当地业务制度,选择正确的一揽子方案——

Local Operating System

一旦下载可执行的文件,完成所有安装步骤,即启动《演播室视觉守则》。

Visual Studio

选择从档案菜单中选取开放式Folder。 接着,在《演播室视觉法》中添加“CypressAutomation”的夹(我们此前已经创建)。

Cypress Automation Folder

我们需要制定一揽子计划。 json卷宗,由终端指挥:

如下文所述,我们必须详细了解包装名称、描述等等。


npm init

一揽子计划一旦完成。 json案卷是在该项目的夹子内制作的,有我们提供的信息。

Package

一揽子计划一旦完成。 json案卷是在该项目的夹子内制作的,有我们提供的信息。

Project Folder

最后,安装“旋风”指挥系统如下:


npm install cypress --save-dev

你们将获得以下产出:

Install Cypress
Advertisements