转载自:http://blog.sina.com.cn/s/blog_13cc013b50102vof1.html

操作系统环境:CentOS 6.5-x86_64

下载地址:http://www.centoscn.com/CentosSoft/iso/2013/1205/2196.html

一、安装Python

python下载地址:

https://www.python.org/downloads/

安装python

[root@localhost mnt]# tar -xvzf Python-2.7.10.tgz

[root@localhost mnt]# cd Python-2.7.10

[root@localhost Python-2.7.10]# ./configure --prefix=/usr/local/python27

checking build system type... x86_64-unknown-linux-gnu

checking host system type... x86_64-unknown-linux-gnu

checking for --enable-universalsdk... no

checking for --with-universal-archs... 32-bit

checking MACHDEP... linux2

checking EXTRAPLATDIR...

checking for --without-gcc... no

checking for gcc... no

checking for cc... no

checking for cl.exe... no

configure: error: in `/mnt/Python-2.7.10':

configure: error: no acceptable C compiler found in $PATH

See `config.log' for more details

如上,出错了,解决方法:安装gcc

配置好本地yum源后,安装gcc

[root@localhost yum.repos.d]# yum install gcc

继续安装python

[root@localhost Python-2.7.10]# ./configure --prefix=/usr/local/python27

......

[root@localhost Python-2.7.10]# make && make install

参考文档:

https://docs.python.org/2/using/unix.html

二、安装pip

pip下载地址

https://pypi.python.org/pypi/pip

安装pip

[root@localhost mnt]# tar -xvzf pip-7.1.0.tar.gz

[root@localhost mnt]# cd pip-7.1.0

[root@localhost pip-7.1.0]# ls

AUTHORS.txt  docs         MANIFEST.in  pip.egg-info  README.rst  setup.py

CHANGES.txt  LICENSE.txt  pip          PKG-INFO      setup.cfg

[root@localhost pip-7.1.0]# python setup.py install

......

参考连接:

https://pip.pypa.io/en/latest/installing.html

三、安装robotframework

robotframework下载地址:

https://pypi.python.org/pypi/robotframework#downloads

安装robotframework

[root@localhost mnt]# chmod 755 robotframework-2.9.tar.gz

[root@localhost mnt]# tar -xvzf robotframework-2.9.tar.gz

[root@localhost mnt]# cd robotframework-2.9

[root@localhost robotframework-2.9]# python setup.py install

……

查看是否安装成功

[root@localhost robotframework-2.9]# pybot --version

Robot Framework 2.9 (Python 2.6.6 on linux2)

[root@localhost robotframework-2.9]#

参考连接:

http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#python-installation

https://sourceforge.net/projects/wxpython/files/wxPython/

wxpython库

问题:robotframework都安装到哪里了?

[root@localhost robotframework-2.9]# find / -name robot

/usr/lib/python2.6/site-packages/robotframework-2.9-py2.6.egg/robot

/mnt/robotframework-2.9/src/robot

/mnt/robotframework-2.9/build/lib/robot

http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html

四、安装robotframework-selenium2library

robotframework-selenium2library下载地址

https://pypi.python.org/pypi/robotframework-selenium2library/

[root@localhost mnt]# chmod 755 robotframework-selenium2library-1.7.3.tar.gz

[root@localhost mnt]# tar -xvzf robotframework-selenium2library-1.7.3.tar.gz

[root@localhost robotframework-selenium2library-1.7.3]# python setup.py install

[root@localhost mnt]# cd robotframework-selenium2library-1.7.3

。。。

Downloading https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz#md5=4622263b62c5c771c03502afa3157768

error: MD5 validation failed for docutils-0.12.tar.gz; possible download problem?

出错了,咋办?解决方法:按提示,下载并安装docutils

docutils下载地址

https://pypi.python.org/pypi/docutils/

https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz

安装docutils

[root@localhost mnt]# chmod 755 docutils-0.12.tar.gz

[root@localhost mnt]# tar -xvzf docutils-0.12.tar.gz

[root@localhost docutils-0.12]# python setup.py install

继续安装robotframework-selenium2library

[root@localhost mnt] cd robotframework-selenium2library-1.7.3

[root@localhost robotframework-selenium2library-1.7.3]# python setup.py  install

……

/usr/lib/python2.6/site-packages/robotframework_selenium2library-1.7.3-py2.6.egg

Processing dependencies for robotframework-selenium2library==1.7.3

Searching for selenium>=2.32.0

Reading http://pypi.python.org/simple/selenium/

到这里可能是网络原因,又卡住了,解决方法:下载并安装selenium

selenium下载地址

地址1:https://pypi.python.org/simple/selenium/

地址2:https://pypi.python.org/pypi/selenium/

安装selenium

[root@localhost mnt]# tar -xvzf selenium-2.47.1.tar.gz

[root@localhost mnt]# cd selenium-2.47.1

[root@localhost selenium-2.47.1]# python setup.py  install

继续安装robotframework-selenium2library

[root@localhost mnt]# cd robotframework-selenium2library-1.7.3

[root@localhost robotframework-selenium2library-1.7.3]# ls

build          demo         LICENSE.txt  README.rst              setup.py

BUILD.rst      dist         MANIFEST.in  selenium.bmp            src

