Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,858
Community Members
 
Community Events
176
Community Groups

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.

3 answers

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

Hello Team,

can you please help in add scripts task to execute cucumber framework, I dont know where need to add the Maven command to RUN the test suits after build.

 

Locally i am able to RUN the API test using below command  to RUN it : 

-e test -Dhttps.protocols=TLSv1.2 -DenvType=demouat -Dtrust_all_cert=true.

suspecting tose command need to add in scripts

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

Atlassian Community Events