Problem creating new test in latest Windows version
Kevin White
kevin at elemtech.com
Tue May 6 22:35:22 UTC 2003
Hello,
I'm a new QMTest user and am having a problem creating a new test case from
the GUI menu. I've searched the archives and haven't seen any discussion of
a similar problem.
When I attempt to create a test case (Windows 2000), I receive the following
error:
Exception type: qm.common.PythonException
Exception value: The extension class 'command.ExecTest' could not be found.
You may need to set the 'QMTEST_CLASS_PATH' environment variable.
Stack trace:
File "C:\progra~1\qm\lib\qm\qm\web.py", line 495, in __HandleScriptRequest
script_output = self.server.ProcessScript(request)
File "C:\progra~1\qm\lib\qm\qm\web.py", line 833, in ProcessScript
return self.__scripts[request.GetUrl()](request)
File "C:\progra~1\qm\lib\qm\qm\test\web\web.py", line 1785, in
HandleNewTest
return NewItemPage(self, "test")(request)
File "C:\progra~1\qm\lib\qm\qm\web.py", line 168, in __call__
return html_file(self)
File "C:\progra~1\qm\lib\qm\zope-dtml\DocumentTemplate\DT_String.py", line
538, in __call__
try: result = render_blocks(self._v_blocks, md)
File
"C:\progra~1\qm\lib\qm\zope-dtml\DocumentTemplate\pDocumentTemplate.py",
line 273, in render_blocks
if section: section=render_blocks(section,md)
File
"C:\progra~1\qm\lib\qm\zope-dtml\DocumentTemplate\pDocumentTemplate.py",
line 250, in render_blocks
else: section=section(md)
File "C:\progra~1\qm\lib\qm\zope-dtml\DocumentTemplate\DT_Util.py", line
334, in eval
return eval(code,globals,d)
File "<string>", line 0, in ?
File "C:\progra~1\qm\lib\qm\qm\test\web\web.py", line 826, in
GetClassDescriptions
self.database)
File "C:\progra~1\qm\lib\qm\qm\test\base.py", line 285, in
get_extension_class
directory, directories)
File "C:\progra~1\qm\lib\qm\qm\test\base.py", line 217, in
get_extension_class_from_directory
path + sys.path)
File "C:\progra~1\qm\lib\qm\qm\common.py", line 450, in load_class
module = load_module(module_name, search_path, load_path)
File "C:\progra~1\qm\lib\qm\qm\common.py", line 396, in load_module
module = imp.load_module(name, file, file_name, description)
File "C:\progra~1\qm\lib\qm\qm\test\classes\command.py", line 24, in ?
import qm.executable
File "C:\progra~1\qm\lib\qm\qm\executable.py", line 26, in ?
import pywintypes
Setting the abovementioned environment variable inside qmtest.bat doesn't
seem to help either. When I execute 'qmtest extensions', here is the
output:
C:\Program Files\QM\bin>qmtest extensions
** Available test classes **
- command.ExecTest
No description available: could not load class.
- command.ShellCommandTest
No description available: could not load class.
- command.ShellScriptTest
No description available: could not load class.
- file.FileContentsTest
Check that the contents of a file match the expected value.
- python.ExecTest
Check that a Python expression evaluates to true.
- python.ExceptionTest
Check that the specified Python code raises an exception.
- python.StringExceptionTest
Check that the specified Python code raises a string exception.
** Available resource classes **
- temporary.TempDirectoryResource
Resource class to manage a temporary directory.
** Available database classes **
- xml_database.XMLDatabase
A database representing tests as XML files in a directory tree.
** Available target classes **
- serial_target.SerialTarget
A target that runs tests in serial on the local machine.
- thread_target.ThreadTarget
A target implementation that runs tests in local threads.
- process_target.ProcessTarget
No description available: could not load class.
- rsh_target.RSHTarget
No description available: could not load class.
For some reason, it can't load the command module and I'm not sure why. It
exists in the same directory as some of the other modules that load just
fine, and command.ExecTest has an entry in classes.qmc. I believe Python is
correctly setup on my machine since I use it for other programs.
Note, this works without problem on my RedHat 8.0 box...
Thanks,
Kevin White
QA Lead
Elemental Technologies, Inc.
More information about the qmtest
mailing list