在linux下搭建自动化测试框架Robot Framework,可以实现多用户同时登录并进行自动化脚本编写,相互之间没有影响。

步奏描述动作note
1Install Python

sudo apt-get install python

fedora: yum install python

yum list python  /* can view which python version will be installed */
2Install easy_install

sudo apt-get install python-setuptools

or:

sudo yum install python-setuptools


3Install Pipeasy_install pip

or:
sudo yum install python-pip

4Install Robot Frameworkpip install robotframeworkRun test case by execute "pybot [testcase.robot]" in terminal
5Install Robot Framework IDEpip install robotframework-rideStart RIDE by execute ride.py in terminal
6Install Selenium Librarypip install robotframework-selenium2libraryLibrary name of this library for Robot is Selenium2Library
7Install Database Librarypip install robotframework-databaselibrary
8Install SSH Librarypip 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

9Install 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
#tar xvjf 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
#patch -p 0 -d wxPython-src-2.9.4.0/ < wxPython-src-2.9.4.1.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