Удаленка для jenkins+selenide+selenoid+allure+docker спецов на 2-3 часа в день. 100% remote! Присоединиться к проекту

Не могу запустить тесты с Serenity в Firefox. Где узнать поддерживаемые версии браузеров?

serenity
firefox
java
webdriver
Теги: #<Tag:0x00007fedb8043320> #<Tag:0x00007fedb80431e0> #<Tag:0x00007fedb80430a0> #<Tag:0x00007fedb8042f60>

#1

Здравствуйте! Пытаюсь написать тесты с серенити, для начала хотябы просто открыть страницу с помощью .open(). Открывается браузер и на этом все кончается. Объясните пожалуйста, что не так. Подозреваю, что проблема в совместимости браузера, но я попробовал разные версии Firefox (43, 47, 56, 57). Где найти информацию, какие версии браузеров поддерживаются какими версиями Serenity? Нужно ли скачивать geckodriver и где-то указывать к нему путь? Может чего-то не хватает в pom.xml или в классах? Делаю все по документации серенити. Заранее спасибо за помощь.

@RunWith(SerenityRunner.class)
public class GooglePageTest {

    @Managed
    WebDriver driver;

    @Steps
    GooglePageSteps user;

    @Test
    public void test() {
        user.openPage();
    }
}

public class GooglePageSteps {

    GooglePage page;

    @Step
    public void openPage() {
        page.open();
    }
}

@DefaultUrl("https://www.google.com")
public class GooglePage extends PageObject {
}

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <serenity.version>1.0.47</serenity.version>
        <serenity.maven.version>1.0.47</serenity.maven.version>
        <webdriver.driver>firefox</webdriver.driver>
    </properties>

    <dependencies>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>core</artifactId>
            <version>${serenity.version}</version>
        </dependency>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-junit</artifactId>
            <version>${serenity.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.6.1</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>1.7.0</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.18</version>
                <configuration>
                    <systemProperties>
                        <webdriver.driver>${webdriver.driver}</webdriver.driver>
                        <surefire.rerunFailingTestsCount>0</surefire.rerunFailingTestsCount>
                        <surefire.rerunFailingTestsCount>0</surefire.rerunFailingTestsCount>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.serenity-bdd.maven.plugins</groupId>
                <artifactId>serenity-maven-plugin</artifactId>
                <version>${serenity.maven.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>net.serenity-bdd</groupId>
                        <artifactId>core</artifactId>
                        <version>${serenity.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>serenity-reports</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms.

	at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
	at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:103)
	at net.thucydides.core.webdriver.WebdriverInstanceFactory.newFirefoxDriver(WebdriverInstanceFactory.java:41)
	at net.thucydides.core.webdriver.WebDriverFactory.firefoxDriver(WebDriverFactory.java:485)
	at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:176)
	at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:137)
	at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:128)
	at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:100)
	at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:173)
	at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:168)
	at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:821)
	at net.serenitybdd.core.pages.PageObject.open(PageObject.java:731)
	at net.serenitybdd.core.pages.PageObject.open(PageObject.java:719)
	at GooglePageSteps.openPage(GooglePageSteps.java:9)
	at GooglePageSteps$$EnhancerByCGLIB$$622c1834.CGLIB$openPage$0(<generated>)
	at GooglePageSteps$$EnhancerByCGLIB$$622c1834$$FastClassByCGLIB$$f243815c.invoke(<generated>)
	at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:310)
	at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:295)
	at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:272)
	at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:130)
	at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:56)
	at GooglePageSteps$$EnhancerByCGLIB$$622c1834.openPage(<generated>)
	at GooglePageTest.test(GooglePageTest.java:19)
	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.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.InvokeMethod.evaluate(InvokeMethod.java:17)
	at net.serenitybdd.junit.runners.SerenityStatement.evaluate(SerenityStatement.java:24)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:435)
	at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:59)
	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 net.serenitybdd.junit.runners.SerenityRunner.run(SerenityRunner.java:248)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
	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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
