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

Robot test executes locally but fails whiles executing from bamboo[Agent]

Pavankumar April 25, 2023

While running the bamboo plan fails to execute the robot tests as below:

command	26-Apr-2023 05:22:39	Beginning to execute external process for build 'Platform - Validation - Initial Job #63 (P-V-JOB1-63)'\n ... running command line: \n/home/root/bamboo-agent-home/temp/P-V-JOB1-63-ScriptBuildTask-1082238127479262881.sh\n ... in: /home/root/bamboo-agent-home/xml-data/build-dir/P-V-JOB1\n
build	26-Apr-2023 05:22:39	Hello!
build	26-Apr-2023 05:22:39	Entered into scripts folder
error	26-Apr-2023 05:22:39	Traceback (most recent call last):
error	26-Apr-2023 05:22:39	  File "/usr/bin/robot", line 5, in <module>
error	26-Apr-2023 05:22:39	    from robot.run import run_cli
error	26-Apr-2023 05:22:39	ModuleNotFoundError: No module named 'robot'

In the same machine I have installed robot framework and able to execute tests from different folder but failing in bamboo-agent

2 answers

1 vote
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2023

Hello @Pavankumar

That's a Python environment configuration issue.

Please review if all the required modules in your code are installed on the Build agent and if they are accessible by the user that is running the Agent (in your case root)

The Robot Framework can be installed on the Agent by running:

  • pip install robotframework

To reproduce the issue and test for alternatives, you can log to your Agent server as the same user that runs the Bamboo Agent application, cwd to the /home/root/bamboo-agent-home/xml-data/build-dir/P-V-JOB1 directory and run the build commands manually.

Kind regards,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

0 votes
Akermanihao
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 4, 2023

I had a similar problem running robot tests in a different environment. That "ModuleNotFoundError" can be tricky. Ensure the Bamboo agent knows where to find the 'robot' module. Check its settings and paths. If it's still not working, maybe get help from Bamboo support or others who have faced this, or try a telepresence robot instead. I know it can be frustrating, but keep at it!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events