我使用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中的「正確」序列是:接受自己的答案,然後再提出另一個答案。嘆... –