Hi Chang, I'm not a jython/python expert. If jython allows calling python code (which would surprise me) than this will also work inside scriptStep. Otherwise you will have to include the whole script.
If it's only about retrieving a hostname, it shouldn't be too long... happy testing Dierk > -----Original Message----- > From: Chang Su [mailto:[EMAIL PROTECTED] > Sent: Dienstag, 16. Januar 2007 19:20 > To: [email protected]; Dierk Koenig > Subject: RE: [Webtest] is it possible to include python in Webtest XML > code > > > 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] Behalf Of > > Chang Su > > > Sent: Montag, 15. Januar 2007 22:34 > > > To: [email protected] > > > 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 > > > _______________________________________________ > > > WebTest mailing list > > > [email protected] > > > http://lists.canoo.com/mailman/listinfo/webtest > > _______________________________________________ > > WebTest mailing list > > [email protected] > > http://lists.canoo.com/mailman/listinfo/webtest > > > > > > > __________________________________________________________________ > __________________ > We won't tell. Get more on shows you hate to love > (and love to hate): Yahoo! TV's Guilty Pleasures list. > http://tv.yahoo.com/collections/265 _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

