Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Service Testing With .Net

Similar presentations


Presentation on theme: "Web Service Testing With .Net"— Presentation transcript:

1 Web Service Testing With .Net
Web Service Testing With .Net Troy Walsh

2 Overview Web service primer Web service testing tools
Microsoft.AspNet.WebApi.Client overview Basic usage Deep dive Takeaways Questions References

3 What is a Web Service Machine to machine communication using web technologies Client Client Web Server Client Client Client

4 Request Request URI (Universal Resource Identifier) Header Method
Service endpoint *Query string Header Method Get Post/Put Delete *Content/media types *Body

5 Response Response Status Code Description Header *Body

6 Web Service Call Header Body Web Server Client Header Status Body

7 Web Service Clients Popular clients Ready! API (Java based tool)
RESTClient (Firefox add-in) Advanced REST client (Chrome extension) Fiddler, Wireshark (diagnostic tools) Microsoft.AspNet.WebApi.Client (C# library) Plus more

8 Why Microsoft.AspNet.WebApi.Client
Real world usage Supported by Microsoft .Net Serialization Licensing/cost Available via Nuget “Easy” to work with

9 Why Not Microsoft.AspNet.WebApi.Client
Already invested in another tool Not a .Net shop Requires development skill Extra work to do negative testing

10 Basic Usage // Setup http client HttpClient client = new HttpClient();
client.BaseAddress = new Uri(" client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/plain")); // Send the request and get back the response HttpResponseMessage response = client.GetAsync("/api/String/1").Result; string result = response.Content.ReadAsStringAsync().Result;

11 Deep Dive Basic setup Data driving Framework buildout Serialization
Models Media type formatters Async Configuration Parallelization

12 Takeaways Powerful Requires development Not right for every project
.Net Serialization Parallelization Requires development Not right for every project

13 Questions?

14 References a-net-client mstest.html web-api

15


Download ppt "Web Service Testing With .Net"

Similar presentations


Ads by Google