jeudi 1 octobre 2020

Unit test for network answer

In my app I use network calls to get JSON answer. I would like to make some test for these calls, but I only find test with MockUp.

But my purpose is to test if my app can handle JSON change from the API, so make mockup json isn't valable for my case.

Is it possible to make real api call in Android Test ? It's possible on Swift with iOS, there is any equivalent ?

Earlier, I've tried to make a bash script which call api and put answer in a JSON file and then run test with the file, but I feel that my solution wasn't a good thing.

Thank all for yours answers, have a nice day !

Aucun commentaire:

Enregistrer un commentaire