Reputation: 43
I want to change the cucumber reporting to serenity reporting. I am using cucumber 2.3.1 version in our framework. What are the steps i need to start with. Is it possible? As of now, i started adding the dependencies for serenity gradle plugin and replaced cucumber "io.cucumber:cucumber-spring, cucumber-java, cucumber-junit" with "serenity-core, serenity-junit, serenity-screenplay" but some build issues are coming. Not sure if this is doable or how should i approach for this. Is there any example project available?
Upvotes: 0
Views: 1599
Reputation: 69
It is very much doable. To use Serenity, we need either Cucumber or JBehave. So, it is good that you are already using Cucumber. You need to add Serenity dependencies and Cucumber one like serenity-core, serenity-junit, serenity-cucumber5, cucumber-java, cucumber-junit and serenity-screenplay in POM.xml.
The test Runner for Serenity Framework will be something like this.
import org.junit.runner.RunWith;
import io.cucumber.junit.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(plugin = { "pretty" }, features = "src/test/resources/features/LoginPage.feature")
public class CucumberTestSuite {
}
There is a article which explains how a project in Serenity can be built. But it is in Maven. Still you will get some idea. Here, it is link.
Upvotes: 1