I am using SoapUI to test the web service. In that I can able to format one request and get the response back.
now My requirement is I need to prepare a file(not sure about the format) and I have to send 50 to 100 different requests at a time from the soapUI client and get the response back.
Colud any one help me out in this?
You can use datasource to load the input for which you want to get back response and then loop it using datasource loop step
More info : http://www.soapui.org/Data-Driven-Testing/datasources.html
Not sure if this what you are looking for.
Related
I am trying to write automated tests with Postman. I am new to postman automation world so sorry if the question will seem dumb.
In the api that I need to test when I send a request I immediately receive a response with a transactionID, no matter transaction succeeded or not. Along with my request I send a CallbackURL to the server where I expect the actual transaction result to be called back. The server will do a PUT request back to the CallbackURL that I have provided with the transactionID and the actual response or error.
So the question is, can I have such kind of scenarios in my postman tests?
I guess I should run a web server and expose an endpoint which will expect a PUT request and I should get the body of this PUT request in my tests to check it, and respond back to it with success.
In other words, within my script I need to perform the following actions:
Do a request to the server passing a callback URL
check the immediate response from the server and keep the returned transactionID
Have a webserver run with an endpoint that I passed as a callback URL
Expect a request to that endpoint with transactionID and actual response
Check that the response is what I actually expected
Respond to the request with success
I was thinking about Postman Mock server, but seems it is not designed for such usage.
I also think may be I can run some JS Webserver (may be nodeJS) inside the postman Sandbox...
Actually I am very new to postman testing and I am really confused about this kind of issue. Is it even possible to do this with postman or I need something else?
There are some features provided by POSTMAN which can help you to resolve your problem
When you do request to server passing callback URL it gives you transactionID in response. Save that transactionID in environment variable or global variable. Same you can do it for callbackURL.
Eg. pm.environment.set("transactionID", transactionID);
Then you can do the second request where you passed callback URL and transactionID which you have already.
In short in POSTMAN there are features like
Set global and environment variable which helps to pass some values fetched from response to another request.
call other request on success of first request
eg. postman.setnextRequest({{requestname}});
If you can mentioned your problem statement little bit in details it will be easy to answer in better way.
Hope This Will Help You
I am using Django, Neo4j, and pentaho. In Pentaho Data Integration, we can use the javascript for any transaction. My question is that can we call ajax from the PDI javasticpt to django server method. Actually i want to send success msg to server after the ETL process done by the PDI. Following is the javascript I am trying.
var xhReq = new XMLHttpRequest();
xhReq.open("GET", "http://127.0.0.1/url_name/?parameter=value", false);
xhReq.send();
Don't re-invent the wheel my friend!, use the "REST Client" step as the last step of your flow, and use the parameters in the step to specify the GET Method and URL with GET parameters to send. After executing the "REST Client" you will get the expected response as you specified in the parameters (maybe a JSON if your server answers it).
You don't need to code with javascript (actually is possible with User Defined Java Class with coding, but it's a more complex process).
I have implemented a web-service in qualtrics after a question block and the job is to do an operation and send a response back to my website after the survey.I don't know how qualtrics record these responses. Is there any logs section in qualtrics where we can see these responses? Can we deal with the responses in the qualtrics login?
If I'm understanding correctly, you're asking how responses are recorded in Qualtrics WebServices.
When a response comes in, Qualtrics parses the response as embedded data fields. Please note that the response has to be in json or xml encoding for Qualtrics to be able to properly parse it. When you test a webservice it gives you the option to set embedded data based on the response that comes back during testing.
Qualtrics automatically parses your response and assigns it to each parameter.
Either way work. (I didn't test in xml but, I assume it would work as well)
q1=answer1&q2=answer2&...
in JSON {"q1":"answer1", "q2":"answer2", ...)
I made an application using Qt/C++ that reads some values every 5-7 seconds and sends them to a website.
My approach is very simple. I am just reading the values i want to send and then i make an HTTP POST to the website. I also send the username and password to the website.
The problem is that i cannot find out if the request is successful. I mean that if i send the request and server gets it, i will get an HTTP:200 always. For example if the password is not correct, there is no way to know it. It is the way HTTP works.
Now i think i will need some kind of a protocol to take care the communication between the application and the website.
The question is what protocol to use?
If the action performed completes before the response header is sent you have the option of adding a custom status to it. If your website is built on PHP you can call header() to add the custom status of the operation.
header('XAppRequest-Status: complete');
if you can modify the server side script you could do the following
on one end :
You can make the HTTP post request via ajax
and evaluate the result of the ajax request.
On the serve side
On the HTTP request you do your process and if everything goes accordingly you can send data back to the ajax script that called it.
solves your problem .. ?
I am using apache axis2 server webservies, Basically I am sending xml response to android client through webservices. Here I need to maintain the session since the services per user basis. I know maintaining session in webservices is bad idea, but cant avoid it.
Actually I need to generate random unique string when user invoke first service from android client, that random string going to be used as session id. This session id, i need to set in http custom header, so that android client can able to get it and can send it subsequent requests as well.
I want to know whether any API is available in axis2 to set custom header information on http headers. Same way I need to read the http header, so that next request I can get the session id from header.
Can anyone advice me regarding this?? Thanks
-Ravi
Dead link on #Martin Dürrmeier's answer, here's a snapshot of the webpage that i've found on web.archive.org : Axis2 - Setting custom HTTP Headers on a response, it helped me.
Here's the lines needed :
MessageContext responseMessageContext =
MessageContext.getCurrentMessageContext().getOperationContext().getMessageContext(
WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
List<Header> headers = new ArrayList<Header>();
headers.add(new Header(HTTPConstants.HEADER_CONTENT_ENCODING, "identity"));
responseMessageContext.setProperty(HTTPConstants.HTTP_HEADERS, headers);