serenity-cucumber4-starter's People
Forkers
nawazzeeshan jdmesalosada leokannan rsvonddy nirotomas jitindoriya07 najeebarif funnear turturie ralphamparo munna73 sneybe bartvanraemdonck bhupendrachauhan89 aj-72 ppaallmmeerr nicopaez thephannfq johwik shiradean happy1610 raaghav23 pdubey00 mshaulskiy dzablodska ishankhaneja jakimcho sailfishdev ricfeatherstone cliviu thuynt707 nu75h311 loveariva push2212 hazmeister hanibalvuong kushanbhai paddyfox mpuertao andrealuna93 revfran luisestebancastillo alexgp94 thuyttn2020 onlyfullstack tstng nathanielgenwright mjp1994 mdsapon gabe-zoldi karenfi93 mr-chenn olaris2295 mclondonol dheybenclave marimontoyan juliangebe luigiar10 nsnietol amad410 amadain17 jfmorozco coetzeehei chrisolido apkrajar hungpd-comartek santiagobr cliff-latorre anhphan-cwvn lemeesprit ameniztn mateo002serenity-cucumber4-starter's Issues
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
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?
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
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:
- In some cases there is skipping of stack push operation
- In some cases there is some excess stack pop operation
- 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
@Step annotation error:Im getting error for @step annotation error message-The import net.thucydides.core.annotations.Step cannot be resolved,why this import is not resolved?
[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
But, in the Requiremens, Capabilities and Features tabs, they are not displayed
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!
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.
[Question ]How to retrieve the scenario name, feature file name and test step from Step Event Bus
Hi,
I need to retrieve the scenario name, feature file name and test step from my java code.
Is it possible to create those details from StepEventBus? if yes how to get it.
My requirement is to create the folders according to the above names to store screenshot to compare UI.
Appreciate your help.
Thanks
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.
Could you help me with this question?
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'
}
How to I run by Tags?
How do I run by Tags?
clean verify "-Dcucumber.options=--tags @Lemniscate"
It doesn't exeute the test, it just passes
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 ...
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.
Imports org.openqa.selenium.By & net.serenitybdd.core.pages.PageObject not resolved
With this pom the following imports cannot be resolved:
import org.openqa.selenium.By;
import net.serenitybdd.core.pages.PageObject;
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
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.
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
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:
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
[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
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.
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.
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
The tests can't even be executed - failed with maven goal "Verify"
Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.22.1:verify (default) on project serenity-cucumber4-smoketests: There are test failures. --- that's the error I'm getting, pls help
[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)
Not sure if this gradle issue, Can someone please suggest on this
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();
}
}
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] ------------------------------------------------------------------------
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.
PendingException
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'
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)
[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>
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?
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:
- 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.
- 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.>
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.