Перейти к содержимому

Программирование на C# для тестировщиков
онлайн, начало 14 мая
Первый Онлайн ИНститут Тестировщиков
онлайн, начало 18 мая
SQL для тестировщиков
онлайн, начало 17 мая
Английский для тестировщиков
онлайн, начало 17 мая

thepauloo89

Регистрация: 20 ноя 2015
Offline Активность: 06 сен 2020 09:29
-----

Мои темы

Не получается запустить параллельно тесты в нужном количестве.

15 июня 2016 - 07:40

Java Maven Junit 

 

При таких параметрах, запускаются все методы в классе по очереди,

 

так

<configuration>
<parallel>methods</parallel>
<threadCountMethods>4</threadCountMethods>
<testFailureIgnore>true</testFailureIgnore>

либо так

<configuration>
<parallel>methods</parallel>
<threadCount>4</threadCount>
<testFailureIgnore>true</testFailureIgnore>

 

 

При таких все классы запускаются в которых есть слово "Test"

так

<parallel>classes</parallel>
<threadCountClasses>4</threadCountClasses>
<testFailureIgnore>true</testFailureIgnore>

либо так

<parallel>classes</parallel>
<threadCount>4</threadCount>
<testFailureIgnore>true</testFailureIgnore>

 

 

Подскажите почему так происходит


как сохранять отчеты allure в нужную папку

22 апреля 2016 - 06:51

Нужно чтобы папка target создавалась не в директории проекта, а на другой машине(\\172.2.4.2\folder\folder\)

где в pom файле это прописывать?

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/20...chema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache....aven-4.0.0.xsd" >
<modelVersion>4.0.0</modelVersion>

<groupId>Test2</groupId>
<artifactId>Test2</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<allure.version>1.4.16</allure.version>
<aspectj.version>1.8.5</aspectj.version>
</properties>

<dependencies>

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.53.0</version>
</dependency>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.10</version>
</dependency>


