ContributionsMost RecentMost LikesSolutionsRe: Rest request attachments multipart form data for json file with parameterized json data Answer from smartbear support below. The links they suggested did not provide a solution/workaround. I am playing around a bit on how to construct / adapt the (raw)request payload and send it again with proper content-type, but so far no luck in finding a workaround that solves it. So only solution might be to wait for RIA-22427 :'-( Thank you for reaching out to SmartBear support. We have received your case and we are happy to help. We understand your concern. We already have an enhancement request in place for your request RIA-22427. However, we do not have an ETA on when this enhancement will be implemented in the application. You can alternatively check this: For the content type to be application/json, I would suggest you uncheck the Post QueryString. Once the option is unchecked, the Media type will display it: https://support.smartbear.com/readyapi/docs/requests/attachment/rest.html https://support.smartbear.com/readyapi/docs/functional/steps/http-request.html https://community.smartbear.com/discussions/readyapi-questions/how-to-pass-multipartform-data-request-schema-in-post-request/192169 Hope this was helpful. Please feel free to reach out to us in case you have any other queries. Have a great day. Thank you! Re: Rest request attachments multipart form data for json file with parameterized json data Hi richie . Digging up this old post as I'm also confronted with this issue and I believe the original question isn't answered. I found a stackoverflow post which clearly explains the issue: https://stackoverflow.com/questions/78076769/soapui-readyapi-multi-part-form-data-rest-request-how-to-set-content-type-of So next to a normal file, we also need to send a json object for another query parameter called "myInfo". I tried 3 ways in ReadyAPI 3.52 to achieve this, but all fail to achieve my goal. More info on these 3 with test data from the stackoverflow post: The way the original poster tried it in stackoverflow: I tried to add the json value in the query parameter. The raw view shows the json payload, but the Content-Type: application/json is missing, and our application does not accept it without this header (Content-Type 'application/octet-stream' is not supported). I have no way of adjusting this query parameter's setting to set the content-type. In the payload window, underneath the "media type" selection I added the json payload, like {"myInfo" : {"firstName" : "John", "lastName", "Doe", "middleInitial" : "A"} }. Then the Content-Type: application/json is there, but no Content-Disposition: form-data; name="myInfo" , which makes our application saying it's missing the "myInfo" parameter. I tried to pack my json into another file (next to my normal attachment "pdfFile"). The the readyAPI reads out that file and sends the json object, but again, not with proper application/json header but with Content-Type: application/octet-stream & Content-Transfer-Encoding: binary The thing is, if I can send it like the poster on stackoverlfow indicates, so Content-Disposition: form-data; name="myInfo" Content-Type: application/json it will work, as I can achieve that via postmen. It seems to me a limitation in ReadyAPI that blocks me... FYI: Raised support ticket 00667624 to address this. Re: ReadyAPI - Data Source - Minimum value as today´s date - Possible? Hi AutoBear , In your script, it looks like you forgot to use your i variable. In stead of currentDate.add(Calendar.DAY_OF_MONTH, 1) try currentDate.add(Calendar.DAY_OF_MONTH, i) Re: Disable test cases depending on environment Vigneshwaranit : I assume that is either because you are not running this script from the project setup script OR something else in your setup script fails. The above script was confirmed working from the project setup script, no need for any additional imports. Of course, you need to adjust the values "generate access token" & "sandbox" to your use case. If first issue, you have to know that each place where you can do scripting has a limited set of "objects" you can use. Project setup script has these: A test case setup script has these: This means you cannot use a statement like project.testSuiteList in a test case setup script. To get the project object, you will need to use statement: testCase.testSuite.project If second issue: You need to look in your "Error Log" tab to know what exactly is the issue (you will see line number where it breaks and more info) Re: Environment-specific assertions What I often do in such a case is assert via a script assertion. In the script I get the current active environment via: def activeEnvironmentName = messageExchange.modelItem.project.activeEnvironment.name //note, this is the name for your environment you have setup in the "Endpoints & Environments" setting. //for tst def expectedResult = "tst123" if (activeEnvironmentName == "acc"){ //for acc expectedResult = "acc123" } then proceed with the actual assertion by getting the actual api response value and assert it against expectedResult Re: ReadyAPI Error: Error getting response; java.net.SocketException: Connection reset by peer Or perhaps another instance of readyAPI is already running on your machine? I know you can open ReadyAPI 2 times, but that does cause some instabilities I noticed... It could be a reason for the exotic "An established connection was aborted by the software in your host machine." Not tested it, but just trying to get some clues... Re: ReadyAPI Error: Error getting response; java.net.SocketException: Connection reset by peer From your logs, can you see how long exactly the request takes before the connection closes? If it happens each time after 60 seconds there might still be something with your socket timeout settings. Note that there is test case timeout and socket timeout. I referred to the latter. See https://support.smartbear.com/readyapi/docs/functional/ui/case.html#options (The duration (ms) of a connection socket. The empty value or 0 sets the timeout to 1 minute.) Or your rest service (or any other downstream service) has a timeout set whichafter it closes down. But if you say it consistently fails for ReadyAPI but works for Postmen than this cannot be the case. Re: ReadyAPI Error: Error getting response; java.net.SocketException: Connection reset by peer Hi AkshayMandloi . Did you trye in your test case options to specify you socket timeout limit. Default is zero = 60.000 ms (= 1 minute). Re: How to handle parameter value like " ${xyz} in rest request body Hi avraroy . I think you can do this: "audit" :"$${xyz}" Re: data source Loop Hi armygrad . Just a guess, but if each loop takes around 8 seconds then your test case will time out if you use the default setting (=0 == 60000 ms === 1 minute). So after 7 loops ReadyAPI will cancel the run as 1 minute has passed since you started the test case. You can adjust the Test Case Timeout via right click on the test case and click on options. If that is not the root cause, potentially there might be something in your data source that is not as expected (check perhaps your error log and/or do some scripting to the script log (log.info) to see more details...