<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-test-an-api-without-a-frontend-5phbkfhlw" -->

---
title: How to Test an API Without a Frontend | daily.dev
description: A practical guide to testing APIs before or instead of building a frontend, arguing that manual UI-driven checks miss edge cases like malformed payloads,...
canonical: https://daily.dev/posts/how-to-test-an-api-without-a-frontend-5phbkfhlw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Test an API Without a Frontend | daily.dev
og:description: A practical guide to testing APIs before or instead of building a frontend, arguing that manual UI-driven checks miss edge cases like malformed payloads,...
og:url: https://daily.dev/posts/how-to-test-an-api-without-a-frontend-5phbkfhlw
og:image: https://api.daily.dev/og/posts/5phbKfHlW.png
og:image:alt: How to Test an API Without a Frontend
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Test an API Without a Frontend

**[Bruno Blog](https://daily.dev/sources/usebruno)** · 12 min read · 16 upvotes · 3 comments

## Summary

A practical guide to testing APIs before or instead of building a frontend, arguing that manual UI-driven checks miss edge cases like malformed payloads, expired tokens, and pagination boundaries. It compares four approaches (curl/HTTPie, GUI clients, code test frameworks, and collection-plus-CLI runners) and walks through building a full test suite with Bruno: saving requests as YAML files in the repo, writing assertions, chaining auth tokens between requests, using environments for local vs CI, running the suite headlessly, and gating pull requests in GitHub Actions. It closes with a checklist of what to verify before handing an API to a frontend team and clarifies that mock servers solve a different problem than real API testing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.usebruno.com/how-to-test-an-api-without-a-frontend>

## Questions this post answers

### How do I test an API endpoint that has no frontend yet?

Send requests directly to the endpoint with a GUI client or curl, then save the request so it can run again. Add status and shape assertions instead of eyeballing responses, chain a login request to generate an auth token for protected endpoints, and run the whole collection headlessly with a CLI so it can be wired into CI on every pull request.

_daily.dev surfaces practical workflows like this for teams building test coverage before a UI exists._

### What's the difference between mocking an API and testing it?

A mock server gives frontend teams a fake endpoint to build against before the real one is ready, but it only reflects intentions, not actual behavior. Testing the real service verifies the API actually works. Using both in parallel and comparing results catches contract breaks between what was promised and what was built before they reach a browser.

_Developers weighing mocks versus real integration tests can track these tradeoffs on daily.dev._

### How do I chain an authentication token between API requests without a login screen?

Capture the access token from the login response body using a script like bru.setVar("token", body.accessToken) after the request runs, then reference that variable in every subsequent protected request. Running the collection executes login first, sets the variable, and the rest of the suite inherits the token automatically, replacing the manual login step a UI would normally provide.

_daily.dev helps developers building auth-chained test flows keep up with practical API testing patterns._

## Community discussion

Top comments from developers on daily.dev.

**@pdfopsdev** · 1 upvotes

> small correction, bruno saves collections as .bru files, not yaml. worth mentioning because that's actually one of its selling points over postman/insomnia, the format diffs cleanly in a PR.

**@nikhil3** · 1 upvotes

> I have been using for last 1.5 year, it is the best tool switch I did.

**@ihara** · 1 upvotes

> We don´t talk about bruno...
>
> [https://www.youtube.com/watch?v=bvWRMAU6V-c](https://www.youtube.com/watch?v=bvWRMAU6V-c)

## Similar posts on daily.dev

- [How to Automate API Testing in CI/CD Pipelines](https://daily.dev/posts/how-to-automate-api-testing-in-ci-cd-pipelines-4i1mnh8ug) · DevOps.com · 0 upvotes · 0 comments
- [3 REST API Testing Mistakes That Cost Us the Most Time \(and How We Fixed Them\)](https://daily.dev/posts/3-rest-api-testing-mistakes-that-cost-us-the-most-time-and-how-we-fixed-them--kzo04t39p) · SitePoint · 0 upvotes · 0 comments
- [How to test agent skills without hitting real APIs](https://daily.dev/posts/how-to-test-agent-skills-without-hitting-real-apis-oz8x5b0z1) · DevBlogs · 0 upvotes · 0 comments
- [How-tos & Examples](https://daily.dev/posts/how-tos-examples-cxl03k9wm) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#cicd](https://daily.dev/tags/cicd), [#rest-api](https://daily.dev/tags/rest-api)

[View this post on daily.dev](https://daily.dev/posts/how-to-test-an-api-without-a-frontend-5phbkfhlw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Test an API Without a Frontend","url":"https://daily.dev/posts/how-to-test-an-api-without-a-frontend-5phbkfhlw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-test-an-api-without-a-frontend-5phbkfhlw"},"datePublished":"2026-09-15T18:39:15.880Z","dateModified":"2026-09-15T18:39:39.674Z","description":"A practical guide to testing APIs before or instead of building a frontend, arguing that manual UI-driven checks miss edge cases like malformed payloads,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/253c0eb3b96398872f84a9649b922c54?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/253c0eb3b96398872f84a9649b922c54?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Bruno Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Bruno Blog","logo":"https://media.daily.dev/image/upload/s--n6YntNuw--/f_auto,q_auto/v1787469611/logos/usebruno?_a=BAMAMicg0","url":"https://daily.dev/sources/usebruno"},"commentCount":3,"discussionUrl":"https://daily.dev/posts/how-to-test-an-api-without-a-frontend-5phbkfhlw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":16},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"keywords":"testing,cicd,rest-api","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Bruno Blog","item":"https://daily.dev/sources/usebruno"},{"@type":"ListItem","position":3,"name":"How to Test an API Without a Frontend"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/how-to-test-an-api-without-a-frontend-5phbkfhlw","comment":[{"@type":"Comment","text":"small correction, bruno saves collections as .bru files, not yaml. worth mentioning because that’s actually one of its selling points over postman/insomnia, the format diffs cleanly in a PR.","datePublished":"2026-09-17T18:12:49.225Z","url":"https://daily.dev/posts/5phbKfHlW#c-HowI865Gw","author":{"@type":"Person","name":"PDFops","url":"https://daily.dev/pdfopsdev","image":"https://media.daily.dev/image/upload/s---8isRBKc--/f_auto/v1782922291/avatars/avatar_orjMeK8QKaaVZwGq7ScPz?_a=BAMAMicg0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"I have been using for last 1.5 year, it is the best tool switch I did.","datePublished":"2026-09-19T05:19:39.264Z","url":"https://daily.dev/posts/5phbKfHlW#c-ona5XTwNS","author":{"@type":"Person","name":"Nikhil","url":"https://daily.dev/nikhil3","image":"https://avatars.githubusercontent.com/u/123929646?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"We don´t talk about bruno…\nhttps://www.youtube.com/watch?v=bvWRMAU6V-c","datePublished":"2026-09-22T01:43:04.067Z","url":"https://daily.dev/posts/5phbKfHlW#c-8ZCoU2CTs","author":{"@type":"Person","name":"Luiz Ihara","url":"https://daily.dev/ihara","image":"https://lh3.googleusercontent.com/a-/AOh14Gie9QpHcFlZumhZ5u1j562KBUNBcQmhvxCwAvlnlA=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-test-an-api-without-a-frontend-5phbkfhlw#faq","mainEntity":[{"@type":"Question","name":"How do I test an API endpoint that has no frontend yet?","acceptedAnswer":{"@type":"Answer","text":"Send requests directly to the endpoint with a GUI client or curl, then save the request so it can run again. Add status and shape assertions instead of eyeballing responses, chain a login request to generate an auth token for protected endpoints, and run the whole collection headlessly with a CLI so it can be wired into CI on every pull request. daily.dev surfaces practical workflows like this for teams building test coverage before a UI exists."}},{"@type":"Question","name":"What's the difference between mocking an API and testing it?","acceptedAnswer":{"@type":"Answer","text":"A mock server gives frontend teams a fake endpoint to build against before the real one is ready, but it only reflects intentions, not actual behavior. Testing the real service verifies the API actually works. Using both in parallel and comparing results catches contract breaks between what was promised and what was built before they reach a browser. Developers weighing mocks versus real integration tests can track these tradeoffs on daily.dev."}},{"@type":"Question","name":"How do I chain an authentication token between API requests without a login screen?","acceptedAnswer":{"@type":"Answer","text":"Capture the access token from the login response body using a script like bru.setVar(\"token\", body.accessToken) after the request runs, then reference that variable in every subsequent protected request. Running the collection executes login first, sets the variable, and the rest of the suite inherits the token automatically, replacing the manual login step a UI would normally provide. daily.dev helps developers building auth-chained test flows keep up with practical API testing patterns."}}]}
```

