lundi 4 septembre 2017

3rd party's API's in E2E tests: To Mock or Not To Mock?

When testing an app that connects to some 3rd party API(s) (let use Facebook for example) to collect some data, process and store it in a database.

In E2E testing environment scenerio - What would you consider to be the best practice:

  1. A Mock service for Facebook - to control the data you expect to be on the database at the end of the process, or
  2. Call Facebook API again from the E2E test so you'll have the data you expect to find in database at the end.

1 or 2? Other option?

Aucun commentaire:

Enregistrer un commentaire