Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Belajar Postman test runner

642 views

Published on

Belajar membuat postman runner dengan menggunakan data dummy

Published in: Technology

Belajar Postman test runner

  1. 1. Postman Runner by @FachrulCH
  2. 2. 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?
  3. 3. 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.
  4. 4. postman?
  5. 5. Case 1 What to test? 1. Response status 200 2. Response time (optional) 3. Response is equal to string (optional) 4. Total > 0 5. Content type json 6. Contain 'Indonesia' What the test look like? Story: We want to get list of country in the system
  6. 6. Case 2 What to test? 1. Response status 200 2. Response time (optional) 3. Contain 1 data 4. Content type json 5. Contain Selected country name What the test look like? Story: We want to get detail info of one country
  7. 7. prepare • Select one country (add following code in case 1 sample)
  8. 8. Generate dummy data http://www.generatedata.com/
  9. 9. Advance trick
  10. 10. Prepared variable
  11. 11. Prepared variable Used Here
  12. 12. Assertion test
  13. 13. Generate dummy data http://www.generatedata.com/ Download dummy data in .json format
  14. 14. Running a collection
  15. 15. Test result
  16. 16. kelar! thanks :D @fachrulch

×