Problem with triggering Gauge tests from GoCD

146 views
Skip to first unread message

Michael Pauli

unread,
Aug 3, 2016, 11:30:23 AM8/3/16
to go-cd
Hi!

I have a problem with the triggering of Gauge tests from GoCD.

My GoCD (Go Version: 16.7.0) Machine is a Mac OSX 10.11.6 with one Go Server and two Go Agents.
The following versions auf Gauge/Plugins are installed on this machine:
Gauge version: 0.6.1
Plugins
-------
html-report (2.1.1)
java (0.5.0)

The task is a custom command that start a .sh file in the root of the project. Inside the script is only the command mvn gauge:execute -DspecsDir=specs -Denv="ci" (ci is my user.propertie under env/ci beside the default folder).

If I trigger now GoCD to build the test, I get the following error for all of my steps/specs:
[ValidationError] /Users/admin/Library/Application Support/Go Agent/pipelines/GaugeTests/specs/xxx.spec:11: Step implementation not found => '...'

I'm asking the question here and not in the Gauge Group cause if I run the test with the same .sh file on my local machine (via Selenium Grid) with the same Gauge/Plugin versions, every test works fine. I also have no problems with GoCD and Selenium tests, JMeter tests and RestAssured tests.

I'm new to GoCD so it could also be, that the bug sits in front of the display ;-)

Thanks and cheers,
michael

Michael Pauli

unread,
Aug 22, 2016, 5:46:11 AM8/22/16
to go-cd
No idea at all, that could help me with my problem?

Cheers,
michael

Ketan Padegaonkar

unread,
Aug 22, 2016, 5:59:51 AM8/22/16
to go-cd
Could you provide us the contents of the `<exec/>` task xml?

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Pauli

unread,
Aug 22, 2016, 8:46:36 AM8/22/16
to go-cd
Hi Ketan!

Thanks for the response!

Here is the xml part:
<exec command="sh">
                <arg>semigator_GaugeTests_ci.sh</arg>
                <runif status="any" />
</exec>

Michael Pauli

unread,
Aug 24, 2016, 4:54:20 AM8/24/16
to go-cd

Hi again,


I’ve tried  to check out a lot of things, like the gauge installation or the java plugin on the gocd server. Everything is there and should work like wished. I’ve triggered the tests from my local machine with the bash script. Also the one, that is used by gocd (With Selenium Grid on a test VM). I’ve also checked the files in the Go agent pipelines on the go sever…everything was there and at the same place like locally. But still the same problem: The specs could not find the step implementations. Only running on the gocd server.


I have absolutely no idea anymore…


Cheers,

michael

Ketan Padegaonkar

unread,
Aug 24, 2016, 5:16:40 AM8/24/16
to go-cd
Michael,

Can login into the go agent and run the same command as the user that runs the go agent process? If it still continues to fail, you should probably consider adding the `env` command to your shell script to see if there's any missing environment variables that gauge depends on.

Michael Pauli

unread,
Aug 25, 2016, 5:21:33 AM8/25/16
to go-cd
Hi Ketan,

the problem also appears, if I run the script on the go agent. What does you mean exactly with the env command? I already use the -Denv=ci in my script. I do not get any errors about the environment variables. Here is the terminal output:

11:13:05.464 [go] setting environment variable 'GO_SERVER_URL' to value 'https://127.0.0.1:8154/go'
11:13:05.464 [go] setting environment variable 'GO_TRIGGER_USER' to value 'anonymous'
11:13:05.464 [go] setting environment variable 'GO_PIPELINE_NAME' to value 'GaugeTests'
11:13:05.464 [go] setting environment variable 'GO_PIPELINE_COUNTER' to value '27'
11:13:05.464 [go] setting environment variable 'GO_PIPELINE_LABEL' to value '27'
11:13:05.464 [go] setting environment variable 'GO_STAGE_NAME' to value 'GaugeStage'
11:13:05.464 [go] setting environment variable 'GO_STAGE_COUNTER' to value '1'
11:13:05.464 [go] setting environment variable 'GO_JOB_NAME' to value 'gaugeJob'
11:13:05.464 [go] setting environment variable 'GO_REVISION_GAUGE_GIT' to value '9fc3b3685626e3b39a3f2d182bd63793b289cc46'
11:13:05.464 [go] setting environment variable 'GO_TO_REVISION_GAUGE_GIT' to value '9fc3b3685626e3b39a3f2d182bd63793b289cc46'
11:13:05.464 [go] setting environment variable 'GO_FROM_REVISION_GAUGE_GIT' to value '9fc3b3685626e3b39a3f2d182bd63793b289cc46'

