Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
183 views
by The go-to Tester (218 points)

I am running a Maven Project from Jenkins. The project runs well from console. But it does not complete execution from Jenkins. In Jenkins Project build I have given-:

Execute windows batch command-:

cd /D E:\Sandeep\EclipseWorkspace\FirstDemo
mvn clean 
mvn test

The console output is

20:00:58 Started by timer
20:00:59 Building in workspace C:\Users\HOME\.jenkins\jobs\Hello world\workspace
20:00:59 [workspace] $ cmd /c call C:\Windows\TEMP\hudson9024727903801029734.bat
20:00:59 
20:00:59 C:\Users\HOME\.jenkins\jobs\Hello world\workspace>cd /D E:\Sandeep\EclipseWorkspace\FirstDemo 
20:00:59 
20:00:59 E:\Sandeep\EclipseWorkspace\FirstDemo>mvn clean  
20:01:13 [INFO] Scanning for projects...
20:01:14 [INFO]                                                                         
20:01:14 [INFO] ------------------------------------------------------------------------
20:01:14 [INFO] Building FirstDemo 0.0.1-SNAPSHOT
20:01:14 [INFO] ------------------------------------------------------------------------
20:01:14 [INFO] 
20:01:14 [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ FirstDemo ---
20:01:15 [INFO] Deleting E:\Sandeep\EclipseWorkspace\FirstDemo\target
20:01:15 [INFO] ------------------------------------------------------------------------
20:01:15 [INFO] BUILD SUCCESS
20:01:15 [INFO] ------------------------------------------------------------------------
20:01:15 [INFO] Total time: 1.685 s
20:01:15 [INFO] Finished at: 2017-02-05T20:01:15+05:30
20:01:15 [INFO] Final Memory: 4M/15M
20:01:15 [INFO] ------------------------------------------------------------------------
20:01:21 Finished: SUCCESS
Unfortunately it runs mvn clean but not mvn test. What is the problem?

1 Answer

0 like 0 dislike
by
selected by
 
Best answer

Your command looks good and it should work.

You can even try using

mvn clean test

That should work.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...