maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hemanth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SUREFIRE-1245) Unable to run TestNG tests using maven surefire plugin.
Date Sat, 21 May 2016 10:38:12 GMT

    [ https://issues.apache.org/jira/browse/SUREFIRE-1245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15294901#comment-15294901
] 

Hemanth commented on SUREFIRE-1245:
-----------------------------------

Here is the log for proof.

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ inhouse.NewStandardEcommerceTemplate
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 47 source files to /Users/hemanthsridhar/Projects/UnilogProjects/etna/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ inhouse.NewStandardEcommerceTemplate
---
[INFO] Surefire report directory: /Users/hemanthsridhar/Projects/UnilogProjects/etna/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
objc[503]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre/bin/java
and /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre/lib/libinstrument.dylib.
One of the two will be used. Which one is undefined.
Running TestSuite
[AppClassLoader@18b4aac2] warning javax.* types are not being woven because the weaver option
'-Xset:weaveJavaxPackages=true' has not been specified
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote
browser. It may have died.
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time:
'2016-03-15 10:43:46'
System info: host: 'Hemanths-MacBook-Pro.local', ip: '192.168.0.8', os.name: 'Mac OS X', os.arch:
'x86_64', os.version: '10.11.4', java.version: '1.8.0_77'
Driver info: driver.version: FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true,
version=46.0.1, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true,
locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true,
cssSelectorsEnabled=true}]
Session ID: e8c3769e-09e0-b440-9d3c-041e2856a2e2
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:701)
	at org.openqa.selenium.firefox.FirefoxDriver.getScreenshotAs(FirefoxDriver.java:341)
	at org.etna.maincontroller.MainController.saveScreenshot(MainController.java:239)
	at org.etna.maincontroller.MainController.run(MainController.java:227)
	at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:209)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.privateRun(TestRunner.java:782)
	at org.testng.TestRunner.run(TestRunner.java:632)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
	at org.testng.SuiteRunner.run(SuiteRunner.java:268)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
	at org.testng.TestNG.run(TestNG.java:1064)
	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:295)
	at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:90)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.net.SocketException: Bad file descriptor
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
	at org.apache.http.impl.conn.LoggingOutputStream.write(LoggingOutputStream.java:77)
	at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:126)
	at org.apache.http.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:138)
	at org.apache.http.impl.io.SessionOutputBufferImpl.flush(SessionOutputBufferImpl.java:146)
	at org.apache.http.impl.BHttpConnectionBase.doFlush(BHttpConnectionBase.java:177)
	at org.apache.http.impl.DefaultBHttpClientConnection.flush(DefaultBHttpClientConnection.java:185)
	at org.apache.http.impl.conn.CPoolProxy.flush(CPoolProxy.java:177)
	at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:240)
	at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:122)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
	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)
	... 27 more


