From: "aidy.lewis@..." Date: 2007-07-15T06:21:18+09:00 Subject: Re: loop unit test cases? On 14 Jul, 20:33, hemant wrote: > Can you explain a bit more? Hi, I am still thinking about this, but I hope you get the idea class TC < Test::Unit::TestCase @@test = Test_Data.new def setup @browser = Browser.new @browser.goto(test.data[:url]) login = Login.new(@@test.data[:username], @@test.data[:password]) login.sign_in.click end def teardown application.log_out.click @browser.close end def test_case_1 main_page.enter_field(@@test.data[:text]) end end class Test_Data attr_accessor :data def initialize username = ['user', 'invalid_name'] password = ['pswd', 'invalid_password'] text = ['something', 'else'] @data= { :url => 'http://whatever', :username => username[@@i], :password => password[@@i] :text => text[@@i] } @@i += 1 unless username.length #need to work this out end end Ideally I want to run the class TC until an array length is reached in the Test_Data class. Aidy