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

Tibor Digana commented on SUREFIRE-1245:
----------------------------------------

[~hemanth.BS]

Both plugins _failsafe_ and _surefire_ are from the same project.
So I am wondering that one hangs and the other does not.
The next strange thing is that you however use _testng.xml_ but this suite has 
one test class and the intermediate process when the methods are running are 
controlled by TestNG and not by Surefire. Our plugins only wait for the 
testng.xml done.
So for me the interesting would be to see inside the stacktrace and this class 
but I could not find it anymore:
at org.etna.maincontroller.MainController.run(MainController.java:227)

What about to make another try and remove listeners and keep using only
_class name="org.etna.modules.ShopByBrandsModuleTest"/>_
Would it make any difference?

> 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)

Reply via email to