For terminal-based API testing with Laravel, a few tools come up a lot:
HTTPie — Probably the most popular pick for quick manual testing. Much friendlier syntax than raw curl, with JSON formatting, syntax highlighting, and easy header/auth handling out of the box.
curl — Still the classic. No install needed, works everywhere, great for CI scripts or quick one-off checks, though the syntax gets verbose for anything complex.
xh — A Rust-based HTTPie alternative, faster startup and single binary, worth trying if you want something lighter.
Postman CLI (Newman) — If your team already builds collections in Postman's GUI, newman run lets you execute those same collections from the terminal/CI pipeline.
Laravel's own HTTP testing — For testing your own API endpoints as part of your app, Http::fake() combined with Pest or PHPUnit is usually the better long-term approach rather than manual terminal calls, since it's repeatable and runs in CI.
If you're just poking at endpoints during development, HTTPie is the easiest to reach for daily. If you're testing your own Laravel routes as part of the test suite, Pest/PHPUnit with Http::fake() (or $this->getJson() / postJson() for your own controllers) is the more sustainable approach.
What are you testing - third-party APIs, or your own Laravel endpoints?
I made a similar transition away from heavy desktop clients about a year ago because maintaining separate Postman collections and local bash scripts was becoming a synchronization nightmare. Newman is the obvious choice if you already have a massive suite of Postman collections, but its dependency on the Node runtime can sometimes complicate lightweight runner environments. If you are leaning toward Apidog CLI, it really excels at bridging that gap because it keeps your specification synchronized automatically. When running these tests in GitHub Actions, the CLI approach lets you spin up parallel containers to test various endpoints simultaneously, allowing for simulated concurrent connections unlimited by the rendering bottlenecks or memory bloat of a desktop app. It makes the feedback loop in your pipeline incredibly tight and reproducible.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.