Respected Sir,
Thanks you so much for guiding in selenium. I am facing this issue since I try to mavenised a java project. When I run the mvn clean it works , but mvn test shows following error SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building my-app 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ my-app --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Biswajit Data\Backup\Date Wise Task\Nov\21st_Nov\Projects\sample projects\Sample1\Workspace\EWZ\my-app\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ my-app --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ my-app --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Biswajit Data\Backup\Date Wise Task\Nov\21st_Nov\Projects\sample projects\Sample1\Workspace\EWZ\my-app\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ my-app --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [INFO] Compiling 1 source file to C:\Biswajit Data\Backup\Date Wise Task\Nov\21st_Nov\Projects\sample projects\Sample1\Workspace\EWZ\my-app\target\test-classes [INFO] [INFO] --- maven-surefire-plugin:2.4.2:test (default-test) @ my-app --- [INFO] Surefire report directory: C:\Biswajit Data\Backup\Date Wise Task\Nov\21st_Nov\Projects\sample projects\Sample1\Workspace\EWZ\my-app\target\surefire-reports org.apache.maven.surefire.booter.SurefireExecutionException: Suite file C:\Biswajit Data\Backup\Date Wise Task\Nov\21st_Nov\Projects\sample projects\Sample1\Workspace\EWZ\my-app\testng.xml is not a valid file; nested exception is org.apache.maven.surefire.testset.TestSetFailedException: Suite file C:\Biswajit Data\Backup\Date Wise Task\Nov\21st_Nov\Projects\sample projects\Sample1\Workspace\EWZ\my-app\testng.xml is not a valid file org.apache.maven.surefire.testset.TestSetFailedException: Suite file C:\Biswajit Data\Backup\Date Wise Task\Nov\21st_Nov\Projects\sample projects\Sample1\Workspace\EWZ\my-app\testng.xml is not a valid file at org.apache.maven.surefire.testng.TestNGXmlTestSuite.locateTestSets(TestNGXmlTestSuite.java:129) at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209) at org.apache.maven.surefire.Surefire.run(Surefire.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.730s [INFO] Finished at: Mon Jan 06 12:12:15 IST 2014 [INFO] Final Memory: 15M/179M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.4.2:test (default-test) on project my-app: There are test failures. [ERROR] [ERROR] Please refer to C:\Biswajit Data\Backup\Date Wise Task\Nov\21st_Nov\Projects\sample projects\Sample1\Workspace\EWZ\my-app\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 file:- <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.EWZ</groupId> <artifactId>EWZ</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>EWZ</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-server</artifactId> <version>2.26.0</version> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.3.1</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.4.2</version> <configuration> <suiteXmlFiles> <suiteXmlFile>testng.xml</suiteXmlFile> <forkMode>always</forkMode> </suiteXmlFiles> </configuration> </plugin> </plugins> </build> </project> Now my testNg.xml file:- <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="EWZ Test" verbose="3" parallel="tests"> <test name="Test"> <classes> <class name="com.EWZWebdriver" /> </classes> </test> </suite> I have prepared this after following the videos and some copy and paste. I know there are errors.. I googled it for a more then 10 days, but no result.. watched the videos for mavenised (6th) every day .. still unable to solve this.. Thanks in advance .. |
Right click on project and Go to Maven->Update project.It worked for me for same type of error.Try at your end also.
|
Hi,
Thanks for the response, and sorry for the delay .. but the same error persisting. When I try to run a small application through maven, it is working fine, and there is an error showing for FF browser. when I run the same maven application with chrome or any browser except FF, it works fine..and when I use the same pom.xml file for my large application it stops. I do not know the reason.. may be the I do not have proper guidance in Maven.. but I try my best to solve it. Thanks again for your response |
Free forum by Nabble | Edit this page |