[qmtest] Variable in argument list
Kelly Lucas
lucaskeli at fastmail.fm
Mon Apr 10 22:56:55 UTC 2006
Ok, I tried to use the targets file, and I'm getting all kinds of python
errors. I did the following:
1) Installed qmtest on the remote machine I want to test
2) removed the ssh -qX $1 out of my test case
3) removed the argument list from my testcase
4) created a target file that looks like this: <hostname>
rsh_target.RSHTarget xw4000 remote_shell="/usr/bin/ssh"
5) ran qmtest with following: qmtest run -T <targetfile> <testcasename>
and I get the following output:
Traceback (most recent call last):
File "/usr/bin/qmtest", line 189, in ?
exit_code = main()
File "/usr/bin/qmtest", line 167, in main
exit_code = command.Execute()
File "/usr/lib/python2.2/site-packages/qm/test/cmdline.py", line 675,
in Execute
return method()
File "/usr/lib/python2.2/site-packages/qm/test/cmdline.py", line 1365,
in __ExecuteRun
targets = self.GetTargets()
File "/usr/lib/python2.2/site-packages/qm/test/cmdline.py", line 741,
in GetTargets
test.set_targets(self.GetTargetsFromFile(file_name))
File "/usr/lib/python2.2/site-packages/qm/test/cmdline.py", line 706,
in GetTargetsFromFile
document = qm.xmlutil.load_xml_file(file_name)
File "/usr/lib/python2.2/site-packages/qm/xmlutil.py", line 55, in
load_xml_file
return load_xml(file)
File "/usr/lib/python2.2/site-packages/qm/xmlutil.py", line 69, in
load_xml
document = xml.dom.minidom.parse(file)
File "/usr/lib/python2.2/site-packages/_xmlplus/dom/minidom.py", line
962, in parse
return _doparse(pulldom.parse, args, kwargs)
File "/usr/lib/python2.2/site-packages/_xmlplus/dom/minidom.py", line
954, in _doparse
toktype, rootNode = events.getEvent()
File "/usr/lib/python2.2/site-packages/_xmlplus/dom/pulldom.py", line
265, in getEvent
self.parser.feed(buf)
File "/usr/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py",
line 208, in feed
self._err_handler.fatalError(exc)
File "/usr/lib/python2.2/site-packages/_xmlplus/sax/handler.py", line
38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: <unknown>:1:0: syntax error
Any ideas why this would fail? I can run the testcase if I first ssh to
the remote system and then execute qmtest.
kdl
Kelly D. Lucas
lucaskeli at fastmail.fm
Stefan Seefeld wrote:
> Kelly Lucas wrote:
>> This looks like the preferred solution, except that it would require
>> that I have qmtest installed on all of the hosts I want to run my
>> tests on.
>
> That's correct. QMTest also supports a 'Host' extension type that
> supports
> remote program execution by means of 'rsh' or 'ssh' without any need to
> prepare that machine, as that extension is responsible for uploading
> files
> before executing them remotely.
> (You can provide your own 'Host' types in the same way you can implement
> your own tests, and so have full control over what to upload and where.)
>
>> Currently, I have a bunch of tests that look like:
>>
>> ssh -X $1 'command'
>>
>> Where $1 is the hostname of the system I'm testing, and I specified
>> that in each testcase in the Argument List. This is a field that is
>> available through the GUI and help says:
>>
>>
>> Argument List
>>
>>
>> About This Field
>>
>> The command-line arguments.
>
> I see ! While you may be able to use these fields, you usually shouldn't
> use different values for the same test in different test runs. To quote
> from the manual:
>
> "The arguments to the test parameterize the test; they are what make two
> instances of the same test class different from each other."
>
> Regards,
> Stefan
More information about the qmtest
mailing list