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

Commit

Permalink
Changed the package from com.cucumber to com.vimalselvam.cucumber
Browse files Browse the repository at this point in the history
  • Loading branch information
email2vimalraj committed Aug 7, 2018
1 parent 2380f76 commit e321ff7
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 33 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### v3.1.1
- Changed the package names from `com.cucumber` to `com.vimalselvam` as this confuses the user that this project is supported by cucumber.

### v2.0.4
- Reverted the optional file parameter for the plugin due to a bug in Cucumber

Expand Down
24 changes: 14 additions & 10 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you are using a maven based project, you can directly add this library as a d
<dependency>
<groupId>com.vimalselvam</groupId>
<artifactId>cucumber-extentsreport</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
</dependency>
```

Expand All @@ -33,19 +33,23 @@ I've been receiving queries often that the extent report class not found. As I m
If you are not using maven, download the jar from [here](http://search.maven.org/#search%7Cga%7C1%7Ccucumber-extentsreport).

## Release Notes

### Breaking change in v3.1.1
Package names are updated from `com.cucumber` to `com.vimalselvam.cucumber` as this confuses users.

For more details, look at [Changelog](Changelog.md).

## Getting Started

### Runner Class example:
Create a runner class and add the `com.cucumber.listener.ExtentCucumberFormatter:output/report.html` as a plugin followed by the report file as input (**optional parameter**).
Create a runner class and add the `com.vimalselvam.cucumber.listener.ExtentCucumberFormatter:output/report.html` as a plugin followed by the report file as input (**optional parameter**).

A sample example is shown below:

```java
package com.cucumber.runner;
package com.vimalselvam.cucumber.runner;

