gauge icon indicating copy to clipboard operation
gauge copied to clipboard

Azure pipeline execution issues on cloud agent machine, Cannot run program "gauge": CreateProcess error=2, The system cannot find the file specified

Open hcsan opened this issue 4 years ago • 1 comments

Describe the bug Hi Team ,

I have followed azure documentation and tried to execute the scripts on Azure pipeline i am getting

Gauge Java with selenium

first time it worked fine , all cloud agent/machines are non persistent Script executing on Azure cloud, i will get the below error .

Same configuration will work fine on Remote agent which is hosted locally ( Where i have setup the gauge path in system environment path variable )

I tied to get the path , set the gauge path nothing worked , tried to set the env variable at the execution time

[ERROR] Failed to execute goal com.thoughtworks.gauge.maven:gauge-maven-plugin:1.4.3:execute (default-cli) on project My-test-automation: Gauge Specs execution failed. java.io.IOException: Cannot run program "gauge": CreateProcess error=2, The system cannot find the file specified -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.thoughtworks.gauge.maven:gauge-maven-plugin:1.4.3:execute (default-cli) on project swoop-test-automation: Gauge Specs execution failed. java.io.IOException: Cannot run program "gauge": CreateProcess error=2, The system cannot find the file specified at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)

at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

[ERROR] [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

To Reproduce Steps (or project) to reproduce the behavior:

pool: vmImage: 'vs2017-win2016'

steps:

  • task: NodeTool@0 inputs: versionSpec: '10.x'

  • powershell: | echo installing gauge npm install -g @getgauge/cli displayName: 'install gauge'

  • powershell: | echo starting gauge test gauge run specs displayName: 'gauge test'

mvn -X -e test-compile gauge:execute -DspecsDir=specs/mytest -Denv="win_chrome" -Dtags="4" -Dflags="--max-retries-count=2,--verbose,--strategy=eager"

hcsan avatar Jul 09 '21 22:07 hcsan

can you try running gauge -v as a command before invoking mvn? The error seems to suggest that mvn is not able to locate gauge binary.

sriv avatar Jul 13 '21 16:07 sriv