Giter VIP home page Giter VIP logo

serenity-cucumber4-starter's Introduction

Getting started with Serenity and Cucumber 4

CircleCI

Serenity BDD is a library that makes it easier to write high quality automated acceptance tests, with powerful reporting and living documentation features. It has strong support for both web testing with Selenium, and API testing using RestAssured.

Serenity strongly encourages good test automation design, and supports several design patterns, including classic Page Objects, the newer Lean Page Objects/ Action Classes approach, and the more sophisticated and flexible Screenplay pattern.

The latest version of Serenity supports both Cucumber 2.4 and the more recent Cucumber 4.x. Cucumber 4 is not backward compatible with Cucumber 2. This article walks you through how to get started with Serenity and Cucumber 4, and also gives you a quick introduction to some of Cucumber 4’s new features.

Get the code

Git:

git clone https://github.com/serenity-bdd/serenity-cucumber4-starter.git
cd serenity-cucumber4-starter

Or simply download a zip file.

The starter project

The best place to start with Serenity and Cucumber is to clone or download the starter project on Github (https://github.com/serenity-bdd/serenity-cucumber4-starter). This project gives you a basic project setup, along with some sample tests and supporting classes. There are two versions to choose from. The master branch uses a more classic approach, using action classes and lightweight page objects, whereas the screenplay branch shows the same sample test implemented using Screenplay.

The project directory structure

The project has build scripts for both Maven and Gradle, and follows the standard directory structure used in most Serenity projects:

src
  + main
  + test
    + java                          Test runners and supporting code
    + resources
      + features                    Feature files
        + search                    Feature file subdirectories

          search_by_keyword.feature  
      + webdriver                   Bundled webdriver binaries
        + linux
        + mac
        + windows
          chromedriver.exe          OS-specific Webdriver binaries
          geckodriver.exe

Adding the Cucumber 4 dependency

Serenity seamlessly supports both Cucumber 2.x and Cucumber 4. However, this flexibility requires a little tweaking in the build dependencies.

If you are using Maven, you need to do the following:

  • exclude the default cucumber-core dependency from your serenity-core dependency
  • Replace your serenity-cucumber dependency with the serenity-cucumber4 dependency
  • Add dependencies on the Cucumber 4.x version of cucumber-java and cucumber-junit into your project

An example of the correctly configured dependencies is shown below:

<dependency>
    <groupId>net.serenity-bdd</groupId>
    <artifactId>serenity-core</artifactId>
    <version>2.0.38</version>
    <scope>test</scope>
    <exclusions>
        <exclusion>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>net.serenity-bdd</groupId>
    <artifactId>serenity-cucumber4</artifactId>
    <version>1.0.4</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>io.cucumber</groupId>
    <artifactId>cucumber-java</artifactId>
    <version>4.2.0</version>
</dependency>
<dependency>
    <groupId>io.cucumber</groupId>
    <artifactId>cucumber-junit</artifactId>
    <version>4.2.0</version>
</dependency>

If you are using Gradle, you need to ensure that the 4.x version of cucumber-core is used using the resolutionStrategy element, and also add the Cucumber 4.x version of cucumber-java and cucumber-junit dependencies as mentioned above:

configurations.all {
    resolutionStrategy {
        force "io.cucumber:cucumber-core:4.2.0"
    }
}

dependencies {
    testCompile "net.serenity-bdd:serenity-core:2.0.38",
                "net.serenity-bdd:serenity-cucumber4:1.0.4",
                "io.cucumber:cucumber-core:4.2.0",
                "io.cucumber:cucumber-junit:4.2.0"
}

In the rest of this article, we will walk through some of the highlights of both versions. Let’s start off with the version on the master branch, which uses lightweight page objects and actions.

The Cucumber 4 sample scenario

Both variations of the sample project uses the sample Cucumber scenario. In this scenario, Sergey (who likes to search for stuff) is performing a search on the DuckDuckGo search engine:

Feature: Search by keyword

  Scenario: Searching for a term
    Given Sergey is on the DuckDuckGo home page
    When he searches for "cucumber"
    Then all the result titles should contain the word "cucumber"

This scenario lets us explore a few of the new Cucumber 4 expressions. Cucumber 4 supports both the classic regular expressions, and the new Cucumber Expressions, which are more readable albeit not as powerful in some cases.

The glue code for this scenario uses both regular expressions and cucumber expressions. The glue code looks this this:

    @Given("^(?:.*) is on the DuckDuckGo home page")	 
    public void i_am_on_the_DuckDuckGo_home_page() {
        navigateTo.theDuckDuckGoHomePage();
    }

    @When("(s)he searches for {string}")				
    public void i_search_for(String term) {
        searchFor.term(term);
    }

    @Then("all the result titles should contain the word {string}")
    public void all_the_result_titles_should_contain_the_word(String term) {
        assertThat(searchResult.titles())
                .matches(results -> results.size() > 0)
                .allMatch(title ->  
                         textOf(title).containsIgnoringCase(term));
    }

The @Given step uses a regular expression; the action class approach we use here is action-centric, not actor-centric, so we ignore the name of the actor.

The @When and @Then steps uses Cucumber expressions, and highlights two useful features. Rather than using a regular expression to match the search term, we use the more readable Cucumber expression {string}. This matches a single or double-quoted string (the quotes themselves are dropped). Cucumber 4 also supports other typed expressions, such as {int}, {word}, and _ {float}_.

Parentheses can be used to indicate optional text, so “(s)he” will match both “he” and “she”. We could also write this using a slash: “she/he”.

Lean Page Objects and Action Classes

The glue code shown above uses Serenity step libraries as action classes to make the tests easier to read, and to improve maintainability.

These classes are declared using the Serenity @Steps annotation, shown below:

    @Steps
    NavigateTo navigateTo;

    @Steps
    SearchFor searchFor;

    @Steps
    SearchResult searchResult;

The @Stepsannotation tells Serenity to create a new instance of the class, and inject any other steps or page objects that this instance might need.

Each action class models a particular facet of user behaviour: navigating to a particular page, performing a search, or retrieving the results of a search. These classes are designed to be small and self-contained, which makes them more stable and easier to maintain.

The NavigateTo class is an example of a very simple action class. In a larger application, it might have some other methods related to high level navigation, but in our sample project, it just needs to open the DuckDuckGo home page:

public class NavigateTo {

    DuckDuckGoHomePage duckDuckGoHomePage;

    @Step("Open the DuckDuckGo home page")
    public void theDuckDuckGoHomePage() {
        duckDuckGoHomePage.open();
    }
}

It does this using a standard Serenity Page Object. Page Objects are often very minimal, storing just the URL of the page itself:

@DefaultUrl("https://duckduckgo.com")
class DuckDuckGoHomePage extends PageObject {}

The second class, SearchFor, is an interaction class. It needs to interact with the web page, and to enable this, we make the class extend the Serenity UIInteractionSteps. This gives the class full access to the powerful Serenity WebDriver API, including the $() method used below, which locates a web element using a By locator or an XPath or CSS expression:

public class SearchFor extends UIInteractionSteps {

    @Step("Search for term {0}")
    public void term(String term) {
        $(SearchForm.SEARCH_FIELD).clear();
        $(SearchForm.SEARCH_FIELD).type(term);
        $(SearchForm.SEARCH_BUTTON).click();
    }
} 

The SearchForm class is typical of a light-weight Page Object: it is responsible uniquely for locating elements on the page, and it does this by defining locators or occasionally by resolving web elements dynamically.

class SearchForm {
    static By SEARCH_FIELD = By.cssSelector(".js-search-input");
    static By SEARCH_BUTTON = By.cssSelector(".js-search-button");
}

The last step library class used in the step definition code is the SearchResult class. The job of this class is to query the web page, and retrieve a list of search results that we can use in the AssertJ assertion at the end of the test. This class also extends UIInteractionSteps and

public class SearchResult extends UIInteractionSteps {
    public List<String> titles() {
        return findAll(SearchResultList.RESULT_TITLES)
                .stream()
                .map(WebElementFacade::getTextContent)
                .collect(Collectors.toList());
    }
}

The SearchResultList class is a lean Page Object that locates the search result titles on the results page:

class SearchResultList {
    static By RESULT_TITLES = By.cssSelector(".result__title");
}

The main advantage of the approach used in this example is not in the lines of code written, although Serenity does reduce a lot of the boilerplate code that you would normally need to write in a web test. The real advantage is in the use of many small, stable classes, each of which focuses on a single job. This application of the Single Responsibility Principle goes a long way to making the test code more stable, easier to understand, and easier to maintain.

The Screenplay starter project

If you prefer to use the Screenplay pattern, or want to try it out, check out the screenplay branch instead of the master branch. In this version of the starter project, the same scenario is implemented using the Screenplay pattern.

The Screenplay pattern describes tests in terms of actors and the tasks they perform. Tasks are represented as objects performed by an actor, rather than methods. This makes them more flexible and composable, at the cost of being a bit more wordy. Here is an example:

    @Before
    public void setTheStage() {
        OnStage.setTheStage(new OnlineCast());
    }

    @Given("^(.*) is on the DuckDuckGo home page")
    public void on_the_DuckDuckGo_home_page(String actor) {
        theActorCalled(actor).attemptsTo(
        NavigateTo.theDuckDuckGoHomePage()
    );
    }

    @When("she/he searches for {string}")
    public void search_for(String term) {
        theActorInTheSpotlight().attemptsTo(
             SearchFor.term(term) 
    );
    }

    @Then("all the result titles should contain the word {string}")
    public void all_the_result_titles_should_contain_the_word(String term) {
        theActorInTheSpotlight().should(
                seeThat("search result titles",
                        SearchResult.titles(),
                    hasSize(greaterThan(0))),
                seeThat("search result titles",
                        SearchResult.titles(),
                    everyItem(containsIgnoringCase(term)))
        );
    }

In both approaches, the Page Objects very close or identical. The differences are mainly in the action classes. Screenplay classes emphasise reusable components and a very readable declarative style, whereas Lean Page Objects and Action Classes opt for a more imperative style.

The NavigateTo class performs the same role as it’s equivalent in the Lean Page Object/Action Class version, and looks quite similar:

public class NavigateTo  {

    public static Performable theDuckDuckGoHomePage() {
        return Task.where("{0} opens the DuckDuckGo home page",
                Open.browserOn().the(DuckDuckGoHomePage.class)
        );
    }
} 

The SearchFor class is also similar: it is shown below:

public class SearchFor {

    public static Performable term(String term) {
        return Task.where("{0} attempts to search for #term",
                Clear.field(SearchForm.SEARCH_FIELD),
            Enter.theValue(term).into(SearchForm.SEARCH_FIELD),
                Click.on(SearchForm.SEARCH_BUTTON)
        ).with("term").of(term);
    }
}

In Screenplay, there is a clear distinction between actions (which change the system state) and questions (which read the system state). In Screenplay, we fetch the search results using a Question class, like this:

public class SearchResult {
    public static Question<List<String>> titles() {
        return actor ->  
                 TextContent.of(SearchResultList.RESULT_TITLES)
                            .viewedBy(actor)
                            .asList();
    }
}

The Screenplay DSL is rich and flexible, and well suited to teams working on large test automation projects with many team members, and who are reasonably comfortable with Java and design patterns. The Lean Page Objects/Action Classes approach proposes a gentler learning curve, but still provides significant advantages in terms of maintainability and reusability.

Executing the tests

To run the sample project, you can either just run the CucumberTestSuite test runner class, or run either mvn verify or gradle test from the command line.

By default, the tests will run using Chrome. You can run them in Firefox by overriding the driver system property, e.g.

$ mvn clean verify -Ddriver=firefox

Or

$ gradle clean test -Pdriver=firefox

The test results will be recorded in the target/site/serenity directory.

Simplified WebDriver configuration and other Serenity extras

The sample projects both use some Serenity features which make configuring the tests easier. In particular, Serenity uses the serenity.conf file in the src/test/resources directory to configure test execution options.

Webdriver configuration

The WebDriver configuration is managed entirely from this file, as illustrated below:

webdriver {
    driver = chrome
}
headless.mode = true

chrome.switches="""--start-maximized;--test-type;--no-sandbox;--ignore-certificate-errors;
                   --disable-popup-blocking;--disable-default-apps;--disable-extensions-file-access-check;
                   --incognito;--disable-infobars,--disable-gpu"""

The project also bundles some of the WebDriver binaries that you need to run Selenium tests in the src/test/resources/webdriver directories. These binaries are configured in the drivers section of the serenity.conf config file:

drivers {
  windows {
    webdriver.chrome.driver = "src/test/resources/webdriver/windows/chromedriver.exe"
    webdriver.gecko.driver = "src/test/resources/webdriver/windows/geckodriver.exe"
  }
  mac {
    webdriver.chrome.driver = "src/test/resources/webdriver/mac/chromedriver"
    webdriver.gecko.driver = "src/test/resources/webdriver/mac/geckodriver"
  }
  linux {
    webdriver.chrome.driver = "src/test/resources/webdriver/linux/chromedriver"
    webdriver.gecko.driver = "src/test/resources/webdriver/linux/geckodriver"
  }
}

This configuration means that development machines and build servers do not need to have a particular version of the WebDriver drivers installed for the tests to run correctly.

Environment-specific configurations

We can also configure environment-specific properties and options, so that the tests can be run in different environments. Here, we configure three environments, dev, staging and prod, with different starting URLs for each:

environments {
  default {
    webdriver.base.url = "https://duckduckgo.com"
  }
  dev {
    webdriver.base.url = "https://duckduckgo.com/dev"
  }
  staging {
    webdriver.base.url = "https://duckduckgo.com/staging"
  }
  prod {
    webdriver.base.url = "https://duckduckgo.com/prod"
  }
}

You use the environment system property to determine which environment to run against. For example to run the tests in the staging environment, you could run:

$ mvn clean verify -Denvironment=staging

See this article for more details about this feature.

Want to learn more?

For more information about Serenity BDD, you can read the Serenity BDD Book, the official online Serenity documentation source. Other sources include:

serenity-cucumber4-starter's People

Contributors

hazmeister avatar wakaleo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

serenity-cucumber4-starter's Issues

[Question] How to use @DefaultUrl with environment variable

I watched the YouTube video about environment configuration with serenity.conf
https://www.youtube.com/watch?v=WP60WYwfgSQ

I was able to use the variable home.page as a default url. However when I try to concatenate it to a longer URL, it says the URL is not defined. Example:

In my serenity.conf:
environments {
default {
webdriver.base.url = "https://www.iherbtest.com/"
}
test {
webdriver.base.url = "https://www.iherbtest.com/"
}
prod {
webdriver.base.url = "https://www.iherb.com/"
}
all {
home.page = "#{webdriver.base.url}"
}
}

In my page object:
@DefaultUrl("page:home.page/auth/Account/Register")
public class RegisterAccountPage extends PageObject {
public static By EMAIL_TEXTFIELD = By.id("Username");
}

Is there a way to do this?

Thanks

Class Configuration issue on 2.1.13 above.

I pulled your code and tried to run it on mvn
But I get the error

java.lang.NoClassDefFoundError: io/cucumber/java/PendingException

	at net.thucydides.core.model.failures.FailureAnalysis.<clinit>(FailureAnalysis.java:74)
	at net.thucydides.core.steps.BaseStepListener.<init>(BaseStepListener.java:727)
	at net.thucydides.core.steps.BaseStepListener.<init>(BaseStepListener.java:271)
	at net.thucydides.core.steps.Listeners$BaseStepListenerBuilder.withOutputDirectory(Listeners.java:37)
	at net.serenitybdd.core.SerenityListeners.<init>(SerenityListeners.java:30)
	at cucumber.runtime.formatter.SerenityReporter.initialiseListenersFor(SerenityReporter.java:112)
	at cucumber.runtime.formatter.SerenityReporter.lambda$handleTestSourceRead$0(SerenityReporter.java:149)
	at java.util.Optional.ifPresent(Optional.java:159)
	at cucumber.runtime.formatter.SerenityReporter.handleTestSourceRead(SerenityReporter.java:144)
	at cucumber.runner.AbstractEventPublisher.send(AbstractEventPublisher.java:45)
	at cucumber.runner.AbstractEventBus.send(AbstractEventBus.java:9)
	at cucumber.runner.TimeServiceEventBus.send(TimeServiceEventBus.java:3)
	at cucumber.runtime.model.CucumberFeature.sendTestSourceRead(CucumberFeature.java:44)
	at io.cucumber.junit.CucumberSerenityRunner$RunCucumber.evaluate(CucumberSerenityRunner.java:234)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Caused by: java.lang.ClassNotFoundException: io.cucumber.java.PendingException
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 20 more

But if I change the dependency from

<serenity.version>2.1.13</serenity.version> to <serenity.version>2.0.91</serenity.version>

It works.

After checking the class of
serenity-model-2.1.13.jar!\net\thucydides\core\model\failures\FailureAnalysis.class

The new version import io.cucumber.java.PendingException; for

    DEFAULT_PENDING_TYPES.addAll(Arrays.asList(PendingStepException.class, PendingException.class));

But there is no such class/package io.cucumber.java.PendingException

Old version 2.0.91 use import cucumber.api.PendingException; which exists
How do we fix it?

[Question] java.lang.NoClassDefFoundError: Could not initialize class net.thucydides.core.webdriver.SupportedWebDriver

I use serenity-bdd with cucumber4 to generate the cucumber report and I can't run it ... maybe is a problem of version, I didn't found any solution with google ...

I add my errors messages :

java.lang.NoClassDefFoundError: org/openqa/selenium/internal/Killable

	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)

