Upgrade to Pro — share decks privately, control downloads, hide ads and more …

API-整合測試

Star Rocket
September 11, 2019

 API-整合測試

LaraGirls Meetup#4

Star Rocket

September 11, 2019

Transcript

40 slides
  1. Glossika 開發流程 訂定 API 格式 建立文件 Mock Server 後端 API

    設計 前端頁面串接 Staging Production Postman Test
  2. Glossika API 基本測試 • Response Schema Test ◦ Tiny Validator

    4 • Http code and Require column Test ◦ Postman sandbox API
  3. Tiny Validator 4 basic syntax "type": "array", "item" : {

    // item here }, "type": "object", "properties" : { // properties }, "key" : { "type": "data type" }, Json Array Json Object Json Column
  4. { "article_id": 55 } { "object": { "properties": { "article_id":

    { "type": "integer" } } } } Response Tiny Validator
  5. Test case: User login • User story ◦ 使用者輸入帳號密碼登入,回傳該使用的的基本資訊 •

    Input ◦ Email ◦ Password • Response ◦ User Id ◦ User name ◦ User email ◦ User Auth token
  6. Postman-CLI Newman • 安裝 ◦ $ npm install -g newman

    • 執行 ◦ $ newman run mycollection.json

More Decks by Star Rocket

Other Decks in Programming