Hi All,
I have a requirement to test REST webservice in Ranorex and Compare the Data in Response JSON with the Hadoop query result.
Below is the flow:
1) Submit the REST request with some parameters and Get the Response in JSON format
2) Execute Hadoop query and Convert the output the JSON format
2) Compare the 2 JSON files.
Please let us know if there is any way we can do this with Ranorex. Sharing any code is appreciated and will be very useful.
Thanks and Regards
Vivek
Need to Test REST webservice using Ranorex
-
- Posts: 31
- Joined: Mon Feb 22, 2016 7:21 pm
Re: Need to Test REST webservice using Ranorex
Ranorex is a Functional UI Test Automation tool. It is not designed, out-of-the-box, to be used for service testing, and there is no way to do it without getting into .NET code.
However, it is a .NET-base system and you can do pretty much anything you need with it in the framework of .NET.
If you want code examples, there are plenty of examples on the web concerning how to interact with a restful API in .NET and how to parse JSON (hint: use the Newtonsoft.Json library!). You will have to decide what the best way to do this is for your situation.
For example:
But, then you need to convert the response into something usable like a memory stream using a serializer.
My code library that does this for me, but it is rather large and contains proprietary code that I can't release.
However, it is a .NET-base system and you can do pretty much anything you need with it in the framework of .NET.
If you want code examples, there are plenty of examples on the web concerning how to interact with a restful API in .NET and how to parse JSON (hint: use the Newtonsoft.Json library!). You will have to decide what the best way to do this is for your situation.
For example:
Code: Select all
using (HttpClient client = new HttpClient()) {
HttpResponseMessage response = client.GetAsync(serviceUri).Result;
}
My code library that does this for me, but it is rather large and contains proprietary code that I can't release.
Shortcuts usually aren't...
-
- Posts: 28
- Joined: Wed Aug 12, 2015 6:44 pm
Re: Need to Test REST webservice using Ranorex
Hi
We also have the need to test REST webservice. We are using Ranorex 6.2.0.
Are there any plans to be able to add REST references to your Solution.
We also have the need to test REST webservice. We are using Ranorex 6.2.0.
Are there any plans to be able to add REST references to your Solution.
- RobinHood42
- Posts: 324
- Joined: Fri Jan 09, 2015 3:24 pm
Re: Need to Test REST webservice using Ranorex
Hi jmchughsmart,
This already can be done like with any other .net based project. Do you face a any issues?
Cheers,
Robin
This already can be done like with any other .net based project. Do you face a any issues?
Cheers,
Robin
-
- Posts: 28
- Joined: Wed Aug 12, 2015 6:44 pm
Re: Need to Test REST webservice using Ranorex
Hi RobinHood42,
Yes, looking for 'How to' information: "done like with any other .net based project"
Possibly, some one has a Ranorex Solution that can be reviewed.
Yes, looking for 'How to' information: "done like with any other .net based project"
Possibly, some one has a Ranorex Solution that can be reviewed.
Re: Need to Test REST webservice using Ranorex
Hi, the best place to search for a Ranorex-related examples is this forum We already discussed sending web service requests couple of times. Please examine for example this post...
http://www.ranorex.com/forum/restful-we ... t8413.html
Hope this helps?
http://www.ranorex.com/forum/restful-we ... t8413.html
Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration