Resolve: pybot robot command not found in Jenkins(mac)

Problem: When you run the Robot Framework with Jenkins and found the error. The command does not see in Jenkins. Robot, Pybot is not recognized.

Error1: Pybot or robot: command not found 
Error2: Build step 'Execute shell' marked build as failure

Solution1:
 Check your Robot Framework
  • Check your Robot Framework is already installed.
which robot
  • The system should return robot path /usr/local/bin/robot
  • If Robot Framework does not install, please install as below
pip3 install robotframework
Solution2: Check your Robot Framework installed in Jenkins
Go to Jenkins > Manage Jenkins > Manage Plugins > Install Robot Framework


Solution3: Check your command in Jenkins

  • Ensure your build step select "Execute shell" (mac)
  • Right now pybot are removed(old script), replace with robot, and reboot(Ref1)
  • Configuration syntax or command Robot Framework in Jenkins refer(Ref2)
Solution4: Set Robot bash profile

Open bash profile
touch ~/.bash_profile; open ~/.bash_profile
nano ~/.bash_profile
Find Robot path
which robot
Default Robot path /usr/local/bin/robot, Copy robot path to bash profile

Solution5*: Check your Python version

Check your python version
python --version
Normally, Mac Book defaults to python version 2.7 but it can run in Jenkins(expect python version 3.x). So you should replace python 2.7 with python 3.x. We have the other way to set up. Howeaver in this solution, we propose to set up with path.
vi ~/.bash_profile
set this path

alias python='/usr/local/bin/python3'
Reload bash profile
source ~/.bash_profile
Check your python version again

Solution6: Restart Jenkins

use the following command to restart Jenkins
brew services restart jenkins-lts


ป้ายกำกับ

แสดงเพิ่มเติม

บทความยอดนิยม

Software Development Life Cycle (SDLC) คืออะไร ทำไมจำเป็นต่อการพัฒนาซอฟต์แวร์

Automation testing หรือ การทดสอบซอฟต์แวร์อัตโนมัติ คืออะไร ทำไมถึงสำคัญต่อการทดสอบซอฟต์แวร์

ม.ปลายอยากเข้าสายคอม วิทยาการคอม วิศวกรรมคอม เตรียมตัวอย่างไร ต้องมีพื้นฐานอะไรบ้าง

วิธีเก็บ วิเคราะห์ รวบรวม requirement อย่างไรให้มีประสิทธิภาพ

Performance Test คือ อะไร วัดประสิทธิภาพของระบบ ล่มไม่ล่ม จะรู้ได้อย่างไร

8 สิ่งที่ AI จะมาเปลี่ยนโลกในอนาคต

ถอดรหัสความลับเครื่อง Enigma จุดเริ่มต้นและจุดจบของสงครามโลกครั้งที่ 2