51Testing软件测试论坛
标题:
怎么看MQ的记录及回放结果?
[打印本页]
作者:
gisjuanzi
时间:
2007-5-21 11:59
标题:
怎么看MQ的记录及回放结果?
比如这个结果,记录并运行后谈出的提示,看不懂
Traceback (innermost last):
(no code object) at line 0
File "<string>", line 12
class 1(PyHttpTestCase):
^
SyntaxError: invalid syntax
作者:
gisjuanzi
时间:
2007-5-21 12:01
语法错误吗?
是不是记录的脚本中要自己添加些语句?
这是前几行教本记录,谁能帮我看看什么问题啊?多谢了~
# Generated by MaxQ [com.bitmechanic.maxq.generator.JythonCodeGenerator]
from PyHttpTestCase import PyHttpTestCase
from com.bitmechanic.maxq import Config
global validatorPkg
if __name__ == 'main':
validatorPkg = Config.getValidatorPkgName()
# Determine the validator for this testcase.
exec 'from '+validatorPkg+' import Validator'
# definition of test class
class 1(PyHttpTestCase):
def runTest(self):
self.msg('Test started')
self.msg("Testing URL: %s" % self.replaceURL('''http://hdgis.ncgc.com.cn/webgis/pages/images/gis2_26.gif'''))
url = "http://hdgis.ncgc.com.cn/webgis/pages/images/gis2_26.gif"
params = None
Validator.validateRequest(self, self.getMethod(), "get", url, params)
self.get(url, params)
self.msg("Testing URL: %s" % self.replaceURL('''http://hdgis.ncgc.com.cn/webgis/pages/images/gis2_22.gif'''))
url = "http://hdgis.ncgc.com.cn/webgis/pages/images/gis2_22.gif"
params = None
Validator.validateRequest(self, self.getMethod(), "get", url, params)
self.get(url, params)
self.msg("Response code: %s" % self.getResponseCode())
self.assertEquals("Assert number 1 failed", 200, self.getResponseCode())
Validator.validateResponse(self, self.getMethod(), url, params)
作者:
gisjuanzi
时间:
2007-5-22 09:23
没有人用过吗?
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2