Search⌘ K
AI Features

Testing the App Endpoints with cURL

Explore how to test your web app’s REST API endpoints using the cURL command-line tool. Understand the role of different testing types including unit, integration, and end-to-end tests. Learn to send HTTP requests to verify endpoints like /ping, /coffee, and /home, ensuring reliable and efficient backend functionality without a graphical interface.

How to test an app

There are several kinds of tests to check if an application works. Some of the major ones are:

  • Unit testing: Unit testing tests a small piece of code, usually a function in isolation.

  • Integration testing: Integration tests are done at a higher level, usually involving more than one module or unit in the workflow. For example, if an app interacts with the database, integration tests will actually send queries to the database.

  • E2E testing: E2E or end-to-end testing, as the name suggests, tests the entire workflow of the app and includes all the components.

  • Manual testing: Manual testing in an app is usually fiddling with the UI of the app and trying out the features manually.

Tools to test an app

Earlier, we tested our server code using some HTML and ran it in a browser. This is ...