Cypress Tutorial
Selected Reading
- Cypress - Discussion
- Cypress - Useful Resources
- Cypress - Quick Guide
- Cypress - GitHub
- Cypress - Plugins
- Cypress - Reports
- Cypress - Configuration of JSON File
- Cypress - Hooks
- Cypress - Environment Variables
- Cypress - Fixtures
- Cypress - Custom Commands
- Cypress - Debugging
- Cypress - Screenshots and Videos
- Cypress - Dashboards
- Cypress - Prompt Pop-up Window
- Cypress - Data Driven Testing
- Cypress - File Upload
- Cypress - Get and Post
- Cypress - Cookies
- Cypress - Mouse Actions
- Cypress - Web Tables
- Cypress - Frames
- Cypress - Hidden Elements
- Cypress - Child Windows
- Cypress - Alerts
- Cypress - Dropdown
- Cypress - Tabs
- Cypress - Checkbox
- Cypress - jQuery
- Cypress - Working with XHR
- Cypress - Asynchronous Behavior
- Cypress - Text Verification
- Cypress - Assertions
- Cypress - Locators
- Cypress - Aliases
- Cypress - Variables
- Cypress - Basic Commands
- Cypress - Supported Browsers
- Cypress - Build First Test
- Cypress - Test Runner
- Cypress - Architecture and Environment Setup
- Cypress - Introduction
- Cypress - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Cypress - Build First Test
Cypress - Build First Test
一旦气旋风暴混杂,在该项目内便建立了框架,在探索者中自动看到这一框架。 如下文所述,新的试验文件(第一份试验)应在集成夹内建立。
![Integration Folder](/cypress/images/integration_folder.jpg)
Cypress Folder Structure
让我们理解热带风暴的多重结构。 The factors which are included in a Cypress, are below -
videos——执行测试步骤以录像形式记录并在此保存。
node_modules——项目从零开始的依赖性保留在这一倍中。 这是Cypress项目执行的核心。
cypress.json-Default formations in this chainer. 现有组合的数值可以在此修改,从而推翻了缺省组合。
包装,json - 这些项目的属性和文字都保留在这个方面。
Structure of a Basic Test
气旋沿袭了 Java本试验框架(Mocha、Jasmine等)。 为了在气旋风暴中进行试验,我们必须遵守以下框架准则——
必须在描述功能中提供试样名称。
试卷中的试样子必须在同一栏内提供,或必须具体说明功能。
试验案件中的试验步骤必须在试验室内实施。
Basic Test Implementation
可以通过使用以下指挥——进行基本测试。
// test suite name describe( Tutorialspoint Test , function () { // Test case it( Scenario 1 , function (){ // test step for URL launching cy.visit("https://www.google.com/"); }); });
上文所用的镜头并不要求使用物体。 在安装 no子模块时,可以不停地提供。
Test Execution
为执行,从指挥线起,指挥如下:
./node_modules/.bin/cypress run
这里,综合文件夹内的所有档案都已经启动。
为执行,从试验操作起,指挥如下:
./node_modules/.bin/cypress open
然后,点击我们想要触发执行的具体卷宗。
为了触发执行指挥线下的具体档案,指挥线如下:
cypress run --spec "<spec file path>"
以下屏幕将登在你的电脑上:
![Specific File from Command pne](/cypress/images/specific_file_from_command_pne.jpg)