11 messages in com.canoo.lists.webtestRE: [Webtest] is it possible to inclu...
FromSent OnAttachments
Chang Su15 Jan 2007 13:33 
Dierk Koenig16 Jan 2007 02:18 
Paul King16 Jan 2007 03:59 
Chang Su16 Jan 2007 10:19 
Dierk Koenig16 Jan 2007 10:31 
Paul King16 Jan 2007 12:43 
Chang Su16 Jan 2007 18:21 
Paul King16 Jan 2007 20:49 
Chang Su17 Jan 2007 08:50 
Chang Su19 Jan 2007 11:32 
Chang Su19 Jan 2007 16:23 
Subject:RE: [Webtest] is it possible to include python in Webtest XML code
From:Chang Su (chan@yahoo.com)
Date:01/16/2007 10:19:59 AM
List:com.canoo.lists.webtest

thanks a lot Dierk.

Regards to the second option, do you mean I can use jython as wrapper for my python code.

can I call into my python module (under jython) inside <scriptStep> such has,

<scriptSteps> description="check hostname" language="jython"><![CDATA[ from xxxx.Hostname import * hostname= Hostname.gethostname() ]]></scriptStep>

(as long as I have jython.jar in my classpath)

OR

do I have to include the whole python script (which could be too long because of a chain of modules) inside <scriptSteps>.

thanks a lot,

Chang

--- Dierk Koenig <dier@canoo.com> wrote:

you can use the standard ant tasks, e.g. <exec> to start your python script. Other options are using the jython bsf integration with the <script> step.

regards Dierk

-----Original Message----- From: webt@lists.canoo.com [mailto:webt@lists.canoo.com]On Behalf Of Chang Su Sent: Montag, 15. Januar 2007 22:34 To: webt@lists.canoo.com Subject: [Webtest] is it possible to include python in Webtest XML code

Hi,

I like to use some of my existing python code that does data acquisition in my bui test automation code which I plan to use webtest.

For example, if the BUI display the host name is qa_machine_2, I like to lanuch my python code which runs cli 'hostname' on the machine and compares the result as one of my tests.

So the question is, is there a way to include python inside webtest xml code?

thanks,

Chang

__________________________________________________________________

__________________ Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A.

http://answers.yahoo.com/dir/?link=list&sid=396545367