List Info

Thread: Iterator in harness




Iterator in harness
user name
2006-12-21 15:24:43

I’m cross posting this one from Ruby Forum as I’m at a loss here…;

 

I have a harness I'm using for testing with Watir. It has become
apparent that the iterator is loading the tests defined based on the
order they appear in the directory as opposed to the order in the
testlist.
 
File.open('testlist.txt').each_line do |entry|
  self.send(:define_method, entry.strip){ load "#{entry.strip}.rb"}
 
 
so if the testlist read something like
 
test_aac
test_aab
test_aaa
 
instead of executing them in the order above it would do
 
test_aaa
test_aab
test_aac
 
I'm probably being thick, but I'm not spotting where my iterator is
going wrong?

 

 

Ta

 

Max

 

Max Russell

Test Analyst.

INPS

 

Tel: 01382 223900

Fax: ;01382 204488

 

Visit our Web site at www.inps.co.uk

 

The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of In Practice Systems Limited or any of its affiliates. If you are not the intended recipient please contact is.helpdeskinps.co.uk

 

Iterator in harness
user name
2006-12-27 10:50:39
Maybe this would help.

http://wiki.openqa.org/display/WTR/Test-Unit+Patch
--
Zeljko Filipin
zeljkofilipin.com
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )