testsmith-ai 0.2.0__tar.gz

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.
Files changed (32) hide show
  1. testsmith_ai-0.2.0/LICENSE +21 -0
  2. testsmith_ai-0.2.0/PKG-INFO +293 -0
  3. testsmith_ai-0.2.0/README.md +257 -0
  4. testsmith_ai-0.2.0/pyproject.toml +54 -0
  5. testsmith_ai-0.2.0/setup.cfg +4 -0
  6. testsmith_ai-0.2.0/tests/test_csv_writer.py +106 -0
  7. testsmith_ai-0.2.0/tests/test_generator.py +132 -0
  8. testsmith_ai-0.2.0/tests/test_loaders.py +49 -0
  9. testsmith_ai-0.2.0/tests/test_providers.py +89 -0
  10. testsmith_ai-0.2.0/tests/test_sources_confluence.py +132 -0
  11. testsmith_ai-0.2.0/tests/test_sources_figma.py +222 -0
  12. testsmith_ai-0.2.0/tests/test_sources_files.py +65 -0
  13. testsmith_ai-0.2.0/tests/test_sources_registry.py +34 -0
  14. testsmith_ai-0.2.0/testsmith/__init__.py +1 -0
  15. testsmith_ai-0.2.0/testsmith/cli.py +191 -0
  16. testsmith_ai-0.2.0/testsmith/csv_writer.py +58 -0
  17. testsmith_ai-0.2.0/testsmith/generator.py +168 -0
  18. testsmith_ai-0.2.0/testsmith/interview.py +130 -0
  19. testsmith_ai-0.2.0/testsmith/loaders.py +27 -0
  20. testsmith_ai-0.2.0/testsmith/providers.py +169 -0
  21. testsmith_ai-0.2.0/testsmith/sources/__init__.py +13 -0
  22. testsmith_ai-0.2.0/testsmith/sources/base.py +40 -0
  23. testsmith_ai-0.2.0/testsmith/sources/confluence.py +234 -0
  24. testsmith_ai-0.2.0/testsmith/sources/figma.py +258 -0
  25. testsmith_ai-0.2.0/testsmith/sources/files.py +72 -0
  26. testsmith_ai-0.2.0/testsmith/sources/registry.py +31 -0
  27. testsmith_ai-0.2.0/testsmith_ai.egg-info/PKG-INFO +293 -0
  28. testsmith_ai-0.2.0/testsmith_ai.egg-info/SOURCES.txt +30 -0
  29. testsmith_ai-0.2.0/testsmith_ai.egg-info/dependency_links.txt +1 -0
  30. testsmith_ai-0.2.0/testsmith_ai.egg-info/entry_points.txt +2 -0
  31. testsmith_ai-0.2.0/testsmith_ai.egg-info/requires.txt +10 -0
  32. testsmith_ai-0.2.0/testsmith_ai.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Priyank Shah
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,293 @@
1
+ Metadata-Version: 2.4
2
+ Name: testsmith-ai
3
+ Version: 0.2.0
4
+ Summary: Forge QA test cases from text, documents, Confluence pages, and Figma designs using LLMs
5
+ Author-email: Priyank Shah <priyank.shah217@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/priyankshah217/testsmith
8
+ Project-URL: Repository, https://github.com/priyankshah217/testsmith
9
+ Project-URL: Issues, https://github.com/priyankshah217/testsmith/issues
10
+ Project-URL: Changelog, https://github.com/priyankshah217/testsmith/blob/main/CHANGELOG.md
11
+ Keywords: qa,testing,test-cases,llm,anthropic,gemini,confluence,figma,cli
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Quality Assurance
22
+ Classifier: Topic :: Software Development :: Testing
23
+ Requires-Python: >=3.11
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: anthropic>=0.40.0
27
+ Requires-Dist: google-genai>=0.3.0
28
+ Requires-Dist: typer>=0.12.0
29
+ Requires-Dist: pypdf>=4.0.0
30
+ Requires-Dist: python-docx>=1.1.0
31
+ Requires-Dist: rich>=13.0.0
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=8.0; extra == "dev"
34
+ Requires-Dist: ruff>=0.4.0; extra == "dev"
35
+ Dynamic: license-file
36
+
37
+ # testsmith
38
+
39
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
40
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
41
+ [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
42
+
43
+ Forge QA test cases from text, documents, Confluence pages, and Figma designs using LLMs.
44
+
45
+ `testsmith` is a CLI that takes a feature description and/or supporting sources (local files or URLs), sends them to an LLM (Anthropic Claude or Google Gemini), and writes the generated test cases to a CSV file.
46
+
47
+ ## Requirements
48
+
49
+ - Python >= 3.11
50
+ - An API key for one of the supported providers:
51
+ - `ANTHROPIC_API_KEY` for Anthropic Claude
52
+ - `GOOGLE_API_KEY` (or `GEMINI_API_KEY`) for Google Gemini
53
+
54
+ ## Installation
55
+
56
+ ### Via pipx (recommended)
57
+
58
+ [pipx](https://pipx.pypa.io/) installs CLI tools in isolated environments so they don't conflict with your system Python:
59
+
60
+ ```bash
61
+ # Install pipx (pick your platform)
62
+ # macOS: brew install pipx
63
+ # Linux: python3 -m pip install --user pipx
64
+ # Windows: python -m pip install --user pipx
65
+
66
+ pipx install git+https://github.com/priyankshah217/testsmith.git
67
+ ```
68
+
69
+ To upgrade later:
70
+
71
+ ```bash
72
+ pipx upgrade testsmith
73
+ ```
74
+
75
+ ### Via pip (in a virtualenv)
76
+
77
+ ```bash
78
+ # macOS / Linux
79
+ python3 -m venv .venv && source .venv/bin/activate
80
+
81
+ # Windows
82
+ python -m venv .venv && .venv\Scripts\activate
83
+
84
+ pip install git+https://github.com/priyankshah217/testsmith.git
85
+ ```
86
+
87
+ ### From source (for development)
88
+
89
+ ```bash
90
+ git clone https://github.com/priyankshah217/testsmith.git
91
+ cd testsmith
92
+
93
+ # macOS / Linux
94
+ python3 -m venv .venv && source .venv/bin/activate
95
+
96
+ # Windows
97
+ python -m venv .venv && .venv\Scripts\activate
98
+
99
+ pip install -e ".[dev]"
100
+ ```
101
+
102
+ This installs the `testsmith` command on your PATH.
103
+
104
+ ## Usage
105
+
106
+ ```bash
107
+ testsmith [OPTIONS]
108
+ ```
109
+
110
+ You must provide at least one of `--prompt`, `--file`, or piped stdin.
111
+
112
+ ### Options
113
+
114
+ | Option | Description |
115
+ | --- | --- |
116
+ | `-p`, `--prompt TEXT` | Plain text prompt / feature description. |
117
+ | `-f`, `--file REF` | Input source: local file (PDF, DOCX, MD, TXT) **or** URL (e.g. Confluence page). Repeatable. |
118
+ | `-o`, `--out PATH` | Output CSV path. If omitted, the LLM suggests a kebab-case filename based on the feature (e.g. `login-social-auth.csv`). Collisions get `_2`, `_3`, ... |
119
+ | `--provider TEXT` | LLM provider: `anthropic` or `gemini`. Auto-detected from env if omitted. |
120
+ | `-m`, `--model TEXT` | LLM model name (e.g. `claude-sonnet-4-6`, `gemini-2.5-flash`). Defaults per provider. |
121
+ | `-t`, `--temperature FLOAT` | Sampling temperature (0.0–2.0). Lower = more deterministic. |
122
+ | `--top-p FLOAT` | Nucleus sampling top-p (0.0–1.0). |
123
+ | `--format TEXT` | Test step format: `steps` (default, numbered) or `bdd` (Given/When/Then, business-focused). |
124
+ | `-s`, `--system TEXT` | Custom system prompt. Inline text or `@path/to/file.txt`. Replaces the default. |
125
+ | `--append-system` | Append `--system` to the default system prompt instead of replacing it. |
126
+ | `-u`, `--user-template TEXT` | Custom user prompt template. Inline text or `@path/to/file.txt`. Use `{context}` as a placeholder. |
127
+ | `-i`, `--interactive` | Let the LLM ask clarifying questions adaptively before generating. It asks one question at a time and stops as soon as it has enough context (0–5 questions). Type `skip` to skip a question or `done` to stop early. |
128
+
129
+ ### Supported input sources
130
+
131
+ | Source | Example |
132
+ | --- | --- |
133
+ | Plain text | `-p "Login screen with social auth"` |
134
+ | PDF | `-f ./specs/checkout.pdf` |
135
+ | DOCX | `-f ./specs/payment.docx` |
136
+ | Markdown / text | `-f ./notes.md` |
137
+ | Confluence page | `-f https://acme.atlassian.net/wiki/spaces/ENG/pages/12345/Checkout-PRD` |
138
+ | Figma design (text-only) | `-f "https://www.figma.com/design/<fileKey>/<name>?node-id=1-23"` |
139
+
140
+ Adding new sources (Notion, Jira, Linear, ...) is a single file in `testsmith/sources/` — see `testsmith/sources/base.py` for the `Source` protocol.
141
+
142
+ ### Confluence setup
143
+
144
+ Set these environment variables to fetch Confluence pages:
145
+
146
+ ```bash
147
+ export CONFLUENCE_BASE_URL=https://<your-site>.atlassian.net
148
+ export CONFLUENCE_EMAIL=you@example.com
149
+ export CONFLUENCE_API_TOKEN=<token from id.atlassian.com/manage-profile/security/api-tokens>
150
+ ```
151
+
152
+ ### Figma setup
153
+
154
+ Set a personal access token to fetch Figma designs:
155
+
156
+ ```bash
157
+ export FIGMA_API_TOKEN=<token from figma.com/settings>
158
+ ```
159
+
160
+ Figma support is **text-only** in v1: frame/component names become headings, text layers become body text, and component descriptions are preserved. Purely visual nodes (vectors, rectangles, etc.) are skipped. If the URL contains a `node-id`, only that subtree is fetched; otherwise the whole file is loaded. **Tip:** right-click a frame in Figma → Copy link to get a URL with the right `node-id`.
161
+
162
+ ### Examples
163
+
164
+ Generate from an inline prompt (LLM picks the filename):
165
+
166
+ ```bash
167
+ testsmith -p "Login screen with email + password, forgot password link, and social login"
168
+ ```
169
+
170
+ Generate from documents:
171
+
172
+ ```bash
173
+ testsmith -f specs/checkout.pdf -f specs/payment.docx
174
+ ```
175
+
176
+ Generate from a Confluence page:
177
+
178
+ ```bash
179
+ testsmith -f https://acme.atlassian.net/wiki/spaces/ENG/pages/12345/Checkout-PRD
180
+ ```
181
+
182
+ Generate from a Figma design (quote the URL — the `?` will be interpreted by your shell otherwise):
183
+
184
+ ```bash
185
+ testsmith -f "https://www.figma.com/design/ABC123/Checkout?node-id=42-1337"
186
+ ```
187
+
188
+ Mix a prompt with supporting files, Confluence pages, and Figma designs:
189
+
190
+ ```bash
191
+ testsmith -p "Focus on edge cases" \
192
+ -f "https://www.figma.com/design/ABC123/Checkout?node-id=42-1337" \
193
+ -f https://acme.atlassian.net/wiki/spaces/ENG/pages/12345/PRD \
194
+ -f specs/wireframes.pdf
195
+ ```
196
+
197
+ Pipe text via stdin:
198
+
199
+ ```bash
200
+ cat feature.md | testsmith
201
+ ```
202
+
203
+ Pick a provider explicitly:
204
+
205
+ ```bash
206
+ testsmith -p "Signup flow" --provider anthropic
207
+ ```
208
+
209
+ Interactive mode (LLM asks clarifying questions only when genuinely ambiguous):
210
+
211
+ ```bash
212
+ testsmith -i -p "Checkout flow with guest and returning users"
213
+ ```
214
+
215
+ Generate BDD-style test cases (Given/When/Then, business-focused):
216
+
217
+ ```bash
218
+ testsmith -p "Subscription renewal flow" --format bdd
219
+ ```
220
+
221
+ Use a specific model with custom temperature:
222
+
223
+ ```bash
224
+ testsmith -p "Signup flow" -m claude-sonnet-4-6 -t 0.3
225
+ ```
226
+
227
+ Use a custom system prompt from a file:
228
+
229
+ ```bash
230
+ testsmith -f spec.pdf --system @prompts/qa_system.txt
231
+ ```
232
+
233
+ Append to the default system prompt instead of replacing it:
234
+
235
+ ```bash
236
+ testsmith -f spec.pdf --system "Focus on accessibility test cases." --append-system
237
+ ```
238
+
239
+ Force an explicit output filename:
240
+
241
+ ```bash
242
+ testsmith -p "Password reset flow" -o reset.csv
243
+ ```
244
+
245
+ ## Output
246
+
247
+ Test cases are written to a CSV with columns:
248
+ `ID, Title, Preconditions, Steps, Expected Result, Priority, Type`
249
+
250
+ By default the filename is suggested by the LLM based on the feature context; pass `-o` to override.
251
+
252
+ ### Step formats
253
+
254
+ | `--format` | Steps column example |
255
+ | --- | --- |
256
+ | `steps` (default) | `1. Open app \| 2. Enter credentials \| 3. Submit form` |
257
+ | `bdd` | `Given user has an active account \| When user provides valid credentials \| Then user is authenticated` |
258
+
259
+ BDD mode enforces **business-focused language** — steps describe domain intent and outcomes, not UI interactions (no "click", "tap", "navigate", etc.).
260
+
261
+ ## Claude Code skill
262
+
263
+ Testsmith ships with a [Claude Code skill](https://docs.anthropic.com/en/docs/claude-code/skills) so Claude can run testsmith for you when you ask for test cases.
264
+
265
+ ### Install the skill
266
+
267
+ Copy the bundled skill to your Claude Code skills directory:
268
+
269
+ ```bash
270
+ # macOS / Linux
271
+ cp -r skills/testsmith ~/.claude/skills/
272
+
273
+ # Windows (PowerShell)
274
+ Copy-Item -Recurse skills\testsmith $env:USERPROFILE\.claude\skills\
275
+ ```
276
+
277
+ Or create a symlink so it stays in sync with the repo:
278
+
279
+ ```bash
280
+ ln -s "$(pwd)/skills/testsmith" ~/.claude/skills/testsmith
281
+ ```
282
+
283
+ Once installed, just ask Claude Code: *"generate test cases for the login screen"* — it will invoke testsmith automatically.
284
+
285
+ ## Contributing
286
+
287
+ ```bash
288
+ git clone https://github.com/priyankshah217/testsmith.git
289
+ cd testsmith
290
+ python3 -m venv .venv && source .venv/bin/activate
291
+ pip install -e ".[dev]"
292
+ pytest tests/ -v
293
+ ```
@@ -0,0 +1,257 @@
1
+ # testsmith
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
4
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
5
+ [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
6
+
7
+ Forge QA test cases from text, documents, Confluence pages, and Figma designs using LLMs.
8
+
9
+ `testsmith` is a CLI that takes a feature description and/or supporting sources (local files or URLs), sends them to an LLM (Anthropic Claude or Google Gemini), and writes the generated test cases to a CSV file.
10
+
11
+ ## Requirements
12
+
13
+ - Python >= 3.11
14
+ - An API key for one of the supported providers:
15
+ - `ANTHROPIC_API_KEY` for Anthropic Claude
16
+ - `GOOGLE_API_KEY` (or `GEMINI_API_KEY`) for Google Gemini
17
+
18
+ ## Installation
19
+
20
+ ### Via pipx (recommended)
21
+
22
+ [pipx](https://pipx.pypa.io/) installs CLI tools in isolated environments so they don't conflict with your system Python:
23
+
24
+ ```bash
25
+ # Install pipx (pick your platform)
26
+ # macOS: brew install pipx
27
+ # Linux: python3 -m pip install --user pipx
28
+ # Windows: python -m pip install --user pipx
29
+
30
+ pipx install git+https://github.com/priyankshah217/testsmith.git
31
+ ```
32
+
33
+ To upgrade later:
34
+
35
+ ```bash
36
+ pipx upgrade testsmith
37
+ ```
38
+
39
+ ### Via pip (in a virtualenv)
40
+
41
+ ```bash
42
+ # macOS / Linux
43
+ python3 -m venv .venv && source .venv/bin/activate
44
+
45
+ # Windows
46
+ python -m venv .venv && .venv\Scripts\activate
47
+
48
+ pip install git+https://github.com/priyankshah217/testsmith.git
49
+ ```
50
+
51
+ ### From source (for development)
52
+
53
+ ```bash
54
+ git clone https://github.com/priyankshah217/testsmith.git
55
+ cd testsmith
56
+
57
+ # macOS / Linux
58
+ python3 -m venv .venv && source .venv/bin/activate
59
+
60
+ # Windows
61
+ python -m venv .venv && .venv\Scripts\activate
62
+
63
+ pip install -e ".[dev]"
64
+ ```
65
+
66
+ This installs the `testsmith` command on your PATH.
67
+
68
+ ## Usage
69
+
70
+ ```bash
71
+ testsmith [OPTIONS]
72
+ ```
73
+
74
+ You must provide at least one of `--prompt`, `--file`, or piped stdin.
75
+
76
+ ### Options
77
+
78
+ | Option | Description |
79
+ | --- | --- |
80
+ | `-p`, `--prompt TEXT` | Plain text prompt / feature description. |
81
+ | `-f`, `--file REF` | Input source: local file (PDF, DOCX, MD, TXT) **or** URL (e.g. Confluence page). Repeatable. |
82
+ | `-o`, `--out PATH` | Output CSV path. If omitted, the LLM suggests a kebab-case filename based on the feature (e.g. `login-social-auth.csv`). Collisions get `_2`, `_3`, ... |
83
+ | `--provider TEXT` | LLM provider: `anthropic` or `gemini`. Auto-detected from env if omitted. |
84
+ | `-m`, `--model TEXT` | LLM model name (e.g. `claude-sonnet-4-6`, `gemini-2.5-flash`). Defaults per provider. |
85
+ | `-t`, `--temperature FLOAT` | Sampling temperature (0.0–2.0). Lower = more deterministic. |
86
+ | `--top-p FLOAT` | Nucleus sampling top-p (0.0–1.0). |
87
+ | `--format TEXT` | Test step format: `steps` (default, numbered) or `bdd` (Given/When/Then, business-focused). |
88
+ | `-s`, `--system TEXT` | Custom system prompt. Inline text or `@path/to/file.txt`. Replaces the default. |
89
+ | `--append-system` | Append `--system` to the default system prompt instead of replacing it. |
90
+ | `-u`, `--user-template TEXT` | Custom user prompt template. Inline text or `@path/to/file.txt`. Use `{context}` as a placeholder. |
91
+ | `-i`, `--interactive` | Let the LLM ask clarifying questions adaptively before generating. It asks one question at a time and stops as soon as it has enough context (0–5 questions). Type `skip` to skip a question or `done` to stop early. |
92
+
93
+ ### Supported input sources
94
+
95
+ | Source | Example |
96
+ | --- | --- |
97
+ | Plain text | `-p "Login screen with social auth"` |
98
+ | PDF | `-f ./specs/checkout.pdf` |
99
+ | DOCX | `-f ./specs/payment.docx` |
100
+ | Markdown / text | `-f ./notes.md` |
101
+ | Confluence page | `-f https://acme.atlassian.net/wiki/spaces/ENG/pages/12345/Checkout-PRD` |
102
+ | Figma design (text-only) | `-f "https://www.figma.com/design/<fileKey>/<name>?node-id=1-23"` |
103
+
104
+ Adding new sources (Notion, Jira, Linear, ...) is a single file in `testsmith/sources/` — see `testsmith/sources/base.py` for the `Source` protocol.
105
+
106
+ ### Confluence setup
107
+
108
+ Set these environment variables to fetch Confluence pages:
109
+
110
+ ```bash
111
+ export CONFLUENCE_BASE_URL=https://<your-site>.atlassian.net
112
+ export CONFLUENCE_EMAIL=you@example.com
113
+ export CONFLUENCE_API_TOKEN=<token from id.atlassian.com/manage-profile/security/api-tokens>
114
+ ```
115
+
116
+ ### Figma setup
117
+
118
+ Set a personal access token to fetch Figma designs:
119
+
120
+ ```bash
121
+ export FIGMA_API_TOKEN=<token from figma.com/settings>
122
+ ```
123
+
124
+ Figma support is **text-only** in v1: frame/component names become headings, text layers become body text, and component descriptions are preserved. Purely visual nodes (vectors, rectangles, etc.) are skipped. If the URL contains a `node-id`, only that subtree is fetched; otherwise the whole file is loaded. **Tip:** right-click a frame in Figma → Copy link to get a URL with the right `node-id`.
125
+
126
+ ### Examples
127
+
128
+ Generate from an inline prompt (LLM picks the filename):
129
+
130
+ ```bash
131
+ testsmith -p "Login screen with email + password, forgot password link, and social login"
132
+ ```
133
+
134
+ Generate from documents:
135
+
136
+ ```bash
137
+ testsmith -f specs/checkout.pdf -f specs/payment.docx
138
+ ```
139
+
140
+ Generate from a Confluence page:
141
+
142
+ ```bash
143
+ testsmith -f https://acme.atlassian.net/wiki/spaces/ENG/pages/12345/Checkout-PRD
144
+ ```
145
+
146
+ Generate from a Figma design (quote the URL — the `?` will be interpreted by your shell otherwise):
147
+
148
+ ```bash
149
+ testsmith -f "https://www.figma.com/design/ABC123/Checkout?node-id=42-1337"
150
+ ```
151
+
152
+ Mix a prompt with supporting files, Confluence pages, and Figma designs:
153
+
154
+ ```bash
155
+ testsmith -p "Focus on edge cases" \
156
+ -f "https://www.figma.com/design/ABC123/Checkout?node-id=42-1337" \
157
+ -f https://acme.atlassian.net/wiki/spaces/ENG/pages/12345/PRD \
158
+ -f specs/wireframes.pdf
159
+ ```
160
+
161
+ Pipe text via stdin:
162
+
163
+ ```bash
164
+ cat feature.md | testsmith
165
+ ```
166
+
167
+ Pick a provider explicitly:
168
+
169
+ ```bash
170
+ testsmith -p "Signup flow" --provider anthropic
171
+ ```
172
+
173
+ Interactive mode (LLM asks clarifying questions only when genuinely ambiguous):
174
+
175
+ ```bash
176
+ testsmith -i -p "Checkout flow with guest and returning users"
177
+ ```
178
+
179
+ Generate BDD-style test cases (Given/When/Then, business-focused):
180
+
181
+ ```bash
182
+ testsmith -p "Subscription renewal flow" --format bdd
183
+ ```
184
+
185
+ Use a specific model with custom temperature:
186
+
187
+ ```bash
188
+ testsmith -p "Signup flow" -m claude-sonnet-4-6 -t 0.3
189
+ ```
190
+
191
+ Use a custom system prompt from a file:
192
+
193
+ ```bash
194
+ testsmith -f spec.pdf --system @prompts/qa_system.txt
195
+ ```
196
+
197
+ Append to the default system prompt instead of replacing it:
198
+
199
+ ```bash
200
+ testsmith -f spec.pdf --system "Focus on accessibility test cases." --append-system
201
+ ```
202
+
203
+ Force an explicit output filename:
204
+
205
+ ```bash
206
+ testsmith -p "Password reset flow" -o reset.csv
207
+ ```
208
+
209
+ ## Output
210
+
211
+ Test cases are written to a CSV with columns:
212
+ `ID, Title, Preconditions, Steps, Expected Result, Priority, Type`
213
+
214
+ By default the filename is suggested by the LLM based on the feature context; pass `-o` to override.
215
+
216
+ ### Step formats
217
+
218
+ | `--format` | Steps column example |
219
+ | --- | --- |
220
+ | `steps` (default) | `1. Open app \| 2. Enter credentials \| 3. Submit form` |
221
+ | `bdd` | `Given user has an active account \| When user provides valid credentials \| Then user is authenticated` |
222
+
223
+ BDD mode enforces **business-focused language** — steps describe domain intent and outcomes, not UI interactions (no "click", "tap", "navigate", etc.).
224
+
225
+ ## Claude Code skill
226
+
227
+ Testsmith ships with a [Claude Code skill](https://docs.anthropic.com/en/docs/claude-code/skills) so Claude can run testsmith for you when you ask for test cases.
228
+
229
+ ### Install the skill
230
+
231
+ Copy the bundled skill to your Claude Code skills directory:
232
+
233
+ ```bash
234
+ # macOS / Linux
235
+ cp -r skills/testsmith ~/.claude/skills/
236
+
237
+ # Windows (PowerShell)
238
+ Copy-Item -Recurse skills\testsmith $env:USERPROFILE\.claude\skills\
239
+ ```
240
+
241
+ Or create a symlink so it stays in sync with the repo:
242
+
243
+ ```bash
244
+ ln -s "$(pwd)/skills/testsmith" ~/.claude/skills/testsmith
245
+ ```
246
+
247
+ Once installed, just ask Claude Code: *"generate test cases for the login screen"* — it will invoke testsmith automatically.
248
+
249
+ ## Contributing
250
+
251
+ ```bash
252
+ git clone https://github.com/priyankshah217/testsmith.git
253
+ cd testsmith
254
+ python3 -m venv .venv && source .venv/bin/activate
255
+ pip install -e ".[dev]"
256
+ pytest tests/ -v
257
+ ```
@@ -0,0 +1,54 @@
1
+ [project]
2
+ name = "testsmith-ai"
3
+ version = "0.2.0"
4
+ description = "Forge QA test cases from text, documents, Confluence pages, and Figma designs using LLMs"
5
+ readme = "README.md"
6
+ license = { text = "MIT" }
7
+ requires-python = ">=3.11"
8
+ authors = [
9
+ { name = "Priyank Shah", email = "priyank.shah217@gmail.com" },
10
+ ]
11
+ keywords = ["qa", "testing", "test-cases", "llm", "anthropic", "gemini", "confluence", "figma", "cli"]
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Environment :: Console",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Topic :: Software Development :: Quality Assurance",
23
+ "Topic :: Software Development :: Testing",
24
+ ]
25
+ dependencies = [
26
+ "anthropic>=0.40.0",
27
+ "google-genai>=0.3.0",
28
+ "typer>=0.12.0",
29
+ "pypdf>=4.0.0",
30
+ "python-docx>=1.1.0",
31
+ "rich>=13.0.0",
32
+ ]
33
+
34
+ [project.optional-dependencies]
35
+ dev = [
36
+ "pytest>=8.0",
37
+ "ruff>=0.4.0",
38
+ ]
39
+
40
+ [project.urls]
41
+ Homepage = "https://github.com/priyankshah217/testsmith"
42
+ Repository = "https://github.com/priyankshah217/testsmith"
43
+ Issues = "https://github.com/priyankshah217/testsmith/issues"
44
+ Changelog = "https://github.com/priyankshah217/testsmith/blob/main/CHANGELOG.md"
45
+
46
+ [project.scripts]
47
+ testsmith = "testsmith.cli:app"
48
+
49
+ [build-system]
50
+ requires = ["setuptools>=68"]
51
+ build-backend = "setuptools.build_meta"
52
+
53
+ [tool.setuptools.packages.find]
54
+ include = ["testsmith*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+