我使用JMeter的2.6,并有我的测试以下设置:JMeter XML Schema的相对路径?
-
|-test.jmx
|-myschema.xsd
我已经成立了一个XML Schema声明,并在文件名称字段中键入"myschema.xsd"
。不幸的是,这并不工作:
HTTP Request
Output schema : error: line=1 col=114 schema_reference.4:
Failed to read schema document 'myschema.xsd', because
1) could not find the document;
2) the document could not be read;
3) the root element of the document is not <xsd:schema>.
我已经尝试添加几件事情给path
,包括${__P(user.dir)}
(指向用户的home dir
)和${__BeanShell(pwd())}
(不返回任何东西)。我通过给予绝对路径来实现它,但脚本应该被其他人使用,所以这不是好事。
我可以让它使用命令行中定义的属性值,但我也想避免它,因为同样的原因。
如何在这些情况下正确地将断言指向模式?
所以,显然SO中的“正确”序列是:接受自己的答案,然后再提出另一个答案。叹... –