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
Cucumber reporting is a way to visualize and analyze test results when using the Cucumber testing framework. Cucumber is widely used for Behavior-Driven Development (BDD), allowing tests to be written in plain language using Gherkin syntax. The reports generated from Cucumber tests provide a readable format for stakeholders to understand the results, which helps in understanding the behavior of the system being tested without requiring technical expertise.
38
38
39
-
# Cucumber Reports
39
+
Cucumber itself provides basic reporting in the command line, but additional plugins and tools can enhance the reporting experience, generating rich HTML or JSON reports.
40
40
41
-
Cucumber uses reporter plugins to produce reports that contain information about what scenarios have passed or failed.
42
-
43
-
## Built-in Reporters
44
-
There several pre-defined or built-in reporters for Cucumber. 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.
41
+
## Steps to Generate Cucumber Reports on HyperExecute
45
42
46
-
Following are some of the built-in reporters:
47
-
- message
48
-
- progress
49
-
- pretty
50
-
- html
51
-
- json
52
-
- rerun
53
-
- junit
54
-
- testng
43
+
### Step 1: Configure the TestRunner File
44
+
In your `TestRunner` file, configure `@CucumberOptions` to specify report formats and output paths. Here’s an example configuration:
55
45
56
-
## Custom Reporters
57
-
Apart from the built-in reporters, Cucumber 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.
This involves creating a class that implements/extends the standard formatter interface.
59
+
Explanation of plugin Options:
60
60
61
-
## Steps to Generate Cucumber Reports on HyperExecute
61
+
-**pretty :** Outputs readable format in console.
62
+
-**html:target/cucumber-reports/cucumber-pretty :** Generates HTML report in the target directory.
63
+
-**json:target/cucumber-reports/CucumberTestReport.json :** Generates JSON report, often required for CI/CD and advanced reporting.
64
+
-**rerun:target/cucumber-reports/rerun.txt :** Logs any failed scenarios for rerun.
62
65
63
-
**Step 1:** Configure the report parameters in the HyperExecute YAML file.
66
+
### Step 2: Configure the HyperExecute YAML File
67
+
In your HyperExecute YAML configuration, define the [`report`](https://www.lambdatest.com/support/docs/deep-dive-into-hyperexecute-yaml/#report) parameters like this:
64
68
65
-
```bash
69
+
```yaml title="hyperexecute.yaml"
66
70
report: true
67
71
partialReports:
68
72
location: target/cucumber-reports/
69
73
frameworkName: cucumber
70
74
type: json
71
75
```
72
76
73
-
**Step 2:** Now execute your job by triggering the HyperExecute CLI. You can visit the HyperExecute dashboard to download the report after job completion.
77
+
### Step 3: Execute Your Tests
78
+
Run your tests on HyperExecute using the CLI. After your job completes, you can visit the HyperExecute dashboard to download and view the Cucumber report.
Copy file name to clipboardExpand all lines: docs/extent-report.md
+63-36Lines changed: 63 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
id: extent-report
3
-
title: Extent Report on HyperExecute
4
-
hide_title: true
3
+
title: Extent Report
4
+
hide_title: false
5
5
sidebar_label: Extent
6
6
description: Learn how to generate Extent Report on lambdatest and download the reports from the dashboard
7
7
keywords:
@@ -35,53 +35,84 @@ slug: extent-report/
35
35
})
36
36
}}
37
37
></script>
38
+
Extent Reports is a powerful reporting library used in test automation frameworks to generate visually appealing and detailed test reports. It provides insights into the status of each test case, including whether they passed, failed, or were skipped, along with additional information such as logs, screenshots, and system/environment details. This makes it especially popular in Selenium, Appium, and API testing frameworks.
38
39
39
-
# HyperExecute Extent Report
40
-
41
-
Extent Reports is a popular reporting framework for Java, TestNG, and Selenium tests. It provides a comprehensive set of features for reporting test results, including detailed test case summaries, screenshots and videos of test execution, execution logs, and charts and graphs to analyze test results..
40
+
## Steps to Generate Extent Reports `(Version <= 2)` on HyperExecute
41
+
Follow these steps to enable Extent Reports for your HyperExecute job:
42
42
43
-
### Prerequisites
43
+
### Step 1: Add Dependency
44
+
If using Maven, add the following dependency to your `pom.xml` file:
44
45
45
-
1. Upgrade to extent reporting version 5 in the `pom.xml` file.
46
-
2. Update import statements in the codebase from `com.relevantcodes` (version 2) to `com.aventstack` (version 5).
46
+
```xml title="pom.xml"
47
+
<dependency>
48
+
<groupId>com.relevantcodes</groupId>
49
+
<artifactId>extentreports</artifactId>
50
+
<version>2.41.2</version>
51
+
</dependency>
52
+
```
47
53
48
-
## Implementation Steps
54
+
### Step 2: Create an Extent Report Listener
55
+
Create a class, e.g., `ExtentReportListenerV2.java`, to initialize and flush Extent Reports during test execution. This listener will log each test case’s status to the report.
## Steps to GenerateExtentReports `(Version>2)` on HyperExecute
50
76
Follow these steps to enable ExtentReportsfor your HyperExecute job:
51
77
52
-
### 1. Upgrade Extent Reporting Version
53
-
54
-
Update the `pom.xml` file to include the latest version of the Extent Reporting library (version 5). Ensure that the necessary dependencies are correctly configured.
78
+
### Step1:AddDependency
79
+
If using Maven, add the latest extentreports dependency to `pom.xml` file:
55
80
56
-
```xml
81
+
```xml title="pom.xml"
57
82
<dependency>
58
-
<groupId>com.aventstack</groupId>
59
-
<artifactId>extentreports</artifactId>
60
-
<version>5.0.0</version>
83
+
<groupId>com.aventstack</groupId>
84
+
<artifactId>extentreports</artifactId>
85
+
<version>5.0.9</version><!--Use latest version available -->
61
86
</dependency>
62
87
```
63
88
64
-
### 2. Modify Import Statements
89
+
### Step2:Create an ExtentReportListener
90
+
ForExtentReports>2, use `ExtentHtmlReporter` to generate and customize the HTML report. Create `ExtentReportListener.java`:
65
91
66
-
Update import statements in your codebase to reflect the new package structure in Extent Reporting version 5. Replace `com.relevantcodes` with `com.aventstack`.
htmlReporter.config().setReportName("Automation Test Results")
109
+
extent =newExtentReports();
110
+
extent.attachReporter(htmlReporter);
111
+
}
76
112
```
77
113
78
-
### 3. Generate JSON Reports
79
-
80
-
Make changes in your codebase to generate individual JSON reports. These reports will serve as the source for the Extent Reports.
81
-
82
-
### 4. Update HyperExecute YAML Configuration
83
-
84
-
In the HyperExecute YAML configuration, add the following section to instruct the HyperExecute systems to generate Extent Reports:
114
+
## Configure the HyperExecuteYAMLFile
115
+
In your HyperExecuteYAML configuration, define the [`report`](https://www.lambdatest.com/support/docs/deep-dive-into-hyperexecute-yaml/#report) parameters like this:
By following these steps, your HyperExecute job will generate Extent Reports, providing a consolidated HTML report derived from individual JSON reports. This enhancement allows customers to access comprehensive and standardized reports conveniently at the conclusion of their HyperExecute jobs.
Copy file name to clipboardExpand all lines: docs/native-extent-report.md
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
id: native-extent-report
3
-
title: Native Extent Report on HyperExecute
4
-
hide_title: true
3
+
title: Native Extent Report
4
+
hide_title: false
5
5
sidebar_label: Extent Native
6
6
description: Learn how to generate Native Extent Report on lambdatest and download the reports from the dashboard
7
7
keywords:
@@ -37,9 +37,6 @@ slug: native-extent-report/
37
37
})
38
38
}}
39
39
></script>
40
-
41
-
# HyperExecute Extent Native Report
42
-
43
40
The Extent Native Reports offer a standardized and easily accessible summary of information extracted from raw Extent reports per Virtual Machine (VM) at the end of a HyperExecute job.
0 commit comments