Closed natkrish closed 6 years ago
@natkrish Please re-run using the -X switch to enable full debug logging mvn test -X
and share any error messages or stack trace from the console output.
Can you run gauge -v
as part of your build to see if gauge
command is available to the Jenkins user.
It would be great if you could share logs present in logs
directory after the rerun.
@kashishm Here you go.... Attached
@natkrish Logs also don't have any error messages/stack trace. This usually happens when gauge
command is not available to the user or the user doesn't have permission to access $HOME/.gauge/
folder.
@kashishm when you say 'user' i believe you mean the user as 'jenkins' because when you run it on jenkins - i suppose it will have to be the jenkins user. Is there any troubleshooting that I can do to find out the actual problem itself? I have been really struggling without able to run tests for about a week. Hence asking
I have also attached the permissions as per from Jenkins in the attached file. Can you please take a look and let me know if anything is missing? gauge permissions.txt
@natkrish Can you try running gauge specs
instead of mvn test
in your build. The command will fail because of dependencies not found. But it might give us some info on any permission related issue.
@natkrish Don't use maven to execute. Just run the following command in Jenkins task instead of maven task
gauge specs/preprod/preprodecalgo.spec
@natkrish The output has the error message gauge: command not found
. Please make sure that the gauge
command and the updated $PATH
env var is available to the Jenkins user.
@kashishm I have double triple checked the jenkins box and I can see that it has all the user permission thats required for gauge to run. Is there anything that I can do to resolve this issue? Its been while that I cant run one single test since the upgrade. I am not sure whether other users within the community are having this issue. Can you please investigate?
This issue is happening even when I run the specs on your site's template projects. gauge --install java_maven_selenium when you run mvn gauge:execute on local - it works fine. however when you run the same on jenkins you get an error.
@natkrish you can print PATH
environment variable in the Jenkins job and see if gauge
is available in that.
Closing as stale, feel free to comment if the issue persists.
I have been running gauge specs on Jenkins. But after the upgrade to the latest version which is 0.8.3
Expected behavior
Tests should run successfully without any issues. This started to happen after the upgrade.
Actual behavior
I get the following error
T E S T S
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results[INFO] [INFO] --- gauge-maven-plugin:1.2.0:execute (default) @ gauge-test ---
specs/dev/devecalgo.spec [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.721 s [INFO] Finished at: 2017-04-19T10:59:02+01:00 [INFO] Final Memory: 27M/336M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.thoughtworks.gauge.maven:gauge-maven-plugin:1.2.0:execute (default) on project gauge-test: Gauge Specs execution failed -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.thoughtworks.gauge.maven:gauge-maven-plugin:1.2.0:execute (default) on project gauge-test: Gauge Specs execution failed at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.jvnet.hudson.maven3.launcher.Maven33Launcher.main(Maven33Launcher.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238) at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.maven.Maven3Builder.call(Maven3Builder.java:139) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.maven.plugin.MojoFailureException: Gauge Specs execution failed at com.thoughtworks.gauge.maven.GaugeExecutionMojo.execute(GaugeExecutionMojo.java:108) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 31 more [ERROR] [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 [JENKINS] Archiving /opt/jenkins2/jobs/test gauge/workspace/pom.xml to com.krish/gauge-test/1.0-SNAPSHOT/gauge-test-1.0-SNAPSHOT.pom channel stopped [htmlpublisher] Archiving HTML reports... [htmlpublisher] Archiving at PROJECT level /opt/jenkins2/jobs/test gauge/workspace/reports/html-report to /opt/jenkins2/jobs/test gauge/htmlreports/HTML_Report Finished: FAILURE
POM file
<?xml version="1.0" encoding="UTF-8"?> <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">
Steps to reproduce
Gauge version
$ gauge -v Gauge version: 0.8.3
Plugins
csharp (0.10.0) html-report (3.1.0) java (0.6.2) ruby (0.4.0) spectacle (0.1.1) xml-report (0.2.0)