<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-testng-adaptor</artifactId>
<version>${allure.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<parallel>classes</parallel>
<threadCount>4</threadCount>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>

</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.10.v20150310</version>
<configuration>
<webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
<stopKey>stop</stopKey>
<stopPort>1234</stopPort>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</reporting>
</project>


No buffer space available (maximum connections reached?): connect

22 марта 2016 - 08:42

Есть проект в IntelliJ IDEA 15 JDK 1.8 TestNG
В проекте два класса в одном 8 тестов в другом 4.
Запускаю тесты правой кнопкой мыши на класс с тестами, нажимая Run по очереди на оба класса.
При этом в тестах такая аннотация, и для каждого теста запускается новый webDriver.
@BeforeMethod
public void setUp() {


driver = new FirefoxDriver();
driver.get("http://web-05.test.cbtc.ru/");
}

@AfterMethod
public void closeDriver() {
driver.quit();
}
 
Про эту ошибку гуглил кое где написано что проблема в ОС скачал фикс обновление для системы не помогло.
падает вот такая ошибка.
 
"C:\Program Files\Java\jdk1.8.0_73\bin\java" -ea -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 15.0.4\bin" -Didea.testng.sm_runner -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 15.0.4\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 15.0.4\plugins\testng\lib\testng-plugin.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_73\jre\lib\rt.jar;C:\!Idea\TestTravel_2.0\TestTravel_2.0\target\test-classes;C:\!Idea\TestTravel_2.0\TestTravel_2.0\target\classes;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-server\2.52.0\selenium-server-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\com\beust\jcommander\1.48\jcommander-1.48.jar;C:\Users\NaumenkoP\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.48\bcprov-jdk15on-1.48.jar;C:\Users\NaumenkoP\.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.48\bcpkix-jdk15on-1.48.jar;C:\Users\NaumenkoP\.m2\repository\mx4j\mx4j-tools\3.0.1\mx4j-tools-3.0.1.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\jetty-repacked\9.2.13.v20150730\jetty-repacked-9.2.13.v20150730.jar;C:\Users\NaumenkoP\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\jetty-rc-repacked\5\jetty-rc-repacked-5.jar;C:\Users\NaumenkoP\.m2\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-java\2.52.0\selenium-java-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\2.52.0\selenium-chrome-driver-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\2.52.0\selenium-remote-driver-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar;C:\Users\NaumenkoP\.m2\repository\com\google\code\gson\gson\2.3.1\gson-2.3.1.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-api\2.52.0\selenium-api-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\com\google\guava\guava\19.0\guava-19.0.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\2.52.0\selenium-edge-driver-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\NaumenkoP\.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-htmlunit-driver\2.52.0\selenium-htmlunit-driver-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\net\sourceforge\htmlunit\htmlunit\2.18\htmlunit-2.18.jar;C:\Users\NaumenkoP\.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar;C:\Users\NaumenkoP\.m2\repository\xalan\serializer\2.7.2\serializer-2.7.2.jar;C:\Users\NaumenkoP\.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;C:\Users\NaumenkoP\.m2\repository\org\apache\httpcomponents\httpmime\4.5\httpmime-4.5.jar;C:\Users\NaumenkoP\.m2\repository\net\sourceforge\htmlunit\htmlunit-core-js\2.17\htmlunit-core-js-2.17.jar;C:\Users\NaumenkoP\.m2\repository\xerces\xercesImpl\2.11.0\xercesImpl-2.11.0.jar;C:\Users\NaumenkoP\.m2\repository\xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar;C:\Users\NaumenkoP\.m2\repository\net\sourceforge\nekohtml\nekohtml\1.9.22\nekohtml-1.9.22.jar;C:\Users\NaumenkoP\.m2\repository\net\sourceforge\cssparser\cssparser\0.9.16\cssparser-0.9.16.jar;C:\Users\NaumenkoP\.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar;C:\Users\NaumenkoP\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\NaumenkoP\.m2\repository\org\eclipse\jetty\websocket\websocket-client\9.2.12.v20150709\websocket-client-9.2.12.v20150709.jar;C:\Users\NaumenkoP\.m2\repository\org\eclipse\jetty\jetty-util\9.2.12.v20150709\jetty-util-9.2.12.v20150709.jar;C:\Users\NaumenkoP\.m2\repository\org\eclipse\jetty\jetty-io\9.2.12.v20150709\jetty-io-9.2.12.v20150709.jar;C:\Users\NaumenkoP\.m2\repository\org\eclipse\jetty\websocket\websocket-common\9.2.12.v20150709\websocket-common-9.2.12.v20150709.jar;C:\Users\NaumenkoP\.m2\repository\org\eclipse\jetty\websocket\websocket-api\9.2.12.v20150709\websocket-api-9.2.12.v20150709.jar;C:\Users\NaumenkoP\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\NaumenkoP\.m2\repository\org\apache\httpcomponents\httpclient\4.5.1\httpclient-4.5.1.jar;C:\Users\NaumenkoP\.m2\repository\org\apache\httpcomponents\httpcore\4.4.3\httpcore-4.4.3.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\2.52.0\selenium-firefox-driver-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\2.52.0\selenium-ie-driver-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\net\java\dev\jna\jna\4.1.0\jna-4.1.0.jar;C:\Users\NaumenkoP\.m2\repository\net\java\dev\jna\jna-platform\4.1.0\jna-platform-4.1.0.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\2.52.0\selenium-safari-driver-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-support\2.52.0\selenium-support-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\org\webbitserver\webbit\0.4.14\webbit-0.4.14.jar;C:\Users\NaumenkoP\.m2\repository\io\netty\netty\3.5.2.Final\netty-3.5.2.Final.jar;C:\Users\NaumenkoP\.m2\repository\org\seleniumhq\selenium\selenium-leg-rc\2.52.0\selenium-leg-rc-2.52.0.jar;C:\Users\NaumenkoP\.m2\repository\org\yaml\snakeyaml\1.8\snakeyaml-1.8.jar;C:\Users\NaumenkoP\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\NaumenkoP\.m2\repository\org\testng\testng\6.8\testng-6.8.jar;C:\Users\NaumenkoP\.m2\repository\junit\junit\4.10\junit-4.10.jar;C:\Users\NaumenkoP\.m2\repository\org\hamcrest\hamcrest-core\1.1\hamcrest-core-1.1.jar;C:\Users\NaumenkoP\.m2\repository\org\beanshell\bsh\2.0b4\bsh-2.0b4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 15.0.4\plugins\testng\lib\jcommander.jar" com.intellij.rt.execution.application.AppMain org.testng.RemoteTestNGStarter -port 53111 -usedefaultlisteners false -socket53112 @w@C:\Users\NaumenkoP\AppData\Local\Temp\idea_working_dirs_testng1.tmp -temp C:\Users\NaumenkoP\AppData\Local\Temp\idea_testng1.tmp
[TestNG] Running:
  C:\Users\NaumenkoP\.IdeaIC15\system\temp-testng-customsuite.xml
мар 22, 2016 11:29:51 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://127.0.0.1:7055: No buffer space available (maximum connections reached?): connect
мар 22, 2016 11:29:51 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:7055
мар 22, 2016 11:29:51 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://127.0.0.1:7055: No buffer space available (maximum connections reached?): connect
мар 22, 2016 11:29:51 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:7055
мар 22, 2016 11:29:51 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://127.0.0.1:7055: No buffer space available (maximum connections reached?): connect
мар 22, 2016 11:29:52 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:7055
 
мар 22, 2016 11:29:52 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://127.0.0.1:7055: No buffer space available (maximum connections reached?): connect
мар 22, 2016 11:29:52 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:7055
мар 22, 2016 11:29:52 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://127.0.0.1:7055: No buffer space available (maximum connections reached?): connect
мар 22, 2016 11:29:52 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:7055
мар 22, 2016 11:29:52 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://127.0.0.1:7055: No buffer space available (maximum connections reached?): connect
мар 22, 2016 11:29:52 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:7055
 
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.52.0', revision: '4c2593cfc3689a7fcd7be52549167e5ccc93ad28', time: '2016-02-11 11:22:43'
System info: host: 'MSC-CO-WS416', ip: '172.31.4.108', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_73'
Driver info: driver.version: RemoteWebDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=41.0.2, platform=WINDOWS, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 375763ac-e5ec-4e87-8dd2-8b914242b3e8
 
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:577)
at main.Travelclick.waitForAjaxToFinish(Travelclick.java:40)
at main.Travelclick.<init>(Travelclick.java:24)
at main.AeroTab.<init>(AeroTab.java:13)
at main.AeroKoordinTest.aeroKoordinatorRoundtripSochiMocsowShedulerEconom(AeroKoordinTest.java:100)
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:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
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:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:122)
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:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:83)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.execute(NewProfileExtensionConnection.java:160)
at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:380)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
... 33 more
 
 
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.52.0', revision: '4c2593cfc3689a7fcd7be52549167e5ccc93ad28', time: '2016-02-11 11:22:43'
System info: host: 'MSC-CO-WS416', ip: '172.31.4.108', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_73'
Driver info: driver.version: RemoteWebDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=41.0.2, platform=WINDOWS, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 375763ac-e5ec-4e87-8dd2-8b914242b3e8
 
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:701)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:526)
at main.AeroKoordinTest.closeDriver(AeroKoordinTest.java:31)
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:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
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:786)
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:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:122)
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:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:83)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.execute(NewProfileExtensionConnection.java:160)
at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:380)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
... 33 more
 
 
===============================================
Default Suite
Total tests run: 8, Failures: 1, Skips: 0
Configuration Failures: 1, Skips: 0
===============================================
 
 
Process finished with exit code 0

