在linux下搭建自动化测试框架Robot Framework,可以实现多用户同时登录并进行自动化脚本编写,相互之间没有影响。
步奏 | 描述 | 动作 | note |
1 | Install Python | sudo apt-get install python fedora: yum install python | yum list python /* can view which python version will be installed */ |
2 | Install easy_install | sudo apt-get install python-setuptools or: sudo yum install python-setuptools | |
3 | Install Pip | easy_install pip or: sudo yum install python-pip | |
4 | Install Robot Framework | pip install robotframework | Run test case by execute "pybot [testcase.robot]" in terminal |
5 | Install Robot Framework IDE | pip install robotframework-ride | Start RIDE by execute ride.py in terminal |
6 | Install Selenium Library | pip install robotframework-selenium2library | Library name of this library for Robot is Selenium2Library |
7 | Install Database Library | pip install robotframework-databaselibrary | |
8 | Install SSH Library | pip install robotframework-sshlibrary | If fail to install sshlibrary, install paramiko and pycrypto seperately: pip install paramiko pip install pycrypto If above fails to install pycrypto, use yum or apt-get to install python-crypto package. I will put this note to a wiki page. Fedrora: #yum install python-crypto #yum install python-paramiko Other: #apt-get install python-crypto |
9 | Install wxPython-2.8.12.1 | apt-get install python-wxgtk2.8 fedora: yum install wxPython soucre code download list http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/ | wxPython version 2.8.10.0 or newer with Unicode support is required for RIDE to work Details please refer to the comment below. Install from source: #cd ~ #sudo yum install make automake gcc gcc-c++ kernel-devel gtk2-devel gtkglext-devel gstreamer-plugins-base-devel python-devel webkitgtk #yum install wget #wget http://downloads.sourceforge.net/project/wxpython/wxPython/2.9.4.0/wxPython-src-2.9.4.0.tar.bz2 #wget http://downloads.sourceforge.net/project/wxpython/wxPython/2.9.4.0/wxPython-src-2.9.4.1.patch #yum install patch #cd ~/wxPython-src-2.9.4.0/bld (if bld not exist, do: mkdir ~/wxPython-src-2.9.4.0/bld) #../configure --prefix=/usr/local #sudo python ../wxPython/build-wxpython.py --build_dir=../bld --wxpy_installdir=/usr --installdir=/usr #vim ~/.bash_profile When vim opens, add the following under the "User Specified Alias and Functions" section put the following line in there: export PYTHONPATH=/home/auto/wxPython-src-2.9.4.0/wxPython export LD_LIBRARY_PATH=/home/auto/wxPython-src-2.9.4.0/bld/lib #reboot |
转载于:https://blog.51cto.com/11921428/1833078