[Webtest] webtest extension points under way...

Dierk Koenig webtest@lists.canoo.com
Fri, 27 Jun 2003 21:36:15 +0200


Carsten and me did the first steps into making 
- contributions of new steps and
- adaptions of existing steps 
much easier.

With the new structure, you can write your own "Custom Steps" and use it
in your test script without touching any part of the existing code.

This is how it works:
- Look at the MyCustomStep class in the "extension" package.
- Copy and rename it according to your needs.  
- Provide setters and getters for the attributes you want to use.
  Two sample attributes are provided for illustration.
- Adapt Parameter handling accordingly to ensure proper reporting and
  failure indications (e.g. in case of misspelling).
- Use the MyCustomStepTest as a jump-start for your own unit test.
  This is easy. Just do it. Don't forget to add it to your test suite.

- You can now use a taskdef to make your new step known to ANT
  and use it nested in the <steps> element.

For those who would like to change the behaviour of an existing
- make your new Step inheriting from the existing one
- override where you want to change
- do the same for the tests
- in order to make the taskdef point to your new implementation,
  adapt the according line in %WEBTEST_HOME%/webtestTaskdefs.properties

happy testing

BTW: this functionality is not yet in the official build, but only on
the cvs HEAD. While the HEAD version builds and tests perfectly on
the developer workstation, there is an issue with the ANT-Installation
on the Integration machine that cannot be resolved before monday when the
administrator shows up.