[ptt-users] how to run a Jython/Python unit test?
Lars Huttar
lars_huttar at sil.org
Fri Sep 28 13:31:03 PDT 2007
Hello,
This seems like a really dumb question, but I can't figure it out.
I have been writing a Python unit test, based on HTTP_Example.py.
But I can't figure out how to have TestMaker run it. I assume I need to
put it into a functional test (which is the same thing as a test
scenario?). But how do I do that?
I guess it should go in <resources>, but the docs for <resources> don't
show an example of a python resource. Maybe analogous to the ruby
example? something like
<module name="MyPythonClass" path="./example_agents/HTTP_Example.py"/>
Oh... I just found a relevant example. In
example_agents\monitoringExample\mytestmonitor.xml there is a python
unit test:
<module name="myscript"
path="./example_agents/monitoringExample/myjython.py"/>
I will go ahead and post this email in case others are trying to figure
out the same thing.
Would be nice to have this in the documentation. E.g. on the page
http://docs.pushtotest.com/docs/reference.html,
the section on <resources> could say that <module> is used for python
scripts as well as ruby (and also ...).
It would also be nice to have the meaning of the name attribute of
<module> defined (it appears to be the ID that <run>/@module will use to
refer to the module).
Regards,
Lars
More information about the Users
mailing list