How to execute testng Scuite from pom.xml using maven surefire pluggin

Hiii Frnds :-)

I have completed framework but m unable to run the framework using my pom.xml….if i reun with testng.xml i can execute all the tests….

inorder to exceute testng scuite from Pom.xml,i have done below procedur but still m not able to execute …plz do help me soon

i have added all the test classes in testng.xml n created testng scuite as below
==>testng.xml
<classes>
<class name=”com.actitimeTests.LoginLogoutTest”/>
<class name=”com.actitimeTests.CreateNewTaskTest”/>
<class name=”com.actitimeTests.CreateNewBillingTest”/>
</classes>

and using surefire i have added pluggin also …see below
==>pom.xml
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<suitexmlfiles>
<suitexmlfile>testng.xml</suitexmlfile>
</suitexmlfiles>
</configuration>
</plugin>
</plugins>

next RunAs====> maven test

after performing these steps also m not able to run pom.xml

PLz do help me

Pradeep Train Asked on December 17, 2014 in Selenium WebDriver.

Hi Pradeep,

Can you post whats the error in your IDE? We will be able to help you if you can post the error logs here. Thanks

on December 18, 2014.

Here s my Exception:

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 Pradeep 0.0.1-SNAPSHOT
[INFO] ————————————————————————
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom (5 KB at 5.9 KB/sec)
[INFO]
[INFO] — maven-resources-plugin:2.5:resources (default-resources) @ Pradeep —
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ Pradeep —
[INFO] Nothing to compile – all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.5:testResources (default-testResources) @ Pradeep —
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] — maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ Pradeep —
[INFO] Nothing to compile – all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.17:test (default-test) @ Pradeep —
[WARNING] The POM for org.apache.maven:maven-plugin-api:jar:2.0.9 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.surefire:maven-surefire-common:jar:2.17 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.surefire:surefire-api:jar:2.17 is missing, no dependency information available
[WARNING] The POM for org.apache.maven:maven-toolchain:jar:2.0.9 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2 is missing, no dependency information available
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 3.924s
[INFO] Finished at: Thu Dec 18 18:42:11 IST 2014
[INFO] Final Memory: 6M/15M
[INFO] ————————————————————————
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project Pradeep: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.17 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven.surefire:maven-surefire-common:jar:2.17, org.apache.maven.surefire:surefire-api:jar:2.17, org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2, org.codehaus.plexus:plexus-utils:jar:1.1: Failure to find org.apache.maven.surefire:maven-surefire-common:jar:2.17 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/PluginResolutionException

on December 18, 2014.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.