maven 2 - Jenkin not able to pick Test cases -


i using maven project testng, project contains 1 testcase enter image description here

when run maven manually using cmd, test suite gets executed properly. mvn test -e

i dont errors when manually.

i have configured jenkins maven project. have correctly configured maven & jdk. have correctly passed path pom.xml goal: test -e

jenkins somehow not able run test case. doesn't find test cases.

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>jenkin_demo_project</groupid>   <artifactid>jenkin_demo_project</artifactid>   <version>0.0.1-snapshot</version>   <build>     <sourcedirectory>src</sourcedirectory>     <plugins>       <plugin>         <artifactid>maven-compiler-plugin</artifactid>         <version>3.5.1</version>         <configuration>           <source>1.8</source>           <target>1.8</target>         </configuration>       </plugin>       <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-surefire-plugin</artifactid>                 <version>2.14</version>                 <configuration>                 <suitexmlfiles>                <suitexmlfile>testng.xml</suitexmlfile>           </suitexmlfiles>                     <testfailureignore>false</testfailureignore>                     <systemproperties>                         <property>                             <name>listener</name>                             <value>ru.yandex.qatools.allure.testng.alluretestlistener</value>                         </property>                     </systemproperties>                 </configuration>                 </plugin>     </plugins>   </build>   <dependencies>      <dependency>       <groupid>io.appium</groupid>       <artifactid>java-client</artifactid>       <version>3.3.0</version>       <scope>compile</scope>     </dependency>     <dependency>       <groupid>org.seleniumhq.selenium</groupid>       <artifactid>selenium-java</artifactid>       <version>2.48.2</version>       <scope>compile</scope>     </dependency>     <dependency>         <groupid>org.testng</groupid>         <artifactid>testng</artifactid>         <version>6.9.10</version>     </dependency>   </dependencies> </project> 

testng.xml:

<!doctype suite system "http://testng.org/testng-1.0.dtd"> <suite name="example test run">   <test name="starttest">     <classes>       <class name="testcase.startapplication"/>       </classes>   </test> </suite> 

please tell me missing, why jenkin's not able pick test case, though manually working fine. have jenkins installed on local system. image of jenkin project : enter image description here

jenkins console output :

started user neha1 building in workspace c:\program files (x86)\jenkins\workspace\gitmavenproject  > c:\program files (x86)\git\cmd\git.exe rev-parse --is-inside-work-tree # timeout=10 fetching changes remote git repository  > c:\program files (x86)\git\cmd\git.exe config remote.origin.url https://github.com/nehabedi/repo1.git # timeout=10 fetching upstream changes https://github.com/nehabedi/repo1.git  > c:\program files (x86)\git\cmd\git.exe --version # timeout=10 setting http proxy: 172.18.65.22:80  > c:\program files (x86)\git\cmd\git.exe -c core.askpass=true fetch --tags --progress https://github.com/nehabedi/repo1.git +refs/heads/*:refs/remotes/origin/*  > c:\program files (x86)\git\cmd\git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10  > c:\program files (x86)\git\cmd\git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10 checking out revision c63d32391414a2a8368c74fb34733fafc66fc5f6 (refs/remotes/origin/master)  > c:\program files (x86)\git\cmd\git.exe config core.sparsecheckout # timeout=10  > c:\program files (x86)\git\cmd\git.exe checkout -f c63d32391414a2a8368c74fb34733fafc66fc5f6  > c:\program files (x86)\git\cmd\git.exe rev-list c63d32391414a2a8368c74fb34733fafc66fc5f6 # timeout=10 parsing poms [jenkin_demo_project] $ "c:\program files\java\jdk1.8.0_74/bin/java" -cp "c:\program files (x86)\jenkins\plugins\maven-plugin\web-inf\lib\maven31-agent-1.5.jar;d:\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;d:\apache-maven-3.2.5/conf/logging" jenkins.maven3.agent.maven31main d:\apache-maven-3.2.5 "c:\program files (x86)\jenkins\war\web-inf\lib\remoting-2.53.3.jar" "c:\program files (x86)\jenkins\plugins\maven-plugin\web-inf\lib\maven31-interceptor-1.5.jar" "c:\program files (x86)\jenkins\plugins\maven-plugin\web-inf\lib\maven3-interceptor-commons-1.5.jar" 52804 <===[jenkins remoting capacity]===>channel started executing maven:  -b -f c:\program files (x86)\jenkins\workspace\gitmavenproject\jenkin_demo_project\pom.xml clean test [info] scanning projects... [info]                                                                          [info] ------------------------------------------------------------------------ [info] building jenkin_demo_project 0.0.1-snapshot [info] ------------------------------------------------------------------------ [info]  [info] --- maven-clean-plugin:2.5:clean (default-clean) @ jenkin_demo_project --- [info] deleting c:\program files (x86)\jenkins\workspace\gitmavenproject\jenkin_demo_project\target [info]  [info] --- maven-resources-plugin:2.6:resources (default-resources) @ jenkin_demo_project --- [warning] using platform encoding (cp1252 actually) copy filtered resources, i.e. build platform dependent! [info] skip non existing resourcedirectory c:\program files (x86)\jenkins\workspace\gitmavenproject\jenkin_demo_project\src\main\resources [info]  [info] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ jenkin_demo_project --- [info] changes detected - recompiling module! [warning] file encoding has not been set, using platform encoding cp1252, i.e. build platform dependent! [info] compiling 1 source file c:\program files (x86)\jenkins\workspace\gitmavenproject\jenkin_demo_project\target\classes [info]  [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ jenkin_demo_project --- [warning] using platform encoding (cp1252 actually) copy filtered resources, i.e. build platform dependent! [info] skip non existing resourcedirectory c:\program files (x86)\jenkins\workspace\gitmavenproject\jenkin_demo_project\src\test\resources [info]  [info] --- maven-compiler-plugin:3.5.1:testcompile (default-testcompile) @ jenkin_demo_project --- [info] no sources compile [info]  [info] --- maven-surefire-plugin:2.14:test (default-test) @ jenkin_demo_project --- [info] no tests run. [info] surefire report directory: c:\program files (x86)\jenkins\workspace\gitmavenproject\jenkin_demo_project\target\surefire-reports  -------------------------------------------------------  t e s t s -------------------------------------------------------  results :  tests run: 0, failures: 0, errors: 0, skipped: 0 

at glance looks oke. wondering, location of testng.xml right? try scope of testng dependency test,

<dependency>   <groupid>org.testng</groupid>   <artifactid>testng</artifactid>   <version>6.9.10</version>   <test> </dependency> 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -