Presentation is loading. Please wait.

Presentation is loading. Please wait.

Understanding SOAP and REST calls The types of web service requests

Similar presentations


Presentation on theme: "Understanding SOAP and REST calls The types of web service requests"— Presentation transcript:

1

2 Understanding SOAP and REST calls The types of web service requests
Agenda What is a web service? Understanding SOAP and REST calls The types of web service requests The forms of web service responses Soap UI – Overview & Features Integration with Maven and Jenkins API automation frameworks Security & Performance tests on API Demo © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

3 What is a WebService? Bluntly speaking, when two devices need to talk to each other and exchange information over a network, the interface used to communicate between them is called a web service Typically a web service comprises of two components: a Service Provider (or Publisher) and a Service Requestor (or Consumer) © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

4 Types of WebServices Big web services – these are largely based on the SOAP standard protocol Uses a communication language called Web Service Definition Language (WSDL) RESTful web services – which is an architectural style, whereas SOAP is a protocol Some of the examples of REST standards are HTTP (yes, our world wide web is built on REST standard), XML, URI and MIME, etc. © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

5 Request and response Interacting with a web service is a two-fold process: we request for desired data; the service responds to our request This kind of simple interaction is called a ‘GET’ method, where the service only transfers information When there is a need for more than a simple retrieve process – like adding an entry to the Database – we can choose the ‘POST’ method that will require us to send a ‘Request Body’ along with the ‘Request URL’ When there is a need to update your data, we can opt for a ‘PUT’ method that instructs the web service to update an existing entry And lastly, when there is a need to erase data, we go for the ‘DELETE’ method © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

6 Types of testing supported Functional, Regression, Load and Security
SoapUI - Features Features Comments Types of testing supported Functional, Regression, Load and Security Data mocking Supported Multi-environment support Yes Built on top of JUnit Execution style Sequential and Parallel Types of requests/formats supported SOAP, REST, HTTP, JDBC, JMS, AMF Continuous Integration Integrates with Jenkins Supported build tools Maven, Ant and Bamboo Embedded language Groovy © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

7 In SoapUI, the hierarchy is as follows: Project Test Suite Test Case
Project hierarchy Once a Project name is entered, the new Project gets displayed in the Navigator pane. This is the area that lists the Project hierarchy. In SoapUI, the hierarchy is as follows: Project Test Suite Test Case Test Step © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

8 Being assertive Assertions are checkpoints that decide the pass/fail status of a test step. SoapUI gives us the ability to assert the response from validating the HTTP status code to performing complex looped assertions for every entry in the response body. The assertions in SoapUI are only limited by our ability to handle the scenario with Groovy scripts. © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

9 Integrating with Maven
<plugin> <groupId>com.smartbear.soapui</groupId> <artifactId>soapui-pro-maven-plugin</artifactId> <version>${soapui.version}</version> <configuration> <projectProperties> <projectProperty>external_property=${external_property}</projectProperty> </projectProperties> <soapuiProperties> <property> <name>soapui.scripting.library</name> <value>${project.basedir}/src/main/groovy</value> </property> </soapuiProperties> </configuration> <executions> <execution> <id>*Project-name*</id> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> <projectFile>${soapuiFiles.home.dir}/projects/*project_name*.xml</projectFile> <outputFolder>${soapui.results.dir}/*project_name*</outputFolder> <testFailIgnore>true</testFailIgnore> </execution> </executions> </plugin> Adding the appropriate dependencies and the required plugins will make it easy for us to integrate SoapUI with Maven. © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

10 Getting assisted by Jenkins – Continuous Delivery
Once the POM files and properties of the separate modules are supplied to Jenkins, the builds can be triggered – just like any other build-job configuration. © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

11 Choosing the best framework approach
Rapid framework - For API with basic validations © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

12 Choosing the best framework approach
Script library framework – For API requires dynamic validations & calculations © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

13 Test Data & Response Verification Data
Script library framework architecture Test Launcher Test Data & Response Verification Data Resource Bundle Validator Result Logger Script Libraries Excel Adapter Reporting Database Data Access Object © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

14 What else can SOAP UI do? Security testing on API
Performance testing of the API © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

15 References: © Aspire Systems, Inc. US | UK | BENELUX | ME | IND

16 Recap on Verizon Q & A Capture the Web Page Traffic and store in external file format Capture the total page size, Images Sizes, JS (Java Script) sizes, CSS file sizes Need a solution that can work across multiple devices / useragents Selenium with Selenium Proxy Server Java & Test NG POI HAR Reader (Handling HAR Format) IDE - Eclipse Capturing Page, Image, CSS and JS Sizes Implemented the above approach for Desktop Browser Store the Network Traffic in the form of HAR File which can be used by Developers Code is scalable across Windows, Mac and Linux Environments © Aspire Systems, Inc. US | UK | BENELUX | ME | IND


Download ppt "Understanding SOAP and REST calls The types of web service requests"

Similar presentations


Ads by Google