如何在watir中建立测试组?

发布于 2024-09-02 04:49:33 字数 738 浏览 4 评论 0原文

我有一些使用 IE 并以标准 watir 方式编写的单个 watir.rb 脚本。

如何创建一个将它们结合起来的测试组?我希望所有这些都通过执行主脚本来执行。

是否可以通过 subidr 自动将单个测试文件包含到测试组中?

是否可以枚举应包含在测试组中的文件?

我可以级联(在一个 watir 测试组中包含其他 watir 测试组)吗?

编辑:经过多次搜索和谷歌搜索,我找不到任何东西。

我现在将使用这种简单的样式:

passed = 0
failed = 0

result = system("ruby suite_one.rb")  #execute the script and wait for it to finish.
if result  #Record our results.
  passed = passed + 1
else 
  failed = failed + 1
end


result = system("ruby suite_two.rb")  #execute the script and wait for it to finish.
if result  #Record our results.
  passed = passed + 1
else 
  failed = failed + 1
end

puts "failed: " 
puts failed
puts "passed: " 
puts passed

I have some single watir.rb scripts that use IE and are written in a standard watir way.

How do I create a test group that combines them? I want all of them be executed by executing the main script.

Is it possible to auto include single test files into a test group by subidr?

Is it possible to enumerate the files that should be included in the test group?

Can I cascade (include other watir test groups in a watir test group)?

Edit: After much searching and googling I could not find anything.

I will use this simple style for now:

passed = 0
failed = 0

result = system("ruby suite_one.rb")  #execute the script and wait for it to finish.
if result  #Record our results.
  passed = passed + 1
else 
  failed = failed + 1
end


result = system("ruby suite_two.rb")  #execute the script and wait for it to finish.
if result  #Record our results.
  passed = passed + 1
else 
  failed = failed + 1
end

puts "failed: " 
puts failed
puts "passed: " 
puts passed

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

木森分化 2024-09-09 04:49:33

看看 Watir 单元测试被执行。

Take a look how Watir unit tests are executed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文