47979 [main] ERROR net.thucydides.core.webdriver.WebDriverFacade - FAILED TO CREATE NEW WEBDRIVER_DRIVER INSTANCE class org.openqa.selenium.firefox.FirefoxDriver: Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver
net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver
	at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:199)
	at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:137)
	at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:128)
	at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:100)
	at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:173)
	at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:168)
	at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:821)
	at net.serenitybdd.core.pages.PageObject.open(PageObject.java:731)
	at net.serenitybdd.core.pages.PageObject.open(PageObject.java:719)
	at GooglePageSteps.openPage(GooglePageSteps.java:9)
	at GooglePageSteps$$EnhancerByCGLIB$$622c1834.CGLIB$openPage$0(<generated>)
	at GooglePageSteps$$EnhancerByCGLIB$$622c1834$$FastClassByCGLIB$$f243815c.invoke(<generated>)
	at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:310)
	at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:295)
	at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:272)
	at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:130)
	at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:56)
	at GooglePageSteps$$EnhancerByCGLIB$$622c1834.openPage(<generated>)
	at GooglePageTest.test(GooglePageTest.java:19)
	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.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.InvokeMethod.evaluate(InvokeMethod.java:17)
	at net.serenitybdd.junit.runners.SerenityStatement.evaluate(SerenityStatement.java:24)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:435)
	at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:59)
	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 net.serenitybdd.junit.runners.SerenityRunner.run(SerenityRunner.java:248)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
	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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
Caused by: org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files\Mozilla Firefox\firefox.exe) on port 7055; process output follows: 
code.com to C:\Users\user\AppData\Local\Temp\anonymous7503314309665137990webdriver-profile\extensions\fxdriver@googlecode.com
1510748858507	addons.xpi	DEBUG	Ignoring file entry whose name is not a valid add-on ID: C:\Users\user\AppData\Local\Temp\anonymous7503314309665137990webdriver-profile\extensions\webdriver-staging
1510748858507	addons.xpi	INFO	SystemAddonInstallLocation directory is missing
1510748858508	addons.xpi	INFO	Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}
1510748858508	addons.xpi	DEBUG	Skipping unavailable install location app-system-share
1510748858508	addons.xpi	DEBUG	Skipping unavailable install location app-system-local
1510748858509	addons.xpi	DEBUG	checkForChanges
1510748858509	addons.xpi	DEBUG	Loaded add-on state from prefs: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\\Users\\user\\AppData\\Local\\Temp\\anonymous7503314309665137990webdriver-profile\\extensions\\fxdriver@googlecode.com","e":false,"v":"2.45.0","st":1510748856867,"mt":1510748856820}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"43.0","st":1510747934436,"mt":1449639644000}}}
1510748858510	addons.xpi	DEBUG	Existing add-on fxdriver@googlecode.com in app-profile
1510748858511	addons.xpi	DEBUG	getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1510748858512	addons.xpi	DEBUG	Existing add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global
1510748858513	addons.xpi	DEBUG	getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\\Users\\user\\AppData\\Local\\Temp\\anonymous7503314309665137990webdriver-profile\\extensions\\fxdriver@googlecode.com","e":false,"v":"2.45.0","st":1510748856867,"mt":1510748856820}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"43.0","st":1510747934436,"mt":1449639644000}}}
1510748858514	addons.xpi	DEBUG	No changes found
1510748858520	addons.manager	DEBUG	Registering shutdown blocker for XPIProvider
1510748858521	addons.manager	DEBUG	Provider finished startup: XPIProvider
1510748858521	addons.manager	DEBUG	Starting provider: LightweightThemeManager
1510748858521	addons.manager	DEBUG	Registering shutdown blocker for LightweightThemeManager
1510748858521	addons.manager	DEBUG	Provider finished startup: LightweightThemeManager
1510748858522	addons.manager	DEBUG	Starting provider: GMPProvider
1510748858527	addons.manager	DEBUG	Registering shutdown blocker for GMPProvider
1510748858527	addons.manager	DEBUG	Provider finished startup: GMPProvider
1510748858527	addons.manager	DEBUG	Starting provider: PluginProvider
1510748858527	addons.manager	DEBUG	Registering shutdown blocker for PluginProvider
1510748858527	addons.manager	DEBUG	Provider finished startup: PluginProvider
1510748858528	addons.manager	DEBUG	Completed startup sequence
1510748858596	addons.xpi-utils	DEBUG	Starting async load of XPI database C:\Users\user\AppData\Local\Temp\anonymous7503314309665137990webdriver-profile\extensions.json
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1510748858680	addons.manager	DEBUG	Starting provider: <unnamed-provider>
1510748858680	addons.manager	DEBUG	Registering shutdown blocker for <unnamed-provider>
1510748858681	addons.manager	DEBUG	Provider finished startup: <unnamed-provider>
1510748858750	addons.xpi-utils	DEBUG	Async JSON file read took 0 MS
1510748858750	addons.xpi-utils	DEBUG	Finished async read of XPI database, parsing...
1510748858751	addons.xpi-utils	DEBUG	Successfully read XPI database
1510748858806	addons.manager	DEBUG	Starting provider: PreviousExperimentProvider
1510748858806	addons.manager	DEBUG	Registering shutdown blocker for PreviousExperimentProvider
1510748858806	addons.manager	DEBUG	Provider finished startup: PreviousExperimentProvider

