Re: [Httpunit-develop] Large Complex Websites: Is there a better way than inheritance?
Brought to you by:
russgold
From: Russell G. <rus...@ht...> - 2003-02-28 12:42:28
|
On Thursday, February 27, 2003, at 06:30 PM, Edwin Sillence wrote: > Hey everyone, > > I was just wondering if anyone had come up with an elegant solution for > using HttpUnit to test large sites. I'm currently trying to test a > large, complicated site that is generated using tapestry. > > So far, I have just built things up using inheritance. For example, a > TestCase where the user logs in (in the setup() ) is inherited by > another TestCase where the user goes an does something (in the setUp() > )... and so on ... > > The problem is, this just keeps building up as an ugly logic tree (and > its kinda inflexible)... I know you guys might say that this is totally > out of the realms of unit testing (which is true, because im really > trying to create regression tests for functionality... its not unit > testing at all), but nonetheless, I really need to find a way. They key is planning your tests. If you have long scenarios with many steps, they need to be part of a single test. If there are many repeated steps with optional paths then you will need common code - and inheritance is one way to manage it, another being common methods. > > I keep envisaging something like parts of a script (but that acted as > objects) that you could intelligently hook together... I dunno... Im a > bit lost really... the complexity is just getting out of hand? (and ive > already looked at non-junit solutions like jmeter and maxq, and whilst > they are cool, they still don't have the functionality necessary)... There are approaches like Canoo WebTest and jWebUnit which attempt to wrapper HttpUnit functionality. They may help you, or you may just find it more sensible to make your own building blocks. |