- 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 - Reports
风暴与Mocha交火。 因此,可能为Mocha编写的任何报告也可以用“旋风”加以利用。 除此以外,还有其他第三方记者,如Junnit和团队精神。
Mochawesome Report
Mochaweous报告是“Cypress”中最重要的报告之一。
页: 1
npm install mochawesome --save-dev
以下屏幕将登在你的电脑上:
安装 mo,指挥线如下:
npm install mocha --save-dev
以下屏幕将登在你的电脑上:
npm install mochawesome-merge --save-dev
以下屏幕将登在你的电脑上:
在安装后,所有这些包裹都应反映在包件上。 json案。
将多份报告合并为一份报告,由以下指挥:
npm run combine-reports
Configurations in cypress.json file
In the cypress.json file, we can set the following configurations for the mochawesome reports −
overwrite − If its value is set to false, there should not be any overwriting from the prior generated reports.
quiet − If its value is set to true, there should not be any Cypress related output. Only the mochawesome output has to be printed.
html − If its value is set to false, there should not be any generation of html reports after execution.
json——如果其价值被确定为真实,将产生一份载有执行细节的json档案。
Implementation in cypress.json
cy杂报告的执行情况。 json如下:
{ "reporter": "mochawesome", "reporterOptions": { "reportDir": "cypress/results", "overwrite": false, "html": false, "json": true } }
1. 为气旋风暴项目整合者的所有光谱编制一份报告,其指挥范围如下:
npx cypress run
进行特定试验,由以下指挥进行:
npx cypress run --spec "<path of spec file>"
在完成执行后,在“Cypress”项目内产生了 mo状报告夹,其中包含以html和json格式撰写的报告。
Right-cpck on the mochawesome.html report. 然后选择制版路,打开浏览器上铺路。
令人不安的报告在开篇时附有执行结果、期限、测试案例名称、测试步骤等细节。
在对屏幕左上角的icon(以上述图像为亮点)进行点击时,展示出更多的选择。
我们可以得出不同的看法,选择过去、失败、等待、天空的测试案例,以及适用于试验的hoo。
JUnit Report
气旋风暴还提供了另外一种称为Junnit报告的报告。
安装JUSG报告包,指挥如下:
npm install cypress-junit-reporter --save-dev
以下屏幕将登在你的电脑上:
Implementation in cypress.json
下面是《日元报告》的执行情况。 json -
{ "reporter": "junit", "reporterOptions": { "mochaFile": "cypress/results/results.xml", "toConsole": true } }
如果我们进行多次测试,并希望有一份单独光谱档案的独特报告,我们就必须在风暴中增加[hash]。 碎块中的卷宗参数。 json。
Implementation to avoid overriding report
下面是cy。 json, 避免在Cypress发表压倒一切的报告
{ "reporter": "junit", "reporterOptions": { "mochaFile": "cypress/results/results-[hash].xml", "toConsole": true } }
3. 为“旋风”项目集成夹中的所有光谱生成报告,由以下指挥:
npx cypress run --reporter junit
以下屏幕将登在你的电脑上:
在完成执行后,结果夹在含有Xml格式报告的Cypress项目中产生。
teamcity Report
气旋风暴提供了另外一种称为团队精神报告的报告。
安装小组报告包,操作如下:
npm install cypress-teamcity-reporter --save-dev
以下屏幕将登在你的电脑上:
3. 为“旋风”项目集成夹中的所有光谱生成报告,由以下指挥:
npx cypress run --reporter teamcity
以下屏幕将登在你的电脑上:
Advertisements