On 26 May 2012 19:19, Chuck van der Linden <[email protected]> wrote: > I'm in agreement with Željko Cucumber is a good way to go. If you look > at RubyToolbox you will see that by far and away the most favored testing > framework is Cucumber > https://www.ruby-toolbox.com/categories/Acceptance_Test_Frameworks > > To use it right you don't want to just automate manual tests. That tends > to lead to tests that can be difficult to maintain, have a lot of > inter-dependencies or have to be run in a particular order. The things > that make a good automated test are not the same as what makes a good > manual test. With manual tests you want to optimize the time of the person > running the test, so it's common to have long chained scenarios. With > automated tests you want to be able to run any test in any order, so each > test should take care of setting up what it needs, and putting the system > back to a known state afterwards. > > I would strongly recommend buying and downloading the e-book version of > "The Cucumber Book" from Pragmatic Programmers, it will get you (and your > team) off to the right start in terms of how to use cucumber > > Two other good resources would be the specification by example > presentations from Alister, and Andrew & Bramha, at the test automation > bazaar, you can find both of them on this page: > https://github.com/watir/watir-bazaar/wiki/Presentations this would > give you a quick introduction into how to use cucumber and watir, and a > great experience report from some folks who have had a lot of success with > this approach. > > The next thing you need is to learn a bit about 'abstraction layers' which > can make your tests easier to create and maintain. The basic idea is to > give you one place where you tell the scripts names for elements on the > page and how to identify them, then in the rest of the scripts you just > refer to them by name. If the UI is changed, then you just need to update > one thing instead of a bunch of test steps that use that element. We had > a really great workshop on this at the conference, you can access it here > https://github.com/watir/watir-bazaar/wiki/Test-Automation-Workshop-2012 (We > would ask that since this training was done to raise money for charity, > that you make a donation to one of the listed charities if you find it of > value.) > > If you really want to work with stuff based on excel, you'll likely have > to create your own framework, using a gem like 'sheets' or another similar > gem that lets you easily access data in .xls or .xlsx format. There are a > few examples of working with excel in the watir wiki, but they are from a > few years ago and may be a bit outdated. > > On Saturday, May 26, 2012 10:12:36 AM UTC-7, Željko Filipin wrote: >> >> On Sat, May 26, 2012 at 6:41 PM, gajendra <[email protected]> >> wrote: >> > I mean, I wanted some folder structure where i can maintain the object >> > repository, data(in Excel) required for the application, and the >> > function related to the application in different folders. >> >> In that case, check the link I have posted in previous reply. >> >> Željko >> > Since Oscar didn't appear yet, I'll be the one to suggest taza: https://github.com/hammernight/taza
I'd say it pretty much fits your need to have a folder structure and will give you some help on setting up the pages and flows. Page-object (the first one that Željko suggested) is a great gem to speed up creating the (mind it) page objects and their methods, and will help you create cleaner and more maintainable code. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
