stanfy madcode meetup "how to test web api using soapui"
TRANSCRIPT
How to test web API using SoapUI
Nikiforov Oleg
QA @ Stanfy
Agenda
• What is server API• What is SoapUI• Why should you test server API• Live example• Useful ideas
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.
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
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
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
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.
Live Example
• Creating a project and adding test steps• Testing API for mobile app• Some useful things
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