Get to know: - What is a web service? - Introduction to a sample web service - How to test a web service? What is Web Service? • Web service is a standardized medium to propagate communication between the client and server applications on the World Wide Web. • A web service is a software module which is designed to perform a certain set of tasks. • Web service also call Web API, they support for mobile application or SOA (Software Oriented Architecture). • Web Service can communicate with other system by XML or JSON. Web Service Architect XML • XML stands for eXtensible Markup language. XML plays an important role in many different IT systems. XML is often used for distributing data over the Internet. JSON • JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. • JSON for Credit Card: Web Service Methods HTTP Verb CRUD GET Read POST Create PUT Update/Replace DELETE Delete
Depend on the method of web services you have
different ways to test them. Introduction to a Web Service Payment Gateway Web Service • This is a web service designed to simulate online payment services via credit cards that are widely used on current e- commerce sites. • To easier to test, we have added some more web services like list credit card, list payment ... List of services • Payment Gateway web service methods: – addPayment(Payment): payment service. – creditCardList(): list all credit cards – paymentList(): list of payments. – paymentByDate?paymentDate =2019-05-07 – paymentByCardNumber?cardNumber =1000100010001000 • See the document to get to know more details. How to test a web service? How to test a web service? • Because web service don’t have UI, so you need a tool to test web service function. • You can use Postman tool to test web service function. • Do step by step follow the document to test web service. Postman app Test Get methods Test Post Methods Test Post Methods (Cont.) Practice • Write test case for addPayment service then run this test case and report bug for them. Q&A