Developer Tools

Bruno API Testing Tutorial: Git-Native Postman Alternative

Bruno is an open-source, Git-native API testing client with 41,300 GitHub stars that’s emerging as the privacy-focused alternative to Postman. Following Postman’s March 2026 pricing changes—which ended free team plans and now charge $14-49 per user monthly—developers are migrating to Bruno for three reasons: offline-first privacy (zero cloud sync), zero cost (completely free for teams), and Git-native workflows (API tests stored as plain-text .bru files you can commit alongside code).

What Makes Bruno Different: Git-Native Architecture

Bruno stores API collections as plain-text .bru files on your filesystem, not in proprietary cloud storage. Each request becomes a human-readable file using Bru markup language—similar to JSON but cleaner. Your project structure looks like this:

my-project/
├── collections/
│   ├── users/
│   │   ├── create-user.bru
│   │   └── list-users.bru
├── environments/
│   ├── dev.bru
│   └── prod.bru

Here’s what a .bru file contains:

meta {
  name: Get User
  type: http
}

http {
  method: 'GET'
  url: 'https://api.example.com/users/{{userId}}'
  headers {
    Authorization: 'Bearer {{token}}'
  }
}

tests {
  test("Status is 200", function() {
    expect(res.status).to.equal(200);
  });
}

This approach transforms API testing. You git commit these files, push to GitHub, and collaborate via pull requests—no export/import dance. PR reviews include both implementation and tests in a single diff. Branching strategies work for APIs. Rollback is git revert, not scrambling through cloud backups. For teams already using Git, Bruno fits existing workflows perfectly instead of forcing a separate cloud-based collaboration model.

Getting Started with Bruno

Bruno supports cross-platform installation via package managers or direct downloads. Setup takes under five minutes:

macOS: brew install bruno
Windows: choco install bruno or winget install Bruno.Bruno
Linux: snap install bruno or flatpak install com.usebruno.Bruno

Creating your first API test requires no account, no cloud sync, no subscription. Open Bruno, create a collection, add a GET request, set headers, run it, and commit the .bru file to Git. The plain-text format means you can read collections in any editor, grep through them for specific endpoints, and diff them in PR reviews. No proprietary JSON exports—just clean, version-controlled API definitions. Download from usebruno.com.

Bruno vs Postman: Choosing the Right Tool

Bruno excels at core API testing with Git workflows but lacks Postman’s full platform features. The trade-off is lightweight and free versus comprehensive and expensive:

FeatureBrunoPostman
CostFree (MIT), Pro $6/moSolo $9/mo, Team $14-49/user/mo
StorageLocal filesystemCloud (required)
CollaborationGit-basedWorkspaces (cloud)
ProtocolsREST, GraphQL, SOAP, gRPCFull coverage + MQTT, HTTP/2
Mock ServersNoneBuilt-in
Version ControlNative GitExport/import only
PrivacyOffline-firstCloud-dependent

Choose Bruno if you’re a Git-first team, need privacy for sensitive APIs (healthcare, finance, internal tools), or want to eliminate per-user subscription costs—a five-person team pays $0 with Bruno versus $840-2,940 annually with Postman. Choose Postman if you need mock servers for frontend development before backends exist, production API monitoring, or your team isn’t Git-fluent. A hybrid approach works: Bruno for dev and testing, Postman for specific platform features when needed. See the official Bruno vs Postman comparison for more details.

Bruno CI/CD Integration with GitHub Actions

Bruno CLI automates API testing in CI/CD pipelines. Install via npm, run collections with environment variables, generate test reports, and upload artifacts—standard GitHub Actions workflow:

name: API Tests

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      - name: Install Bruno CLI
        run: npm install -g @usebruno/cli
      - name: Run API Tests
        env:
          API_KEY: ${{ secrets.API_KEY }}
        run: bru run --env ci --reporter-html results.html
      - name: Upload Results
        uses: actions/upload-artifact@v3
        with:
          name: test-results
          path: results.html

API tests in Git mean tests run automatically on every commit and pull request. This catches breaking changes before merge, works with any CI platform that runs npm commands (GitHub Actions, GitLab CI, Jenkins, CircleCI), and costs nothing with GitHub’s free 2,000 CI minutes per month. Your API contract becomes enforceable via automated tests, not just documentation developers forget to update.

Migrating from Postman to Bruno

Migration is straightforward: export Postman collections as JSON, import to Bruno, and validate for gotchas. Bruno provides conversion tools that handle most edge cases automatically.

Steps:
1. Export from Postman: Collection → Export → v2.1 format → Save JSON
2. Import to Bruno: Ellipsis → Import Collection → Select JSON → Choose location
3. Validate: Verify HTTP methods are uppercase (GET not get), rename environment variables with special characters (Bruno requires alphanumeric plus -_. only)

Common gotchas are minor. Postman allows flexible method casing like get, POST, or GeT—Bruno requires strict uppercase. Postman accepts environment variables like user.name—Bruno needs user_name (alphanumeric only). Review JavaScript test scripts for deprecated Postman syntax that may need updates. Most teams complete weekend migrations successfully. One developer blogged: “Postman to Bruno migration transformed our API workflow.”

Key Takeaways

  • Bruno’s Git-native approach stores API tests as plain-text .bru files in your codebase, enabling version control workflows that Postman’s cloud-first model can’t match
  • Postman’s March 2026 pricing changes ($14-49/user/month for teams) make Bruno’s free, open-source model financially compelling for startups and cost-conscious teams
  • Bruno excels at core API testing (REST, GraphQL) with CI/CD integration but lacks Postman’s mock servers and production monitoring—choose based on your workflow needs, not feature checklists
  • Installation takes five minutes across macOS, Windows, and Linux via package managers, with no account creation or cloud sync required
  • Migration from Postman is realistic for weekend execution—import works automatically, gotchas (method casing, variable naming) are documented and minor

For Git-first teams prioritizing privacy, cost control, and version-controlled API definitions, Bruno delivers exactly what Postman’s cloud-dependent architecture can’t. Download from usebruno.com, create your first collection, and commit it alongside your code.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *