我正在使用JMeter進行負載測試。我的測試包含一個簡單的POST請求。當我執行此請求時,服務器在其錯誤日誌中說No Payload Detected
。我已驗證服務器正在收到Post請求,並且我在Raw Post Body中嘗試了不同的文本。將JMeter與REST Webservice和XML主體一起使用時檢測不到有效負載
接下來,爲了確保它不是服務器的問題,我使用了不同的Http Request程序(Wiztools休息客戶端)發送具有相同內容的帖子。它的工作原理,並沒有No Payload Detected
錯誤引發。
我目前的理論是,JMeter和服務器都解析。我知道服務器,因爲它正在尋找一小塊數據,並且JMeter的解析破壞了那小塊數據。
因此,最後,我的問題是「JMeter做什麼解析?」。
我找了這個答案,我知道它唯一解析的是${VARNAME}
。
我送文如下:
<IpReport xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="">
<ProductReviewId>12345</ProductReviewId>
<DepartmentCode>ABC</DepartmentCode>
<ProductTitle>Test of a teaser</ProductTitle>
<ProjectId>2</ProjectId>
<ProductCodePD>ICS-1139150</ProductCodePD>
<Priority>Pre-Approved</Priority>
<Status>Approved</Status>
<IpStatus>Submitted</IpStatus>
<EvalStatus>Approved</EvalStatus>
<EvalNotes>No Limitations - message from eval</EvalNotes>
<Notes>Notes test</Notes>
<IsInClarity>true</IsInClarity>
<IsPreRelease>true</IsPreRelease>
<IsApproved>true</IsApproved>
<IsCOREvalIP>false</IsCOREvalIP>
<Elements>
<IpReportElement>
<IpReportElementLineItemId>21774</IpReportElementLineItemId>
<ElementType>ReportingStatement</ElementType>
<Contributor>Sample Contributor</Contributor>
<Description>test</Description>
<LocationInProduct>test</LocationInProduct>
<ReportingStatementId>7</ReportingStatementId>
<IpCodeId>3</IpCodeId>
<Links>
<IpReportLink>
<IpReportLinkId>25982</IpReportLinkId>
<Name>Link</Name>
<Url>https://example.org/</Url>
</IpReportLink>
</Links>
</IpReportElement>
</Elements>
<CustomData><site>ldsorg</site>
<site-root>/preview/ldsorg/</site-root>
<correlation-document-id>123456-eng</correlation-document-id>
<post-to-server>l12773:9239</post-to-server>
</CustomData>
<ApprovalNumber>2013-1139150-I</ApprovalNumber>
<EvalApprovalNumber>2013-1139150-E</EvalApprovalNumber>
</IpReport>
這裏是JMeter的的屏幕截圖。這是唯一的要求,沒有其他的配置元素: 所有的
顯示您的HTTP取樣配置 – 2013-05-06 16:41:46
HTTP://img607.imageshack .us/img607/4645/20130506104835telerikvm.png請求的截圖。我已驗證服務器和端口是否正確。我沒有任何配置元素。 – 2013-05-06 16:50:42
你可以在你的問題中添加圖片,我無法顯示鏈接 – 2013-05-06 16:54:41