Skip to content

Commit 74eaca6

Browse files
committed
Add new installation guide and some other minor changes
1 parent 2e4c31f commit 74eaca6

20 files changed

Lines changed: 308 additions & 136 deletions

File tree

docusaurus/testbench-defect-service/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: CLI reference
55

66
# CLI Reference
77

8-
The Testbench Defect Service is controlled entirely from the command line. The main entry point is:
8+
The TestBench Defect Service is controlled entirely from the command line. The main entry point is:
99

1010
```bash
1111
testbench-defect-service [COMMAND] [OPTIONS]

docusaurus/testbench-defect-service/clients/custom-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Custom Client
55

66
# Custom Client
77

8-
The Testbench Defect Service supports custom backends through a pluggable client interface. Any Python class that extends `AbstractDefectClient` and implements the required methods can be used as a drop-in replacement for the built-in JSONL or Jira clients.
8+
The TestBench Defect Service supports custom backends through a pluggable client interface. Any Python class that extends `AbstractDefectClient` and implements the required methods can be used as a drop-in replacement for the built-in JSONL or Jira clients.
99

1010
Typical use cases:
1111

docusaurus/testbench-defect-service/clients/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Clients
44
---
55
# Clients
66

7-
The Testbench Defect Service uses a pluggable client architecture. A **client** is a Python class that connects the service's generic defect API to a specific backend — such as a file system or a project management tool.
7+
The TestBench Defect Service uses a pluggable client architecture. A **client** is a Python class that connects the service's generic defect API to a specific backend — such as a file system or a project management tool.
88

99
---
1010

docusaurus/testbench-defect-service/clients/jira-client.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Jira Client
55

66
# Jira Client
77

8-
The Jira client integrates the Testbench Defect Service with [Jira Cloud](https://www.atlassian.com/software/jira) and [Jira Data Center / Server](https://www.atlassian.com/enterprise/data-center/jira). It maps TestBench defect operations to Jira issue operations using the official `jira` Python library.
8+
The Jira client integrates the TestBench Defect Service with [Jira Cloud](https://www.atlassian.com/software/jira) and [Jira Data Center / Server](https://www.atlassian.com/enterprise/data-center/jira). It maps TestBench defect operations to Jira issue operations using the official `jira` Python library.
99

1010
---
1111

@@ -23,7 +23,7 @@ When the Jira client is active, defect CRUD operations performed by TestBench ar
2323

2424
---
2525

26-
## Prerequisites
26+
## Requirements
2727

2828
The Jira client is an **optional** component. Install it with:
2929

docusaurus/testbench-defect-service/clients/jsonl-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: JSONL Client
44
---
55
# JSONL Client
66

7-
The JSONL client is the default, zero-dependency backend for the Testbench Defect Service. It stores defects as [newline-delimited JSON](https://jsonlines.org) (`.jsonl`) files on the local file system.
7+
The JSONL client is the default, zero-dependency backend for the TestBench Defect Service. It stores defects as [newline-delimited JSON](https://jsonlines.org) (`.jsonl`) files on the local file system.
88

99
---
1010

docusaurus/testbench-defect-service/configuration.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Configuration
55

66
# Configuration
77

8-
The Testbench Defect Service is configured through a single TOML file (`config.toml` in the working directory by default). This page documents every available option.
8+
The TestBench Defect Service is configured through a single TOML file (`config.toml` in the working directory by default). This page documents every available option.
99

1010
:::tip
1111
Use the CLI wizards instead of editing the file by hand — they validate your input and prevent syntax errors:
@@ -115,6 +115,27 @@ ssl_ca_cert = "certs/ca.crt" # optional — enables mTLS
115115
116116
---
117117

118+
## Server Process Settings
119+
120+
**`[testbench-defect-service.server]`**
121+
122+
Controls how Sanic spawns and manages its worker process. In most cases you can leave this section out and rely on the defaults.
123+
124+
| Key | Type | Default | Description |
125+
|---|---|---|---|
126+
| `single_process` | boolean | `true` | Run in single-process mode. Required when using mTLS. Set to `false` to enable multi-worker throughput. |
127+
| `keep_alive_timeout` | integer | `5` | Seconds an idle HTTP keep-alive connection is held open waiting for the next request before being closed. A shorter value reduces the number of open connections that can delay shutdown. |
128+
| `run_kwargs` | table | `{}` | Raw keyword arguments forwarded verbatim to Sanic's `run()` call. Use for advanced Sanic tuning not exposed by other settings. |
129+
130+
```toml
131+
[testbench-defect-service.server]
132+
single_process = false
133+
keep_alive_timeout = 3
134+
run_kwargs = { workers = 4 }
135+
```
136+
137+
---
138+
118139
## Logging
119140

120141
### Console
@@ -194,20 +215,20 @@ Each `start` command loads exactly one config file and binds to one port. To ser
194215
`jsonl_config.toml`
195216
```toml
196217
[testbench-defect-service]
197-
reader_class = "testbench_defect_service.clients.JsonlDefectClient"
218+
client_class = "testbench_defect_service.clients.JsonlDefectClient"
198219
port = 8030
199220

