Restsharp support webservice automationtesting like rest

0 votes

Hi ,

Restsharp support webservice automationtesting like rest .

i want to automation webservice using C# . if Restsharp supports share same sample code.

sample uri : http://currencyconverter.kowabunga.net/converter.asmx

RestClient client = new RestClient("http://currencyconverter.kowabunga.net");
            RestRequest request = new RestRequest("/converter.asmx", Method.GET);

             request.AddParameter("CurrencyFrom", "USD", ParameterType.GetOrPost);

            request.AddParameter("CurrencyTo", "INR", ParameterType.GetOrPost);

            request.AddParameter("RateDate", "2018-12-07", ParameterType.GetOrPost);            
   IRestResponse response = client.Execute(request); //StatusCode: OK, Content-Type: text/html; charset=utf-8, Content-Length: 6651

          //  JsonDeserializer des = new JsonDeserializer();
            XmlDeserializer des = new XmlDeserializer();

            var res = des.Deserialize<Dictionary<string, string>>(response); // getting error here like below

System.Xml.XmlException: 'The 'p' start tag on line 108 position 16 does not match the end tag of 'ul'. Line 110, position 17.

Expected result : <decimal xmlns="http://tempuri.org/">70.802040277899920851288365139</decimal>

thanks

Aug 9 in Java by anonymous
• 2,970 points
217 views

Hello,

Would you please provide more information about what you are trying to do?

Hi Niroj,

i have to automate webservices .

1) restsharp support rest api automation, and is it support webservices also ...?

2) is there any different thing we have for webservices  like restsharp .

Hi, @Sri,

Did you convert your response to class with the help of JSON 2C# using any converter?  You need to create a user in your project. Have you done it till that?

Hi ,

Coul d u plz share any samples please

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Java

0 votes
3 answers

Does Java support Default Parameters?

You can try this with method overloading. void ...READ MORE

answered Sep 21, 2018 in Java by Sushmita
• 6,890 points
4,105 views
0 votes
1 answer

does java support operator overloading?

Java doesn't supports operator overloading because it's just a ...READ MORE

answered Jun 18, 2018 in Java by Akrati
• 960 points
6,112 views
+1 vote
1 answer

What are REST clients for Java?

These are the few options : Apache CXF has ...READ MORE

answered Nov 21, 2018 in Java by Frankie
• 9,810 points
585 views
0 votes
1 answer

How can we override back button to act like home button?

Most of the time you need to ...READ MORE

answered Dec 14, 2018 in Java by Daisy
• 8,110 points
846 views
0 votes
1 answer

how to read csv file form sftp connection and store into string object in java code and convert into json.....post it using rest api

Hey, @Pooja, Before starting with anything you should ...READ MORE

answered May 12 in Java by Roshni
• 3,910 points
426 views
0 votes
1 answer

How to set base url for rest in spring boot?

Hello @kartik, Set it up in your application.yml ...READ MORE

answered May 22 in Java by Niroj
• 59,780 points
1,705 views
0 votes
1 answer

GSON fails to read/map a field with name like USERId

Hello @ RamaKrishnaRaju, You should note the Javadoc of configureMessageConverters states ...READ MORE

answered Jul 1 in Java by Niroj
• 59,780 points
151 views
0 votes
1 answer

Restsharp support webservice automationtesting like rest .

Hey, here's an example with sample code. check ...READ MORE

answered Aug 10 in Software Testing by Karan
• 16,730 points
78 views