3 messages in com.canoo.lists.webtestRe: [Webtest] Can I integrate existin...
FromSent OnAttachments
devarani ratnam12 May 2008 08:13 
Mato, Steve13 May 2008 05:52 
Marc Guillemot13 May 2008 10:47 
Subject:Re: [Webtest] Can I integrate existing java library function into Canoo WebTest
From:Marc Guillemot (mgui@yahoo.fr)
Date:05/13/2008 10:47:54 AM
List:com.canoo.lists.webtest

Hi,

if you have existing code using HtmlUnit directly, you surely have some methods with a WebClient or an HtmlPage as parameter. If you make your custom classes available in the classpath of your webtest project, you can call them from a groovy step (or scriptStep, but Groovy is simply better ;-)):

<groovy> import my.package.MyClass

MyClass.doSomething(step.context.currentResponse) MyClass.doSomethingElse(step.context.webClient) </groovy>

or wrap your method in a Step to allow reuse like <myCustomStep .../>

Cheers, Marc.

-- Blog: http://mguillem.wordpress.com

devarani ratnam wrote:

Hi, I am evaluating different web testing tools for a new project and Canoo Webtest seems very interesting. However, my team have used HtmlUnit in the past and we have few libraries of common functions written in Java. I wonder, is there any way I can integrate and reuse those libraries instead of rewrting all of them in xml for webtest.

------------------------------------------------------------------------ Make Windows Vista more reliable and secure with Windows Vista Service Pack 1. Learn more. <http://www.windowsvista.com/SP1?WT.mc_id=hotmailvistasp1banner>