开发者

How to build a test group in watir?

开发者 https://www.devze.com 2022-12-31 01:31 出处:网络
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.

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 t开发者_Python百科est 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


Take a look how Watir unit tests are executed.

0

精彩评论

暂无评论...
验证码 换一张
取 消