Ожидание аяксов

21 марта 2016 - 10:37

public void waitForAjaxToFinish() {
long currentTime = System.currentTimeMillis();
while (System.currentTimeMillis() - currentTime < 40000) {
boolean ajaxFinished = (Boolean) ((JavascriptExecutor) driver)    /// в этой строке ошибка
.executeScript("return !!jQuery && jQuery.active == 0");
if (ajaxFinished)
return;
}

throw new AssertionError("Ajax haven't finished its job in 40 sec");
}

 

на этом методе падает тест  с такой ошибкой кто нить встречался с таким?

 

INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:44505: No buffer space available (maximum connections reached?): connect

 

 


Как выбрать нужный елемент

16 марта 2016 - 07:27

Делаю описание страницы и хочу сделать выбор типа документа универсальным, чтобы можно было выбирать всегда  radiobutton который начинается на ПН.
Выбирать 4(3)radiobutton вариант не подходит т.к. у разных пользователей разный порядок, хотелось бы как то реализовать поиск по части значения ПН в похожей ситуации ранее делал вот так(css = "input[id^='ЗП_']")
но там код другой был. 
 
<tbody class="passengerTbody">
           <tr style="line-height: 1.8">
               <td colspan="2" style="line-height: 1.4;">
                   <input type="checkbox" checked="checked" disabled="disabled" style="margin-bottom: 2px;">
                   Qualintinov V. A.
 
/ <span id="profileSelectedPassportNumber">999988877</span>
 
                   <br>
 
 
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" class="changepasspass" bookingid="31" profileid="69018985" docnumber="98789700879" name="passport6901898531">
ЗЗ: 98789700879<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" class="changepasspass" bookingid="31" profileid="69018985" docnumber="999988877" name="passport6901898531" checked="checked">
ЗП: 999988877<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" class="changepasspass" bookingid="31" profileid="69018985" docnumber="12541254125" name="passport6901898531">
ЗЗ: 12541254125<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" class="changepasspass" bookingid="31" profileid="69018985" docnumber="1231231231" name="passport6901898531">
ПН: 1231231231<br>
 
 
                   
<br>
 

Яндекс.Метрика
Реклама на портале