Ubuntu上使用autotest做Rails项目的自动测试 - autotest安装和测试
来源:互联网 发布:2013版excel数据在哪里 编辑:程序博客网 时间:2024/05/17 23:21
Automate Everything: Ruby, Linux and other hints, tips and tricks.
Gnome and Autospec Notifications
注:不需要安装autotest (参考Ruby on Rails 3 Tutorial: 3.2.1 Testing tools),好像是ZenTest里面有autotest了。
$ sudo gem install ZenTest$ sudo gem install redgreen
然后安装libnotify-bin package
$ sudo apt-get install libnotify-bin
在Home目录创建文件 ~/.autotest 内容如下
和原文Automate Everything 唯一不同的地方是要掉redgreen那一行。
#!/bin/ruby# remove this line on Unbuntu 11 : require 'redgreen'require 'autotest/timestamp' module Autotest::GnomeNotify def self.notify title, msg, img system "notify-send '#{title}' '#{msg}' -i #{img} -t 3000" end Autotest.add_hook :ran_command do |at| image_root = "~/.autotest_images" results = [at.results].flatten.join("\n") results.gsub!(/\\e\[\d+m/,'') output = results.slice(/(\d+)\sexamples?,\s(\d+)\sfailures?(,\s(\d+)\spending?|)/) full_sentence, green, failures, garbage, pending = $~.to_a.map(&:to_i) if output if failures > 0 notify "FAIL", "#{output}", "#{image_root}/fail.png" elsif pending > 0 notify "Pending", "#{output}", "#{image_root}/pending.png" else notify "Pass", "#{output}", "#{image_root}/pass.png" end end endend
下载红绿图片到目录~/.autotest_images/.
autotest_images.zip
参考:
Rails项目配置rspec: Ruby on Rails 3 Tutorial: 3.2.1 Testing tools
安装配置:Automate Everything
安装配置:http://jetpackweb.com/blog/2009/09/01/autotest-notifications-on-ubuntu-using-lib-notify/
- Ubuntu上使用autotest做Rails项目的自动测试 - autotest安装和测试
- 自动化测试框架AutoTest
- 如何使用kvm autotest来测试kernel
- RSpec + Spork + Autotest 给Rails 3添加快速自动化测试
- autotest client的使用
- KVM Autotest client的使用
- autotest server使用
- Ubuntu 上安装jenkins 自动测试ruby on rails
- Autotest中 kvm class和test class的关系
- Ubuntu11.10+ruby on rails 3+rspec+autotest+spork配置
- KVM Autotest 配置文件
- Android autotest - Monkey tool
- Autotest 0.14.0 released!
- Android autotest - Monkey tool
- xenomai 在ubuntu上的安装测试
- 使用jenkins做自动测试
- Rails项目中使用Cucumber测试
- ubuntu上使用mysql数据库连接rails项目
- 虚拟化技术的最初的目的是提高CPU和其他资源的利用率
- 腾讯VS百度
- DateTimePicker控件中自定义时间格式
- 十大企业必须执行的网络和数据安全策略
- 身份验证方式转变:密码验证已成过去式
- Ubuntu上使用autotest做Rails项目的自动测试 - autotest安装和测试
- sed当中使用变量替换以及执行外部命令
- 我的寒假小计划
- 动态规划思想
- 记录:自定义设置颜色静态控件的实现
- myeclipse的常用技巧
- 针对《关于郝培强的《为什么我们招聘的时候绝不要传智播客的学生?》》的看法
- Tomcat中各组件介绍
- maven的使用