> Unable to run TestNG tests using maven surefire plugin.
> -------------------------------------------------------
>
>                 Key: SUREFIRE-1245
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1245
>             Project: Maven Surefire
>          Issue Type: Bug
>            Reporter: Hemanth
>            Assignee: Tibor Digana
>            Priority: Blocker
>         Attachments: pom.xml, testng.xml
>
>
> I am having testng.xml with around 8 classes. The suite will be running fine but suddenly
stops working and gives me unreachable browser exception. The same tests finishes off its
execution using failsafe plugin like a charm, but my reporting tool is kind of dependent on
the surefire plugin. Running it by testng.xml(Right clicking and clicking on run as testng
suite is working fine as well). If there is any mistake that I have done in the pom.xml please
help me out as well. Please look into this issue.
> Here is a testng.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
> <suite name="EtnaTestSuite">
>  <listeners>
>         <listener class-name="org.etna.maincontroller.MainController"/>
>         <listener class-name="org.etna.utils.ReportGenerator"/>
>     </listeners>
>   <test name="EtnaTestAutomation">
>     <classes>
>     <class name="org.etna.modules.ShopByModuleTest"/>
>     <class name="org.etna.modules.APAModuleTest"/>
>     <class name="org.etna.modules.ProductListModuleTest"/>
>     <class name="org.etna.modules.LoginModuleTest"/>
>     <class name="org.etna.modules.MyCartModuleTest"/>
>     <class name="org.etna.modules.CategoryModuleTest"/>
>     <class name="org.etna.modules.ProductDetailsModuleTest"/>
>     <class name="org.etna.modules.SearchModuleTest"/>
>     <class name="org.etna.modules.HomePageModuleTest"/>
>    </classes> 
>   </test> <!-- Test -->
> </suite> <!-- Suite -->
>  <!--  -->
> Here is my pom.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <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>ETNA</groupId>
>     <artifactId>inhouse.NewStandardEcommerceTemplate</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <properties>
>     	<compiler.version>1.8</compiler.version>
>         <allure.version>1.5.0.RC2</allure.version>
>         <aspectj.version>1.8.5</aspectj.version>
>         <version.selenium>2.53.0</version.selenium>
>          <version.slf4j>1.7.7</version.slf4j>
>     </properties>
>     <name>ETNA</name>
>     <description>New standard ecommerce template</description>
>     <dependencies>
> 	 <dependency>
>     <groupId>com.fasterxml.jackson.core</groupId>
>     <artifactId>jackson-databind</artifactId>
>     <version>2.7.0</version>
>   </dependency>
>     
>     <dependency>
> 	<groupId>com.pojosontheweb</groupId>
> 	<artifactId>monte-repack</artifactId>
> 	<version>1.0</version>
> 	</dependency>
>     <dependency>
>   <groupId>org.testng</groupId>
>   <artifactId>testng</artifactId>
>   <version>6.9.10</version>
>   <scope>test</scope>
> </dependency>
>     
>     
>     <dependency>
> 	<groupId>com.jayway.restassured</groupId>
> 	<artifactId>rest-assured</artifactId>
> 	<version>2.9.0</version>
> 	</dependency>
>     <dependency>
>         <groupId>org.seleniumhq.selenium</groupId>
>         <artifactId>selenium-firefox-driver</artifactId>
>         <version>${version.selenium}</version>
>     </dependency>
>     
>  <!-- custom excelread library using apachePOI -->   
>     <dependency>
> 	<groupId>org.apache.poi</groupId>
> 	<artifactId>poi</artifactId>
> 	<version>3.13</version>
> </dependency>
>     
>     <dependency>
>     <groupId>org.apache.poi</groupId>
>     <artifactId>poi-ooxml</artifactId>
>     <version>3.13</version>
> </dependency>
> <dependency>
> 	<groupId>org.apache.poi</groupId>
> 	<artifactId>poi-ooxml-schemas</artifactId>
> 	<version>3.13</version>
> </dependency>
> <!-- zipturnaround -->
> 	<dependency>
> 	<groupId>org.zeroturnaround</groupId>
> 	<artifactId>zt-zip</artifactId>
> 	<version>1.7</version>
> 	</dependency>
>  <!-- java mail -->
>     <dependency>
> 	<groupId>javax.mail</groupId>
> 	<artifactId>mail</artifactId>
> 	<version>1.4.7</version>
> </dependency>
>             
>         <!-- Selenium and Drivers -->
>         <dependency>
>             <groupId>org.seleniumhq.selenium</groupId>
>             <artifactId>selenium-java</artifactId>
>             <version>${version.selenium}</version>
>             <scope>test</scope>
>         </dependency>
>         
>         <dependency>
> 	<groupId>org.seleniumhq.selenium</groupId>
> 	<artifactId>selenium-server</artifactId>
> 	<version>${version.selenium}</version>
> </dependency>
>         
>         
>         <dependency>
>             <groupId>ru.yandex.qatools.allure</groupId>
>             <artifactId>allure-testng-adaptor</artifactId>
>             <version>${allure.version}</version>
>             <exclusions>
>                 <exclusion>
>                     <groupId>junit</groupId>
>                     <artifactId>junit</artifactId>
>                 </exclusion>
>             </exclusions>
>         </dependency>
>  
>         <dependency>
>             <groupId>org.hamcrest</groupId>
>             <artifactId>hamcrest-all</artifactId>
>             <version>1.3</version>
>         </dependency>
>         
>          <dependency>
> 	<groupId>com.google.code.gson</groupId>
> 	<artifactId>gson</artifactId>
> 	<version>2.3.1</version>
> 	</dependency>
> 	
> 	 <dependency>
>             <groupId>org.slf4j</groupId>
>             <artifactId>slf4j-api</artifactId>
>             <version>${version.slf4j}</version>
>             <scope>test</scope>
>         </dependency>
>         
>         <dependency>
>             <groupId>org.slf4j</groupId>
>             <artifactId>slf4j-log4j12</artifactId>
>             <version>${version.slf4j}</version>
>             <scope>test</scope>
>         </dependency>
>         
>         <dependency>
>             <groupId>org.slf4j</groupId>
>             <artifactId>jul-to-slf4j</artifactId>
>             <version>${version.slf4j}</version>
>             <scope>test</scope>
>         </dependency>
>         
>         <dependency>
>             <groupId>org.slf4j</groupId>
>             <artifactId>jcl-over-slf4j</artifactId>
>             <version>${version.slf4j}</version>
>             <scope>test</scope>
>         </dependency>
>         
>     </dependencies>
>     <build>
>         <plugins>
>         	
>         	<plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <version>3.1</version>
>                 <configuration>
>                     <source>${compiler.version}</source>
>                     <target>${compiler.version}</target>
>                 </configuration>
>             </plugin>
>             	
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <version>2.19.1</version>
>                 <configuration>
>                   <suiteXmlFiles>
>            		 <suiteXmlFile>testng.xml</suiteXmlFile>
>          		 </suiteXmlFiles>
>                     <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>
>             <!--Needed only to show reports locally. Run jetty:run and
>             open localhost:8080 to show the report-->
>             <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.5</version>
>                   <configuration>
>                     <reportVersion>${allure.version}</reportVersion>
>                 </configuration>
>             </plugin>
>         </plugins>
>     </reporting>
> </project>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message