From: aidy Date: 2008-07-17T04:50:10+09:00 Subject: Re: Is it possible to dynamically extend Test::Unit test cases? On 15 Jul, 22:33, David Mitchell wrote: > Thanks Bret andAidy > > I'll check out the options you've suggested today.  I've only ever > needed test/unit in the past, so have never bothered to look into > alternate test frameworks. > > Regards > > David Mitchell > > 2008/7/16aidy: > > > > > On Jul 15, 7:33 am, Bret Pettichord wrote: > >> [Note:  parts of this message were removed to make it a legal post.] > > >> David, > > >> test/spec or shoulda or rspec can be used to provide a more "dsl-ish" front > >> end for your tests. > > >> Bret > > > Bret's right. > > > I would also argue that the xUnit narrative for workflow tests is > > inadequate. > > > You could object model your AUT > > > g_mail.goto_url > > g_mail.welcome_page.sign_up_for_google_mail_link.click > > gmail.create_account_page.first_name_field.set('aidy') > > gmail.create_account_page.last_name_field.set('lewis') > > > example:http://wiki.openqa.org/display/WTR/Example+Frameworks > > > You can then wrap this up in Rspec story runner tests > > > acceptance test: > > > Given a user at gmail > > When clicks to create a account > > And enters first and second name > > Then #.... > > > steps > > > Given "a user at gmail" do > >  g_mail.goto_url > > end > > > When "clicks to create a account" do > >  g_mail.welcome_page.sign_up_for_google_mail_link.click > > end > > > When "enters first and second name" do > >  gmail.create_account.page.first_name_field.set('aidy') > >  gmail.create_account.page.last_name_field.set('lewis') > > end > > > .... > > > I will example this and post on Watir site > > >Aidy- Hide quoted text - > > - Show quoted text - I have added an example of the Rspec story runner that is used with the AUT object model and Watir http://wiki.openqa.org/display/WTR/Example+Frameworks Aidy