You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Consolidated Mochawesome Report for Cypress on HyperExecute
3
+
title: Consolidated Mochawesome Report for Cypress
4
4
hide_title: false
5
-
sidebar_label: Cypress Mochawesome Report
5
+
sidebar_label: Cypress Mochawesome
6
6
description: Discover how to create MochaAwesome test reports for Cypress framework testing on LambdaTest and how to download these reports from the dashboard
Cypress is an open-source, end-to-end testing framework made especially for contemporary web applications. It enables programmers to create and run tests that mimic user interactions right inside a web browser.
42
+
The Mochawesome reporter is a custom Cypress reporter designed to generate standalone HTML reports. These reports are clean, modern, and interactive, making it easier to visualize test results. With features like filtering tests and displaying stack traces for failures, the Mochawesome report is an essential tool in Cypress for clear and concise test insights.
43
43
44
-
### Built-in Reporters
45
-
There several pre-defined or built-in reporters and since Cypress is built on top of Mocha, that means any reporter built for Mocha can be used with Cypress as well. Each reporter may present the test results in a different way, suitable for specific needs or preferences. These built-in reporters offer different levels of detail and visualization options, helping developers to understand the test results and identify any potential issues more effectively.
44
+
##Generating a Consolidated HTML Report
45
+
Follow these steps to generate a consolidated HTML report using Mochawesome:
46
46
47
-
:::note info
48
-
Following are some of the built-in reporters:
49
-
- Spec Reporter
50
-
- Dot Matrix Reporter
51
-
- Nyan Reporter
52
-
- Tap Reporter
53
-
- Landing Strip Reporter
54
-
- List Reporter
55
-
:::
56
-
57
-
There are many other built-in reporters as well. By default, Cypress uses the `spec` reporter to output information to `STDOUT`
58
-
59
-
### Custom Reporters
60
-
Apart from the built-in reporters, Cypress Test also allows developers to create custom reporters i.e. you have the flexibility to define your own format and layout for displaying test results. Custom reporters are beneficial when you have specific reporting requirements or when you want to integrate the test results seamlessly into your existing development workflow.
61
-
62
-
You can load custom Mocha reporters through a relative or absolute path which can be specified in your **Cypress Configuration file** or via the **CLI**.
63
-
64
-
## Mochawesome Report on HyperExecute
65
-
***
66
-
67
-
Mochawesome reporter is a custom reporter that generates a standalone HTML report which helps to help visualize the test runs. It has simple, clean, and modern design. The report has filters to display only the desired tests and renders stack trace for failed tests. The Mochawesome report is one of the most important reports in Cypress.
47
+
### Step 1: Update Your Cypress Configuration
48
+
In your Cypress configuration file `cypress.config.js`, add the following code to enable Mochawesome as a reporter:
68
49
69
-
### Steps to Generate HTML Report on HyperExecute
70
-
71
-
**Step 1:** Update your Cypress Configuration File by adding the below code
72
-
73
-
#### Cypress Config File
74
-
75
-
```bash
50
+
```javascript title="cypress.config.js"
76
51
"reporter":"cypress-multi-reporters",
77
52
"reporterOptions": {
78
53
"reporterEnabled": [
@@ -87,24 +62,24 @@ Mochawesome reporter is a custom reporter that generates a standalone HTML repor
87
62
}
88
63
```
89
64
90
-
> The `overwrite` parameter should be set to **true** and `html` should be set to **false** because the mocha-merge utility which we use to merge reports do not support html files in path while merging json files
91
-
92
-
:::tip Note
93
-
94
-
The path to report is set to **``"reportDir": "cypress/results"``** and it should not be changed as we use this path for showing command logs on a dashboard.
95
-
65
+
:::note
66
+
- The `overwrite` parameter should be set to `true` to ensure the report is replaced with the latest run results.
67
+
- The `html` option should be set to `false` because we will be merging JSON files later, and the mocha-merge utility does not support HTML files.
68
+
- Ensure the `reportDir` path is set to `"cypress/results"` —this path is used to generate logs that will be visible on the dashboard. **Do not change this path.**
96
69
:::
97
70
98
-
**Step 2:** Now configure the report parameters in the **HyperExecute YAML** file.
71
+
### Step 2: Configure the HyperExecute YAML File
72
+
In your HyperExecute YAML configuration, define the [`report`](https://www.lambdatest.com/support/docs/deep-dive-into-hyperexecute-yaml/#report) parameters like this:
99
73
100
-
```bash
74
+
```yaml title="hyperexecute.yaml"
101
75
report: true
102
76
partialReports:
103
77
frameworkName: cypress
104
78
location: cypress/results
105
79
type: html
106
80
```
107
81
108
-
**Step 3:** Now Execute your job by triggering the HyperExecute CLI. You can visit the HyperExecute dashboard to download the report after job completion.
82
+
### Step 3: Execute Your Tests
83
+
Run your Cypress tests on HyperExecute using the CLI. After your job completes, you can visit the HyperExecute dashboard to download and view the consolidated Mochawesome report.
Copy file name to clipboardExpand all lines: docs/error-categorization-report.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
id: error-categorization-report
3
-
title: Error Categorization Report on HyperExecute
3
+
title: Error Categorization Report
4
4
hide_title: false
5
5
sidebar_label: Error Categorization
6
6
description: Streamline error analysis with the Error Categorization Report. Identify patterns in test failures to enhance quality and efficiency in your testing process.
@@ -45,7 +45,7 @@ You can generate and download other reports as well, along with the error-report
45
45
46
46
This report is generated when your job includes multiple error categories. To enable the error categorization report, simply pass the [`errorCategorizedReport`](https://www.lambdatest.com/support/docs/deep-dive-into-hyperexecute-yaml/#errorcategorizedreport) flag to your YAML file:
0 commit comments