import com.cucumber.listener.Reporter;
import Reporter;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.AfterClass;
Expand All @@ -59,8 +63,8 @@ import java.io.File;
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"src/test/resources/features"},
glue = {"com.cucumber.stepdefinitions"},
plugin = {"com.cucumber.listener.ExtentCucumberFormatter:output/report.html"}
glue = {"com.vimalselvam.cucumber.stepdefinitions"},
plugin = {"com.vimalselvam.cucumber.ExtentCucumberFormatter:output/report.html"}
)
public class RunCukesTest {
@AfterClass
Expand All @@ -76,14 +80,14 @@ public class RunCukesTest {

The above setup will generate the report in `output` directory with the name of `report.html`. There are 3 ways to configure the report location:

- As shown above, pass the report file path along with `com.cucumber.listener.ExtentCucumberFormatter:`
- As shown above, pass the report file path along with `com.vimalselvam.cucumber.listener.ExtentCucumberFormatter:`
- If in case you want a dynamic location, you can leave the file path parameter empty while configuring the plugin. For example:
`plugin = {"com.cucumber.listener.ExtentCucumberFormatter:"}`
`plugin = {"com.vimalselvam.cucumber.listener.ExtentCucumberFormatter:"}`
This will generate the report file in the location `output/Run_<Current Time Stamp>/report.html`.
- You can also configure the report location by using `ExtentProperties` enum as follows. Leave the plugin configuration empty, and configure the report location in your `@BeforeClass` method:

```java
plugin = {"com.cucumber.listener.ExtentCucumberFormatter:"}
plugin = {"com.vimalselvam.cucumber.listener.ExtentCucumberFormatter:"}
......
......
@BeforeClass
Expand All @@ -105,7 +109,7 @@ The current release added a support for `Klov`. The results of your execution ca
The `Klov` configurations can be set up using `ExtentProperties` enum as follows:

```java
plugin = {"com.cucumber.listener.ExtentCucumberFormatter:"}
plugin = {"com.vimalselvam.cucumber.listener.ExtentCucumberFormatter:"}
......
......
@BeforeClass
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.vimalselvam</groupId>
<artifactId>cucumber-extentsreport</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cucumber.listener;
package com.vimalselvam.cucumber.listener;

import com.aventstack.extentreports.ExtentReports;
import com.aventstack.extentreports.ExtentTest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cucumber.listener;
package com.vimalselvam.cucumber.listener;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cucumber.listener;
package com.vimalselvam.cucumber.listener;

import com.aventstack.extentreports.ExtentReports;
import com.aventstack.extentreports.ExtentTest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* This package houses the listener for cucumber reporting and few utilities
*/
package com.cucumber.listener;
package com.vimalselvam.cucumber.listener;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.cucumber.runner;
package com.vimalselvam.cucumber.runner;

import com.cucumber.listener.Reporter;
import com.vimalselvam.cucumber.listener.Reporter;
import cucumber.api.CucumberOptions;
import cucumber.api.testng.AbstractTestNGCucumberTests;
import org.testng.annotations.AfterClass;
Expand All @@ -9,8 +9,8 @@

@CucumberOptions(
features = {"src/test/resources/features/MySecondFeature.feature"},
glue = {"com.cucumber.stepdefinitions"},
plugin = {"com.cucumber.listener.ExtentCucumberFormatter:output/report.html"}
glue = {"com.vimalselvam.cucumber.stepdefinitions"},
plugin = {"com.vimalselvam.cucumber.listener.ExtentCucumberFormatter:output/report.html"}
)
public class MyTestNGCukesRunner extends AbstractTestNGCucumberTests {
@AfterClass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.cucumber.runner;
package com.vimalselvam.cucumber.runner;

import com.cucumber.listener.ExtentProperties;
import com.cucumber.listener.Reporter;
import com.vimalselvam.cucumber.listener.ExtentProperties;
import com.vimalselvam.cucumber.listener.Reporter;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.AfterClass;
Expand All @@ -16,8 +16,8 @@
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"src/test/resources/features"},
glue = {"com.cucumber.stepdefinitions"},
plugin = {"com.cucumber.listener.ExtentCucumberFormatter:"}
glue = {"com.vimalselvam.cucumber.stepdefinitions"},
plugin = {"com.vimalselvam.cucumber.listener.ExtentCucumberFormatter:"}
)
public class RunCukesTest {
@BeforeClass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.cucumber.runner;
package com.vimalselvam.cucumber.runner;

import com.cucumber.listener.ExtentProperties;
import com.cucumber.listener.Reporter;
import com.vimalselvam.cucumber.listener.ExtentProperties;
import com.vimalselvam.cucumber.listener.Reporter;
import cucumber.api.CucumberOptions;
import cucumber.api.testng.AbstractTestNGCucumberTests;
import org.testng.annotations.AfterClass;
Expand All @@ -11,8 +11,8 @@

@CucumberOptions(
features = {"src/test/resources/features/MyFeature.feature"},
glue = {"com.cucumber.stepdefinitions"},
plugin = {"com.cucumber.listener.ExtentCucumberFormatter:"}
glue = {"com.vimalselvam.cucumber.stepdefinitions"},
plugin = {"com.vimalselvam.cucumber.listener.ExtentCucumberFormatter:"}
)
public class TestNGCukesRunner extends AbstractTestNGCucumberTests {
@BeforeClass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.cucumber.stepdefinitions;
package com.vimalselvam.cucumber.stepdefinitions;

import com.cucumber.listener.Reporter;
import com.vimalselvam.cucumber.listener.Reporter;
import cucumber.api.DataTable;
import cucumber.api.Scenario;
import cucumber.api.java.Before;
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/suite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<suite name="Suite1" verbose="2" parallel="classes">
<test name="Test" >
<classes>
<class name="com.cucumber.runner.TestNGCukesRunner" />
<class name="com.cucumber.runner.MyTestNGCukesRunner" />
<class name="com.vimalselvam.cucumber.runner.TestNGCukesRunner" />
<class name="com.vimalselvam.cucumber.runner.MyTestNGCukesRunner" />
</classes>
</test>
</suite>

0 comments on commit e321ff7

Please sign in to comment.