Skip to Content
SDK (Deep Dive)Overview

Glubean SDK Overview

The @glubean/sdk provides the core primitives for writing API tests that can run locally via the CLI and seamlessly in the cloud on the Glubean platform, without any code changes.

Design Philosophy

The SDK is built around a few core principles:

  1. Zero Magic Globals: Everything a test needs is passed explicitly via the TestContext (ctx). There are no ambient global variables to guess.
  2. Fail Fast & Loud: Missing environment variables, secrets, or failed hard assertions throw immediately, preventing silent, cascading failures deep within test logic.
  3. Observability First: Tests don’t just pass or fail—they produce rich traces, logs, and metrics. The SDK is deeply integrated with the Glubean dashboard to report this data automatically.

Core Concepts

The SDK is divided into several logical areas. Explore the documentation to understand the purpose, design rationale, and scenarios for each.

Test Structure & Organization

The Test Context (ctx)

Every test function receives a ctx object (TestContext). This context object is your gateway to making HTTP requests, reading variables, asserting conditions, and logging.

Last updated on