1 Replies - 199 Views - Last Post: 19 March 2019 - 12:29 PM Rate Topic: -----

#1 Alhazred   User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 208
  • Joined: 25-July 07

Laravel-PHP Unit: how do you test complex functionalities?

Posted 19 March 2019 - 11:25 AM

I've got an application where users can create meetings anywhere they want.
When a user creates a meeting, the system takes care of many things, like:
- if the user gives only an address, Google Geolocation API is called to get the coordinates
- if Google fails to get the coordinates, the user is asked to provide them manually
- Timezone Database API is called to get the timezone if the user selected a "I don't know" option
- Google maps is called to generate a static map of the area
- if the map fails to be generated a default "missing map" image is associated to the meeting
and so on.

How would you organize the test for such a functionality taking into consideration any possible response (success/fail) from the external APIs?

Is This A Good Question/Topic? 0
  • +

Replies To: Laravel-PHP Unit: how do you test complex functionalities?

#2 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2835
  • View blog
  • Posts: 11,125
  • Joined: 03-December 12

Re: Laravel-PHP Unit: how do you test complex functionalities?

Posted 19 March 2019 - 12:29 PM

Individually.


You're talking a suite of tests, not just a few. You need perfect path, then tests to check each scenario you come up with. And I would use something like Selenium or a Service like Ghost Inspector to not only test initially, but constantly so you know when something goes down before a customer tells you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1