API vs UI Testing

API(Application Programming Interface): API enables communication between two separate software systems. A software system implementing an API contains functions/sub-routines which can be executed by another software system.


Example: Now open UBER and see. Once the site is loaded, it gives you an ability to log in or continue with Facebook and Google. In this case, Google and Facebook are also exposing some level of users’ information. There is an agreement between UBER and Google/Facebook that has already happened. That’s the reason it is letting you sign up with Google/ Facebook.



How it actually works? Let’s see with another example:


  1. User searches for local pizza options.

  2. That search is sent to the app’s servers by API.

  3. The app servers receives the API call, searches its database for pizza delivery options in the area.

  4. The server puts together a response in JSON.

  5. That response is sent by API.

  6. The app takes this data and coverts it into a mobile friendly view.


UI(User Interface): UI allows the user to interact with the application.


UI testing refers to testing graphical user interfaces, such as how user interacts with the application, testing application elements like fonts, layouts, buttons, images, colors, etc. Basically, UI testing concentrates on the look-and-feel of an application.


For example, if you are testing an address book, the most likely scenario for a user would be adding in a new address. You could create a UI test that would navigate to the address book, click a button to add a new address, add the address, save it, and then search the address book to verify that it has been saved



15 views0 comments