Build info: version: '2.45.0', revision: '5017cb8e7ca8e37638dc3091b2440b90a1d8686f', time: '2015-02-27 09:10:26'
System info: host: 'ASDSPB-WS034', ip: '192.168.99.1', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_102'
Driver info: driver.version: FirefoxDriver
	at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:130)
	at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:103)
	at net.thucydides.core.webdriver.WebdriverInstanceFactory.newFirefoxDriver(WebdriverInstanceFactory.java:41)
	at net.thucydides.core.webdriver.WebDriverFactory.firefoxDriver(WebDriverFactory.java:485)
	at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:176)
	... 51 more
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
code.com to C:\Users\user\AppData\Local\Temp\anonymous7503314309665137990webdriver-profile\extensions\fxdriver@googlecode.com
1510748858507	addons.xpi	DEBUG	Ignoring file entry whose name is not a valid add-on ID: C:\Users\user\AppData\Local\Temp\anonymous7503314309665137990webdriver-profile\extensions\webdriver-staging
1510748858507	addons.xpi	INFO	SystemAddonInstallLocation directory is missing
1510748858508	addons.xpi	INFO	Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}
1510748858508	addons.xpi	DEBUG	Skipping unavailable install location app-system-share
1510748858508	addons.xpi	DEBUG	Skipping unavailable install location app-system-local
1510748858509	addons.xpi	DEBUG	checkForChanges
1510748858509	addons.xpi	DEBUG	Loaded add-on state from prefs: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\\Users\\user\\AppData\\Local\\Temp\\anonymous7503314309665137990webdriver-profile\\extensions\\fxdriver@googlecode.com","e":false,"v":"2.45.0","st":1510748856867,"mt":1510748856820}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"43.0","st":1510747934436,"mt":1449639644000}}}
1510748858510	addons.xpi	DEBUG	Existing add-on fxdriver@googlecode.com in app-profile
1510748858511	addons.xpi	DEBUG	getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1510748858512	addons.xpi	DEBUG	Existing add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global
1510748858513	addons.xpi	DEBUG	getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\\Users\\user\\AppData\\Local\\Temp\\anonymous7503314309665137990webdriver-profile\\extensions\\fxdriver@googlecode.com","e":false,"v":"2.45.0","st":1510748856867,"mt":1510748856820}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"43.0","st":1510747934436,"mt":1449639644000}}}
1510748858514	addons.xpi	DEBUG	No changes found
1510748858520	addons.manager	DEBUG	Registering shutdown blocker for XPIProvider
1510748858521	addons.manager	DEBUG	Provider finished startup: XPIProvider
1510748858521	addons.manager	DEBUG	Starting provider: LightweightThemeManager
1510748858521	addons.manager	DEBUG	Registering shutdown blocker for LightweightThemeManager
1510748858521	addons.manager	DEBUG	Provider finished startup: LightweightThemeManager
1510748858522	addons.manager	DEBUG	Starting provider: GMPProvider
1510748858527	addons.manager	DEBUG	Registering shutdown blocker for GMPProvider
1510748858527	addons.manager	DEBUG	Provider finished startup: GMPProvider
1510748858527	addons.manager	DEBUG	Starting provider: PluginProvider
1510748858527	addons.manager	DEBUG	Registering shutdown blocker for PluginProvider
1510748858527	addons.manager	DEBUG	Provider finished startup: PluginProvider
1510748858528	addons.manager	DEBUG	Completed startup sequence
1510748858596	addons.xpi-utils	DEBUG	Starting async load of XPI database C:\Users\user\AppData\Local\Temp\anonymous7503314309665137990webdriver-profile\extensions.json
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1510748858680	addons.manager	DEBUG	Starting provider: <unnamed-provider>
1510748858680	addons.manager	DEBUG	Registering shutdown blocker for <unnamed-provider>
1510748858681	addons.manager	DEBUG	Provider finished startup: <unnamed-provider>
1510748858750	addons.xpi-utils	DEBUG	Async JSON file read took 0 MS
1510748858750	addons.xpi-utils	DEBUG	Finished async read of XPI database, parsing...
1510748858751	addons.xpi-utils	DEBUG	Successfully read XPI database
1510748858806	addons.manager	DEBUG	Starting provider: PreviousExperimentProvider
1510748858806	addons.manager	DEBUG	Registering shutdown blocker for PreviousExperimentProvider
1510748858806	addons.manager	DEBUG	Provider finished startup: PreviousExperimentProvider

	at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
	... 59 more
