maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hemanth (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SUREFIRE-1245) Unable to run testng tests using surefire plugin
Date Wed, 04 May 2016 06:46:12 GMT
Hemanth created SUREFIRE-1245:
---------------------------------

             Summary: Unable to run testng tests using surefire plugin
                 Key: SUREFIRE-1245
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1245
             Project: Maven Surefire
          Issue Type: Bug
            Reporter: Hemanth
            Priority: Blocker


I am having testng.xml with around 8 classes. The suite will be running fine but suddenly
stops working and gives me unhandled 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