test in tutorial fails on Windows

Danny Faught faught at tejasconsulting.com
Thu Jul 24 15:39:42 UTC 2003


I just started looking at QMTest 2.0.3 in earnest in order to use it as 
an example in a tutorial I'm giving at a conference.  So far I'm very
impressed.

I'm going through the tutorial on Windows 2000 now, and I'm getting 
stuck.  On the page at 
http://www.codesourcery.com/qm/qmtest_downloads/qm-2.0.3/manual.html/sec-testtut-modifying.html, 
  it says "Click on the Home link to return to the main QMTest page."  I 
haven't found a Home link on the web interface.

In any case, it's not too hard to get to a page where I can do File->New 
Test.  I create a test that tries to do "echo test", but the result when 
I run it is an error: "pywintypes.api_error: (2, 'CreateProcess', 'The 
system cannot find the file specified.')"  It appears that echo is a DOS 
builtin rather than a separate utility as on Unix.

Here's the source for command.test1:

<?xml version="1.0" ?>
<extension class="command.ExecTest" kind="test"><argument 
name="environment"><set/></argument><argument 
name="program"><text>echo</text></argument><argument 
name="resources"><set/></argument><argument 
name="arguments"><set><text>test</text>
</set></argument><argument name="stderr"><text/></argument><argument 
name="stdout"><text>test
</text></argument><argument 
name="prerequisites"><set/></argument><argument name
="stdin"><text/></argument><argument 
name="exit_code"><integer>0</integer></argument><argument 
name="target_group"><text>.*</text></argument></extension>

It works better using the command.ShellCommandTest class instead.  In 
that case, the test runs, but I can't get it to match the output -

-------------
command.test2
Outcome Cause
FAIL Unexpected standard output.
Annotation Value
ExecTest.expected_stdout

test

ExecTest.stdout

test

qmtest.target local
--------------

There is a carriage return in the expected output, like the tutorial says:

<?xml version="1.0" ?>
<extension class="command.ShellCommandTest" kind="test"><argument 
name="environment"><set/></argument><argument 
name="target_group"><text>.*</text></argument><argument 
name="command"><text>echo test</text></argument><argument name="stderr">
<text/></argument><argument name="stdout"><text>test
</text></argument><argument 
name="prerequisites"><set/></argument><argument 
name="stdin"><text/></argument><argument 
name="exit_code"><integer>0</integer></argument><argument 
name="resources"><set/></argument></extension>

Any pointers would be appreciated.  I'm using ActiveState Python 2.2.2.
-- 
Danny R. Faught
Tejas Software Consulting
publisher of Open Testware Reviews -
   http://tejasconsulting.com/open-testware/




More information about the qmtest mailing list