STi的一个bug?

上一篇 / 下一篇  2008-10-15 14:14:05 / 个人分类:自动化测试技术

用ruby+watir写自动化测试脚本时发现一个问题:

定义一个类的方法时,忘记了一个带有默认值的参数,后来试图添加这个参数,但每次添加时,都会引起STi crash:

最初代码如下:

require 'watir'

class Addworkitem
  def additem(team,project,projectdesc,pjalltime,pjextratime,other='',otheralltime=0,otherextratime=0)
    begin
     $ie=Watir::IE.new()
     $ie.goto("http://.....")
     sleep 1
     $ie.maximize()
     $ie.table(:id,'zz11_NewMenu_t').link(:text,'新建').click()

     ........ 

    rescue
     raise
    end
  end
end

运行时发现other=''后缺少一个参数otherdesc, 在sti中添加otherdesc='desc'

时,输入otherdesc=后,继续输入', sti就crash了,反复试了很多次,都会crash.

其他的机器上尝试,出现同样的问题。    


TAG: 自动化测试 Bug Ruby 自动化测试技术 Watir STi

 

评分:0

我来说两句

Open Toolbar