Пробывал запустить тесты на инструменте для непрерывной интеграции(Jenkins)
Tecт вываливается по такой ошибке.
------------------------------------------------------- T E S T S ------------------------------------------------------- Running TestSuite ... ... TestNG 6.8.9beta by Cédric Beust (cedric@beust.com) ... org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: (process:17320): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Error: no display specified (process:17331): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Error: no display specified 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 ru.stqa.selenium.factory.WebDriverFactoryInternal.createLocalDriver(WebDriverFactoryInternal.java:74) at ru.stqa.selenium.factory.WebDriverFactoryInternal.newDriver(WebDriverFactoryInternal.java:57) at ru.stqa.selenium.factory.ThreadLocalSingletonStorage.createNewDriver(ThreadLocalSingletonStorage.java:91) at ru.stqa.selenium.factory.ThreadLocalSingletonStorage.getDriver(ThreadLocalSingletonStorage.java:36) at ru.stqa.selenium.factory.WebDriverFactory.getDriver(WebDriverFactory.java:35) at performance.test.TestNgTestBase.initWebDriver(TestNgTestBase.java:52) 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:483) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84) at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213) at org.testng.internal.Invoker.invokeMethod(Invoker.java:653) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) at org.testng.SuiteRunner.runTest(SuiteRunner.java:348) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305) at org.testng.SuiteRunner.run(SuiteRunner.java:254) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224) at org.testng.TestNG.runSuitesLocally(TestNG.java:1149) at org.testng.TestNG.run(TestNG.java:1057) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:293) at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:91) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
вот мой pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>performance.test</groupId> <artifactId>Bil</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.8.8</version> </dependency> <dependency> <groupId>ru.stqa.selenium</groupId> <artifactId>webdriver-factory</artifactId> <version>1.1.42</version> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <version>2.5</version> <type>zip</type> <classifier>source-release</classifier> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-server</artifactId> <version>2.42.2</version> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.17</version> </dependency> <dependency> <groupId>org.seleniumhq.webdriver</groupId> <artifactId>webdriver-firefox</artifactId> <version>0.9.7376</version> </dependency> </dependencies> <build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> <testResources> <testResource> <directory>src/test/resources</directory> <filtering>true</filtering> </testResource> </testResources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <configuration> <encoding>${project.build.sourceEncoding}</encoding> </configuration> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.17</version> <configuration> <suiteXmlFiles> <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile> </suiteXmlFiles> <systemPropertyVariables> <application.properties>/application.properties</application.properties> </systemPropertyVariables> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.6</source> <target>1.6</target> <encoding>${project.build.sourceEncoding}</encoding> </configuration> </plugin> </plugins> </build> <!-- profiles --> <profiles> <!-- browsers --> <profile> <id>firefox</id> <properties> <capabilities>/firefox.capabilities</capabilities> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>chrome</id> <properties> <capabilities>/chrome.capabilities</capabilities> </properties> </profile> <profile> <id>ie</id> <properties> <capabilities>/ie.capabilities</capabilities> </properties> </profile> <profile> <id>safari</id> <properties> <capabilities>/safari.capabilities</capabilities> </properties> </profile> <profile> <id>phantomjs</id> <properties> <capabilities>/phantomjs.capabilities</capabilities> </properties> </profile> <profile> <id>opera</id> <properties> <capabilities>/opera.capabilities</capabilities> </properties> </profile> <profile> <id>htmlunit</id> <properties> <capabilities>/htmlunit.capabilities</capabilities> </properties> </profile> <!-- environments --> <profile> <id>localhost</id> <properties> <site.url>http://localhost/</site.url> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>devhost</id> <properties> <site.url>http://devhost/</site.url> </properties> </profile> <profile> <id>testhost</id> <properties> <site.url>http://testhost/</site.url> </properties> </profile> <profile> <id>prodhost</id> <properties> <site.url>http://prodhost.com/</site.url> </properties> </profile> <!-- grid --> <profile> <id>nogrid</id> <properties> <grid.url></grid.url> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>grid</id> <properties> <grid.url>http://localhost:4444/wd/hub/</grid.url> </properties> </profile> </profiles> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> </project>
c Chromedriver также не может найти...
Tests run: 2, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 1.433 sec <<< FAILURE! - in TestSuite initWebDriver(bil.bil.tests.Registration_Successful) Time elapsed: 1.168 sec <<< FAILURE! java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
хотя у меня через IDE хром запускается норм. Chromedriver лежит /usr/local/share/chromedriver и символические ссылки
/usr/local/bin/chromedriver
/usr/bin/chromedriver