Skip to content
TestingDocs 1.3.x

Testing ​

Choose the boundary that can disprove the behavior you are testing: an isolated decision, the assembled application, or the deployed service. Keep most business cases in fast TypeScript tests and reserve deployed scenarios for protocol and configuration boundaries.

Choose the testing boundary runn and scenarigo cross the deployed transport boundary, in-process clients exercise routing and middleware, and handler checks isolate business decisions. Service: transport, routing and handler In-process: routes + middleware Unit: handler decisions runnInstall binary; YAML runbooksgRPC reflection or local protos; HTTPHealth, auth, validation, TLS, streamsVariables + CI / Compose runners scenarigoGo install; config init; rungRPC reflection + HTTP scenariosTemplates + Go plugins; JUnit / JSONStreaming support is limited Network / TLS / proxyExercise the deployed listener configuration createLocalClient Router + middleware Handler checks Handler under test Assert success and errors; avoid repeating every unit case through the network.
Local tests bypass network, certificate and proxy configuration. Run success and failure scenarios against the real listener; plaintext gRPC and HTTP/1.1 require separate listener modes.

For a server with the example Inventory implementation registered:

typescript
import assert from 'node:assert/strict';
import { createLocalClient } from '@connectum/testing';

const client = createLocalClient(server, InventoryService);
const stock = await client.checkStock({ sku: 'A-1' });
assert.equal(stock.units, 7);

Choose a layer ​

Start with unit tests and fixtures, exercise application wiring in integration tests, then verify the running service with end-to-end tests.

Match a specific test task to a tool
QuestionRecommended surface
Does a handler or interceptor make the right decision?Unit tests with @connectum/test-fixtures
Are routes, middleware and catalog dependencies wired correctly?Integration tests with @connectum/testing
Do service-catalog calls resolve without a network listener?In-process transport
Does a running service expose correct gRPC, Connect, health, auth, TLS, or streaming behavior?runn
Do you need Go plugins or JUnit-oriented scenario output?scenarigo
  1. Test handler and middleware decisions in process.
  2. Start the real service with its generated proto contract.
  3. Exercise one successful call and the important failure paths through runn.
  4. Add deployment-specific probe or TLS scenarios only where that boundary matters.

Scenario tests catch serialization, validation, interceptor-order, reflection, and health-endpoint integration that isolated unit tests cannot. They should not repeat every business-rule case already covered in TypeScript.

Exact helper options live in the @connectum/testing API and @connectum/test-fixtures API.

Topics ​

Follow an earlier link to the integration testing details