[Webtest] WebTest-http-request-recorder? Verifying whole HTML-pages?

Damian Glania webtest@lists.canoo.com
Thu, 10 Oct 2002 12:45:32 +0200

Hi all,
I would like to use the WebTest to perform the functional tests of our web front end. 
I'm wondering if I can generate (part of) the WebTest test script instead of writing 
it manually? Is there any one who tried to do it before?

I think, I could do it by performing the following steps:
1) write an "http-request-recorder" as logging extension to our dispatcher servlet. 
   The recorder would perform the following tasks:
   - each incoming http-request would be recorded in "WebTest format" e.g.:
   <invoke stepid="get 0x100-01" url="Main?navId=0x100-001" />
   - for each request, a default validation tag, comparing the current http-response to
     a corresponding one - which was (optically ;-) validated before - would be generated.
     (a new validation tag, the "diff-tag" has to be introduced)

2) the human tester would start the recorder and perform all tests as described in the 
   test plan using a browser. He validates (optically) each response (HTML-Page) according to the description in the test plan. Each response page will be written to a file (WebTest functionality)

3) After completion of the manual test the generated WebTest script would be manually "polished", e.g. some of the default "diff-tags" would be replaced by specialized ones (especially for responses including timestamps or other volatile parts)  

4) the following test could be performed automatically until the front end is changed. As the backend is not a part of our project, we would use a stub based on a database of stored backend-request-response-records.  This should help to make the tests more repeatable.
So my questions are:
- what do you think about that scenario? Could it work? Is it a sensible way to do that test?
- is there any software available, I can use to write the "WebTest-http-request-recorder"?
- is there any software available, I can use to write the "diff-tag" comparing the previously stored HTML-page to the current response?

 Any help, ideas, comments and software samples would be greatly appreciated!   

Die clevere Geldreserve: der DiBa-Privatkredit. Funktioniert wie ein Dispo, 
ist aber viel gunstiger! Alle Infos: http://diba.web.de/?mc=021104