Contributions
Varying parameter in load test
Hi, I created a REST HTTP Request for a POST Method, using JSON data in the body. I am trying to do the load test by sending POST requests to multiple locations with different deviceId in order to check the total consuming time. The path used for POST is "..../device/{device_ID}" POST Body: { "accountId":2500000000, "deviceId":${device_ID}, "key":"Program", "value":"on" } For example, device_ID is set from 1001 to 2000. May I ask how to do this load test by using SOAPUI? I couldn't find the way to set varied deviceId. Thanks a lot in advance!899Views0likes1CommentUsing parameters in JSON Body in REST HTTP POST method
Hi, I am trying to create a REST HTTP Request for a POST Method, using JSON data in the body. I am trying to use parameters instead of values in the body. For example: POST Body: { "accountId":${accountID}, "userId":${userID} } I named a parameter as accountID with a long-type value like 1380000 of PLAIN style. I also named a parameter as userID with a long-type value like 250000000 of PLAIN style. But after I submitted the POST request, the data in Raw became { "accountId":, "userId": } I am wondering why those values were not taken? How to make it JSON style instead of PLAIN style? Thanks a lot in advance!17KViews0likes5CommentsRe: HTTP ERROR 500 when using POST method
In addition, I used Jmeter to do POST request on the same path, it is working. So why can't I use soapui to send the POST request successfully? It seems like those parameters in data are not sent by the POST request according to this 500 error. Which style of the parameter should I choose? I tried all of them (query, template, header, matrix, plain), none is working. I have set the content-type of header to be application/json, the media types of request and response are application/json. The type of parameter is always {http://www.w3.org/2001/XMLSchema}string, how to change it to json type? <method name="POST" id="Post"> <doc xml:lang="en" title="Post"/> <request> <param name="accountId" default="11" type="xs:string" required="false" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/> <param name="userId" default="23" type="xs:string" required="false" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/> <param name="value" default="0" type="xs:string" required="false" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/> <param name="key" default="345" type="xs:string" required="false" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/> <param name="id" default="123" type="xs:string" required="false" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/> <representation mediaType="application/json"/> </request> <response status=""> <representation mediaType="application/json"/> <representation mediaType="application/json"/> </response> <response status="500"> <representation mediaType="text/html;charset=ISO-8859-1" element="html"/> </response> </method>12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes0CommentsHTTP ERROR 500 when using POST method
I am trying to use HTTP POST request to post asset to Data Server, I get this HTTP ERROR 500: No content to map to Object due to end of input. java.io.EOFException: No content to map to Object due to end of input. However, I can successfully use GET/DELETE request on the same url. How to solve this problem? Thanks.12 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.7KViews0likes1CommentRe: How to set content type to be application/json?
ccdssv1 wrote: Hi, You have 2 options: - if you use the REST Resources then you can go to that method and define an representation for "request", like in the below screenshot, this will make the application/json displayed in the drop down for that method: - if you use the HTTP request then all u need to do is to open the request and just type the content they you want eg application/json, this will be available only for this request if you have more like this then you need to repeat this step: Hope this will help you. It helps a lot. Thank you.12 years agoPlace ReadyAPI QuestionsReadyAPI Questions16KViews0likes0CommentsHow to set content type to be application/json?
Hi, I am trying to use POST method to post some values to the server, the Media Type that I can choose from only have three options: application/xml, text/xml, multipart/form-data. May I ask how to set the application/json content type? Thanks.12 years agoPlace ReadyAPI QuestionsReadyAPI Questions17KViews0likes2Comments