Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Commit

Permalink
Bumped up the version to 3.1.0 with Klov support. (#97)
Browse files Browse the repository at this point in the history
Deprecated the ExtentX related implementation.
  • Loading branch information
email2vimalraj committed Jul 1, 2018
1 parent dd18d4a commit 7448715
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 24 deletions.
23 changes: 2 additions & 21 deletions Readme.md
Expand Up @@ -14,7 +14,7 @@ If you are using a maven based project, you can directly add this library as a d
<dependency> <dependency>
<groupId>com.vimalselvam</groupId> <groupId>com.vimalselvam</groupId>
<artifactId>cucumber-extentsreport</artifactId> <artifactId>cucumber-extentsreport</artifactId>
<version>3.0.2</version> <version>3.1.0</version>
</dependency> </dependency>
``` ```


Expand Down Expand Up @@ -97,26 +97,7 @@ The above example shows a JUnit runner. However, you can use the TestNG runner t
Also make sure the `loadXMLConfig`, `setSystemInfo` and `setTestRunnerOutput` methods should be in your `@AfterClass` method. Also make sure the `loadXMLConfig`, `setSystemInfo` and `setTestRunnerOutput` methods should be in your `@AfterClass` method.


### Setting up ExtentX ### Setting up ExtentX
The current release added a support for `ExtentX`. The results of your execution can be sent to `ExtentX` dashboard. Since ExtentReport does not support ExtentX anymore, we have deprecated the ExtentX and added support for [Klov](#setting-up-klov). Thanks to (@msingh3)[https://github.com/msingh3] for the contribution.

The `ExtentX` configurations can be set up using `ExtentProperties` enum as follows:

```java
plugin = {"com.cucumber.listener.ExtentCucumberFormatter:"}
......
......
@BeforeClass
public static void setup() {
ExtentProperties extentProperties = ExtentProperties.INSTANCE;
extentProperties.setReportPath("output/myreport.html");
extentProperties.setExtentXServerUrl("http://localhost:1337");
extentProperties.setProjectName("MyProject");
}
```

You can either setup ExtentX in your local / remote machine using:
- [A docker approach - 2 minutes to setup](http://www.vimalselvam.com/2017/04/13/shipping-extentx-in-a-docker-container/)
- [A plain vanilla approach](http://extentreports.com/docs/extentx/)


### Setting up Klov ### Setting up Klov
The current release added a support for `Klov`. The results of your execution can be sent to `Klov` dashboard. The current release added a support for `Klov`. The results of your execution can be sent to `Klov` dashboard.
Expand Down
5 changes: 2 additions & 3 deletions pom.xml
Expand Up @@ -6,7 +6,7 @@


<groupId>com.vimalselvam</groupId> <groupId>com.vimalselvam</groupId>
<artifactId>cucumber-extentsreport</artifactId> <artifactId>cucumber-extentsreport</artifactId>
<version>3.0.2</version> <version>3.1.0</version>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
Expand Down Expand Up @@ -58,7 +58,6 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cucumber.version>1.2.5</cucumber.version> <cucumber.version>1.2.5</cucumber.version>
<extentreports.version>3.1.1</extentreports.version>
</properties> </properties>


<dependencies> <dependencies>
Expand Down Expand Up @@ -100,7 +99,7 @@
<dependency> <dependency>
<groupId>com.aventstack</groupId> <groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId> <artifactId>extentreports</artifactId>
<version>${extentreports.version}</version> <version>[3.1.1,)</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
Expand Down
Expand Up @@ -65,6 +65,8 @@ private static void setExtentReport() {
} }
extentReports = new ExtentReports(); extentReports = new ExtentReports();
ExtentProperties extentProperties = ExtentProperties.INSTANCE; ExtentProperties extentProperties = ExtentProperties.INSTANCE;

// Remove this block in the next release
if (extentProperties.getExtentXServerUrl() != null) { if (extentProperties.getExtentXServerUrl() != null) {
String extentXServerUrl = extentProperties.getExtentXServerUrl(); String extentXServerUrl = extentProperties.getExtentXServerUrl();
try { try {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/cucumber/listener/ExtentProperties.java
Expand Up @@ -47,6 +47,7 @@ public void setReportPath(String reportPath) {
* Gets the ExtentX server URL * Gets the ExtentX server URL
* @return The ExtentX server URL * @return The ExtentX server URL
*/ */
@Deprecated
public String getExtentXServerUrl() { public String getExtentXServerUrl() {
return extentXServerUrl; return extentXServerUrl;
} }
Expand All @@ -55,6 +56,7 @@ public String getExtentXServerUrl() {
* Sets the ExtentX server URL * Sets the ExtentX server URL
* @param extentXServerUrl The ExtentX server URL * @param extentXServerUrl The ExtentX server URL
*/ */
@Deprecated
public void setExtentXServerUrl(String extentXServerUrl) { public void setExtentXServerUrl(String extentXServerUrl) {
this.extentXServerUrl = extentXServerUrl; this.extentXServerUrl = extentXServerUrl;
} }
Expand Down

0 comments on commit 7448715

Please sign in to comment.