@syn7xx/testops-mcp-server 0.1.2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/README.md +147 -89
- package/dist/args.d.ts +2 -3
- package/dist/args.d.ts.map +1 -1
- package/dist/args.js +57 -19
- package/dist/args.js.map +1 -1
- package/dist/domain/project/service.d.ts.map +1 -1
- package/dist/domain/project/service.js +1 -1
- package/dist/domain/project/service.js.map +1 -1
- package/dist/domain/project/types.d.ts.map +1 -1
- package/dist/domain/test-case/service.d.ts +13 -1
- package/dist/domain/test-case/service.d.ts.map +1 -1
- package/dist/domain/test-case/service.js +22 -6
- package/dist/domain/test-case/service.js.map +1 -1
- package/dist/domain/test-case/types.d.ts +17 -0
- package/dist/domain/test-case/types.d.ts.map +1 -1
- package/dist/domain/test-plan/service.d.ts.map +1 -1
- package/dist/domain/test-plan/service.js +1 -1
- package/dist/domain/test-plan/service.js.map +1 -1
- package/dist/domain/test-plan/types.d.ts.map +1 -1
- package/dist/presentation/project/tools.d.ts +2 -1
- package/dist/presentation/project/tools.d.ts.map +1 -1
- package/dist/presentation/project/tools.js +30 -8
- package/dist/presentation/project/tools.js.map +1 -1
- package/dist/presentation/test-case/tools.d.ts +2 -1
- package/dist/presentation/test-case/tools.d.ts.map +1 -1
- package/dist/presentation/test-case/tools.js +138 -32
- package/dist/presentation/test-case/tools.js.map +1 -1
- package/dist/presentation/test-plan/tools.d.ts +2 -1
- package/dist/presentation/test-plan/tools.d.ts.map +1 -1
- package/dist/presentation/test-plan/tools.js +17 -5
- package/dist/presentation/test-plan/tools.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +8 -5
- package/dist/server.js.map +1 -1
- package/dist/shared/api.d.ts +2 -4
- package/dist/shared/api.d.ts.map +1 -1
- package/dist/shared/api.js +34 -31
- package/dist/shared/api.js.map +1 -1
- package/dist/shared/pagination.d.ts.map +1 -1
- package/dist/shared/pagination.js.map +1 -1
- package/dist/shared/result.d.ts.map +1 -1
- package/dist/shared/result.js +7 -4
- package/dist/shared/result.js.map +1 -1
- package/package.json +18 -4
- package/dist/services/config.d.ts +0 -43
- package/dist/services/config.d.ts.map +0 -1
- package/dist/services/config.js +0 -99
- package/dist/services/config.js.map +0 -1
- package/dist/services/index.d.ts +0 -8
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/index.js +0 -8
- package/dist/services/index.js.map +0 -1
- package/dist/services/project.d.ts +0 -17
- package/dist/services/project.d.ts.map +0 -1
- package/dist/services/project.js +0 -27
- package/dist/services/project.js.map +0 -1
- package/dist/services/test-case.d.ts +0 -59
- package/dist/services/test-case.d.ts.map +0 -1
- package/dist/services/test-case.js +0 -138
- package/dist/services/test-case.js.map +0 -1
- package/dist/services/test-plan.d.ts +0 -20
- package/dist/services/test-plan.d.ts.map +0 -1
- package/dist/services/test-plan.js +0 -18
- package/dist/services/test-plan.js.map +0 -1
- package/dist/services/testops-client.d.ts +0 -96
- package/dist/services/testops-client.d.ts.map +0 -1
- package/dist/services/testops-client.js +0 -392
- package/dist/services/testops-client.js.map +0 -1
- package/dist/services/testops-types.d.ts +0 -62
- package/dist/services/testops-types.d.ts.map +0 -1
- package/dist/services/testops-types.js +0 -3
- package/dist/services/testops-types.js.map +0 -1
- package/dist/tools/index.d.ts +0 -8
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -8
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/project.d.ts +0 -5
- package/dist/tools/project.d.ts.map +0 -1
- package/dist/tools/project.js +0 -62
- package/dist/tools/project.js.map +0 -1
- package/dist/tools/test-case.d.ts +0 -5
- package/dist/tools/test-case.d.ts.map +0 -1
- package/dist/tools/test-case.js +0 -185
- package/dist/tools/test-case.js.map +0 -1
- package/dist/tools/test-plan.d.ts +0 -5
- package/dist/tools/test-plan.d.ts.map +0 -1
- package/dist/tools/test-plan.js +0 -57
- package/dist/tools/test-plan.js.map +0 -1
- package/dist/tools/testops.d.ts +0 -6
- package/dist/tools/testops.d.ts.map +0 -1
- package/dist/tools/testops.js +0 -302
- package/dist/tools/testops.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
|
+
On each release, [release-it](https://github.com/release-it/release-it) with `@release-it/conventional-changelog` prepends new sections from [Conventional Commits](https://www.conventionalcommits.org/) since the previous tag.
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.4] - 2026-04-03
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `prepublishOnly` runs `npm run build` before every `npm publish` (CI and local)
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Ship `CHANGELOG.md` in the npm package (`files`); expand README **Releasing** (conventional commits, manual workflow)
|
|
19
|
+
|
|
20
|
+
## [0.1.3] - 2026-04-03
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- CI (lint, build on push); GitHub Actions **Release** workflow with `release-it`
|
|
25
|
+
- ESLint 9 (flat config), Prettier, `typescript-eslint`
|
|
26
|
+
- CLI parsing via `node:util` / `parseArgs`; short flags `-u` / `-t` / `-h`; validation of `http(s)` base URL
|
|
27
|
+
- HTTP 401 handling: clear JWT cache and retry once
|
|
28
|
+
- `CHANGELOG.md` in published npm package; maintainer notes in README (Release workflow, conventional commits)
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- README: MCP setup for Cursor, VS Code (`servers`), OpenCode (`mcp` + `type: local`), Claude; **Releasing** section
|
|
33
|
+
- CI: npm publish removed from default pipeline (publish only via **Release** + `release-it`)
|
|
34
|
+
|
|
35
|
+
## [0.1.2] - 2026-04-03
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- Add shebang for the `testops-mcp-server` CLI binary
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- OpenCode: document using `TESTOPS_URL` / `TESTOPS_TOKEN` in env in MCP config
|
|
44
|
+
|
|
45
|
+
## [0.1.0-alpha.2] - 2026-04-03
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- `bin` field in `package.json` for the CLI executable
|
|
50
|
+
|
|
51
|
+
## [0.1.0] - 2026-04-03
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
|
|
55
|
+
- Initial **TestOps MCP Server**: tools for projects, test plans, and test cases; API client with JWT; stdio transport
|
package/README.md
CHANGED
|
@@ -16,6 +16,9 @@ Or use directly via npx:
|
|
|
16
16
|
npx @syn7xx/testops-mcp-server --url <testops-url> --token <api-token>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
Short flags: `-u` / `-t` / `-h` (same as `--url`, `--token`, `--help`).
|
|
20
|
+
Environment variables: `TESTOPS_URL`, `TESTOPS_TOKEN` (used when flags are omitted).
|
|
21
|
+
|
|
19
22
|
## Build
|
|
20
23
|
|
|
21
24
|
```bash
|
|
@@ -34,125 +37,116 @@ Or with npx (if not installed globally):
|
|
|
34
37
|
npx @syn7xx/testops-mcp-server --url <testops-url> --token <api-token>
|
|
35
38
|
```
|
|
36
39
|
|
|
37
|
-
##
|
|
40
|
+
## MCP setup in AI tools
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
| Tool | Description |
|
|
41
|
-
|------|-------------|
|
|
42
|
-
| `project_list` | List projects with pagination |
|
|
43
|
-
| `project_find_by_name` | Find project by exact or partial name match |
|
|
44
|
-
| `project_get_by_id` | Get project by ID |
|
|
42
|
+
Configs differ by product:
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
44
|
+
| Product | Typical config file | Root key | Notes |
|
|
45
|
+
|--------|---------------------|----------|--------|
|
|
46
|
+
| Cursor, Windsurf, Kilo Code, Zed | `mcp.json` (paths vary) | **`mcpServers`** | `command` + `args` |
|
|
47
|
+
| **Visual Studio Code** | `.vscode/mcp.json` or user MCP config | **`servers`** | [Official docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) — not `mcpServers` |
|
|
48
|
+
| Claude Desktop | `claude_desktop_config.json` | **`mcpServers`** | Same idea as Cursor |
|
|
49
|
+
| **OpenCode** | `opencode.jsonc` (project or [user config](https://open-code.ai/en/docs/config)) | **`mcp`** | **`type: "local"`**, `command` as **array**, env under **`environment`** |
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
| Tool | Description |
|
|
54
|
-
|------|-------------|
|
|
55
|
-
| `testcase_get` | Get test case by ID |
|
|
56
|
-
| `testcase_get_detail` | Get test case with steps and custom fields |
|
|
57
|
-
| `testcase_get_scenario` | Get scenario (steps and expected results) |
|
|
58
|
-
| `testcase_update_step` | Update a step in scenario |
|
|
59
|
-
| `testcase_set_scenario` | Replace all steps in scenario |
|
|
60
|
-
| `testcase_get_custom_fields` | Get custom field values |
|
|
61
|
-
| `testcase_update_custom_fields` | Update custom field values |
|
|
62
|
-
| `testcase_search_by_aql` | Search test cases using AQL |
|
|
51
|
+
Do **not** commit real tokens; use env vars or local-only config.
|
|
63
52
|
|
|
64
|
-
|
|
53
|
+
### Cursor, Windsurf, Kilo Code, Zed
|
|
65
54
|
|
|
66
|
-
|
|
67
|
-
src/
|
|
68
|
-
├── shared/ # Utilities (Result, pagination, API client)
|
|
69
|
-
├── domain/ # Business logic (project, test-plan, test-case)
|
|
70
|
-
├── presentation/ # MCP tools
|
|
71
|
-
├── index.ts # Entry point
|
|
72
|
-
└── server.ts # MCP server configuration
|
|
73
|
-
```
|
|
55
|
+
These use top-level **`mcpServers`**, each entry has **`command`** (string) and **`args`** (array).
|
|
74
56
|
|
|
75
|
-
|
|
76
|
-
<summary><b>Configuration in AI Editors</b> (click to expand)</summary>
|
|
77
|
-
|
|
78
|
-
Use `@syn7xx/testops-mcp-server` package:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
npm install -g @syn7xx/testops-mcp-server
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Cursor
|
|
85
|
-
|
|
86
|
-
Add to `~/.cursor/mcp.json` or project `.cursor/mcp.json`:
|
|
57
|
+
**Cursor** — `~/.cursor/mcp.json` or project `.cursor/mcp.json`:
|
|
87
58
|
|
|
88
59
|
```json
|
|
89
60
|
{
|
|
90
61
|
"mcpServers": {
|
|
91
62
|
"testops": {
|
|
92
63
|
"command": "npx",
|
|
93
|
-
"args": [
|
|
64
|
+
"args": [
|
|
65
|
+
"-y",
|
|
66
|
+
"@syn7xx/testops-mcp-server",
|
|
67
|
+
"--url",
|
|
68
|
+
"https://your-testops.com",
|
|
69
|
+
"--token",
|
|
70
|
+
"your-token"
|
|
71
|
+
]
|
|
94
72
|
}
|
|
95
73
|
}
|
|
96
74
|
}
|
|
97
75
|
```
|
|
98
76
|
|
|
99
|
-
|
|
77
|
+
**Windsurf** — `~/.config/windsurf/mcp.json` or project `.windsurf/mcp.json` (same structure).
|
|
100
78
|
|
|
101
|
-
|
|
79
|
+
**Kilo Code** — `~/.kilocode/mcp.json` or project `.kilocode/mcp.json` (same structure).
|
|
102
80
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"testops": {
|
|
107
|
-
"command": "npx",
|
|
108
|
-
"args": ["@syn7xx/testops-mcp-server", "--url", "https://your-testops.com", "--token", "your-token"]
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
```
|
|
81
|
+
**Zed** — `~/.config/zed/mcp.json` (same structure).
|
|
82
|
+
|
|
83
|
+
### Visual Studio Code
|
|
113
84
|
|
|
114
|
-
|
|
85
|
+
VS Code stores MCP config in **`mcp.json`** with top-level **`servers`**, not `mcpServers` (see [Add and manage MCP servers in VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) and the [MCP configuration reference](https://code.visualstudio.com/docs/copilot/reference/mcp-configuration)).
|
|
115
86
|
|
|
116
|
-
|
|
87
|
+
Workspace file: **`.vscode/mcp.json`**, or run **MCP: Open User Configuration** for a global file.
|
|
117
88
|
|
|
118
89
|
```json
|
|
119
90
|
{
|
|
120
|
-
"
|
|
91
|
+
"servers": {
|
|
121
92
|
"testops": {
|
|
122
93
|
"command": "npx",
|
|
123
|
-
"args": [
|
|
94
|
+
"args": [
|
|
95
|
+
"-y",
|
|
96
|
+
"@syn7xx/testops-mcp-server",
|
|
97
|
+
"--url",
|
|
98
|
+
"https://your-testops.com",
|
|
99
|
+
"--token",
|
|
100
|
+
"your-token"
|
|
101
|
+
]
|
|
124
102
|
}
|
|
125
103
|
}
|
|
126
104
|
}
|
|
127
105
|
```
|
|
128
106
|
|
|
107
|
+
For sensitive values, prefer [input variables](https://code.visualstudio.com/docs/copilot/reference/mcp-configuration#_input-variables-for-sensitive-data) or env files as described in the reference.
|
|
108
|
+
|
|
129
109
|
### OpenCode
|
|
130
110
|
|
|
131
|
-
|
|
111
|
+
OpenCode does **not** use `mcpServers`. Define servers under **`mcp`**, set **`type: "local"`**, pass the process as a **`command`** array (e.g. `npx`, `-y`, `@syn7xx/testops-mcp-server`, …), and optional env in **`environment`** (not `env`). See [OpenCode MCP servers](https://open-code.ai/docs/en/mcp-servers).
|
|
132
112
|
|
|
133
|
-
|
|
113
|
+
Example — `opencode.jsonc` in the project root or in the [global OpenCode config](https://open-code.ai/en/docs/config):
|
|
114
|
+
|
|
115
|
+
```jsonc
|
|
134
116
|
{
|
|
135
|
-
"
|
|
117
|
+
"$schema": "https://opencode.ai/config.json",
|
|
118
|
+
"mcp": {
|
|
136
119
|
"testops": {
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
|
|
120
|
+
"type": "local",
|
|
121
|
+
"command": [
|
|
122
|
+
"npx",
|
|
123
|
+
"-y",
|
|
124
|
+
"@syn7xx/testops-mcp-server",
|
|
125
|
+
"--url",
|
|
126
|
+
"https://your-testops.com",
|
|
127
|
+
"--token",
|
|
128
|
+
"your-token"
|
|
129
|
+
],
|
|
130
|
+
"enabled": true
|
|
143
131
|
}
|
|
144
132
|
}
|
|
145
133
|
}
|
|
146
134
|
```
|
|
147
135
|
|
|
148
|
-
|
|
136
|
+
Using environment variables instead of flags:
|
|
149
137
|
|
|
150
|
-
```
|
|
138
|
+
```jsonc
|
|
151
139
|
{
|
|
152
|
-
"
|
|
140
|
+
"$schema": "https://opencode.ai/config.json",
|
|
141
|
+
"mcp": {
|
|
153
142
|
"testops": {
|
|
154
|
-
"
|
|
155
|
-
"
|
|
143
|
+
"type": "local",
|
|
144
|
+
"command": ["npx", "-y", "@syn7xx/testops-mcp-server"],
|
|
145
|
+
"environment": {
|
|
146
|
+
"TESTOPS_URL": "https://your-testops.com",
|
|
147
|
+
"TESTOPS_TOKEN": "your-token"
|
|
148
|
+
},
|
|
149
|
+
"enabled": true
|
|
156
150
|
}
|
|
157
151
|
}
|
|
158
152
|
}
|
|
@@ -160,34 +154,98 @@ Or using command with inline arguments:
|
|
|
160
154
|
|
|
161
155
|
### Claude Desktop
|
|
162
156
|
|
|
163
|
-
|
|
157
|
+
**macOS** — `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
164
158
|
|
|
165
159
|
```json
|
|
166
160
|
{
|
|
167
161
|
"mcpServers": {
|
|
168
162
|
"testops": {
|
|
169
163
|
"command": "npx",
|
|
170
|
-
"args": [
|
|
164
|
+
"args": [
|
|
165
|
+
"@syn7xx/testops-mcp-server",
|
|
166
|
+
"--url",
|
|
167
|
+
"https://your-testops.com",
|
|
168
|
+
"--token",
|
|
169
|
+
"your-token"
|
|
170
|
+
]
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
On **Windows**, the config lives under `%APPDATA%\Claude\` — see Anthropic’s Claude Desktop documentation for the exact path.
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
### Global install (optional)
|
|
179
|
+
|
|
180
|
+
If you prefer a fixed binary path instead of `npx`:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
npm install -g @syn7xx/testops-mcp-server
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Then use `"command": "testops-mcp-server"` and `"args": ["--url", "...", "--token", "..."]` under **`mcpServers`** (Cursor, Claude, …) or **`servers`** (VS Code), or the **`command`** array in OpenCode.
|
|
187
|
+
|
|
188
|
+
## Tools
|
|
189
|
+
|
|
190
|
+
### Project
|
|
191
|
+
|
|
192
|
+
| Tool | Description |
|
|
193
|
+
|------|-------------|
|
|
194
|
+
| `project_list` | List projects with pagination |
|
|
195
|
+
| `project_find_by_name` | Find project by exact or partial name match |
|
|
196
|
+
| `project_get_by_id` | Get project by ID |
|
|
197
|
+
|
|
198
|
+
### Test Plan
|
|
199
|
+
|
|
200
|
+
| Tool | Description |
|
|
201
|
+
|------|-------------|
|
|
202
|
+
| `testplan_get` | Get test plan by ID |
|
|
203
|
+
| `testplan_get_test_cases` | Get test cases from test plan with pagination |
|
|
204
|
+
|
|
205
|
+
### Test Case
|
|
206
|
+
|
|
207
|
+
Routing is defined in each tool’s **description** in `tools/list`. For step actions and expected results from `/api/testcase/{id}/step`, use **`testcase_get_scenario`** or **`testcase_get_step`** (same behavior).
|
|
208
|
+
|
|
209
|
+
| Tool | Description |
|
|
210
|
+
|------|-------------|
|
|
211
|
+
| `testcase_get` | Get test case by ID |
|
|
212
|
+
| `testcase_get_detail` | Summary with flattened step strings and custom fields (not raw scenario JSON) |
|
|
213
|
+
| `testcase_get_scenario` | Scenario JSON: steps and expected results |
|
|
214
|
+
| `testcase_get_step` | Same as `testcase_get_scenario` (alias for LLM-friendly naming) |
|
|
215
|
+
| `testcase_update_step` | Update a step in scenario |
|
|
216
|
+
| `testcase_set_scenario` | Replace all steps in scenario |
|
|
217
|
+
| `testcase_get_custom_fields` | Get custom field values |
|
|
218
|
+
| `testcase_update_custom_fields` | Update custom field values |
|
|
219
|
+
| `testcase_search_by_aql` | Search test cases using AQL |
|
|
220
|
+
| `testcase_list_in_tree` | List test cases in a project tree (`treeId`, optional `parentNodeId`) |
|
|
221
|
+
|
|
222
|
+
## Project Structure
|
|
179
223
|
|
|
180
|
-
```json
|
|
181
|
-
{
|
|
182
|
-
"mcpServers": {
|
|
183
|
-
"testops": {
|
|
184
|
-
"command": "npx",
|
|
185
|
-
"args": ["@syn7xx/testops-mcp-server", "--url", "https://your-testops.com", "--token", "your-token"]
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
224
|
```
|
|
190
|
-
|
|
225
|
+
src/
|
|
226
|
+
├── shared/ # Utilities (Result, pagination, API client)
|
|
227
|
+
├── domain/ # Business logic (project, test-plan, test-case)
|
|
228
|
+
├── presentation/ # MCP tools
|
|
229
|
+
├── index.ts # Entry point
|
|
230
|
+
└── server.ts # MCP server configuration
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Releasing
|
|
234
|
+
|
|
235
|
+
Publishing to **npm** is only via the GitHub Actions workflow **Release** (`release-it`). The **CI** workflow only runs lint and build.
|
|
236
|
+
|
|
237
|
+
**This workflow does not run on `git push`.** It is triggered **only** when someone opens **Actions → Release → Run workflow**, selects branch **`main`**, and chooses **patch** / **minor** / **major**. A plain merge or push to `main` will not start `release-it` (by design, so every commit does not bump the version).
|
|
238
|
+
|
|
239
|
+
Steps:
|
|
240
|
+
|
|
241
|
+
1. Repository secret **`NPM_TOKEN`** (npm token with publish access for `@syn7xx`).
|
|
242
|
+
2. **Actions** tab → **Release** in the left list → **Run workflow** → branch **main** → run.
|
|
243
|
+
|
|
244
|
+
That bumps `package.json`, updates **`CHANGELOG.md`** (from conventional commits since the last tag), creates a git tag, pushes to `main`, and runs **`npm publish`**. Use commit messages like `feat: ...`, `fix: ...`, `chore: ...` so the changelog has meaningful entries. Locally you can use `npm run release` (interactive) or `npm run release:patch` / `:minor` / `:major` instead.
|
|
245
|
+
|
|
246
|
+
If you do not want a changelog at all, remove the `@release-it/conventional-changelog` plugin from `release-it.json` and delete `CHANGELOG.md`.
|
|
247
|
+
|
|
248
|
+
If the **Release** workflow is missing in **Actions**, ensure `.github/workflows/release.yml` is on the **default branch** and that Actions are allowed in the repository **Settings → Actions → General**.
|
|
191
249
|
|
|
192
250
|
## License
|
|
193
251
|
|
package/dist/args.d.ts
CHANGED
|
@@ -3,9 +3,8 @@ export type TestOpsServerArgs = {
|
|
|
3
3
|
token: string;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
|
-
* Parse
|
|
7
|
-
*
|
|
8
|
-
* Base URL is stored without a trailing slash.
|
|
6
|
+
* Parse argv with `node:util` parseArgs (strict: unknown flags and positionals are rejected),
|
|
7
|
+
* then merge env TESTOPS_URL / TESTOPS_TOKEN. Base URL is trimmed and has trailing slashes removed.
|
|
9
8
|
*/
|
|
10
9
|
export declare function parseTestOpsServerArgs(argv: string[]): TestOpsServerArgs;
|
|
11
10
|
//# sourceMappingURL=args.d.ts.map
|
package/dist/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoCF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAqCxE"}
|
package/dist/args.js
CHANGED
|
@@ -1,29 +1,67 @@
|
|
|
1
|
+
import { parseArgs } from 'node:util';
|
|
2
|
+
const usage = `Usage: testops-mcp-server --url <BASE_URL> --token <API_TOKEN>
|
|
3
|
+
testops-mcp-server -u <BASE_URL> -t <API_TOKEN>
|
|
4
|
+
testops-mcp-server --url=<BASE> --token=<TOKEN>
|
|
5
|
+
Environment: TESTOPS_URL, TESTOPS_TOKEN (used if CLI flags are omitted)
|
|
6
|
+
CLI flags override environment variables when both are set.`;
|
|
7
|
+
function printCliError(err) {
|
|
8
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
9
|
+
console.error(msg);
|
|
10
|
+
console.error(usage);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
function normalizeBaseUrl(raw) {
|
|
14
|
+
const s = raw.trim();
|
|
15
|
+
let parsed;
|
|
16
|
+
try {
|
|
17
|
+
parsed = new URL(s);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
console.error('Invalid --url / TESTOPS_URL: expected an absolute http(s) URL (e.g. https://testops.example.com)\n' +
|
|
21
|
+
usage);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
|
|
25
|
+
console.error('Invalid --url: only http: and https: are supported\n' + usage);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
return s.replace(/\/+$/, '');
|
|
29
|
+
}
|
|
1
30
|
/**
|
|
2
|
-
* Parse
|
|
3
|
-
*
|
|
4
|
-
* Base URL is stored without a trailing slash.
|
|
31
|
+
* Parse argv with `node:util` parseArgs (strict: unknown flags and positionals are rejected),
|
|
32
|
+
* then merge env TESTOPS_URL / TESTOPS_TOKEN. Base URL is trimmed and has trailing slashes removed.
|
|
5
33
|
*/
|
|
6
34
|
export function parseTestOpsServerArgs(argv) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
35
|
+
let values;
|
|
36
|
+
try {
|
|
37
|
+
({ values } = parseArgs({
|
|
38
|
+
args: argv.slice(2),
|
|
39
|
+
options: {
|
|
40
|
+
url: { type: 'string', short: 'u' },
|
|
41
|
+
token: { type: 'string', short: 't' },
|
|
42
|
+
help: { type: 'boolean', short: 'h' },
|
|
43
|
+
},
|
|
44
|
+
allowPositionals: false,
|
|
45
|
+
strict: true,
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
printCliError(err);
|
|
50
|
+
}
|
|
51
|
+
if (values.help) {
|
|
52
|
+
console.log(usage);
|
|
53
|
+
process.exit(0);
|
|
19
54
|
}
|
|
20
|
-
|
|
21
|
-
|
|
55
|
+
const urlRaw = values.url ?? process.env.TESTOPS_URL;
|
|
56
|
+
const tokenRaw = values.token ?? process.env.TESTOPS_TOKEN;
|
|
57
|
+
if (!urlRaw?.trim() || !tokenRaw?.trim()) {
|
|
58
|
+
console.error('Required: --url / -u and --token / -t (or env TESTOPS_URL, TESTOPS_TOKEN)\n\n' +
|
|
59
|
+
usage);
|
|
22
60
|
process.exit(1);
|
|
23
61
|
}
|
|
24
62
|
return {
|
|
25
|
-
url:
|
|
26
|
-
token:
|
|
63
|
+
url: normalizeBaseUrl(urlRaw),
|
|
64
|
+
token: tokenRaw.trim(),
|
|
27
65
|
};
|
|
28
66
|
}
|
|
29
67
|
//# sourceMappingURL=args.js.map
|
package/dist/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAOtC,MAAM,KAAK,GAAG;;;;4DAI8C,CAAC;AAE7D,SAAS,aAAa,CAAC,GAAY;IACjC,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CA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AI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;aACtC;YACD,gBAAgB,EAAE,KAAK;YACvB,MAAM,EAAE,IAAI;SACb,CAAC,CAAC,CAAC;IACN,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,aAAa,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAED,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IACrD,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IAE3D,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC;QACzC,OAAO,CAAC,KAAK,CACX,+EAA+E;YAC7E,KAAK,CACR,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO;QACL,GAAG,EAAE,gBAAgB,CAAC,MAAM,CAAC;QAC7B,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE;KACvB,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/domain/project/service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAO,MAAM,wBAAwB,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/domain/project/service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAO,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,UAAU,EAGV,KAAK,SAAS,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,OAAO,EAAqB,MAAM,YAAY,CAAC;AAS7D;;;;GAIG;AACH,eAAO,MAAM,YAAY,GACvB,SAAS,UAAU,KAClB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAiB3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,KACX,OAAO,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI,EAAE,KAAK,CAAC,CAyBvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,IAAI,MAAM,KACT,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAGhC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { apiGet } from '../../shared/api.js';
|
|
2
2
|
import { map } from '../../shared/result.js';
|
|
3
|
-
import { normalizePageParams, createPaginated } from '../../shared/pagination.js';
|
|
3
|
+
import { normalizePageParams, createPaginated, } from '../../shared/pagination.js';
|
|
4
4
|
/**
|
|
5
5
|
* Find all projects with pagination
|
|
6
6
|
* @param params - Pagination parameters (page, size, sort)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/project/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAU,GAAG,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/project/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAU,GAAG,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAEL,mBAAmB,EACnB,eAAe,GAEhB,MAAM,4BAA4B,CAAC;AAUpC;;;;GAIG;AACH,MA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,CAAC,CAAC,CAAC,EAAE,EAAE,CACrC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAClD,CAAC;QACF,OAAO,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,EAAU,EACuB,EAAE;IACnC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAU,gBAAgB,EAAE,EAAE,CAAC,CAAC;IAC7D,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/domain/project/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,OAAO;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/domain/project/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Result } from '../../shared/result.js';
|
|
2
2
|
import { PageParams } from '../../shared/pagination.js';
|
|
3
|
-
import type { TestCase, TestCaseDetail, NormalizedScenario, CustomFieldWithValues, TestCaseSearchResult } from './types.js';
|
|
3
|
+
import type { TestCase, TestCaseDetail, NormalizedScenario, CustomFieldWithValues, TestCaseSearchResult, TestCaseFullTreeNode } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Get a test case by ID
|
|
6
6
|
* @param id - Test case ID
|
|
@@ -63,6 +63,18 @@ export declare const updateTestCaseCustomFields: (testCaseId: number, fields: Ar
|
|
|
63
63
|
* @param params - Pagination and options
|
|
64
64
|
* @returns Search results with pagination info
|
|
65
65
|
*/
|
|
66
|
+
export interface ListTestCasesInTreeParams extends PageParams {
|
|
67
|
+
parentNodeId?: number;
|
|
68
|
+
search?: string;
|
|
69
|
+
filterId?: number;
|
|
70
|
+
query?: string;
|
|
71
|
+
baseAql?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* List test cases under a project tree (v2 tree-node).
|
|
75
|
+
* When `treeId` is set, TestOps scopes the result to that tree (see OpenAPI: test-case-tree-controller-v-2).
|
|
76
|
+
*/
|
|
77
|
+
export declare const listTestCasesInTree: (projectId: number, treeId: number, params?: ListTestCasesInTreeParams) => Promise<Result<TestCaseFullTreeNode, Error>>;
|
|
66
78
|
export declare const searchTestCasesByAQL: (projectId: number, rql: string, params?: PageParams & {
|
|
67
79
|
deleted?: boolean;
|
|
68
80
|
}) => Promise<Result<TestCaseSearchResult, Error>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/domain/test-case/service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAA2B,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/domain/test-case/service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAA2B,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAuB,MAAM,4BAA4B,CAAC;AAC7E,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAA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B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,yBAA0B,SAAQ,UAAU;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,EACjB,QAAQ,MAAM,EACd,SAAS,yBAAyB,KACjC,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAoB7C,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,WAAW,MAAM,EACjB,KAAK,MAAM,EACX,SAAS,UAAU,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,KAC1C,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAqB7C,CAAC"}
|
|
@@ -80,7 +80,9 @@ export const updateScenarioStep = async (testCaseId, stepId, data) => {
|
|
|
80
80
|
body.body = data.body;
|
|
81
81
|
if (data.expectedResult !== undefined)
|
|
82
82
|
body.expectedResult = data.expectedResult;
|
|
83
|
-
return apiPatch(`/api/testcase/step/${stepId}`, body, {
|
|
83
|
+
return apiPatch(`/api/testcase/step/${stepId}`, body, {
|
|
84
|
+
withExpectedResult: true,
|
|
85
|
+
});
|
|
84
86
|
};
|
|
85
87
|
/**
|
|
86
88
|
* Replace entire scenario with new steps
|
|
@@ -115,12 +117,26 @@ export const updateTestCaseCustomFields = async (testCaseId, fields) => {
|
|
|
115
117
|
return map(result, () => undefined);
|
|
116
118
|
};
|
|
117
119
|
/**
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* @param rql - AQL query string
|
|
121
|
-
* @param params - Pagination and options
|
|
122
|
-
* @returns Search results with pagination info
|
|
120
|
+
* List test cases under a project tree (v2 tree-node).
|
|
121
|
+
* When `treeId` is set, TestOps scopes the result to that tree (see OpenAPI: test-case-tree-controller-v-2).
|
|
123
122
|
*/
|
|
123
|
+
export const listTestCasesInTree = async (projectId, treeId, params) => {
|
|
124
|
+
const { page, size, sort } = normalizePageParams({
|
|
125
|
+
...params,
|
|
126
|
+
sort: params?.sort ?? 'name,ASC',
|
|
127
|
+
});
|
|
128
|
+
return apiGet(`/api/v2/project/${projectId}/test-case/tree/tree-node`, {
|
|
129
|
+
treeId,
|
|
130
|
+
parentNodeId: params?.parentNodeId,
|
|
131
|
+
search: params?.search,
|
|
132
|
+
filterId: params?.filterId,
|
|
133
|
+
page,
|
|
134
|
+
size,
|
|
135
|
+
sort,
|
|
136
|
+
query: params?.query,
|
|
137
|
+
baseAql: params?.baseAql,
|
|
138
|
+
});
|
|
139
|
+
};
|
|
124
140
|
export const searchTestCasesByAQL = async (projectId, rql, params) => {
|
|
125
141
|
const { page, size, sort } = normalizePageParams(params);
|
|
126
142
|
const response = await apiGet('/api/testcase/__search', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/test-case/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAU,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAc,mBAAmB,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/test-case/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAU,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAc,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAiB7E;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAA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