Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to soapUI Presented by Kushan Athukorala.

Similar presentations


Presentation on theme: "Introduction to soapUI Presented by Kushan Athukorala."— Presentation transcript:

1 Introduction to soapUI Presented by Kushan Athukorala

2 2 Agenda Feature Overview Prerequisites Webservices Examples First soapUI Project Examples

3 3 Feature Overview Inspecting Web Services Invoking Web Services Developing Web Services Web Services Simulation and Mocking Functional, Load and Compliance testing of Web Services

4 4 Prerequisites WSDL - basic concepts (services, ports, bindings, port types), relation to xml-schema SOAP - basic concepts, relation to WSDL (bindings, etc), different encoding types (soap-encoded/literal) and message styles (document/rpc) XML and related technologies - XPath, XML Schema, namespaces, etc

5 5 First soapUI Project Step1 - Create or Import a Web Service testing project Step2 - Add a WSDL to create tests from Now that you have a project you can start adding Interfaces (i.e. Web Service PortTypes) to it. http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl http://sdb.amazonaws.com/doc/2009-04-15/AmazonSimpleDB.wsdl When you added the interface soapUI created default requests for each operation in accordance with their WSDL and Schema definition Step3 - Try some Web Service requests

6 6 Small Note on ASP.Net Webservices You use an *.asmx file to create an ASP.NET Web Service. This file contains your service implementation and is needed for hosting the service. ASP.NET automatically generates the WSDL or "service description" for your service by reflecting over the types in your service. You can see the WSDL for your service by browsing to your ASMX file, which should show you a help page for your service containing a link to the service description for the service. The WSDL can also generally be reached by appending "?wsdl" to the address of the asmx file.

7 7 Example1 – Using TempConvert Webservice http://www.w3schools.com/webservices/tempconvert.asm x?WSDL http://www.w3schools.com/webservices/tempconvert.asm x?WSDL

8 8 Example2 – Couple of Free Webservices You can find free web services at following location http://www.webservicex.net/WCF/Default.aspx Try following Web services on soapUI and observer responses Currency Converter - http://www.webservicex.net/CurrencyConvertor.asmx?wsdlhttp://www.webservicex.net/CurrencyConvertor.asmx?wsdl Validate Email Address - http://www.webservicex.net/ValidateEmail.asmx?wsdlhttp://www.webservicex.net/ValidateEmail.asmx?wsdl Airport Information - http://www.webservicex.net/airport.asmx?wsdlhttp://www.webservicex.net/airport.asmx?wsdl Periodic Table - http://www.webservicex.net/periodictable.asmx?wsdlhttp://www.webservicex.net/periodictable.asmx?wsdl Global Weather - http://www.webservicex.net/globalweather.asmx?wsdlhttp://www.webservicex.net/globalweather.asmx?wsdl

9 9 Getting Started with Functional Testing soapUI Functional Tests can be used to develop in general Unit Tests Validate required functionality on each web service invocation on its own Integration Tests Validate required functionality using number of requests sequence Customized Test Functional Tests can be customised using Groovy Language to interact with – Databases or –Perform complex test-flow logic Note - You will see a better categorization in a later slide

10 10 Design the First soapUI TestCase Example - Global Weather Webservice http://www.webservicex.net/globalweather.asmx?wsdl Step1 - Create a Web Service Test from SOAP request Step2 - Add an Assertions to a Test Click “Add an assertion to this test request” button Select "Schema Compliance" assertion –This will check that the response is compliant with the associated WSDL/Schema definition. Post the request and validate the response If all goes well the test-request should be shown with a green background in the navigation tree Edit the request and make it invalid and see how it get failed Step3 – Run the TestCase using TestCase node

11 11 Thank You

12 12 USA INDIA SRILANKA UK www.virtusa.com © V I r t u s a C o r p o r a t i o n "Virtusa" is a trademark of the company and a registered trademark in the EU and In India. "Productization" is a service mark of the company and a registered service mark in the United States. "vRule" is a service mark of the company. For more information please contact SalesInquiries@virtusa.com


Download ppt "Introduction to soapUI Presented by Kushan Athukorala."

Similar presentations


Ads by Google