Workshop: Web API Mocking - Fengyi === {%hackmd FGRWt1UuTFKk0wSbGgg-SA %} > https://github.com/fengyi-line/puglist ## 主題 巴哥交友APP ## ISSUE RESPONSE無法隨意修改時,如何寫測試? ## 架構 Mock Server -> Proxy -> Client client端可控制的部分:Proxy / Client ## Client如何修改 1. Hard Code 2. LLDB 3. DI ## Step: API改寫為pop 1. 加上protocol 2. 建立extention of API, confirm protocol ## Step: 模擬error狀態 1. 寫一個MockAPI 2. 加入error callback ## Step: 請提供以下Test Case * empty * loading * normal * error ## Step: 將API改寫為struct * 使用pop不易抽換test data ###### tags:`iPlayground2019` `workshop`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up