java.lang.NoClassDefFoundError: Could not initialize class net.thucydides.core.webdriver.SupportedWebDriver

	at net.thucydides.core.configuration.WebDriverConfiguration.lookupSupportedDriverTypeFor(WebDriverConfiguration.java:45)
	at net.thucydides.core.configuration.WebDriverConfiguration.getDriverType(WebDriverConfiguration.java:33)

And my maven file :

	<properties>
		<cucumber.version>4.2.0</cucumber.version>
                <serenity.version>2.0.41</serenity.version>
                <serenity.cucumber.version>1.0.6</serenity.cucumber.version>
	</properties>

       <dependencies>
                <dependency>
			<groupId>io.cucumber</groupId>
			<artifactId>cucumber-java</artifactId>
			<version>${cucumber.version}</version>
			<scope>test</scope>
                </dependency>
		<dependency>
			<groupId>io.cucumber</groupId>
			<artifactId>cucumber-junit</artifactId>
			<version>${cucumber.version}</version>
			<scope>test</scope>
		</dependency>
                 <dependency>
			<groupId>net.serenity-bdd</groupId>
			<artifactId>serenity-screenplay</artifactId>
			<version>${serenity.version}</version>
		</dependency>
		<dependency>
			<groupId>net.serenity-bdd</groupId>
			<artifactId>serenity-screenplay-webdriver</artifactId>
			<version>${serenity.version}</version>
		</dependency>
		<dependency>
			<groupId>net.serenity-bdd</groupId>
			<artifactId>serenity-core</artifactId>
			<version>${serenity.version}</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>io.cucumber</groupId>
					<artifactId>cucumber-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>net.serenity-bdd</groupId>
			<artifactId>serenity-junit</artifactId>
			<version>${serenity.version}</version>
		</dependency>
		<dependency>
			<groupId>net.serenity-bdd</groupId>
			<artifactId>serenity-cucumber4</artifactId>
			<version>${serenity.cucumber.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

        <build>
		<plugins>
			<plugin>
				<groupId>net.serenity-bdd.maven.plugins</groupId>
				<artifactId>serenity-maven-plugin</artifactId>
				<version>${serenity.version}</version>
				<configuration>
					<tags>${tags}</tags>
				</configuration>
				<executions>
					<execution>
						<id>serenity-reports</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>aggregate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

PendingException

I tried to follow this guide and I get Pending Exception

image

Here is my CucumberTestSuite

image

Facing an issue with running Cucumber runner file thru CucumberWithSerenity.class

import org.junit.runner.RunWith;
import io.cucumber.junit.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(features= "src/test/resources/features/Smoke.feature",
tags= {"@smoke"},
glue="com.stepdefinitions",
dryRun=true,
plugin= {"pretty","html:report/html-report","json:report/json-report"})

public class SampleRunner {

}

================== build.gradle =================
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'net.serenity-bdd.aggregator'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
// Use Maven for resolving dependencies. Also, You can declare any Jcenter/Ivy/file repository here.
mavenCentral()
jcenter()
}

