[Webtest] Executing WebTest Scripts

Jan Nielsen webtest@lists.canoo.com
Wed, 5 Apr 2006 09:52:12 -0600


I'm brand new to WebTest. I have written my first WebTest script which 
performs a login to one of our applications, and I am quite happy with the 
simplicity of the WebTest XML script - really super for the 
presentation-layer folks. 

My next step is to integrate my test into Maven (and it appears there is a 
plug-in written already); capture how long it took my test to execute; and 
to log this duration for historical display. I am likely not the only one 
looking for this - so, any advice on how to proceed with this?

After the build integration work is complete, I would like to extend the 
example by performing several application-level reconfiguration steps 
while the test is executing. Here's an example:

  Successful Login Test:
    - login with valid user id and password 
    - check for success

  Account Locked Login Test:
    - <lock the account>
    - login with valid user id and password
    - check for account locked failure

I have Java APIs to perform the <lock the account>. I believe one way to 
do this is to write a Groovy script which has the appropriate Java code in 
it. I would prefer to execute the Java code in a JUnit test, and then 
perform a "call-out" to the WebTest XML script to perform the login. Does 
that make sense...even in the WebTest world? Or should I be using 
HttpUnit, or some other tool for this? I like using JUnit tests because 
our Java developers are already setup to do this, as is the build server, 
so that's the natural way to these folks to test code. Any thoughts and/or 
helpful hints?

Many thanks for any and all input.


Jan Nielsen * System Architect * SunGard Higher Education * Tel +1 801 257 
4155 * Fax +1 801 485 6606 * jan.nielsen@sungardhe.com * www.sungardhe.com 
* 90 South 400 West, Suite 500, Salt Lake City, UT

CONFIDENTIALITY: This email (including any attachments) may contain 
confidential, proprietary and privileged information, and unauthorized 
disclosure or use is prohibited.  If you received this email in error, 
please notify the sender and delete this email from your system. Thank