47998 [main] INFO net.thucydides.core.steps.StepInterceptor - STEP FAILED: openPage - Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver
net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver

(Павел) #2

Где найти информацию, какие версии браузеров поддерживаются какими версиями Serenity?

Serenity включает в себя определенную версию зависимости Selenium, а уже от Selenium зависит и версия браузера.

<serenity.version>1.0.47</serenity.version>

Довольно старая версия на самом деле… Даже на Maven Central самая старая версия это 1.0.49, она включает в себя еще аж 2ю версию вебдрайвера (org.seleniumhq.selenium:selenium-server:2.45.0)

На сегодняшний день последняя анонсированная версия Serenity это 1.6.9, которая использует WebDriver 3.5.3.

Нужно ли скачивать geckodriver и где-то указывать к нему путь?

Да. Для WebDriver 3 нужно качать драйвера отдельно для каждого браузера. Совместимости каждого из драйверов с версиями их браузера есть в интернете. Вот гайд для настройки серенити+хром, для гекодрайвера соотв. нужно указывать пропертю webdriver.gecko.driver вместо webdriver.chrome.driver. Хотя для старта я бы рекомендовал использовать Chrome вместо Firefox т.к. гекодрайвер (на мой взгляд) пока более проблемный.

Делаю все по документации серенити

Если вы про http://thucydides.info/docs/serenity-staging/, то она, на минуточку,
Last updated 2016-07-15 12:22:46 UTC
:slightly_smiling_face:
Можете попробовать взять за основу один из тестовых проектов на их гитхабе, ну или хотя бы взять оттуда версии всех нужных зависимостей.


(Николай Анатольевич) #3

Я использую Serenity 1.4.0 (с ней идёт selenium webdriver 2.53.1) - firefox ставлю 46-ой версии. Хром можно последний использовать.
В версии вебдрайвера 2.53.1 geckodriver не нужен.


#4

Господа, спасибо за помощь! Проблема была в том, что у меня в dependency был core (как указано в той старой доке serenity), у которого последняя версия была 1.0.47, поставил вместо него serenity-core и заработало.

Теперь у меня появилась новая проблема: я указываю

                    <includes>
                        <include>**/When*.java</include>
                    </includes>

Но запускаются все равно только тесты со словом Test в названии, а When* - нет. Структура простая:
src - test - java - тут *Test.java и When*.java

Не могли бы вы подсказать, что я указал неправильно, и сказать, насколько правильно сейчас составлен POM? Составлял частично по докам, по гитхабам и тд, но до конца не разобрался, как все настраивается и какой phase нужен (integration-test или post-integration-test).

Спасибо!

pom.xml


    <dependencies>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-core</artifactId>
            <version>1.7.4</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-junit</artifactId>
            <version>1.7.4</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.6.1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20.1</version>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.20.1</version>
                <configuration>
                    <includes>
                        <include>**/When*.java</include>
                    </includes>
                    <systemProperties>
                        <webdriver.driver>1.7.4</webdriver.driver>
                        <surefire.rerunFailingTestsCount>0</surefire.rerunFailingTestsCount>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.serenity-bdd.maven.plugins</groupId>
                <artifactId>serenity-maven-plugin</artifactId>
                <version>1.7.4</version>
                <dependencies>
                    <dependency>
                        <groupId>net.serenity-bdd</groupId>
                        <artifactId>serenity-core</artifactId>
                        <version>1.7.4</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>serenity-reports</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


(Николай Анатольевич) #5

Я использую profiles

<profiles>
        <profile>
            <id>simpleProfile</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.20.1</version>
                        <configuration>
                            <includes>
                                <include>**/When**.java</include>
                            </includes>
                            <forkMode>once</forkMode>
                            <parallel>classes</parallel>
                            <threadCount>5</threadCount>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>test</phase>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>