Skip to main content

Introduction

TestBench Defect Service is a lightweight, asynchronous REST API service that acts as a bridge between imbus TestBench and external defect tracking systems.

What it does

TestBench works with defect data — creating, reading, updating, and deleting bug reports during test execution. The Defect Service provides a unified API layer that allows TestBench to communicate with any supported backend without being tied to a specific tool.

At its core the service:

  • Exposes a stable HTTP API that TestBench calls to manage defects.
  • Translates those API calls into backend-specific operations.
  • Returns structured responses that TestBench can understand regardless of which backend is used.

Features

  • Pluggable clients — swap the backend without touching TestBench configuration.
  • Per-project configuration — control fields, attributes, and sync commands can all be overridden per project.
  • Pre/post sync hooks — run custom shell commands before or after TestBench syncs defects.
  • Authentication — simple username/password auth with salted bcrypt hashing.
  • SSL/TLS support — optional HTTPS with one-way TLS or mutual TLS (mTLS).
  • Interactive setup wizardinit and configure commands guide you through configuration interactively.

Architecture

The service runs a Sanic-based HTTP server and delegates all domain logic to a configured DefectClient implementation.

┌──────────────────────────────────────┐
│ TestBench DM Proxy │
└───────────────────┬──────────────────┘
│ HTTP (Basic Auth)
┌───────────────────▼──────────────────┐
│ TestBench Defect Service │
│ (Sanic) │
├──────────────────────────────────────┤
│ DefectClient │
├───────────────────┬──────────────────┤
│ JSONL │ Jira │
└──────────┬────────┴────────┬─────────┘
│ │
.jsonl files Jira REST API

Supported Backends

BackendClassDescription
JSONLtestbench_defect_service.clients.JsonlDefectClientStores defects as newline-delimited JSON files on disk. No external dependencies. Ideal for local use and testing.
Jiratestbench_defect_service.clients.JiraDefectClientFull integration with Jira Cloud or Jira Data Center / Server. Requires the optional [jira] extra.

The backend is selected via the client_class configuration key and can be switched at any time by updating the config file and restarting the service.

Where to go next