脚本连跑:

rake是ruby中的一个构建工具,和make很像。允许用ruby来写rakefile。

我们使用rake以任务的方式来运行我们的脚本集。

新建Rakefile文件,写入如下内容:

require 'rake/testtask'
task :default => :autotest
Rake::TestTask.new :autotest do |t|
  files = FileList['../testcase/*/*.rb',
                   '../testcase/*/*/*.rb',]
  t.libs << "."
  t.test_files = files
  t.verbose = false
end

 

在上面的rakefile中,我们新建了一个autotest的任务。并批量执行testcase目录下的所有.rb的脚本。

使用rake autotest即调度rake任务,批量执行所有脚本。

web自动化测试:watir+minitest(四)

相关文章:

  • 2021-11-03
  • 2021-07-23
  • 2022-02-08
  • 2021-11-30
  • 2022-02-08
  • 2021-11-22
  • 2021-08-15
猜你喜欢
  • 2021-11-13
  • 2021-09-26
  • 2022-02-09
  • 2021-12-04
  • 2021-12-09
  • 2021-09-17
相关资源
相似解决方案