How to set different Content-Types in multipart/form-data POST Request?
I have a REST API, that I can curl correctly, but I can not get it done in ReadyApi. I have to upload a picture and a json string, which has the content-type "type=application/json": curl -X 'POST' 'http:/localhost:12345/rest/add' -H 'Content-Type: multipart/form-data' -F 'picture=@/home/my.jpg' -F 'criteria={"personId":"string"};type=application/json' I ticked "Post QueryString" and selected multipart/form-data. When I look up in the RAW tab, I see, that for criteria no content-type is set. The error message in ReadyApi says: Content type 'application/octet-stream' not supported It is necessary for me to set the content-type of my criteria JSON Object to "application/json". Otherwise I will get this error. I am on ReadyApi 3.45. Does anyone have a clue, how to solve the problem?Solved62Views0likes1CommentSSL Certificate error while trying to import swagger definition
I am trying to create a API project by using swagger/Open API definition(Rest) option. I have provided the a correct swagger definition(HTTPS) , but while importing it is throwing an error as "unable to read location '<swagger.json>' due to a SSL configuration error. It is possible that the server SSL certificate is invalid, self-signed, or has an untrusted Certificate Authority." From ready api documentation is saw that we face this issue when the specification is https and followed this solution, but even after doing this i am facing the same error. Can you please provide an alternate solution to this Possible Issues ReadyAPI cannot import OpenAPI 3.0 specifications through HTTPS if the server where your spec resides has an invalid or expired security certificate. To work around this issue: Add the following option to thevmoptionsfile: -Dio.swagger.parser.v3.util.RemoteUrl.trustAll=true Restart ReadyAPI to apply the change.Solved7KViews1like2CommentsHow to change the API of a REST test step
Hi guys, If you test REST APIs in SoapUI, you may encounter an issue where you cannot change the API attached to the REST test step. I am not aware of any standard way to do it, so I prepared a simple Groovy script to change the test step's API programmatically: testRunner.testCase.getTestStepList().each(){ step = it service = step.getService() log.info("TestStep: ${step.getName()}") config = step.getRequestStepConfig() log.info "Before: ${step.getService()}" config.setService("BankGround_v1.12") log.info "After: ${step.getService()}" } I thought this may help those of you who work with REST APIs, which get changed over time (new versions). For a longer story, you can visit the following article: https://www.linkedin.com/pulse/soapui-what-rest-api-changes-karel-husa-7vb2e33Views2likes0CommentsProperty transfer version 5.7.2 not removing double quotes.
I am doing property transfer by using the setup script through sql. My request has something which should be in []. I have created the propert transfer like below For the Target i have given like below. $.dispositionIds In the setup script I am giving like below. String dispositionIds = rows.DISPOSTN_ID //Set Property value testRunner.testCase.setPropertyValue( "DISPOSTN_ID", dispositionIds ) After runng the script I am getting the value in double quotes "" like shown below. "dispositionIds":"[1282678]" ---But becasue of the double quotes, My request is thrownig an error saying invalid json. My Colleagesue have a differnt verison soap 5.6.0 and it is working fine for them.SolvedREST request with parameters - how to avoid default Content-Transfert-Encoding:quoted-printable ?
Hi, I am facing to an issue (with soapUI version 5.6.0). My POST REST request have two parameters. One of them is a zip file converted in Base64. In Request Raw tab You can see a parameter "Content-Transfert-Encoding" with "quoted-printable". The parameter content contains multiple lines may be due to the Content-Transfert-Encoding parameter value. Expected one line with all the parameter content How to avoid this default value ? In a previous topics one member says that soapUI uses the mail api. And explains that if the primary type of this datasource is "text", and : - If all the bytes in its input stream are US-ASCII, then the encoding is "7bit". - If more than half of the bytes are non-US-ASCII, then the encoding is "base64". - If less than half of the bytes are non-US-ASCII, then the encoding is "quoted-printable". But how to make sure that more than half of the bytes are non-US-ASCII ?634Views0likes5CommentsParse a multipart/data-form response
Hello all, In my project, I want to assert the content of the reply from my server. I send a POST request containing only a xml file, and I get a multipart/form-data containing 2 parts as a response, as expected. How do I parse those 2 parts of the response in a grovvy script ? The problem is that the "response" property of my Request only contain the first part. The 2nd seems to be lost. Thank you for your support.422Views0likes1CommentSet Authorization Method defaults in Auth Manager which can be inherited by environments
Each of my Ready API projects have dozens of tests and 10+ environments each. The authorization methods for each API request/test is the same across all environments, but any time I need to make changes, or add new requests/tests, I have to open up the environment configuration window. and then for each environment I have to: select the api > Edit > Authorization > Configure > Auth Manager > expand out all of the requests/test steps > make any changes (which is like 3 mouse clicks each plus some scrolling) > close > save And then repeat the exact same steps 10+ more times. Even using inheritance within an environment as much as I can, it's incredibly tedious, and often leads to developers making quick one-off changes in the request/test itself which gets applied inconsistently across environments and then wonder why our automated tests start failing I propose being able to use Auth Manager in the "No Environment" to set the authorization methods in one place, which can then be applied to all environments (unless overridden). Basically, in addition to Inherit From Parent, there could be an Inherit From Default Environment. That way, if an environment will be using all the defaults I only need to touch the environment level auth manager once, set Inherit From Default Environment at the project level for each environment, and then apply that to all dependencies. Any time changes need to be made, I could open up the No Environment Auth Manager, make my changes there, and know it will apply to all all environments inheriting from the default.33Views1like0CommentsURL Encoding Not Working in Open Source version 5.7.2
The default behavior for REST query parameters of URL encoding is not working in version 5.7.2. Template parameters with special characters such as "/" are not being encoded causing the backend system to return an HTTP 404 Not Found error. SmartBear Documentation Our configuration19Views0likes0CommentsValidate Server SSL Certificate Against Soap-UI TrustStore
Dear All, I am trying to create a Soap-UI test which does a call against a server with a verified certificate by the CA (Certificate Authority) of my client. We want to validate this against a truststore in soap-ui to validate if the server certificate is indeed the correct, signed certificate we expect. My problem is that my test always succeeds, I actually want my test to succeed when the server presents a signed certificate, but I want the test to fail if the server presents a self-signed certificate. I have tried this with both SoapUI-5.5.0 as well as ReadyAPI 2.8. I have tried starting SoapUI withSSLv3 and TLS in the vmoptions configuration file. I have ofcourse imported the truststore in SoapUI in "Show Project View" menu, and I have done step 4. from the documentation on page: https://www.soapui.org/soapui-projects/ws-security.html Which I expect links my truststore to the project. I have not changed anything in SSL in the Preferences. On the latter page we also notice that in step 1.9 in the Authentication menu the "Incoming WSS:" selection box can be found in the documentation, but it is not there in our application (Both the SoapUI and ReadyAPI). This menu is also not present after uploading the truststore and finishing step 4.2.2KViews0likes1CommentRest request attachments multipart form data for json file with parameterized json data
So I have been trying to do a scenario where i have two attachments for a rest request, one json file which i need to parameterize couple of fields from previous request. The problem with this is once you have cached the attachment you cannot modify it based on the previous test steps, So i have followed the following youtube linkhttps://www.youtube.com/watch?v=iL-zehJmtWw Used query parameter to use a locally store file of json to request but we are getting the error from response that application/octet-stream content type is not accepted ------=_Part_01_136051460.1696260652738 Content-Disposition: form-data; name="testFile" testFile:/Path/to/file/testFile.json I have used parameter like this testFile:${projectDir}/testFile.json What should I do in this case927Views0likes6Comments