help needed in cucumber with Jenkins

265 views
Skip to first unread message

Vino Maddy

unread,
Sep 27, 2016, 2:12:09 PM9/27/16
to Cukes
Hi,

I am trying to integrate my cucumber project with Jenkins but i didn't succeed in it. can you please help me with the same.
 
Ran the jenkins.war locally
Created a Jenkins job.
Gave the SVN URL to pull the cucumber project.
Used invoke top level maven target 
      Goal - mvn test 
      POM - Pom.xml
save.

this shows the below error.

[Cukes] $ cmd.exe /C "C:\Project\automation\apache-maven-3.3.9-bin\bin\mvn.cmd -f pom.xml mvn test && exit %%ERRORLEVEL%%"

[INFO] Scanning for projects...

[INFO]                                                                        

[INFO] ------------------------------------------------------------------------

[INFO] Building om 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.080 s

[INFO] Finished at: 2016-09-27T23:38:49+05:30 [INFO] Final Memory: 6M/245M [INFO] ------------------------------------------------------------------------

[ERROR] Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/LifecyclePhaseNotFoundException

Build step 'Invoke top-level Maven targets' marked build as failure [CucumberReportPublisher] Compiling Cucumber Reports ...

[CucumberReportPublisher] Copying all json files from: <http://localhost:8080/job/Cukes/ws/> to reports directory: C:\Users\vinothkannan\.jenkins\jobs\Cukes\builds\7

[CucumberReportPublisher] Found 0 json files:











But when give "Clean " in the Goal region the build is sucess though it wont run any test.

 

Thomas Sundberg

unread,
Sep 27, 2016, 3:49:29 PM9/27/16
to cu...@googlegroups.com
Hi


On Tuesday, 27 September 2016, Vino Maddy <vinom...@gmail.com> wrote:
Hi,

I am trying to integrate my cucumber project with Jenkins but i didn't succeed in it. can you please help me with the same.
 
Ran the jenkins.war locally
Created a Jenkins job.
Gave the SVN URL to pull the cucumber project.
Used invoke top level maven target 
      Goal - mvn test 
      POM - Pom.xml
save.

this shows the below error.


Don't specify 

mvn test

Specify 

test

You have species a Maven job and therefore you don't have to specify mvn, it is default for your job.
 

HTH
Thomas

[Cukes] $ cmd.exe /C "C:\Project\automation\apache-maven-3.3.9-bin\bin\mvn.cmd -f pom.xml mvn test && exit %%ERRORLEVEL%%"

[INFO] Scanning for projects...

[INFO]                                                                        

[INFO] ------------------------------------------------------------------------

[INFO] Building om 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.080 s

[INFO] Finished at: 2016-09-27T23:38:49+05:30 [INFO] Final Memory: 6M/245M [INFO] ------------------------------------------------------------------------

[ERROR] Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/LifecyclePhaseNotFoundException

Build step 'Invoke top-level Maven targets' marked build as failure [CucumberReportPublisher] Compiling Cucumber Reports ...

[CucumberReportPublisher] Copying all json files from: <http://localhost:8080/job/Cukes/ws/> to reports directory: C:\Users\vinothkannan\.jenkins\jobs\Cukes\builds\7

[CucumberReportPublisher] Found 0 json files:











But when give "Clean " in the Goal region the build is sucess though it wont run any test.

 

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://www.thinkcode.se/blog
Twitter: @thomassundberg

Better software through faster feedback

Vino Maddy

unread,
Sep 28, 2016, 9:51:47 AM9/28/16
to Cukes
thanks it worked for me,

i gave test and it worked for me. 

When i click on Cumber reports its not showing any graphs and results.

it shows there are no features in your project.
but i do have features, below is the console output.

Running com.selcukesfw.stepimplementations.RunCukesTest
Feature: APM login - Mars
Started InternetExplorerDriver server (32-bit)
2.53.0.0
Listening on port 15788
Only local connections are allowed

  #
  @CreateAppOME
  Scenario: create a Smallbusiness application in OME      [90m# src/test/resources/login.feature:81 [0m
     [31mGiven  [0m [31mI create a OME application with the below table [0m  [90m# CreateApplication.I_Create_OMEE_Application(DataTable) [0m
       [31morg.openqa.selenium.NoSuchElementException: Unable to find element with id == wtUserNameInput (WARNING: The server did not provide any stacktrace information)

I have attached the screenshot of the same
Capture.PNG

Vinoth Kannan

unread,
Sep 28, 2016, 1:53:32 PM9/28/16
to Cukes
Not sure where I am going wrong, I searched cucumber under available plugin and installed all the ones available..
Reply all
Reply to author
Forward
0 new messages