Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to trigger a cucumber command from bamboo?

I used Jenkins for cucumber feature files execution previously. Now I'm going to use bamboo. But the same shell command which works in Jenkins does not work in bamboo.

Could anybody help?

Bamboo version: 6.9

Repository: Bitbucket server

Command example: cucumber BROWSER=firefox MODE=local SCREENSHOT=on HIGHLIGHT=off -f json -o test_result.json --tags @CASE=TEST

Error: cucumber: command not found

Many thanks.

2 answers

1 vote

Hi @Ivy Zhou ,

When running a build / deployment in Bamboo, this will be executed against an Agent, in which, can be a Local, Remote, EC2 agent.

Based on the error you have mentioned, it seems the Bamboo Agent in which the build / deployment was executed against does not have "cucumber" installed.

Here is an example for PROJ-PLAN-JOB1-1

simple 04-Mar-2019 14:51:42 Build Project - Plan - Default Job #1 (PROJ-PLAN-JOB1-1) started building on agent Default Agent
simple 04-Mar-2019 14:51:42
simple 04-Mar-2019 14:51:42 Build working directory is /var/atlassian/application-data/bamboo/xml-data/build-dir/PROJ-PLAN-JOB1

The 1st line will inform you where the build (JOB1) is being executed against, in this case against Bamboo Server as a Default Agent.

The 2nd line will inform you the agent's location (e.g ip address, dns...) Since is it executing against Bamboo Server, this information is not provided.

The 3rd line indicates under which directory the build (JOB) is being executed against.

Based on the Bamboo version (v6.9) you have provided, I am assuming you are running a Script task to issue the command:

cucumber BROWSER=firefox MODE=local SCREENSHOT=on HIGHLIGHT=off -f json -o test_result.json --tags @CASE=TEST

Please, go the server where the build (JOB) was executed against.

Navigate to the Build Working Directory as in example in 3rd line from Terminal and issue the cucumber command. This will confirm whether or not cucumber is installed on that server. At the same time, confirm if the user running Bamboo on that server has enough permissions to run cucumber.

Last but not least, make sure cucumber is available to the PATH in which the user running Bamboo has access to. For that, simply run a new build in Bamboo under the same Agent where the cucumber error was thrown and add a Script task as the first thing to be executed with the following:

  • on Linux
echo $PATH
  • on Windows
echo %PATH%

Please, feel free to disable all other tasks as they not required for this testing purpose.

After the build (JOB) gets executed, check the build log, reviewing if the PATH is correct - cucumber is available to the user running Bamboo Agent. If changes need to be made to the PATH, it is mandatory restarting the Bamboo Agent to changes can be applied.

Kind regards,
Rafael

Dear Rafael,

Thanks very much for you kindly answer.

Yes i can trigger the cucumber command after add the ruby path to PATH.

Thanks again for your time and effort.

Have a nice day!

Best Regards,

Ivy Zhou

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

203 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you