cucumber+Firewatir环境搭建

简介:
应他人需求搭建故事驱动,黄瓜的Ruby自动化测试环境,特总结如下: 
1.安装Ruby  1.8.7运行环境,exe文件一键安装 
2.在XP上会在C盘默认创建Ruby相关文件,安装时选中将Ruby作为该机器的环境变量 
3.安装完ruby后,ruby自带Gem套件,使用Gem套件安装Firewatir,命令为gem install xxx 
4.安装Firewatir成功后,可以运行Firewatir的脚本了,这个时候如果Firewatir不运行的话,可以使用webdriver版得watir来调用你的Firefox,这样Watir脚本既可以执行了 
5.安装cucumber黄瓜,gem install cucumber安装黄瓜的时候可能会需要Json或者其他gem文件需要你提前安装 
5.5安装kit-dev+Json,安装Kit后将Kit的所有Bin目录放置到环境变量里。然后运行gem install json 
6.cucumber  xxxx.featrue即可运行你的黄瓜脚本 
6.5.提示错误require,安装web-driver,命令为gem install watir-webdriver 
6.5.1 提示require错误 安装rspec,命令为gem install rspec,此时能打开浏览器,然后再提示没有jssh,安装jssh
6.5.2 用虚拟机重试的时候,能启动浏览器但不能运行我的测试脚本,怀疑可能性为该网址内容--http://www.natontesting.com/2009/07/24/firewatir-jssh-unable-to-connect-fixed/该部分将会在下次使用时,敲定 
7.运行时结果不是彩色的,会提示你安装ansicon,则你到http://adoxa.110mb.com/ansicon/网站去下载ansicon 
8.
1. Download and unzip the file from http://adoxa.110mb.com/ansicon
2. open cmd and navigate to the unzipped folder
3. Navigate to x64 (if you have a 64 bit machine) otherwise navigate to x86
4. Type ansicon.exe -h and you will get the following:
D:\Data\ansicon\x86>ansicon.exe -h
ANSICON by Jason Hood .
Version 1.32 (22 December, 2010).  Freeware.
http://ansicon.adoxa.cjb.net/

Process ANSI escape sequences in Win32 console programs.

ansicon -i|I | -u|U
ansicon [-m[]] [-p | -e|E string | -t|T [file(s)] | program [args]]

  -i            install - add ANSICON to the AutoRun entry (implies -p)
  -u            uninstall - remove ANSICON from the AutoRun entry
  -I -U         use local machine instead of current user
  -m            use grey on black ("monochrome") or  as default color
  -p            hook into the parent process
  -e            echo string
  -E            echo string, don't append newline
  -t            display files ("-" for stdin), combined as a single stream
  -T            display files, name first, blank line before and after
  program       run the specified program
  nothing       run a new command processor, or display stdin if redirected

 is one or two hexadecimal digits; please use "COLOR /?" for details.
5. Execute 'ansicon.exe -i' to install and add ansicon to your Windows
6. Run your cucumber 0.10.0 test and you should 
get the coloured output result on Windows

这步做完你的故事驱动测试就可以开始了,哦,有可能你会需要一些黄瓜的脚本范例,那么去黄瓜的官网上去找,是可以下载的。网址为:http://cukes.info/
目录
相关文章
|
1月前
|
jenkins 测试技术 持续交付
软件测试|docker搭建Jenkins+Python+allure自动化测试环境
通过以上步骤,你可以在Docker中搭建起Jenkins自动化测试环境,实现Python测试的自动化执行和Allure报告生成。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
51 6
|
2月前
|
Ubuntu 编译器 C++
【Conan 入门教程 】在Ubuntu上使用Conan编译C++第三方库:一站式解决方案
【Conan 入门教程 】在Ubuntu上使用Conan编译C++第三方库:一站式解决方案
229 1
|
9月前
|
Web App开发 测试技术 开发者
【Pyhton入门系列】第十三篇:Python自动化测试和单元测试
自动化测试是软件开发中不可或缺的一部分,它可以提高软件质量、减少人工测试工作量,并确保代码的稳定性。Python作为一种简洁而强大的编程语言,提供了丰富的测试框架和工具,使得自动化测试和单元测试变得更加容易。
90 2
|
10月前
|
数据可视化 机器人 测试技术
自动化测试 RobotFramework安装以及使用教程
自动化测试 RobotFramework安装以及使用教程
|
11月前
|
测试技术 Python
软件测试|教你如何离线安装第三方库
软件测试|教你如何离线安装第三方库
149 1
|
JSON IDE 测试技术
软件测试|Pycharm常用插件介绍
软件测试|Pycharm常用插件介绍
239 0
软件测试|Pycharm常用插件介绍
|
机器人 程序员 测试技术
RobotFramework环境搭建
RobotFramework环境搭建
RobotFramework环境搭建
|
机器人 jenkins 测试技术
RobotFramework基础篇-环境搭建
Robotframework(通常简称RF,在下文中都将用RF代替)是一个关键字驱动的自动化测试框架,底层是基于Python语言实现的。
RobotFramework基础篇-环境搭建
|
Web App开发 编解码 前端开发
常用的前端自动化测试工具介绍 —— Karma
常用的前端自动化测试工具介绍 —— Karma
633 0
常用的前端自动化测试工具介绍 —— Karma
|
搜索推荐 Unix Linux
从 0 开始学 Python 自动化测试开发(二):环境搭建
​本文是「从 0 开始学 Python 自动化测试开发」专题系列文章第二篇 —— 环境搭建篇,适合零基础入门的同学。作者方程老师,是前某跨国通信公司高级测试经理,目前为某互联网名企资深测试技术专家,也是霍格沃兹测试学院「测试开发从入门到高级实战」特邀讲师。有十余年大型电信系统测试、管理经验,自主研发自动化测试工具的经验,其主笔的 CSDN 博客专栏《用 Python 做自动化测试》是测试类访问量最大的专栏。
从 0 开始学 Python 自动化测试开发(二):环境搭建