belajar postman test runner

18
Postman Runner by @FachrulCH

Upload: fachrul-choliluddin

Post on 07-Jan-2017

119 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Belajar Postman test runner

Postman Runner

by @FachrulCH

Page 2: Belajar Postman test runner

API Testing• Who is your target audience? Who is your API consumer?• What environment/s should the API typically be used?• What aspects are you testing?• What problems are we testing for?• What are your priorities to test?• What is supposed to happen in normal circumstances?• What could potentially happen in abnormal circumstances?• What is defined as a Pass or a Fail? What data is the desired output? What is the chain

of events?• What other APIs could this API interact with?• Who on your team is in charge of testing what?

Page 3: Belajar Postman test runner

Kinds of API testing

• Functionality testing — the API technically works.• Usability testing — the API is easy to work with.• Reliability testing — the API can be consistently connected to and lead to consistent results.• Load testing — the API can handle a large amount of calls.• Creativity testing — the API can handle being used in different ways.• Security testing — the API has defined security requirements including authentication,

permissions and access controls. See some API security tips for protectiving vital data.• Proficiency testing — the API increases what developers are able to do.• API documentation testing — also called discovery testing, the API documentation easily

guides the user.

Page 4: Belajar Postman test runner

postman?

Page 5: Belajar Postman test runner
Page 6: Belajar Postman test runner

Case 1

What to test?1. Response status 2002. Response time (optional)3. Response is equal to string (optional)4. Total > 05. Content type json6. Contain 'Indonesia'

What the test look like?

Story: We want to get list of country in the system

Page 7: Belajar Postman test runner
Page 8: Belajar Postman test runner

Case 2

What to test?1. Response status 2002. Response time (optional)3. Contain 1 data4. Content type json5. Contain Selected country name

What the test look like?

Story: We want to get detail info of one country

Page 9: Belajar Postman test runner

prepare• Select one country (add following code in case 1 sample)

Page 10: Belajar Postman test runner

Generate dummy data http://www.generatedata.com/

Page 11: Belajar Postman test runner

Advance trick

Page 12: Belajar Postman test runner

Prepared variable

Page 13: Belajar Postman test runner

Prepared variable

Used Here

Page 14: Belajar Postman test runner

Assertion test

Page 15: Belajar Postman test runner

Generate dummy data http://www.generatedata.com/

Download dummy data in .json format

Page 16: Belajar Postman test runner

Running a collection

Page 17: Belajar Postman test runner

Test result

Page 18: Belajar Postman test runner

kelar!thanks :D

@fachrulch