200-
[testbench-defect-service.reader_config]
221+
[testbench-defect-service.client_config]
201222
# Jsonl-specific settings ...
202223
```
203224

204225
`jira_config.toml`
205226
```toml
206227
[testbench-defect-service]
207-
reader_class = "testbench_defect_service.clients.JiraDefectClient"
228+
client_class = "testbench_defect_service.clients.JiraDefectClient"
208229
port = 8031
209230

210-
[testbench-defect-service.reader_config]
231+
[testbench-defect-service.client_config]
211232
# Jira-specific settings ...
212233
```
213234

docusaurus/testbench-defect-service/getting-started/installation.md

Lines changed: 100 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,107 +2,156 @@
22
sidebar_position: 1
33
title: Installation
44
---
5+
56
# Installation
67

7-
## Requirements
8+
There are two options depending on whether you want to install Python or not:
9+
10+
- **[Option 1: Ready-to-use executable](#option-1-ready-to-use-executable)** (**No Python required**. Download a zip, extract, run. Best for Windows service deployments.)
11+
- **[Option 2: Install with Python](#option-2-install-with-python)** (For users who have Python or are installing it. Managed via pip.)
812

9-
- **Python 3.10 or higher**[Download Python](https://www.python.org/downloads/)
10-
- **pip** — included with Python 3.4+; verify with `pip --version`
1113
---
1214

13-
## Option 1: Install from PyPI *(Recommended)*
15+
## Option 1: Ready-to-use executable
1416

15-
Install the latest release directly from [PyPI](https://pypi.org/project/testbench-defect-service/):
17+
The executable is a self-contained zip archive. No Python, no pip, no virtual environment needed. Both clients (JSONL and Jira) are included.
1618

17-
```bash
18-
pip install testbench-defect-service
19+
**1. Download the zip**
20+
21+
Either use the zip you received directly, or download it from the [GitHub releases page](https://github.com/imbus/testbench-defect-service/releases) — expand **Assets** and pick the file for your platform (e.g. `testbench-defect-service-x.y.z-win_amd64.zip`).
22+
23+
**2. Extract to a permanent location**
24+
25+
Unzip to a folder you won't move later, for example `C:\TestBenchDefectService\`:
26+
27+
```
28+
C:\TestBenchDefectService\
29+
testbench-defect-service.exe
30+
<support files>
1931
```
2032

21-
To include Jira support:
33+
**3. Verify**
2234

23-
```bash
24-
pip install "testbench-defect-service[jira]"
35+
```cmd
36+
C:\TestBenchDefectService\testbench-defect-service.exe --version
2537
```
2638

2739
---
2840

29-
## Option 2: Install from a wheel package *(Offline)*
41+
## Option 2: Install with Python
3042

31-
Use this option when installing on a machine without internet access, for example when you received an offline installation package (`.zip`).
43+
Use this option if you have Python installed or are about to install it.
3244

33-
**1. Extract the zip:**
45+
### Requirements
3446

35-
Unzip the provided package to a local folder, e.g. `C:\install\`:
47+
- **Python 3.10–3.14** — 3.13 recommended ([download](https://www.python.org/downloads/))
48+
- **pip** (included with Python)
3649

50+
### Set up a virtual environment
51+
52+
:::note
53+
For [From source](#from-source-developers): skip this step and create the virtual environment inside the cloned repository instead (shown there).
54+
:::
55+
56+
A virtual environment keeps the installation isolated and provides a stable, predictable path to the executable. Navigate to the directory where you want the service to live, then run:
57+
58+
```bash
59+
python -m venv .venv
3760
```
38-
C:\install\
39-
testbench_defect_service-x.y.z-py3-none-any.whl
40-
<dependency wheels ...>
61+
62+
```bash
63+
# Windows
64+
.venv\Scripts\activate
65+
66+
# Linux / macOS
67+
source .venv/bin/activate
4168
```
4269

43-
**2. Install from the local folder:**
70+
---
71+
72+
### From PyPI *(online, recommended)*
4473

4574
```bash
46-
pip install --no-index --find-links "C:\install" testbench-defect-service
75+
pip install testbench-defect-service
4776
```
4877

49-
To include optional extras, add them as usual — pip will resolve them from the local folder:
78+
The base install includes the [JSONL client](../clients/jsonl-client.md). Add extras for other clients:
5079

80+
| Client | Install command |
81+
|--------|-----------------|
82+
| [JSONL](../clients/jsonl-client.md) *(default)* | `pip install testbench-defect-service` |
83+
| [Jira](../clients/jira-client.md) | `pip install testbench-defect-service[jira]` |
84+
85+
Verify:
5186
```bash
52-
pip install --no-index --find-links "C:\install" testbench-defect-service[jira]
87+
testbench-defect-service --version
5388
```
5489

55-
:::note
56-
The offline package is platform- and Python-version-specific. Make sure you use the package that matches your system (e.g. `win_amd64`, `py310`).
57-
:::
58-
5990
---
6091

61-
## Option 3: Install from Source *(Development)*
92+
### From a wheel file *(offline)*
6293

63-
Clone the repository and install in editable mode:
94+
Use this if you received a `.whl` file or downloaded one from the [GitHub releases page](https://github.com/imbus/testbench-defect-service/releases) (look for `testbench_defect_service-x.y.z-py3-none-any.whl` in the Assets).
6495

6596
```bash
66-
git clone https://github.com/imbus/testbench-defect-service.git
67-
cd defect-service-python
68-
pip install -e ".[dev,jira]"
97+
pip install testbench_defect_service-x.y.z-py3-none-any.whl
6998
```
7099

71-
Available extras:
100+
With optional extras:
101+
102+
```bash
103+
pip install "testbench_defect_service-x.y.z-py3-none-any.whl[jira]"
104+
```
72105

73-
| Extra | Packages installed | When to use |
74-
|---|---|---|
75-
| *(default)* || Uses JSONL files as data source; included in base install |
76-
| `jira` | `jira`, `beautifulsoup4` | Required for Jira backend |
77-
| `dev` | `ruff`, `pre-commit`, `invoke`, `mypy`, `flit`, `wheel`, `robotframework`, `pytest`, … | Development, linting, and testing |
106+
Verify:
78107

79-
---
108+
```bash
109+
testbench-defect-service --version
110+
```
111+
112+
:::note Fully offline install
113+
By default pip still fetches dependencies from PyPI. To install on a machine with no internet access:
114+
115+
**On a machine with internet access**, download the wheel and all its dependencies into a local folder:
116+
117+
```bash
118+
pip download "testbench_defect_service-x.y.z-py3-none-any.whl[jira]" -d ./wheels
119+
```
120+
121+
This saves every required wheel into `./wheels/`. Copy that folder together with the `.whl` file to the target machine.
122+
123+
**On the target machine**, install entirely from the local folder:
124+
125+
```bash
126+
pip install --no-index --find-links ./wheels "testbench_defect_service-x.y.z-py3-none-any.whl[jira]"
127+
```
128+
:::
80129

81-
## Verifying the Installation
130+
---
82131

83-
After installation, verify the CLI is available:
132+
### From source *(developers)*
84133

85134
```bash
86-
testbench-defect-service --help
135+
git clone https://github.com/imbus/testbench-defect-service.git
136+
cd testbench-defect-service
87137
```
88138

89-
Expected output:
139+
Create and activate the virtual environment inside the cloned repository. See [Set up a virtual environment](#set-up-a-virtual-environment).
90140

141+
Install with all clients and development dependencies:
142+
143+
```bash
144+
pip install -e .[jira,dev]
91145
```
92-
Usage: testbench-defect-service [OPTIONS] COMMAND [ARGS]...
93146

94-
Options:
95-
--help Show this message and exit.
147+
Verify:
96148

97-
Commands:
98-
configure Create or update the service configuration interactively.
99-
init Initialize a new service configuration interactively.
100-
set-credentials Set the service username and password.
101-
start Start the defect service.
149+
```bash
150+
testbench-defect-service --version
102151
```
103152

104153
---
105154

106-
## Next Step
155+
## Next steps
107156

108-
[Quick Start](quickstart.md)
157+
Head to the [Quickstart](quickstart.md) to configure and start the service.

docusaurus/testbench-defect-service/getting-started/quickstart.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ curl -u "admin:mypassword" http://127.0.0.1:8030/projects
4949

5050
### 1. Install optional dependencies (if needed)
5151

52-
Choose the extras for your backend. See [Installation](installation.md#available-extras) for available options.
52+
Choose the extras for your backend. See [Installation](installation.md#from-pypi-online-recommended) for available options.
5353

5454
### 2. Create `config.toml`
5555

@@ -99,9 +99,19 @@ curl -u "admin:mypassword" http://127.0.0.1:8030/projects
9999
Use `testbench-defect-service configure` to update specific parts of your configuration later without starting from scratch.
100100
:::
101101

102+
## API documentation endpoints
103+
104+
Once the service is running, these endpoints are available without authentication:
105+
106+
| Endpoint | Description |
107+
|----------|-------------|
108+
| `/docs` | Interactive Swagger UI |
109+
| `/docs/openapi.json` | OpenAPI specification (JSON) |
110+
| `/openapi.yaml` | OpenAPI specification (YAML) |
111+
102112
## Next steps
103113

104114
- Customize the service → [Configuration](../configuration.md)
105115
- Learn about clients → [Clients overview](../clients/index.md)
106116
- Connect TestBench → [TestBench Integration](../testbench-integration.md)
107-
- Explore all CLI options → [CLI commands](../cli.md)
117+
- Explore all CLI options → [CLI reference](../cli.md)

docusaurus/testbench-defect-service/intro.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Introduction
55

66
# Introduction
77

8-
[**Testbench Defect Service**](https://github.com/imbus/testbench-defect-service) is a lightweight, asynchronous REST API service that acts as a bridge between [Imbus TestBench](https://www.testbench.com/de/) and external defect tracking systems.
8+
[**TestBench Defect Service**](https://github.com/imbus/testbench-defect-service) is a lightweight, asynchronous REST API service that acts as a bridge between [Imbus TestBench](https://www.testbench.com/de/) and external defect tracking systems.
99

1010
## What It Does
1111

@@ -56,4 +56,10 @@ The service is built on [Sanic](https://sanic.dev), a Python async web framework
5656

5757
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.
5858

59+
## Where to go next
60+
61+
- **New here?** Start with the [Installation](getting-started/installation.md) and [Quickstart](getting-started/quickstart.md) guides.
62+
- **Configuring the service?** See the [Configuration](configuration.md) page.
63+
- **Choosing a client?** Check the [Clients overview](clients/index.md), then dive into [JSONL](clients/jsonl-client.md) or [Jira](clients/jira-client.md).
64+
- **CLI reference?** See the [CLI reference](cli.md) page.
5965

docusaurus/testbench-defect-service/testbench-integration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: TestBench Integration
44
---
55
# TestBench Integration
66

7-
This page explains how to connect TestBench to the running Testbench Defect Service.
7+
This page explains how to connect TestBench to the running TestBench Defect Service.
88

99
---
1010

@@ -14,9 +14,9 @@ TestBench communicates with the Defect Service through the **DMProxy** (Defect M
1414

1515
---
1616

17-
## Prerequisites
17+
## Requirements
1818

19-
- Testbench Defect Service is installed and running (see [Quick Start](getting-started/quickstart)).
19+
- TestBench Defect Service is installed and running (see [Quick Start](getting-started/quickstart)).
2020
- You know the host and port the service is listening on.
2121
- You have set credentials with `testbench-defect-service set-credentials`.
2222

0 commit comments

Comments
 (0)