Stanfy MadCode Meetup "How to test Web API using SoapUI"

12

Transcript of Stanfy MadCode Meetup "How to test Web API using SoapUI"

Page 1: Stanfy MadCode Meetup "How to test Web API using SoapUI"
Page 2: Stanfy MadCode Meetup "How to test Web API using SoapUI"

How to test web API using SoapUI

Nikiforov Oleg

QA @ Stanfy

Page 3: Stanfy MadCode Meetup "How to test Web API using SoapUI"

Agenda

• What is server API• What is SoapUI• Why should you test server API• Live example• Useful ideas

Page 4: Stanfy MadCode Meetup "How to test Web API using SoapUI"

What is server API

A server-side API is a programmatic interface to a defined request-response message system, usually expressed in JSON or XML, which can be used by web, mobile or other applications that work with back-end.

Page 5: Stanfy MadCode Meetup "How to test Web API using SoapUI"

While working with mobile applications usually you will deal with RESTful systems, which typically communicate over the Hypertext Transfer Protocol with the same HTTP verbs used by web browsers to retrieve web pages and send data to remote servers:

GET /user – get user infoPOST /user – create new userPUT /user – update user profileDELETE /user – delete user

Page 6: Stanfy MadCode Meetup "How to test Web API using SoapUI"

Why should you test server API

• Ensure positive scenarios work• Know server status by each request• Source for testing data• Simulate user behavior• Validate data for your app

Page 7: Stanfy MadCode Meetup "How to test Web API using SoapUI"

What is SoapUI

SoapUI is a cross-platform Functional Testing solution which can be used for testing server API.

Currently SoapUI offers both free and paid versions. Paid version is integrated into Soap NG Pro app which offers a variety of tools:SoapUI vs Soap NG

Page 8: Stanfy MadCode Meetup "How to test Web API using SoapUI"

Why SoapUI

I prefer to use SoapUI when testing server API because it offers lot’s of useful features, such as:• support for groovy or javascript written

scripts;• different kinds of assertions;• integration with CI tools;• easy to share test data (credentials, endpoints,

user data etc.) across a project.

Page 9: Stanfy MadCode Meetup "How to test Web API using SoapUI"

Live Example

• Creating a project and adding test steps• Testing API for mobile app• Some useful things

Page 10: Stanfy MadCode Meetup "How to test Web API using SoapUI"

Summary

• Use any available tool for testing server API

• Think about assertions• Try to generate “real” data• Cooperate with developers• Write API tests as early as necessary

Page 11: Stanfy MadCode Meetup "How to test Web API using SoapUI"
Page 12: Stanfy MadCode Meetup "How to test Web API using SoapUI"

Feedback

navisnobilite

[email protected]

#MadCode