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 :

RestClient client = new RestClient("");
            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="">70.802040277899920851288365139</decimal>


Aug 9, 2020 in Java by anonymous
• 3,100 points


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,900 points
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
+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
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
0 votes
1 answer

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

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

answered May 12, 2020 in Java by Roshni
• 10,480 points
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, 2020 in Java by Niroj
• 82,780 points
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, 2020 in Java by Niroj
• 82,780 points
0 votes
1 answer

Java replace : replace all charecters with space except the matched string like "test"

Hi, @jyra, You can go through this example:  String ...READ MORE

answered Oct 14, 2020 in Java by Gitika
• 65,930 points