You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by HoangVo <th...@gmail.com> on 2013/08/20 11:39:03 UTC

Error when using Maven for test project. I need a help...

Hello,
Im very new to Maven (im researching it)
Im assigned to project that using maven.
I got the message when use command: Maven Test in eclipse.
Currently I don't know how to fix it :(
Can anybody help me? I really don't know the root cause....
I appreciate too much...
I comment main code to find why the bug happens but I have no idea.
The source code is very simple  (of course there are some heritances...)
------------------------------------------------------------------------------
import com.validant.e3.controls.ExtWebDriver;


public class TestBase {
	
	protected ExtWebDriver driver;
	protected UIMap uimap;
	
	@BeforeSuite
	public void beforeSuite(){
		System.out.println("Before Suite");
		driver = new ExtWebDriver();  // *<--- Error occurs when adding this
sentence*
		
	}
	
	@AfterSuite
	public void afterSuite() {
		System.out.println("After Suite");
	}
	
	@BeforeTest
	public void beforeTest()
    {		
		System.out.println("Before Test");		
    }  
    
   @AfterTest
   public void afterTest()
   {
	   System.out.println("After test");	  
   }
   
}
------------------------------------------------------------------------------
The error is:
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO]
------------------------------------------------------------------------
[INFO] Building enigma3 1.0
[INFO]
------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ e3
---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
D:\WORK\Workspace\Selenium_E3\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ e3 ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources
(default-testResources) @ e3 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
D:\WORK\Workspace\Selenium_E3\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
e3 ---
[INFO] Compiling 7 source files to
D:\WORK\Workspace\Selenium_E3\target\test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ enigma3 ---
[INFO] Surefire report directory:
D:\WORK\Workspace\Selenium_E3\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running TestSuite
Before Suite
Tests run: 6, Failures: 1, Errors: 0, Skipped: 5, Time elapsed: 0.441 sec
<<< FAILURE!

Results :

Failed tests: 
  beforeSuite(com.validant.enigma3.samples.HoangTest)

Tests run: 6, Failures: 1, Errors: 0, Skipped: 5

