游戏自动测试记录2

上一篇 / 下一篇  2011-04-12 15:45:03 / 个人分类:游戏自动化

####################
time:2011.4.12
name:char
###################
用例输出部分
require 'spec/autorun'
require 'rack/mock'
require File.expand_path(File.dirname(__FILE__) + "/../helper/coolie_helper.rb")

describe "coolie sample" do
  before(:all) do
    CoolieClient.startup
    ResponseWorker.start
  end
  after(:all) do
    ResponseWorker.stop
    CoolieClient.shutdown
  end



  it "should be true" do
    true.should be_true
  end

  it "should NOT be true" do
    false.should_not be_true
  end

  it "能够打开背包" do
    Coolie.open_bag
  end

  it "能够关闭背包" do
    Coolie.close_bag
  end

  it "能够打开/关闭1号背包" do
    bag_index = 1
    Coolie.toggle_bag bag_index
  end
end
这个是一个简单的rspec框架模式,用例由上到下,输出在判断类中做截取协议检查结果,这个地方需要前端做测试类支持,这个现在一直没解决的严重问题,测试类中方法量原来越大,维护起来头疼(Coolie.open_bag),一直想能实现真正的GUI检查,但是动画特效的动态成分,很难去抓取,抓取后又用一个什么样的方法去验证呢?
预期对象库?继续执行:返回错误并从新执行
对象库,验证识别,如果能像QTP那样去实现,我能笑弯腰

TAG:

 

评分:0

我来说两句

日历

« 2024-05-07  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 10193
  • 日志数: 15
  • 图片数: 1
  • 建立时间: 2011-04-08
  • 更新时间: 2012-07-12

RSS订阅

Open Toolbar