Re: [Grinder-use] Using Grinder and ZSI web services framework
Distributed load testing framework - Java, Jython, or Clojure scripts.
Brought to you by:
philipa
From: Philip A. <ph...@ma...> - 2008-03-27 23:46:18
|
I think you'll have bigger problems.... it looks like ZSI doesn't work with Jython: paston01:philipa% cat test.py import ZSI paston01:philipa% /opt/jython/jython2.2.1/jython -Dpython.path=/tmp/ZSI-2.0/ test.py Traceback (innermost last): File "grinder.py", line 1, in ? File "/tmp/ZSI-2.0/ZSI/__init__.py", line 405, in ? File "/tmp/ZSI-2.0/ZSI/TC.py", line 1794, in RegisterType TypeError: <built-in function bool> is not a class name - Phil Rob Sjodin wrote: > Phil, > > I've added both ZSI and PyXML packages to sys.path, but now I get the > following error when the script executes in Grinder: > > ImportError: cannot import name DOMImplementation > File: "...\xml\dom\__init__.py", line 220, in ? > > It appears that ...\xml\dom\__init__.py cannot find DOMImplementation, > even though DOMImplementation is in the same folder as __init__.py > > Any thoughts? > > Note: I don't have this problem when the script executes from > Eclipse/PyDev (i.e., outside Grinder). > > Thanks for your help. > > > -----Original Message----- > From: gri...@li... > [mailto:gri...@li...] On Behalf Of Philip > Aston > Sent: Wednesday, March 26, 2008 4:30 PM > To: grinder-use > Subject: Re: [Grinder-use] Using Grinder and ZSI web services framework > > Rob Sjodin wrote: > >> I have a python script that uses ZSI to access a web service. The >> script works outside Grinder (i.e., using Eclipse and the PyDev >> > plugin). > >> >> >> I converted the script to the Grinder format and then launched the >> Grinder agent using Ant. >> >> When the script executes, it complains about the following import >> statement: import ZSI >> >> >> >> Question: how do I inform Grinder about the ZSI package/module? >> >> >> >> Note: I'm new to Python/Jython/Grinder, so any help would be >> appreciated. Thanks. >> >> >> >> >> >> > > Assuming that ZSI can be used from Jython (as opposed to Python), you > could simply push the location onto the beginning of the Python > sys.path: > > import sys > sys.path.insert(0, "/directory/containing/zsi") > import ZSI > > > - Phil > |