CHANGES.rst    doc          PKG-INFO     SELENIUM_COPYRIGHT.txt

COPYRIGHT.txt  INSTALL.rst  README       setup.cfg

[root@localhost robotframework-selenium2library-1.7.3]# python setup.py install

……

Using /usr/lib/python2.6/site-packages/selenium-2.47.1-py2.6.egg

Finished processing dependencies for robotframework-selenium2library==1.7.3

检测Selenium2Library是否安装成功

[root@localhost robotframework-selenium2library-1.7.3]# python

Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import Selenium2Library

>>>

如上,没报错,则说明安装成功

安装wxpython

http://www.rpmfind.net/linux/rpm2html/search.php?query=wxPython

转载自:http://blog.51cto.com/11921428/1833078

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

安装requests和requestsLibrary库进行接口测试

https://blog.csdn.net/youran02100210/article/details/80829728

步奏 描述 动作 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
#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

Linux CentOS下Python+robot framework环境搭建的更多相关文章

  1. Linux CentOS下Python+robot framework环境搭建

    Linux CentOS下Python+robot framework环境搭建   by:授客 QQ:1033553122 操作系统环境:CentOS 6.5-x86_64 下载地址:http://w ...

  2. Python + Robot Framework 环境搭建

    一.Python 安装 说明:由于RIDE是基于python2.x开发,后期未做python3.x兼容,所以这里安装python2.7. 链接: https://pan.baidu.com/s/1yf ...

  3. Robot - 1. robot framework环境搭建

    Fom:https://www.cnblogs.com/puresoul/p/3854963.html 一. robot framework环境搭建: 官网:http://robotframework ...

  4. robot_framewok自动化测试--(1)Robot Framework 环境搭建及常见日志问题解决办法

    一.Robot Framework 介绍 Robot Framework 的架构是一个通用的验收测试和验收测试驱动开发的自动化测试框架(ATDD).它具有易于使用的表格来组织测试过程和测试数据. 它使 ...

  5. robot framework环境搭建(转)

    一. robot framework环境搭建: 官网:http://robotframework.org/ 序号 安装包名 安装方法 下载地址 备注 1 python exe文件,直接双击安装 htt ...

  6. robot framework环境搭建

    来源:http://www.cnblogs.com/puresoul/p/3854963.html[转] 一. robot framework环境搭建: 官网:http://robotframewor ...

  7. [转] Mac系统Robot Framework环境搭建

    一.由于Mac系统下自带python,所以不需要再进行安装了 二.关闭mac电脑的sip, 1.重启 Mac并长按 Cmd + R 2.打开终端,执行csrutil disable命令 3.重启电脑 ...

  8. Robot Framework环境搭建(问题总结)

    Robot Framework+python+wxpython+robotframework-ride+library环境搭建问题总结 因为robotframework的兼容性问题要求很严格,小编在环 ...

  9. Robot framework 环境搭建+图标处理

    场景:随着现在项目各种赶工,很多时候界面上的功能还没有实现,这时就可以先对接口进行验证,提早发现一些和预期不一致的错误. Robot framework需要的几个知识点: 测试库:RF是大树,测试库就 ...

随机推荐

  1. URAL1696 Salary for Robots

    题目戳这里. 最长下降子序列单调队列求法. \(f_{i,j,k}\)表示考虑前\(i\)个数,\(g_1 = j,g_2 = k\)的方案数.转移: \[f_{i,j,k} = \sum_{p = ...

  2. JavaScript渐变效果的实现

    鼠标移上去透明度渐渐增加,鼠标移出,透明度渐渐减小. 关键代码: view source   print? 1 var speed = 0; 2 if(target>obj.alpha){ 3 ...

  3. POJ3259:Wormholes(spfa判负环)

    Wormholes Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 68097   Accepted: 25374 题目链接: ...

  4. System l类arraycopy的用法

    package org.springframework; /** * @author 秦林森 */ public class Test { public static void main(String ...

  5. 使用http_load网站压力测试

    http_load用以测试web服务器的吞吐量与负载.但是它不同于大多数压力测试工具, 它可以以一个单一的进程运行,一般不会把客户机搞死.它可以自定义测试的URL列表 下载:http://acme.c ...

  6. TypeConverter使用

    如下代码, <Window.Resources> <local:Human x:Key="human" Name="Tester1" Chil ...

  7. JavaScript获取HTML元素样式的方法(style、currentStyle、getComputedStyle)

    一.style.currentStyle.getComputedStyle的区别 style只能获取元素的内联样式,内部样式和外部样式使用style是获取不到的. currentStyle可以弥补st ...

  8. Hibernate 懒加载 错误----no session

    错误: unable to evaluate the expression Method threw 'org.hibernate.LazyInitializa org.hibernate.LazyI ...

  9. lhgdialog的传值问题

    一前言 今天就离职了,顺便把还没有记载下来得Js有关知识给记载下来,其实这个是lhgdialog.js中的传值问题.就是弹出框选择数据后加载到父页面上,自己用html做了测试. 二:内容 html代码 ...

  10. jvm面试必会基本知识

    内存: 堆区 1.new的对象实例  ps:(java堆可以细分为新生代和老年代)(通过-xmx和-xms来实现可扩展) 虚拟机栈 局部变量 本地方法栈 为虚拟机使用的native方法服务 方法区 s ...