11:13:05.473 [go] Start to build GaugeTests/27/GaugeStage/1/gaugeJob on Mac-mini [/Users/admin/Library/Application Support/Go Agent]
11:13:05.473 [go] Current job status: passed.

11:13:05.473 [go] Start to execute task: <exec command="sh" >
<arg>semigator_GaugeTests_ci.sh</arg>
</exec>.

11:13:06.707 [INFO] Scanning for projects...

11:13:06.905 [INFO]
11:13:06.906 [INFO] ------------------------------------------------------------------------
11:13:06.906 [INFO] Building Semigator.Gauge 1.0
11:13:06.906 [INFO] ------------------------------------------------------------------------
11:13:07.345 [INFO]
11:13:07.345 [INFO] --- gauge-maven-plugin:1.1.0:execute (default-cli) @ Semigator.Gauge ---

11:13:10.268 [ValidationError] /Users/admin/Library/Application Support/Go Agent/pipelines/GaugeTests/specs/basicmenutest.spec:5: Step implementation not found => 'Open Master Agreement Start Page'

... and then the step implementation not found error for all specs.


Cheers,
michael

Ketan Padegaonkar

unread,
Aug 26, 2016, 11:41:42 PM8/26/16
to go-cd


On Thu, Aug 25, 2016, 2:51 PM Michael Pauli <zopp.m...@gmail.com> wrote:
Hi Ketan,

the problem also appears, if I run the script on the go agent. What does you mean exactly with the env command?

I mean the `env` executable. Typically under `/usr/bin/env`.

If the script does not run on the machine successfully, GoCD cannot be expected to run it successfully. Please ensure that the script exits with an exit code of 0(zero) to indicate a successful run.

Michael Pauli

unread,
Aug 31, 2016, 4:31:52 AM8/31/16
to go-cd

Hi Ketan,


sorry for the late response.


I run the env, but did not get any hints or errors for Gauge/GoCD. I’ve added now the direct path to gauge and the java plugin in the .bash_profile (/Users/admin/.gauge/plugins/:/usr/local/Cellar/gauge/0.6.1/bin:) but the problem is still there.


I’ve already modified the start script to get the exit code for 100%:

mvn gauge:execute -DspecsDir=specs -Denv=ci

rc=$?
if [[ $rc -ne 0 ]] ; then
  echo 'Failed tests'; exit $rc
fi


…but nothing helped.


Cheers,

michael

Ketan Padegaonkar

unread,
Aug 31, 2016, 4:50:45 AM8/31/16
to go-cd
You should probably ask this question on the gauge forums. At this point it does not look like a gocd issue.

On Wed, Aug 31, 2016 at 2:01 PM Michael Pauli <zopp.m...@gmail.com> wrote:

Hi Ketan,


sorry for the late response.


I run the env, but did not get any hints or errors for Gauge/GoCD. I’ve added now the direct path to gauge and the java plugin in the .bash_profile (/Users/admin/.gauge/plugins/:/usr/local/Cellar/gauge/0.6.1/bin:) but the problem is still there.


I’ve already modified the start script to get the exit code for 100%:

mvn gauge:execute -DspecsDir=specs -Denv=ci

rc=$?
if [[ $rc -ne 0 ]] ; then
  echo 'Failed tests'; exit $rc
fi


…but nothing helped.


Cheers,

michael



Am Samstag, 27. August 2016 05:41:42 UTC+2 schrieb Ketan Padegaonkar:


On Thu, Aug 25, 2016, 2:51 PM Michael Pauli <zopp.m...@gmail.com> wrote:
Hi Ketan,

the problem also appears, if I run the script on the go agent. What does you mean exactly with the env command?

I mean the `env` executable. Typically under `/usr/bin/env`.

If the script does not run on the machine successfully, GoCD cannot be expected to run it successfully. Please ensure that the script exits with an exit code of 0(zero) to indicate a successful run.

--

Michael Pauli

unread,
Aug 31, 2016, 4:57:38 AM8/31/16
to go-cd
Ok...I will try this.

Nevertheless...thanks for your help!

Cheers,
michael
Reply all
Reply to author
Forward
0 new messages