askill
e2e-bruno

e2e-brunoSafety 100Repository

End-to-end API testing with Bruno HTTP client: collection organization, environment variables, test scripts, and CI integration. Trigger: When creating E2E API tests, organizing Bruno collections, or setting up API test automation.

0 stars
1.2k downloads
Updated 2/9/2026

Package Files

Loading files...
SKILL.md

When to Use

  • Creating end-to-end tests for API endpoints
  • Organizing HTTP request collections per service
  • Setting up pre-request and post-response test scripts
  • Configuring environment variables for local, dev, staging
  • Automating API tests in CI/CD pipelines with Bruno CLI

Critical Patterns

Why Bruno over Postman

Bruno is open-source, Git-friendly (plain text files), and runs collections from CLI. No cloud sync needed — collections live in the repo under version control.

Collection Organization

Collections follow the service structure. One directory per service, one file per endpoint:

tests/e2e/
  bruno.json                     # Bruno workspace config
  environments/
    local.bru                    # localhost URLs, test tokens
    development.bru              # dev environment URLs
    staging.bru                  # staging environment URLs
  notification/
    health.bru                   # GET /health
    send-email.bru               # POST /api/v1/notifications/send (email)
    send-sms.bru                 # POST /api/v1/notifications/send (sms)
    send-push.bru                # POST /api/v1/notifications/send (push)
    send-invalid-channel.bru     # POST with invalid channel (expect 400)
    send-missing-content.bru     # POST with missing content (expect 400)
  auth/
    register.bru
    login.bru
    logout.bru
  gateway/
    health.bru
    proxy-auth.bru
    proxy-notifications.bru

Bru File Format

Every .bru file follows this structure:

See assets/example-success.bru for a success path test.

See assets/example-error.bru for an error path test.

See assets/example-chained.bru for a chained request that uses a previous response.

Environment Files

Environments define variables per deployment target. Each .bru uses {{variable}} placeholders.

See assets/environment-local.bru for local environment config.

Test Scripts

Bruno supports JavaScript test scripts in tests blocks. Key patterns:

PatternWhat it verifies
Status coderes.getStatus() === 200
Response body fieldres.getBody().data.id !== undefined
Response body typetypeof res.getBody().data.status === 'string'
Error enveloperes.getBody().error.code === 'VALIDATION_ERROR'
Set variablebru.setVar('notificationId', res.getBody().data.id)
Chain requestsUse {{notificationId}} in subsequent requests

CI Integration

Bruno CLI runs collections headlessly. The pattern for CI:

See assets/ci-bruno.yml for GitHub Actions integration.


Decision Tree

Testing a single endpoint happy path?
  → One .bru file with status + body assertions

Testing an error path (400, 422, 401)?
  → Separate .bru file named with error scenario

Testing a flow (register → login → use token)?
  → Chained .bru files with bru.setVar/getVar

Need to run in CI?
  → Use bru run with --env flag

Assets

FileDescription
assets/example-success.bruSuccess path test with body assertions
assets/example-error.bruError path test with error envelope validation
assets/example-chained.bruChained request using variables from previous response
assets/environment-local.bruLocal environment with localhost URLs
assets/ci-bruno.ymlGitHub Actions step for running Bruno in CI
assets/bruno.jsonBruno workspace config file

Commands

npm install -g @usebruno/cli   # Install Bruno CLI
bru run tests/e2e/notification --env local  # Run notification E2E tests
bru run tests/e2e --env local               # Run ALL E2E tests

Resources

  • Templates: See assets/ for .bru file templates and CI config

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

87/100Analyzed 2/19/2026

High-quality technical reference skill for Bruno API testing. Well-structured with clear when-to-use section, comprehensive patterns (collection organization, environment files, test scripts, CI integration), decision tree, and actionable CLI commands. Tags improve discoverability. Located in proper skills folder. References external asset files for examples, keeping the skill focused as a guide rather than a tutorial with embedded examples.

100
90
85
85
80

Metadata

Licenseunknown
Version-
Updated2/9/2026
Publisher333-333-333

Tags

apici-cdgithubgithub-actionssecuritytesting