buildscript {
repositories {
// Use Maven for resolving dependencies. Also, You can declare any Jcenter/Ivy/file repository here.
mavenLocal()
jcenter()
}
dependencies {
classpath("net.serenity-bdd:serenity-gradle-plugin:latest.release")
}
}

dependencies {
//JUnit
testImplementation 'junit:junit:4.12'
testImplementation 'org.assertj:assertj-core:1.7.0'
implementation 'org.slf4j:slf4j-nop:1.7.25'

//Cucumber
implementation 'io.cucumber:cucumber-core:4.8.0'
implementation 'io.cucumber:cucumber-java:4.8.0'
implementation 'io.cucumber:cucumber-jvm:4.8.0'
implementation 'io.cucumber:cucumber-junit:4.8.0'
implementation 'io.cucumber:cucumber-testng:4.8.0'
implementation 'io.cucumber:gherkin:2.12.2'
implementation 'io.cucumber:cucumber-jvm-deps:1.0.6'
    
//selenium
implementation 'org.seleniumhq.selenium:selenium-java:3.141.59' 

//SerenityBDD
implementation 'net.serenity-bdd:serenity-core:2.0.90'
implementation 'net.serenity-bdd:serenity-junit:2.0.90'
implementation 'net.serenity-bdd:serenity-cucumber:latest.release'
implementation 'net.serenity-bdd:serenity-rest-assured:2.0.90'

}

Serenity tests do not start with maven

When I run my tests with maven (I deleted all the Gradle stuff).
I get this output in the console:

[INFO] 
[INFO] --------< net.persgroep.targetqa:serenity-cucumber4-smoketests >--------
[INFO] Building Sample Serenity BDD project using Cucumber 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ serenity-cucumber4-smoketests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/bvanraemdonck/workspace/serenity-cucumber-target-maven/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ serenity-cucumber4-smoketests ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ serenity-cucumber4-smoketests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 17 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ serenity-cucumber4-smoketests ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ serenity-cucumber4-smoketests ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ serenity-cucumber4-smoketests ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /Users/bvanraemdonck/workspace/serenity-cucumber-target-maven/target/serenity-cucumber4-smoketests-1.0.0-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (default) @ serenity-cucumber4-smoketests ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- serenity-maven-plugin:2.0.70:aggregate (serenity-reports) @ serenity-cucumber4-smoketests ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/Users/bvanraemdonck/.m2/repository/com/google/inject/guice/4.2.2/guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] current_project.base.dir: /Users/bvanraemdonck/workspace/serenity-cucumber-target-maven
[INFO] Generating test results for 0 tests
[INFO] Loading requirements from tag providers :[net.thucydides.core.requirements.FileSystemRequirementsTagProvider@71f056a, net.thucydides.core.requirements.PackageRequirementsTagProvider@5521407f]
[INFO] LOADED REQUIREMENTS:
REQUIREMENTS:
    - feature : Research things on the web {id: research-things-on-the-web, displayName: 'Research things on the web', path: 0research_things_on_the_web.feature, parent: 'null'}
    - feature : As a advertising business I want to be able to sell targeted advertising {id: as-a-advertising-business-i-want-to-be-able-to-sell-targeted-advertising, displayName: 'As a advertising business I want to be able to sell targeted advertising', path: send_cxense_segments_to_DFP.feature, parent: 'null'}
[INFO] 2 requirements loaded after 184 ms
[INFO] 0 related requirements found after 186 ms
[INFO] Generating test outcome reports: false
[INFO] Starting generating reports after 242 ms
[INFO] Configured report threads: 40
[INFO] Test results for 0 tests generated in 881 ms
[INFO] 
[INFO] --- maven-failsafe-plugin:2.22.1:verify (default) @ serenity-cucumber4-smoketests ---
```

So its getting my requirements from my feature files.
But it doesn't start the Serenity tests with a webdriver.

I have the same POM als in the example.

Cucumber Serenity tests do not start with maven

When I run my test through Maven it gives me the below output in console.
Not sure why this is happening.
My test only include one scenario in a feature file and it runs while executing through the test runner but not with Maven.
I have attached my pom.xml as well.
Please look into the issue as it does not allow me to proceed further.

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/yhassan/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/asingh/eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/yhassan/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/asingh/eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< Automation:BANCS_Serenity_version1 >-----------------
[INFO] Building BANCS_Serenity_version1 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:copy-resources (copy-resources) @ BANCS_Serenity_version1 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory C:\Users\asingh\eclipse-workspace\BANCS_Serenity_version1\src\non-packaged-resources
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ BANCS_Serenity_version1 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ BANCS_Serenity_version1 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ BANCS_Serenity_version1 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ BANCS_Serenity_version1 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 22 source files to C:\Users\asingh\eclipse-workspace\BANCS_Serenity_version1\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M4:test (default-test) @ BANCS_Serenity_version1 ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ BANCS_Serenity_version1 ---
[INFO] Building jar: C:\Users\asingh\eclipse-workspace\BANCS_Serenity_version1\target\BANCS_Serenity_version1-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M5:integration-test (default) @ BANCS_Serenity_version1 ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- serenity-maven-plugin:2.3.4:aggregate (serenity-reports) @ BANCS_Serenity_version1 ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/C:/Users/asingh/.m2/repository/com/google/inject/guice/4.2.2/guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Test results for 0 tests generated in 4.8 secs in directory: file:/C:/Users/asingh/eclipse-workspace/BANCS_Serenity_version1/target/site/serenity/
[INFO] -----------------------------------------
[INFO] SERENITY TESTS : SUCCESS
[INFO] -----------------------------------------
[INFO] | Tests executed | 0
[INFO] | Tests passed | 0
[INFO] | Tests failed | 0
[INFO] | Tests with errors | 0
[INFO] | Tests compromised | 0
[INFO] | Tests pending | 0
[INFO] | Tests ignored/skipped | 0
[INFO] ------------------------ | --------------
[INFO] | Total Duration | 000ms
[INFO] | Fastest test took | 000ms
[INFO] | Slowest test took | 000ms
[INFO] -----------------------------------------
[INFO]
[INFO] SERENITY REPORTS
[INFO] - Full Report: file:///C:/Users/asingh/eclipse-workspace/BANCS_Serenity_version1/target/site/serenity/index.html
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M5:verify (default) @ BANCS_Serenity_version1 ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52.263 s
[INFO] Finished at: 2020-12-13T20:59:35+11:00
[INFO] ------------------------------------------------------------------------

Choose between Gradle and Maven

The starter project has a Gradle and a Maven setup, but I'm missing some instructions, if you want to use only Gradle or only Maven.
Just deleting the lib files doesn't do the trick.
So how do you config the project if you only want to use Gradle for example?
How do you safely remove the maven libs and pom file without breaking anything?

Dependency difference

I am setting up a Serenity Cucumber Framework for testing and I am currently migrating our old framework made from Serenity and JBehave into this new one using Serenity Cucumber.

I don't know if I should still keep the "Serenity-junit" dependency.

ReportGenerationFailedError: Failed to generate configuration report

After my tests are done I see no target folder in my project.
In the console I see the following error:

net.persgroep.targetqa.DFPTestSuitenet.thucydides.core.reports.ReportGenerationFailedError: Failed to generate configuration report at net.thucydides.core.reports.ReportService.waitForReportGenerationToFinish(ReportService.java:204) at net.thucydides.core.reports.ReportService.generateReportsFor(ReportService.java:181) at net.thucydides.core.reports.ReportService.generateReportsFor(ReportService.java:127) at cucumber.runtime.formatter.SerenityReporter.generateReports(SerenityReporter.java:939) at cucumber.runtime.formatter.SerenityReporter.handleTestRunFinished(SerenityReporter.java:356) at cucumber.runtime.formatter.SerenityReporter.lambda$new$6(SerenityReporter.java:150) at cucumber.runner.AbstractEventPublisher.send(AbstractEventPublisher.java:45) at cucumber.runner.AbstractEventBus.send(AbstractEventBus.java:9) at cucumber.runner.TimeServiceEventBus.send(TimeServiceEventBus.java:3) at net.serenitybdd.cucumber.CucumberWithSerenity$1.evaluate(CucumberWithSerenity.java:203) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:410) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:835) Caused by: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.listFilesAndDirs(Ljava/io/File;Lorg/apache/commons/io/filefilter/IOFileFilter;Lorg/apache/commons/io/filefilter/IOFileFilter;)Ljava/util/Collection; at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at net.thucydides.core.reports.ReportService.waitForReportGenerationToFinish(ReportService.java:201) ... 21 more Caused by: java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.listFilesAndDirs(Ljava/io/File;Lorg/apache/commons/io/filefilter/IOFileFilter;Lorg/apache/commons/io/filefilter/IOFileFilter;)Ljava/util/Collection; at net.thucydides.core.files.TheDirectoryStructure.maxDepth(TheDirectoryStructure.java:58) at net.thucydides.core.requirements.FileSystemRequirementsTagProvider.lambda$maxDirectoryDepthIn$2(FileSystemRequirementsTagProvider.java:202) at java.base/java.util.stream.ReferencePipeline$4$1.accept(ReferencePipeline.java:212) at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1600) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:496) at java.base/java.util.stream.IntPipeline.max(IntPipeline.java:459) at net.thucydides.core.requirements.FileSystemRequirementsTagProvider.maxDirectoryDepthIn(FileSystemRequirementsTagProvider.java:203) at net.thucydides.core.requirements.FileSystemRequirementsTagProvider.<init>(FileSystemRequirementsTagProvider.java:125) at net.thucydides.core.requirements.FileSystemRequirementsTagProvider.<init>(FileSystemRequirementsTagProvider.java:76) at net.thucydides.core.requirements.FileSystemRequirementsTagProvider.<init>(FileSystemRequirementsTagProvider.java:71) at net.thucydides.core.requirements.FileSystemRequirementsTagProvider.<init>(FileSystemRequirementsTagProvider.java:80) at net.thucydides.core.statistics.service.JUnitTagProviderStrategy.getTagProviders(JUnitTagProviderStrategy.java:19) at net.thucydides.core.statistics.service.ClasspathTagProviderService.allKnownTagProviders(ClasspathTagProviderService.java:90) at net.thucydides.core.statistics.service.ClasspathTagProviderService.loadTagProvidersFromPath(ClasspathTagProviderService.java:54) at net.thucydides.core.statistics.service.ClasspathTagProviderService.tagProvidersFor(ClasspathTagProviderService.java:36) at net.thucydides.core.statistics.service.ClasspathTagProviderService.getTagProviders(ClasspathTagProviderService.java:28) at net.thucydides.core.statistics.service.ClasspathTagProviderService.getTagProviders(ClasspathTagProviderService.java:18) at net.thucydides.core.requirements.ClasspathRequirementsProviderService.loadRequirementsTagProviders(ClasspathRequirementsProviderService.java:49) at net.thucydides.core.requirements.ClasspathRequirementsProviderService.getRequirementsProviders(ClasspathRequirementsProviderService.java:40) at net.thucydides.core.requirements.MultiSourceRequirementsService.getRequirementsTagProviders(MultiSourceRequirementsService.java:63) at net.thucydides.core.requirements.MultiSourceRequirementsService.getRequirements(MultiSourceRequirementsService.java:38) at net.thucydides.core.requirements.BaseRequirementsService.getRequirementTypes(BaseRequirementsService.java:197) at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.addTestOutcomeToContext(HtmlAcceptanceTestReporter.java:163) at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.generateReportFor(HtmlAcceptanceTestReporter.java:107) at net.thucydides.core.reports.ReportService.generateReportFor(ReportService.java:239) at net.thucydides.core.reports.ReportService.lambda$generateReportsFor$0(ReportService.java:177) ... 5 more net.persgroep.targetqa.DFPTestSuitejava.lang.NullPointerException at net.persgroep.targetqa.DefaultSuite.tearDown(DefaultSuite.java:46) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:410) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:835)

Parallel execution of browser test does not work

Hi,

I have checkout the serenity-cucumber4-starter project, executed the "mvn verify" goal to test the 2 features included as examples. I see that the test execution is performed sequentially although the pom.xml has configuration for parallel execution using maven fail safe plugin. Am I missing something here?

Thank you,
Vinay.

EmptyStackException when using Scenario outlines

When I use scenario outlines and I get any exception in my Performable action (for example Assertion exception in case of test fails) there is an exception java.lang.EmptyStackException throws in net.thucydides.core.steps.BaseStepListener#updateExampleLineNumber
After this exception all test suite will break of execution.

I tried to debug this situation. There is net.thucydides.core.steps.BaseStepListener#getCurrentStep method which tries to get curent step in case when stack of steps is empty.
There can be 3 reasons of this behavior:

  1. In some cases there is skipping of stack push operation
  2. In some cases there is some excess stack pop operation
  3. In some reasons there is some excess of BaseStepListener#updateExampleLineNumber method call

Unfortunately I can not attach the code of my project because of security of my company.
If to find the reason without code is hard, maybe it is possible to add some additional check for stack is not empty before call net.thucydides.core.steps.BaseStepListener#updateExampleLineNumber ??

Thanks

Chromedriver could not be found

When you clone the project, and you try "mvn verify" or try to run it with an IDEA (IntelliJ).
I get an error: net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver

This is not what I should expect because in the serenity.conf file I read Define drivers for different platforms. Serenity will automatically pick the correct driver for the current platform
So this is not the case ...

Picture 23

Something wrong with init Gradle setup?

When I pull this project from scratch, follow the adjustments for Cucumber4, update the chrome driver and then run gradle clean test all the test fail.

Im using Gradle version 5.6

Output from commandline:

    TEST FAILED WITH ERROR: Refining a search using two terms
    ---------------------------------------------------------------------
    16:33:43.959 [Test worker] ERROR n.t.c.steps.ConsoleLoggingListener - TEST FAILED AT STEP Search for term Cucumber
    16:33:43.960 [Test worker] ERROR n.t.c.steps.ConsoleLoggingListener - element not interactable
    Feature: Research things on the web

      Scenario: Researching a thing                               # src/test/resources/features/research/research_things_on_the_web.feature:3
        Given Sergey is on the DuckDuckGo home page               # SearchOnDuckDuckGoStepDefinitions.i_am_on_the_DuckDuckGo_home_page()
        When he searches for "Duck"                               # SearchOnDuckDuckGoStepDefinitions.i_search_for(String)
          org.openqa.selenium.ElementNotInteractableException: element not interactable
      (Session info: headless chrome=76.0.3809.100)
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'BEC02V74Z2HTD5', ip: '10.3.49.217', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '12.0.2'
    Driver info: org.openqa.selenium.chrome.ChromeDriver
    Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 76.0.3809.100, chrome: {chromedriverVersion: 76.0.3809.126 (d80a294506b4..., userDataDir: /var/folders/vl/s19rz73j1tx...}, goog:chromeOptions: {debuggerAddress: localhost:64147}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
    Session ID: 153586d9bbd8c00fbd35bcff373caf8a
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
        at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:106)
        at net.serenitybdd.core.pages.WebElementFacadeImpl.clear(WebElementFacadeImpl.java:1257)
        at starter.search.SearchFor.term(SearchFor.java:10)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.CGLIB$term$0(<generated>)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42$$FastClassByCGLIB$$e60e10c4.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:461)
        at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:446)
        at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:421)
        at net.thucydides.core.steps.StepInterceptor.runOrSkipMethod(StepInterceptor.java:176)
        at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:163)
        at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:69)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.term(<generated>)
        at starter.stepdefinitions.SearchOnDuckDuckGoStepDefinitions.i_search_for(SearchOnDuckDuckGoStepDefinitions.java:35)
        at ✽.he searches for "Duck"(src/test/resources/features/research/research_things_on_the_web.feature:5)
    
        Then all the result titles should contain the word "Duck" # SearchOnDuckDuckGoStepDefinitions.all_the_result_titles_should_contain_the_word(String)

      @manual
      Scenario: Researching a thing by hand                           # src/test/resources/features/research/research_things_on_the_web.feature:9
        Given Sergey is on the DuckDuckGo home page                   # SearchOnDuckDuckGoStepDefinitions.i_am_on_the_DuckDuckGo_home_page()
        And he has searched for "Cucumber"                            # SearchOnDuckDuckGoStepDefinitions.i_search_for(String)
        When he searches for "zucchini"                               # SearchOnDuckDuckGoStepDefinitions.i_search_for(String)
        Then all the result titles should contain the word "zucchini" # SearchOnDuckDuckGoStepDefinitions.all_the_result_titles_should_contain_the_word(String)

    Feature: Search by keyword

      Scenario: Searching for a term                                  # src/test/resources/features/search/search_by_keyword.feature:3
        Given Sergey is on the DuckDuckGo home page                   # SearchOnDuckDuckGoStepDefinitions.i_am_on_the_DuckDuckGo_home_page()
        When he searches for "Cucumber"                               # SearchOnDuckDuckGoStepDefinitions.i_search_for(String)
          org.openqa.selenium.ElementNotInteractableException: element not interactable
      (Session info: headless chrome=76.0.3809.100)
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'BEC02V74Z2HTD5', ip: '10.3.49.217', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '12.0.2'
    Driver info: org.openqa.selenium.chrome.ChromeDriver
    Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 76.0.3809.100, chrome: {chromedriverVersion: 76.0.3809.126 (d80a294506b4..., userDataDir: /var/folders/vl/s19rz73j1tx...}, goog:chromeOptions: {debuggerAddress: localhost:64183}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
    Session ID: 9332c77ecbf6c4ffa63e328227808266
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
        at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:106)
        at net.serenitybdd.core.pages.WebElementFacadeImpl.clear(WebElementFacadeImpl.java:1257)
        at starter.search.SearchFor.term(SearchFor.java:10)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.CGLIB$term$0(<generated>)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42$$FastClassByCGLIB$$e60e10c4.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:461)
        at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:446)
        at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:421)
        at net.thucydides.core.steps.StepInterceptor.runOrSkipMethod(StepInterceptor.java:176)
        at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:163)
        at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:69)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.term(<generated>)
        at starter.stepdefinitions.SearchOnDuckDuckGoStepDefinitions.i_search_for(SearchOnDuckDuckGoStepDefinitions.java:35)
        at ✽.he searches for "Cucumber"(src/test/resources/features/search/search_by_keyword.feature:5)
    
        Then all the result titles should contain the word "Cucumber" # SearchOnDuckDuckGoStepDefinitions.all_the_result_titles_should_contain_the_word(String)

      Scenario: Refining a search using two terms                     # src/test/resources/features/search/search_by_keyword.feature:8
        Given Sergey is on the DuckDuckGo home page                   # SearchOnDuckDuckGoStepDefinitions.i_am_on_the_DuckDuckGo_home_page()
        And he has searched for "Cucumber"                            # SearchOnDuckDuckGoStepDefinitions.i_search_for(String)
          org.openqa.selenium.ElementNotInteractableException: element not interactable
      (Session info: headless chrome=76.0.3809.100)
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'BEC02V74Z2HTD5', ip: '10.3.49.217', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '12.0.2'
    Driver info: org.openqa.selenium.chrome.ChromeDriver
    Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 76.0.3809.100, chrome: {chromedriverVersion: 76.0.3809.126 (d80a294506b4..., userDataDir: /var/folders/vl/s19rz73j1tx...}, goog:chromeOptions: {debuggerAddress: localhost:64213}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
    Session ID: 3018452c82de4f22ae34d4570cb0497e
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
        at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:106)
        at net.serenitybdd.core.pages.WebElementFacadeImpl.clear(WebElementFacadeImpl.java:1257)
        at starter.search.SearchFor.term(SearchFor.java:10)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.CGLIB$term$0(<generated>)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42$$FastClassByCGLIB$$e60e10c4.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:461)
        at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:446)
        at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:421)
        at net.thucydides.core.steps.StepInterceptor.runOrSkipMethod(StepInterceptor.java:176)
        at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:163)
        at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:69)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.term(<generated>)
        at starter.stepdefinitions.SearchOnDuckDuckGoStepDefinitions.i_search_for(SearchOnDuckDuckGoStepDefinitions.java:35)
        at ✽.he has searched for "Cucumber"(src/test/resources/features/search/search_by_keyword.feature:10)
    
        When he searches for "zucchini"                               # SearchOnDuckDuckGoStepDefinitions.i_search_for(String)
        Then all the result titles should contain the word "zucchini" # SearchOnDuckDuckGoStepDefinitions.all_the_result_titles_should_contain_the_word(String)

    Failed scenarios:
    src/test/resources/features/research/research_things_on_the_web.feature:3 # Researching a thing
    src/test/resources/features/search/search_by_keyword.feature:3 # Searching for a term
    src/test/resources/features/search/search_by_keyword.feature:8 # Refining a search using two terms

    4 Scenarios (3 failed, 1 passed)
    14 Steps (3 failed, 4 skipped, 7 passed)
    0m13,846s

    org.openqa.selenium.ElementNotInteractableException: element not interactable
      (Session info: headless chrome=76.0.3809.100)
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'BEC02V74Z2HTD5', ip: '10.3.49.217', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '12.0.2'
    Driver info: org.openqa.selenium.chrome.ChromeDriver
    Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 76.0.3809.100, chrome: {chromedriverVersion: 76.0.3809.126 (d80a294506b4..., userDataDir: /var/folders/vl/s19rz73j1tx...}, goog:chromeOptions: {debuggerAddress: localhost:64147}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
    Session ID: 153586d9bbd8c00fbd35bcff373caf8a
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
        at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:106)
        at net.serenitybdd.core.pages.WebElementFacadeImpl.clear(WebElementFacadeImpl.java:1257)
        at starter.search.SearchFor.term(SearchFor.java:10)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.CGLIB$term$0(<generated>)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42$$FastClassByCGLIB$$e60e10c4.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:461)
        at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:446)
        at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:421)
        at net.thucydides.core.steps.StepInterceptor.runOrSkipMethod(StepInterceptor.java:176)
        at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:163)
        at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:69)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.term(<generated>)
        at starter.stepdefinitions.SearchOnDuckDuckGoStepDefinitions.i_search_for(SearchOnDuckDuckGoStepDefinitions.java:35)
        at ✽.he searches for "Duck"(src/test/resources/features/research/research_things_on_the_web.feature:5)

    org.openqa.selenium.ElementNotInteractableException: element not interactable
      (Session info: headless chrome=76.0.3809.100)
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'BEC02V74Z2HTD5', ip: '10.3.49.217', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '12.0.2'
    Driver info: org.openqa.selenium.chrome.ChromeDriver
    Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 76.0.3809.100, chrome: {chromedriverVersion: 76.0.3809.126 (d80a294506b4..., userDataDir: /var/folders/vl/s19rz73j1tx...}, goog:chromeOptions: {debuggerAddress: localhost:64183}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
    Session ID: 9332c77ecbf6c4ffa63e328227808266
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
        at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:106)
        at net.serenitybdd.core.pages.WebElementFacadeImpl.clear(WebElementFacadeImpl.java:1257)
        at starter.search.SearchFor.term(SearchFor.java:10)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.CGLIB$term$0(<generated>)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42$$FastClassByCGLIB$$e60e10c4.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:461)
        at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:446)
        at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:421)
        at net.thucydides.core.steps.StepInterceptor.runOrSkipMethod(StepInterceptor.java:176)
        at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:163)
        at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:69)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.term(<generated>)
        at starter.stepdefinitions.SearchOnDuckDuckGoStepDefinitions.i_search_for(SearchOnDuckDuckGoStepDefinitions.java:35)
        at ✽.he searches for "Cucumber"(src/test/resources/features/search/search_by_keyword.feature:5)

    org.openqa.selenium.ElementNotInteractableException: element not interactable
      (Session info: headless chrome=76.0.3809.100)
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'BEC02V74Z2HTD5', ip: '10.3.49.217', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '12.0.2'
    Driver info: org.openqa.selenium.chrome.ChromeDriver
    Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 76.0.3809.100, chrome: {chromedriverVersion: 76.0.3809.126 (d80a294506b4..., userDataDir: /var/folders/vl/s19rz73j1tx...}, goog:chromeOptions: {debuggerAddress: localhost:64213}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
    Session ID: 3018452c82de4f22ae34d4570cb0497e
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
        at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:106)
        at net.serenitybdd.core.pages.WebElementFacadeImpl.clear(WebElementFacadeImpl.java:1257)
        at starter.search.SearchFor.term(SearchFor.java:10)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.CGLIB$term$0(<generated>)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42$$FastClassByCGLIB$$e60e10c4.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:461)
        at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:446)
        at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:421)
        at net.thucydides.core.steps.StepInterceptor.runOrSkipMethod(StepInterceptor.java:176)
        at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:163)
        at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:69)
        at starter.search.SearchFor$$EnhancerByCGLIB$$a324f42.term(<generated>)
        at starter.stepdefinitions.SearchOnDuckDuckGoStepDefinitions.i_search_for(SearchOnDuckDuckGoStepDefinitions.java:35)
        at ✽.he has searched for "Cucumber"(src/test/resources/features/search/search_by_keyword.feature:10)


4 tests completed, 3 failed

Parallel execution at Scenario level

Hi,

I am using Serenity with cucumber version 4 in our project. I have a feature file with a multiple scenario's in it.. So I'm trying to run scripts in parallel at scenario level (by default Serenity takes feature level parallel execution) to reduce the execution time, but see that parallel execution is not working as expected at scenario level.

I have tried by updating the pom.xml file to run parallel at scenario level by making the below change
FEATURE level parallel : <parallelScheme>FEATURE</parallelScheme>
SCENARIO level parallel : <parallelScheme>SCENARIO</parallelScheme>

After running the scripts with the above changes, I see there are multiple execution for a single scenario
Ex: I have 5 parallel thread, 5 Scenario's to run then I see each scenario is running 5 times. ie., I see 25 test runs instead of 5.

It would be of great help I could get a solution to run the scripts parallel at scenario.

POM.XML changes

`

	<profile>
		<id>parallel</id>

		<build>
			<plugins>
				<plugin>
					<groupId>com.github.temyers</groupId>
					<artifactId>cucumber-jvm-parallel-plugin</artifactId>
					<version>4.2.0</version>
					<executions>
						<execution>
							<id>generateRunners</id>
							<phase>generate-test-sources</phase>
							<goals>
								<goal>generateRunners</goal>
							</goals>
							<configuration>
								<glue>
									<package>com.XXX</package>
									<package>com.YYY</package>
									<package>com.ZZZ</package>
								</glue>
								<parallelScheme>SCENARIO</parallelScheme>
								<customVmTemplate>src/test/resources/cucumber-serenity-runner.vm</customVmTemplate>
							</configuration>
						</execution>

					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>3.0.0-M1</version>
					<configuration>
						<includes>
							<include>**/Parallel*IT.class</include>
						</includes>
						<systemPropertyVariables>

						</systemPropertyVariables>
						<parallel>classes</parallel>
						<threadCount>${parallel.tests}</threadCount>
						<forkCount>${parallel.tests}</forkCount>
						<perCoreThreadCount>true</perCoreThreadCount>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>integration-test</goal>
								<goal>verify</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>


			<pluginManagement>
				<plugins>
					<plugin>
						<groupId>org.eclipse.m2e</groupId>
						<artifactId>lifecycle-mapping</artifactId>
						<version>1.0.0</version>
						<configuration>
							<lifecycleMappingMetadata>
								<pluginExecutions>
									<pluginExecution>
										<pluginExecutionFilter>
											<groupId>
												com.github.temyers
											</groupId>
											<artifactId>
												cucumber-jvm-parallel-plugin
											</artifactId>
											<versionRange>
												[4.2.0,)
											</versionRange>
											<goals>
												<goal>generateRunners</goal>
											</goals>
										</pluginExecutionFilter>
										<action>
											<ignore></ignore>
										</action>
									</pluginExecution>
								</pluginExecutions>
							</lifecycleMappingMetadata>
						</configuration>
					</plugin>
				</plugins>
			</pluginManagement>
		</build>

	</profile>`

Regards
Ravi

How do you setup @BeforeAll and @AfterAll in the cucumber steps?

I tried it like this, but it doesn't work. Also with the JUnit4 BeforeClass and Afterclass.


public class CucumberTestSuite {

    @BeforeClass
    public static void setup(){
        System.out.println("IN BEFORE ALL ");
    }


    @Before
    public static void setup2(){
        System.out.println("IN BEFORE ALL ");
    }

    @AfterAll
    public static void tearDown() throws Exception {
        System.out.println("IN AFTER ALL ");
        BrowserMobProxy p = getProxy();
        p.stop();
        Local bsLocal = getBrowserStackLocal();
        bsLocal.stop();

    }



    @Given("The user navigates to the goedgevoel website")
    public void theUserNavigatesToTheGoedgevoelWebsite() {
        goedGevoelHomePage.navigateToIt();
    }

    @When("advertising cookies are set")
    public void advertisingCookiesAreSet() {
        defaultPage.setCookies();
    }

    @AfterAll()
    public void tearDown() throws Exception {
        System.out.println("IN AFTER ALL ");
        defaultPage.tearDown();
    }
}

How to verify a API call in Browser Dev Tools with Serenity

Hi,
I'm trying to get one API call details after some browser action.
My test make a login and I need to get a specific POST action to my login endpoint through Devtools from browser (F12).

How can I do this using Serenity?

I tryed to use List<LogEntry> logEntries = getDriver().manage().logs().get(LogType.BROWSER).getAll(); but it returns only the Console tab, not the Network tab.

java.lang.NoClassDefFoundError: cucumber/runtime/io/ResourceLoader when trying to run tests through gradle.

Hey @wakaleo , I followed the steps mentioned the readme as well as the documentation on serenity's site but I am still unable to run the tests I get the following error when I do gradle clean test

java.lang.NoClassDefFoundError: cucumber/runtime/io/ResourceLoader
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
	at java.lang.Class.getConstructor0(Class.java:3075)
	at java.lang.Class.getConstructor(Class.java:1825)
	at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
	at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
	at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)
	at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:78)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: cucumber.runtime.io.ResourceLoader
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 41 more

Below is my libraries.gradle

ext{
    slf4jVersion = '1.7.7'
    serenityCoreVersion = '2.2.2'
    serenityCucumberVersion = '2.1.2'
    junitVersion='4.13'
    assertJVersion='3.8.0'
    logbackVersion='1.2.3'
    cucumberVersion = '6.0.0-RC1'

    libs = [
            slf4jApi: "org.slf4j:slf4j-api:$slf4jVersion",
            logback: "ch.qos.logback:logback-classic:${logbackVersion}",

            test: [
                    serenity: [
                            core: "net.serenity-bdd:serenity-core:${serenityCoreVersion}",
                            junit: "net.serenity-bdd:serenity-junit:${serenityCoreVersion}",
                            screenplay: "net.serenity-bdd:serenity-screenplay:${serenityCoreVersion}",
                            screenplayWebdriver: "net.serenity-bdd:serenity-screenplay-webdriver:${serenityCoreVersion}",
                            cucumber: "net.serenity-bdd:serenity-cucumber4:${serenityCucumberVersion}",
                    ],
                    cucumber: [
                            java: "io.cucumber:cucumber-core:${cucumberVersion}",
                            java: "io.cucumber:cucumber-java8:${cucumberVersion}",
                            junit: "io.cucumber:cucumber-junit:${cucumberVersion}"
                    ],
                    junit: "junit:junit:${junitVersion}",
                    assertj: "org.assertj:assertj-core:${assertJVersion}"
            ]
    ]
}

And here is my build.gradle


defaultTasks 'clean', 'test', 'aggregate'

def cucumberVersion = "6.0.0-RC1"


repositories {
    mavenCentral()
    jcenter()
}
buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath("net.serenity-bdd:serenity-gradle-plugin:2.2.2")

    }
}

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'net.serenity-bdd.aggregator'
apply from: "$rootDir/gradle/libraries.gradle"

sourceCompatibility = 1.8
targetCompatibility = 1.8

configurations.all {
    resolutionStrategy {
        force "io.cucumber:cucumber-core:${cucumberVersion}"
    }
}

dependencies {
    implementation libs.logback

    testImplementation libs.test.cucumber.java,
            libs.test.cucumber.junit,
            libs.test.serenity.core,
            libs.test.serenity.screenplay,
            libs.test.serenity.junit,
            libs.test.serenity.screenplayWebdriver,
            libs.test.serenity.cucumber,
            libs.test.junit,
            libs.test.assertj
}

test {
    testLogging.showStandardStreams = true
    systemProperties System.getProperties()
}

gradle.startParameter.continueOnFailure = true

test.finalizedBy(aggregate)

I am using java 1.8 and gradle version 5.4

Please describe how to configure parallel testing for Zalenium using this project?

-Using this project
-Changed config file accordingly (to what is described at https://serenity-bdd.github.io/theserenitybook/latest/serenity-grid.html) to use remote webdriver.
-Zalenium is executing the example tests of the project. (configures as default: 2 nodes, 1 test per node).
-Nonetheless, it seems to run sequentially by default (1 test on node 1 and after it is done the 2nd test on node 2, where I was expecting test 1 on node 1 to run concurrent with test 2 on node 2).

Can you please specify how this needs to configured? I noticed that the pom file contains the maven failsafe plugin but how to use it to run these example tests in parallel is not clear to me yet in relation to the project and the following references:
https://cucumber.io/docs/guides/parallel-execution/
https://serenity-bdd.github.io/theserenitybook/latest/serenity-grid.html

Thanks in advance.

[Question] New features are not displayed in Requirements, Capabilities and Features sections

Hi Team,

I want to use Serenity Reporting with gradle in my company, and I am testing this tool. It is a great tool, but I have some problems.

I have cloned this Git repo and I have begun to play with it, and the first thing I have done is create a new feature, as the documentation recommend: I have created a new directory in src/main/resouces/features and I have created a new feature file.

When I execute gradle clean test -P=chrome from my console it works fine but the report is not I expected. In the overall section appears the new feature
Captura de pantalla 2019-06-25 a las 18 00 32

But, in the Requiremens, Capabilities and Features tabs, they are not displayed
Captura de pantalla 2019-06-25 a las 18 06 13
Captura de pantalla 2019-06-25 a las 18 06 54

Furthermore, if I delete the Search feature and come back to execute gradle clean test -P=chrome, the Search feature appears...

What am I doing wrong?

Thanks in advance!

[Question] Gradle reports are are broken

Hi Team,

I have used Serenity Reporting with maven in the past, I was trying to implement a new project using gradle but requirements are not loaded properly using gradle.

I tired running this project as well with maven and gradle. When run with maven reports were generated properly, however when I run this project using gradle reports are not displayed as expect (Features and Capabilities tabs are not loaded, also Requirements tab is displayed empty)

image

Not sure if this gradle issue, Can someone please suggest on this

Filtering requirements to be shown in serenity report

Hi ,
I am new to serenity BDD framework.
Currently,I observed that all requirements under "src/test/resources/features" are getting displayed under "Requirements " tab in generated serenity report .Can we filter the requirement to be shown in the report to just to show the current release requirements if specific release tags are used for features/scenarios .As business is interested to look at only current release requirement and and corresponding statistics. Please suggest/guide if this is already available in serenity. Currently am using below versions

 serenity.version>2.0.48
 serenity.maven.version>2.0.48
 serenity.cucumber.version>1.0.12
 cucumber.version>4.2.0.

Thank you.

Cucumber Feature file Run Issues

While running the Cucumber Feature file I am getting the below error . My feature file is correct and there is no error . Could anyone please help .

Mar 27, 2020 10:13:51 PM cucumber.api.cli.Main run
WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main
Exception in thread "main" cucumber.runtime.CucumberException: Failed to parse resource at: file:/F:/Cucumber_Workspace/SerenityCucumber4/serenity-cucumber4-starter/src/test/resources/features/search/Login_HRM_Application.feature
at cucumber.runtime.model.FeatureParser.parseResource(FeatureParser.java:40)
at cucumber.runtime.model.FeatureBuilder.parse(FeatureBuilder.java:25)
at cucumber.runtime.model.FeatureLoader.loadFromFeaturePath(FeatureLoader.java:36)
at cucumber.runtime.model.FeatureLoader.load(FeatureLoader.java:23)
at cucumber.runtime.FeaturePathFeatureSupplier.get(FeaturePathFeatureSupplier.java:33)
at cucumber.runtime.Runtime.run(Runtime.java:78)
at io.cucumber.core.cli.Main.run(Main.java:43)
at cucumber.api.cli.Main.run(Main.java:28)
at cucumber.api.cli.Main.main(Main.java:15)
Caused by: gherkin.ParserException$CompositeParserException: Parser errors:
(1:1): expected: #EOF, #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'Author: Kumar Jitendra'
at gherkin.Parser.parse(Parser.java:143)
at gherkin.Parser.parse(Parser.java:118)
at gherkin.Parser.parse(Parser.java:114)
at cucumber.runtime.model.FeatureParser.parseResource(FeatureParser.java:36)
... 8 more

Serenity - JUnit 5

Hey guys!!

I have some projects who I use JUnit 5 as lib testing and I would like to know if Serenity-BDD has support for it? Are you already using JUnit 5? I had seen this PR, where you told that Serenity does not had support for JUnit 5 yet.

#14

Could you help me with this question?

Migration to serenity-cucumber4 version 1.0.22

Hello,
I have tried to migrate to
serenityCoreVersion = '2.0.88'
serenityCucumberVersion = '1.0.22'
But when I tried to run tests, it throws an exception:
`java.lang.NoClassDefFoundError: io/cucumber/core/options/FeatureOptions