[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2.984s
[INFO] Finished at: Tue Aug 20 16:19:47 ICT 2013
[INFO] Final Memory: 15M/37M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.7.1:test (default-test) on
project E3: There are test failures.
[ERROR] 
[ERROR] Please refer to
D:\WORK\Workspace\Selenium_Enigma3\target\surefire-reports for the
individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

-------------------------------------------------------------------------------------------------------------


This is my 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>com.validant</groupId>
  <artifactId>e3</artifactId>
  <version>1.0</version>
  <packaging>jar</packaging>
  <name>e3</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <timestamp>${maven.build.timestamp}</timestamp>
   
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
    <ui.map.dir>ui.map</ui.map.dir>
    <test.suite.dir>test.suites</test.suite.dir>
    <test.report.dir>test.reports</test.report.dir>    
    <test.tool.dir>tools</test.tool.dir>    
  </properties>

  <dependencies>
	<dependency>
		<groupId>org.testng</groupId>
		<artifactId>testng</artifactId>
		<version>6.8.5</version>
	</dependency>
	<dependency>
        <groupId>org.uncommons</groupId>
        <artifactId>reportng</artifactId>
        <version>1.1.2</version>
        <exclusions>
            <exclusion>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
	    <groupId>com.google.inject</groupId>
	    <artifactId>guice</artifactId>
	    <version>3.0</version>	    
	</dependency>
	<dependency>
		<groupId>org.seleniumhq.selenium</groupId>
		<artifactId>selenium-java</artifactId>
		<version>2.33.0</version>
	</dependency>
	<dependency>
		<groupId>org.seleniumhq.selenium</groupId>
		<artifactId>selenium-server</artifactId>
		<version>2.33.0</version>
	</dependency>
	<dependency>
  	  <groupId>org.apache.poi</groupId>
  	  <artifactId>poi</artifactId>
   	  <version>3.8</version>
	</dependency>
  </dependencies>
    
  <build>
  	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-surefire-report-plugin</artifactId>
			<version>2.14.1</version>			
			<configuration>
				<reportsDirectory>${test.report.dir}/${timestamp}</reportsDirectory>
				<properties>
                    <property>
                        <name>usedefaultlisteners</name>
                        <value>false</value>
                    </property>
                    <property>
                        <name>listener</name>
                        
                       
<value>com.validant.enigma3.reports.ScreenshotHTMLReporter,
org.uncommons.reportng.JUnitXMLReporter</value>
                    </property>
                </properties>                
                
				<systemPropertyVariables>
				
<org.uncommons.reportng.escape-output>false</org.uncommons.reportng.escape-output>
					
					
					
					<test.browser>Chrome</test.browser>
					
					
    			
<test.baseurl>http://docs.sencha.com/extjs/4.2.1/extjs-build/examples</test.baseurl>

    				
    				<test.deftimeout>10</test.deftimeout>
    				
    				
    				<ui.map.file>${ui.map.dir}/UIMap.xls</ui.map.file>
    				
    			
<test.screenshot.dir>${test.report.dir}/${timestamp}</test.screenshot.dir>
    				
    					
            	
<webdriver.chrome.driver>${test.tool.dir}/chromedriver.exe</webdriver.chrome.driver>
            	
<webdriver.ie.driver>${test.tool.dir}/IEDriverServer.exe</webdriver.ie.driver>
        		</systemPropertyVariables>        		
				
				<suiteXmlFiles>
					<suiteXmlFile>${test.suite.dir}/HoangTest.xml</suiteXmlFile>
				</suiteXmlFiles>
				
			    
			    <skip>true</skip>          	
								
			</configuration>
			
			<executions>
				<execution>
					<phase>test</phase>
					<goals>
						<goal>report</goal>
					</goals>					
				</execution>
			</executions>			
		 </plugin>
		 
	</plugins>
	
  </build>
</project>





--
View this message in context: http://maven.40175.n5.nabble.com/Error-when-using-Maven-for-test-project-I-need-a-help-tp5768218.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error when using Maven for test project. I need a help...

Posted by HoangVo <th...@gmail.com>.
In my project,there is a TestBase class. All tests in the future will extend
from this class.
I have just created a basic test extends from that class. Then maven clean
install => Build success.
Next I  select maven test. It failed.

I try to debug backing up code from Test Base and add basic code to run and
It failed when I add some codes relating to testing. It passed with syso
only.

I will work on this project and maintain it. The problem is I dont know
where the issue from: my test or maven or report??? Actually code in test
very basic...

I hope receive more ideas about it.... :(

This is the real code in Test Base
=================================
package com.validant.enigma3.common;

import org.testng.Assert;
import org.testng.ITestContext;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Parameters;

import com.validant.enigma3.controls.ExtWebDriver;

public class TestBase {
	
	protected ExtWebDriver driver;
	protected UIMap uimap;
	
	@Parameters({Constants.PARAM_LOCAL_URL})
	@BeforeSuite(alwaysRun = true)
	public void beforeSuite(ITestContext context, String localurl){
		// get all UI controls
		try
		{
			uimap = new UIMap(Configuration.getUIMapFile(),
Utils.getClassName(this));
		
			//init web driver
			driver = new ExtWebDriver(localurl);
		
			// add driver into context. This is used for ScreenshotHTMLReporter
			context.setAttribute(Constants.CON_DRIVER_ATTR, driver.getWebDriver());
		}
		catch (Exception ex)
		{
			Assert.assertTrue(false, ex.getMessage());
		}
		
	}
	
	@AfterSuite
	public void afterSuite() {
		// do something
	}
	
	@BeforeTest
	public void beforeTest()
    {
		// launch the web application under test
    	driver.launch();
    	
    	// wait for the page loaded successfully
    	driver.waitForPageLoaded();
    }  
    
   @AfterTest
   public void afterTest()
   {
		// close browser
		driver.quit();   
   }
   
}
================================
This is my basic class test:

package com.validant.enigma3.samples;

import java.io.File;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.Test;

import com.validant.enigma3.common.TestBase;
import com.validant.enigma3.common.UIMap;

public class HoangTest extends TestBase{

	@Test
	public void myTest1()
	{
		System.out.println("START MY NEW TEST_01");
	}
	
	@Test
	public void myTest2()
	{
		System.out.println("START MY NEW TEST_02");
	}
}

=========================
And pom file is the same previous post

There is no report in this case. Just only report  pass cases and failed
cases that return assert false... (as i know from the author of this project
but she left... :(  )

Thank you
Hoang




--
View this message in context: http://maven.40175.n5.nabble.com/Error-when-using-Maven-for-test-project-I-need-a-help-tp5768218p5768310.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Error when using Maven for test project. I need a help...

Posted by Adrien Rivard <ad...@gmail.com>.
You probably should have a look to the surefire reports to see the output
of the tests and why it failed.

Reports are usually in target/surefire-reports but you seem to have its
location overriden in your pom.



On Tue, Aug 20, 2013 at 2:50 PM, Baptiste Mathus <ml...@batmat.net> wrote:

> Hi,
> From the output it seems more like you might actually have an issue with
> your tests, not with maven.
>
> Does this test also fail if you run mvn test from the command line at the
> root of that project?
>
> Cheers
> Le 20 août 2013 12:04, "HoangVo" <th...@gmail.com> a écrit :
>
> > Hello,
> > Im very new to Maven (im researching it)
> > Im assigned to project that using maven.
> > I got the message when use command: Maven Test in eclipse.
> > Currently I don't know how to fix it :(
> > Can anybody help me? I really don't know the root cause....
> > I appreciate too much...
> > I comment main code to find why the bug happens but I have no idea.
> > The source code is very simple  (of course there are some heritances...)
> >
> >
> ------------------------------------------------------------------------------
> > import com.validant.e3.controls.ExtWebDriver;
> >
> >
> > public class TestBase {
> >
> >         protected ExtWebDriver driver;
> >         protected UIMap uimap;
> >
> >         @BeforeSuite
> >         public void beforeSuite(){
> >                 System.out.println("Before Suite");
> >                 driver = new ExtWebDriver();  // *<--- Error occurs when
> > adding this
> > sentence*
> >
> >         }
> >
> >         @AfterSuite
> >         public void afterSuite() {
> >                 System.out.println("After Suite");
> >         }
> >
> >         @BeforeTest
> >         public void beforeTest()
> >     {
> >                 System.out.println("Before Test");
> >     }
> >
> >    @AfterTest
> >    public void afterTest()
> >    {
> >            System.out.println("After test");
> >    }
> >
> > }
> >
> >
> ------------------------------------------------------------------------------
> > The error is:
> > [INFO] Scanning for projects...
> > [INFO]
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Building enigma3 1.0
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO]
> > [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
> e3
> > ---
> > [INFO] Using 'UTF-8' encoding to copy filtered resources.
> > [INFO] skip non existing resourceDirectory
> > D:\WORK\Workspace\Selenium_E3\src\main\resources
> > [INFO]
> > [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ e3 ---
> > [INFO] Nothing to compile - all classes are up to date
> > [INFO]
> > [INFO] --- maven-resources-plugin:2.4.3:testResources
> > (default-testResources) @ e3 ---
> > [INFO] Using 'UTF-8' encoding to copy filtered resources.
> > [INFO] skip non existing resourceDirectory
> > D:\WORK\Workspace\Selenium_E3\src\test\resources
> > [INFO]
> > [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile)
> @
> > e3 ---
> > [INFO] Compiling 7 source files to
> > D:\WORK\Workspace\Selenium_E3\target\test-classes
> > [INFO]
> > [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ enigma3 ---
> > [INFO] Surefire report directory:
> > D:\WORK\Workspace\Selenium_E3\target\surefire-reports
> >
> > -------------------------------------------------------
> >  T E S T S
> > -------------------------------------------------------
> > Running TestSuite
> > Before Suite
> > Tests run: 6, Failures: 1, Errors: 0, Skipped: 5, Time elapsed: 0.441 sec
> > <<< FAILURE!
> >
> > Results :
> >
> > Failed tests:
> >   beforeSuite(com.validant.enigma3.samples.HoangTest)
> >
> > Tests run: 6, Failures: 1, Errors: 0, Skipped: 5
> >
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] BUILD FAILURE
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Total time: 2.984s
> > [INFO] Finished at: Tue Aug 20 16:19:47 ICT 2013
> > [INFO] Final Memory: 15M/37M
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] Failed to execute goal
> > org.apache.maven.plugins:maven-surefire-plugin:2.7.1:test (default-test)
> on
> > project E3: There are test failures.
> > [ERROR]
> > [ERROR] Please refer to
> > D:\WORK\Workspace\Selenium_Enigma3\target\surefire-reports for the
> > individual test results.
> > [ERROR] -> [Help 1]
> > [ERROR]
> > [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e
> > switch.
> > [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> > [ERROR]
> > [ERROR] For more information about the errors and possible solutions,
> > please
> > read the following articles:
> > [ERROR] [Help 1]
> > http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> >
> >
> >
> -------------------------------------------------------------------------------------------------------------
> >
> >
> > This is my 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>com.validant</groupId>
> >   <artifactId>e3</artifactId>
> >   <version>1.0</version>
> >   <packaging>jar</packaging>
> >   <name>e3</name>
> >   <url>http://maven.apache.org</url>
> >
> >   <properties>
> >     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> >     <timestamp>${maven.build.timestamp}</timestamp>
> >
> >
> <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
> >     <ui.map.dir>ui.map</ui.map.dir>
> >     <test.suite.dir>test.suites</test.suite.dir>
> >     <test.report.dir>test.reports</test.report.dir>
> >     <test.tool.dir>tools</test.tool.dir>
> >   </properties>
> >
> >   <dependencies>
> >         <dependency>
> >                 <groupId>org.testng</groupId>
> >                 <artifactId>testng</artifactId>
> >                 <version>6.8.5</version>
> >         </dependency>
> >         <dependency>
> >         <groupId>org.uncommons</groupId>
> >         <artifactId>reportng</artifactId>
> >         <version>1.1.2</version>
> >         <exclusions>
> >             <exclusion>
> >                 <groupId>org.testng</groupId>
> >                 <artifactId>testng</artifactId>
> >             </exclusion>
> >         </exclusions>
> >     </dependency>
> >     <dependency>
> >             <groupId>com.google.inject</groupId>
> >             <artifactId>guice</artifactId>
> >             <version>3.0</version>
> >         </dependency>
> >         <dependency>
> >                 <groupId>org.seleniumhq.selenium</groupId>
> >                 <artifactId>selenium-java</artifactId>
> >                 <version>2.33.0</version>
> >         </dependency>
> >         <dependency>
> >                 <groupId>org.seleniumhq.selenium</groupId>
> >                 <artifactId>selenium-server</artifactId>
> >                 <version>2.33.0</version>
> >         </dependency>
> >         <dependency>
> >           <groupId>org.apache.poi</groupId>
> >           <artifactId>poi</artifactId>
> >           <version>3.8</version>
> >         </dependency>
> >   </dependencies>
> >
> >   <build>
> >         <plugins>
> >                 <plugin>
> >                         <groupId>org.apache.maven.plugins</groupId>
> >
> > <artifactId>maven-surefire-report-plugin</artifactId>
> >                         <version>2.14.1</version>
> >                         <configuration>
> >
> > <reportsDirectory>${test.report.dir}/${timestamp}</reportsDirectory>
> >                                 <properties>
> >                     <property>
> >                         <name>usedefaultlisteners</name>
> >                         <value>false</value>
> >                     </property>
> >                     <property>
> >                         <name>listener</name>
> >
> >
> > <value>com.validant.enigma3.reports.ScreenshotHTMLReporter,
> > org.uncommons.reportng.JUnitXMLReporter</value>
> >                     </property>
> >                 </properties>
> >
> >                                 <systemPropertyVariables>
> >
> >
> >
> <org.uncommons.reportng.escape-output>false</org.uncommons.reportng.escape-output>
> >
> >
> >
> >
> <test.browser>Chrome</test.browser>
> >
> >
> >
> > <test.baseurl>http://docs.sencha.com/extjs/4.2.1/extjs-build/examples
> > </test.baseurl>
> >
> >
> >                                 <test.deftimeout>10</test.deftimeout>
> >
> >
> >
> > <ui.map.file>${ui.map.dir}/UIMap.xls</ui.map.file>
> >
> >
> >
> <test.screenshot.dir>${test.report.dir}/${timestamp}</test.screenshot.dir>
> >
> >
> >
> >
> >
> <webdriver.chrome.driver>${test.tool.dir}/chromedriver.exe</webdriver.chrome.driver>
> >
> >
> >
> <webdriver.ie.driver>${test.tool.dir}/IEDriverServer.exe</webdriver.ie.driver>
> >                         </systemPropertyVariables>
> >
> >                                 <suiteXmlFiles>
> >
> > <suiteXmlFile>${test.suite.dir}/HoangTest.xml</suiteXmlFile>
> >                                 </suiteXmlFiles>
> >
> >
> >                             <skip>true</skip>
> >
> >                         </configuration>
> >
> >                         <executions>
> >                                 <execution>
> >                                         <phase>test</phase>
> >                                         <goals>
> >                                                 <goal>report</goal>
> >                                         </goals>
> >                                 </execution>
> >                         </executions>
> >                  </plugin>
> >
> >         </plugins>
> >
> >   </build>
> > </project>
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://maven.40175.n5.nabble.com/Error-when-using-Maven-for-test-project-I-need-a-help-tp5768218.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>



-- 
Adrien Rivard

Re: Error when using Maven for test project. I need a help...

Posted by Baptiste Mathus <ml...@batmat.net>.
Hi,
>From the output it seems more like you might actually have an issue with
your tests, not with maven.

Does this test also fail if you run mvn test from the command line at the
root of that project?

Cheers
Le 20 août 2013 12:04, "HoangVo" <th...@gmail.com> a écrit :

> Hello,
> Im very new to Maven (im researching it)
> Im assigned to project that using maven.
> I got the message when use command: Maven Test in eclipse.
> Currently I don't know how to fix it :(
> Can anybody help me? I really don't know the root cause....
> I appreciate too much...
> I comment main code to find why the bug happens but I have no idea.
> The source code is very simple  (of course there are some heritances...)
>
> ------------------------------------------------------------------------------
> import com.validant.e3.controls.ExtWebDriver;
>
>
> public class TestBase {
>
>         protected ExtWebDriver driver;
>         protected UIMap uimap;
>
>         @BeforeSuite
>         public void beforeSuite(){
>                 System.out.println("Before Suite");
>                 driver = new ExtWebDriver();  // *<--- Error occurs when
> adding this
> sentence*
>
>         }
>
>         @AfterSuite
>         public void afterSuite() {
>                 System.out.println("After Suite");
>         }
>
>         @BeforeTest
>         public void beforeTest()
>     {
>                 System.out.println("Before Test");
>     }
>
>    @AfterTest
>    public void afterTest()
>    {
>            System.out.println("After test");
>    }
>
> }
>
> ------------------------------------------------------------------------------
> The error is:
> [INFO] Scanning for projects...
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building enigma3 1.0
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ e3
> ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> D:\WORK\Workspace\Selenium_E3\src\main\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ e3 ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources
> (default-testResources) @ e3 ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> D:\WORK\Workspace\Selenium_E3\src\test\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
> e3 ---
> [INFO] Compiling 7 source files to
> D:\WORK\Workspace\Selenium_E3\target\test-classes
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ enigma3 ---
> [INFO] Surefire report directory:
> D:\WORK\Workspace\Selenium_E3\target\surefire-reports
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running TestSuite
> Before Suite
> Tests run: 6, Failures: 1, Errors: 0, Skipped: 5, Time elapsed: 0.441 sec
> <<< FAILURE!
>
> Results :
>
> Failed tests:
>   beforeSuite(com.validant.enigma3.samples.HoangTest)
>
> Tests run: 6, Failures: 1, Errors: 0, Skipped: 5
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2.984s
> [INFO] Finished at: Tue Aug 20 16:19:47 ICT 2013
> [INFO] Final Memory: 15M/37M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.7.1:test (default-test) on
> project E3: There are test failures.
> [ERROR]
> [ERROR] Please refer to
> D:\WORK\Workspace\Selenium_Enigma3\target\surefire-reports for the
> individual test results.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>
>
> -------------------------------------------------------------------------------------------------------------
>
>
> This is my 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>com.validant</groupId>
>   <artifactId>e3</artifactId>
>   <version>1.0</version>
>   <packaging>jar</packaging>
>   <name>e3</name>
>   <url>http://maven.apache.org</url>
>
>   <properties>
>     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>     <timestamp>${maven.build.timestamp}</timestamp>
>
> <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
>     <ui.map.dir>ui.map</ui.map.dir>
>     <test.suite.dir>test.suites</test.suite.dir>
>     <test.report.dir>test.reports</test.report.dir>
>     <test.tool.dir>tools</test.tool.dir>
>   </properties>
>
>   <dependencies>
>         <dependency>
>                 <groupId>org.testng</groupId>
>                 <artifactId>testng</artifactId>
>                 <version>6.8.5</version>
>         </dependency>
>         <dependency>
>         <groupId>org.uncommons</groupId>
>         <artifactId>reportng</artifactId>
>         <version>1.1.2</version>
>         <exclusions>
>             <exclusion>
>                 <groupId>org.testng</groupId>
>                 <artifactId>testng</artifactId>
>             </exclusion>
>         </exclusions>
>     </dependency>
>     <dependency>
>             <groupId>com.google.inject</groupId>
>             <artifactId>guice</artifactId>
>             <version>3.0</version>
>         </dependency>
>         <dependency>
>                 <groupId>org.seleniumhq.selenium</groupId>
>                 <artifactId>selenium-java</artifactId>
>                 <version>2.33.0</version>
>         </dependency>
>         <dependency>
>                 <groupId>org.seleniumhq.selenium</groupId>
>                 <artifactId>selenium-server</artifactId>
>                 <version>2.33.0</version>
>         </dependency>
>         <dependency>
>           <groupId>org.apache.poi</groupId>
>           <artifactId>poi</artifactId>
>           <version>3.8</version>
>         </dependency>
>   </dependencies>
>
>   <build>
>         <plugins>
>                 <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>
> <artifactId>maven-surefire-report-plugin</artifactId>
>                         <version>2.14.1</version>
>                         <configuration>
>
> <reportsDirectory>${test.report.dir}/${timestamp}</reportsDirectory>
>                                 <properties>
>                     <property>
>                         <name>usedefaultlisteners</name>
>                         <value>false</value>
>                     </property>
>                     <property>
>                         <name>listener</name>
>
>
> <value>com.validant.enigma3.reports.ScreenshotHTMLReporter,
> org.uncommons.reportng.JUnitXMLReporter</value>
>                     </property>
>                 </properties>
>
>                                 <systemPropertyVariables>
>
>
> <org.uncommons.reportng.escape-output>false</org.uncommons.reportng.escape-output>
>
>
>
>                                         <test.browser>Chrome</test.browser>
>
>
>
> <test.baseurl>http://docs.sencha.com/extjs/4.2.1/extjs-build/examples
> </test.baseurl>
>
>
>                                 <test.deftimeout>10</test.deftimeout>
>
>
>
> <ui.map.file>${ui.map.dir}/UIMap.xls</ui.map.file>
>
>
> <test.screenshot.dir>${test.report.dir}/${timestamp}</test.screenshot.dir>
>
>
>
>
> <webdriver.chrome.driver>${test.tool.dir}/chromedriver.exe</webdriver.chrome.driver>
>
>
> <webdriver.ie.driver>${test.tool.dir}/IEDriverServer.exe</webdriver.ie.driver>
>                         </systemPropertyVariables>
>
>                                 <suiteXmlFiles>
>
> <suiteXmlFile>${test.suite.dir}/HoangTest.xml</suiteXmlFile>
>                                 </suiteXmlFiles>
>
>
>                             <skip>true</skip>
>
>                         </configuration>
>
>                         <executions>
>                                 <execution>
>                                         <phase>test</phase>
>                                         <goals>
>                                                 <goal>report</goal>
>                                         </goals>
>                                 </execution>
>                         </executions>
>                  </plugin>
>
>         </plugins>
>
>   </build>
> </project>
>
>
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Error-when-using-Maven-for-test-project-I-need-a-help-tp5768218.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>