i trying write ui unit test cases ios. tests never run , give failures. test ran couple of times , started failing though didn't made changes in code. app launches in simulator , closes giving failures. complex app, both ui , feature wise , data of ui dynamic. example images, label texts, number of rows in tables etc getting fetched api responses. if please suggest tutorial elaborate explanation or reason random behaviour, great help. have gone through wwdc tutorials , many tutorials on youtube.
during testing should own data in order tests deterministic , run same results. if fetch data dynamically network or elsewhere can never know when data change, making tests fail.
generally should somehow mock data. approach makes best sense project don't know, because don't give details. here example joe masilotti how mock network communication: ui testing stubbed network data
Comments
Post a Comment