You could leave JUnit out of the picture with an ant script:

<groovy ... set up wiser ...>
<webtest ... portal interaction ...>
<ftp ... using ant ftp tasks ...>
<groovy ... with asserts to test emails arrived...>

You can place the <groovy> and <ftp> tasks within a webtest
if you want its reporting - WebTest also maintain the binding
so you can easily get the wiser variable in the second groovy.
(Note: Tasks within a WebTest get automatic AntWrappers)

Of course you could use JUnit as well if you wanted.

WebTest also provides Email testing capabilities but relies
on interacting with an Email server via POP3 or IMAP (we often
use Jes in integration test scenarios) rather than by the
Wiser/Dumbster approach. It would be interesting to integrate
the two however.

Cheers, Paul.
Alvin Lo wrote:
when you said drive the tests from webtest, do you mean using ant wrapper inside webtest to call the junit task?


From: Marc Guillemot <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: [Webtest] how to call webtest inside junit
Date: Mon, 14 Aug 2006 19:01:26 +0200

Hi Alvin,

I would probably rather drive the tests from webtest but it is as you want. To execute WebTests from Junit, you just need to call the Ant Main class with the right parameters (see Ant documentation).

To merge the results you surely can use an xslt. I don't know if there is an better solution.

Marc.

Alvin Lo wrote:
I am testing a complex system, and I would like to call webtest in junit. Can give me some suggestion?
This is the scenario:
1. junit setup will start a test mail server (http://subethasmtp.tigris.org/wiser.html)
2. using webtest to go to the portal to configure the email account
3. send a few transactions through ftp to a server, that will trigger the server to send out some email
4. go to the email server and check the email body and attachments

In order to do this, I will need to invoke the webtest within junit, is this doable? Another question is how to merge the webtest result with the other junit result into a single report.

thx

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to