[筆記] Test Corner #19 Line 購物 API Testing

Wis
Drunk-House :”P
Published in
2 min readJan 9, 2019

How to do test ?

由講者所述,Line購物的Developer大部分的Test Cases以高涵蓋率的Unit Test為主,由測試金字塔來觀察,層級越高花費的成本也相對越高。API Testing則為QA測試的主要中心,UI Testing以好維護與花費時間成本低為主。

API Testing Analyze:

Make sure data reliable

Test 30 times

Response time < 500 ms

JSON Schema Pass

為什麼要測試30次呢 ?

由講者所述,根據統計學的中央極限定理,Sample數量大於30會更趨近於常態分佈,API測試30次會更趨近於使用者的狀態,Response time小於500 ms。

Tools:

Pyresttest — A REST testing and API microbenchmarking tool

Just-API — Just-API is a declarative, specification based test framework for REST, GraphQL APIs.

Cypress — Fast, easy and reliable testing for anything that runs in a browser.

心得感想:

一路從Test Corner#4到現在的#19,對於測試的方法與架構每次都有不同的收穫,票也是越來越難搶XD,這次LINE分享的測試工具剛好可以在工作上使用,找時間再把三個工具研究一下。下方影片連結中還有其他兩位獎者的分享,有興趣的再看看囉!

Reference:

--

--

Wis
Drunk-House :”P

The life of Software Engineer. 陽光、空氣、啤酒🍻、水,咖啡☕️、柯基 & 柴犬 🐕。