at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.getConstructor(Class.java:1825)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:49)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:67)

Caused by: java.lang.ClassNotFoundException: io.cucumber.core.options.FeatureOptions
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 19 more
`
Is there any guide how to complete this migration ?
Note: this issue could be reproduced using serenity-cucumber4-starter, just change the
serenityCoreVersion = '2.0.88'
serenityCucumberVersion = '1.0.22'

java.lang.NoClassDefFoundError: io/cucumber/java/PendingException

Hello,
After I download this project, I can verify mvn clean verify does work and the index file is created. Thx a lot.
However, from IntelliJ IDE when I select src/test/java folder and run all tests , the error is shown below. How to fix it? Thx,

java.lang.NoClassDefFoundError: io/cucumber/java/PendingException

Test ignored.

Test ignored.

java.lang.NoClassDefFoundError: io/cucumber/java/PendingException

at net.thucydides.core.model.failures.FailureAnalysis.<clinit>(FailureAnalysis.java:74)
at net.thucydides.core.steps.BaseStepListener.<init>(BaseStepListener.java:727)
at net.thucydides.core.steps.BaseStepListener.<init>(BaseStepListener.java:271)
at net.thucydides.core.steps.Listeners$BaseStepListenerBuilder.withOutputDirectory(Listeners.java:37)
at net.serenitybdd.core.SerenityListeners.<init>(SerenityListeners.java:30)
at cucumber.runtime.formatter.SerenityReporter.initialiseListenersFor(SerenityReporter.java:112)
at cucumber.runtime.formatter.SerenityReporter.lambda$handleTestSourceRead$0(SerenityReporter.java:149)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at cucumber.runtime.formatter.SerenityReporter.handleTestSourceRead(SerenityReporter.java:144)
at cucumber.runner.AbstractEventPublisher.send(AbstractEventPublisher.java:45)
at cucumber.runner.AbstractEventBus.send(AbstractEventBus.java:9)
at cucumber.runner.TimeServiceEventBus.send(TimeServiceEventBus.java:3)
at cucumber.runtime.model.CucumberFeature.sendTestSourceRead(CucumberFeature.java:44)
at io.cucumber.junit.CucumberSerenityRunner$RunCucumber.evaluate(CucumberSerenityRunner.java:234)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

Caused by: java.lang.ClassNotFoundException: io.cucumber.java.PendingException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 28 more

How to log info, err, warn to serenity html report

First of all thanks for your effort to create serenity-cucumber4. Its very helpful for me. I appreciate it.
I have two questions:

  1. I want to print a message/log on serenity report, how to do it? I know slf4j logs messages on the console as explained here: serenity-bdd/serenity-jbehave#213 but I need to print it on the html report. Let me know if there is a way to do it.
  2. Is there a way to print AssertJ success or failure reasons.
    For ex: assertThat(frodo.getAge()).as("check %s's age", frodo.getName()) .isEqualTo(100);
    Here I want to write if my check is successful, on failure, it report should contain information as to why it failed.

<Please pardon me as I'm not raising any issue here, rather I'm looking for a solution.>

build.gradle adjustments with a provided driver?

When I run my tests in IntelliJ, they work just fine.
But when I try to run them with commandline, the webdriver seems not be initialized.
I use a provided webdriver that I set in the serenity.conf file.
Do I need to make changes to the build.gradle file?

webdriver {

    driver = provided
    provided.type= mydriver
     provided.mydriver = net.persgroep.targetqa.MyCustomDriver
    se.driver.service.pool = false
    thucydides.driver.capabilities = mydriver
 }

My run config in IntelliJ:

Picture 37

My build.gradle file:

defaultTasks 'clean','test','aggregate'

repositories {
    mavenLocal()
    jcenter()
}

buildscript {
    repositories {
        mavenLocal()
        jcenter()
    }
    dependencies {
        classpath("net.serenity-bdd:serenity-gradle-plugin:2.0.70")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'net.serenity-bdd.aggregator'
apply from: "$rootDir/gradle/libraries.gradle"


sourceCompatibility = 1.8
targetCompatibility = 1.8

/**
 * This is needed to make sure there are no Cucumber 2 dependencies in the classpath.
 */
configurations.all {
    resolutionStrategy {
        force "io.cucumber:cucumber-core:${cucumberVersion}"
    }
}
dependencies {
    compile libs.logback

    testCompile libs.test.cucumber.java,
            libs.test.cucumber.junit,
            libs.test.serenity.core,
            libs.test.serenity.screenplay,
            libs.test.serenity.junit,
            libs.test.serenity.screenplayWebdriver,
            libs.test.serenity.cucumber,
            libs.test.junit,
            libs.test.assertj

    compile group: 'net.lightbody.bmp', name: 'browsermob-proxy', version: '2.1.5', ext: 'pom'
    compile group: 'net.lightbody.bmp', name: 'browsermob-core', version: '2.1.5'
    compile group: 'de.sstoehr', name: 'har-reader', version: '2.1.4'
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
}

test {
    testLogging.showStandardStreams = true
    systemProperties System.getProperties()
}

gradle.startParameter.continueOnFailure = true

test.finalizedBy(aggregate)

configurations {
    cucumberRuntime {
        extendsFrom testRuntime
    }
}

task cucumber() {
    dependsOn assemble
    doLast {
        javaexec {
            main = "cucumber.api.cli.Main"
            classpath = configurations.cucumberRuntime
            args = ['--plugin', 'pretty', '--glue net.serenitybdd.cucumber.actors net.persgroep.targetqa.starter.stepdefinitions', 'src/test/java/net/persgroep/targetqa', 'src/test/resources/features']

        }
    }
}

//Ensure the cucumber tests are executed as part of the build. Makes for a very pretty output.
build.dependsOn cucumber

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.