I have a small team but a gigantic application. We don't have PHP unit testing, so we will be using Cypress as a baseline for quality. Everything will go through a CI/CD pipeline and use regression end to end to make sure we haven't broken any modules or projects. One example is a FedEx API for shipping and we have multiple addresses, using GUI testing will be too slow, so I wonder if using Cypress is okay for that task as opposed to put another system (Postman with CLI) in the pipeline running testing with dynamic data (multiple Postal Codes and addresses? )


Cypress is designed for front-end end-to-end testing. It is designed for testing a users interaction with your application and verifying that it works correctly (e.g. logging in with a valid username and password load the landing page). Tools like this are designed to allow running in a headless mode which will let you run the tests in CI tool without loading a GUI.

Since it appears that your goal is to test the API interaction you are probably better off using a tool designed for that purpose. Most API test tools allow you to send a request to your API and verify certain things about the response (i.e., response code, response headers, response bodies).

While using an end-to-end tool (like Cypress) will ultimately test your API, it will take longer to setup, run, and often be more brittle. To use your above example, a tool like Cypress will require a script/test steps that log into your system, selecting multiple addresses for shipping, and verifying that everything displays properly. A tool like Postman would just test that when you send a request to your FedEx API with a specific body and headers, you get the expected response, body, and headers back. Setting up something like Postman will require a new tool, but will ultimately save time

Many of the API tools also provide a command line test runner and integrate with various CI tools (non-exhaustive list):

  1. Postman - Free, relatively easy to setup, and includes an automated testing tool (newman).
  2. SmartBear - Commercial product that integrates with most CI tooling.
  3. Rest-Assured - Open source option for REST API testing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.