testzeus-cli 0.0.2__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 TestZeus
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,349 @@
1
+ Metadata-Version: 2.1
2
+ Name: testzeus-cli
3
+ Version: 0.0.2
4
+ Summary: Command-line interface for TestZeus testing platform
5
+ Home-page: https://github.com/test-zeus-ai/testzeus-cli
6
+ Author: Shriyansh Agnihotri
7
+ Author-email: shriyansh@testzeus.com
8
+ Requires-Python: >=3.11
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Requires-Dist: click (>=8.1.3,<9.0.0)
13
+ Requires-Dist: ipdb (>=0.13.13,<0.14.0)
14
+ Requires-Dist: keyring (>=24.0.0,<25.0.0)
15
+ Requires-Dist: pydantic (>=2.0.0,<3.0.0)
16
+ Requires-Dist: pyyaml (>=6.0,<7.0)
17
+ Requires-Dist: rich (>=13.3.1,<14.0.0)
18
+ Requires-Dist: testzeus-sdk (>=0.0.4,<0.0.5)
19
+ Project-URL: Repository, https://github.com/test-zeus-ai/testzeus-cli
20
+ Description-Content-Type: text/markdown
21
+
22
+ # TestZeus CLI
23
+
24
+ A powerful command-line interface for the TestZeus testing platform.
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install testzeus-cli
30
+ ```
31
+
32
+ ## Authentication
33
+
34
+ Before using the CLI, you need to authenticate with the TestZeus platform:
35
+
36
+ ```bash
37
+ testzeus login
38
+ ```
39
+
40
+ You will be prompted to enter your email and password. Your credentials are securely stored in your system's keyring.
41
+
42
+ ```bash
43
+ testzeus login --profile dev
44
+ ```
45
+
46
+ Authentication automatically detects and stores your tenant information, which will be used for all subsequent commands.
47
+
48
+ ### Auth Commands
49
+
50
+ | Command | Description |
51
+ |---------|-------------|
52
+ | `login` | Authenticate with TestZeus |
53
+ | `logout` | Log out and remove stored credentials |
54
+ | `whoami` | Display current authentication status |
55
+
56
+ ## Global Options
57
+
58
+ The following options can be used with any command:
59
+
60
+ | Option | Description |
61
+ |--------|-------------|
62
+ | `--profile` | Configuration profile to use (default: "default") |
63
+ | `--api-url` | Custom TestZeus API URL |
64
+ | `--verbose` | Enable verbose output |
65
+ | `--format` | Output format: json, table, or yaml (default: table) |
66
+
67
+ ## Managing Tests
68
+
69
+ ### List Tests
70
+
71
+ ```bash
72
+ testzeus tests list
73
+ ```
74
+
75
+ Filter test list with key-value pairs:
76
+ ```bash
77
+ testzeus tests list --filters status=draft
78
+ ```
79
+
80
+ Sort and expand related entities:
81
+ ```bash
82
+ testzeus tests list --sort created --expand tags,test_data
83
+ ```
84
+
85
+ ### Get Test Details
86
+
87
+ ```bash
88
+ testzeus tests get <test-id>
89
+ testzeus tests get <test-id> --expand tags,test_data
90
+ ```
91
+
92
+ ### Create Test
93
+
94
+ Create a test with text-based features:
95
+
96
+ ```bash
97
+ testzeus tests create --name "My Test" --feature "Feature: Test something"
98
+ ```
99
+
100
+ Create a test with features from a file:
101
+
102
+ ```bash
103
+ testzeus tests create --name "My Test" --feature-file ./features.txt
104
+ ```
105
+
106
+ Additional options:
107
+ ```bash
108
+ testzeus tests create --name "My Test" --feature-file ./features.txt --status ready --data data_id1 --data data_id2 --tags tag1 --tags tag2 --environment env_id
109
+ ```
110
+
111
+ ### Update Test
112
+
113
+ Update test name:
114
+
115
+ ```bash
116
+ testzeus tests update <test-id> --name "New Name"
117
+ ```
118
+
119
+ Update test features from text:
120
+
121
+ ```bash
122
+ testzeus tests update <test-id> --feature "Updated feature content"
123
+ ```
124
+
125
+ Update test features from a file:
126
+
127
+ ```bash
128
+ testzeus tests update <test-id> --feature-file ./updated_features.txt
129
+ ```
130
+
131
+ Update other properties:
132
+ ```bash
133
+ testzeus tests update <test-id> --status ready --data data_id1 --tags tag1 --environment env_id
134
+ ```
135
+
136
+ ### Solve Test
137
+
138
+ Generate a solution for a test:
139
+
140
+ ```bash
141
+ testzeus tests solve <test-id>
142
+ ```
143
+
144
+ Save the solution to a file:
145
+
146
+ ```bash
147
+ testzeus tests solve <test-id> --output-file ./solution.txt
148
+ ```
149
+
150
+ ### Delete Test
151
+
152
+ ```bash
153
+ testzeus tests delete <test-id>
154
+ ```
155
+
156
+ ## Test Runs
157
+
158
+ ### List Test Runs
159
+
160
+ ```bash
161
+ testzeus test-runs list
162
+ ```
163
+
164
+ Filter runs by status:
165
+
166
+ ```bash
167
+ testzeus test-runs list --filters status=running
168
+ ```
169
+
170
+ ### Get Test Run Details
171
+
172
+ ```bash
173
+ testzeus test-runs get <run-id>
174
+ ```
175
+
176
+ Get expanded details including all outputs and steps:
177
+
178
+ ```bash
179
+ testzeus test-runs get-expanded <run-id>
180
+ ```
181
+
182
+ ### Create and Start Test Run
183
+
184
+ ```bash
185
+ testzeus test-runs create --name "Run 1" --test <test-id>
186
+ ```
187
+
188
+ ### Cancel Test Run
189
+
190
+ ```bash
191
+ testzeus test-runs cancel <run-id>
192
+ ```
193
+
194
+ ### Watch Test Run Progress
195
+
196
+ ```bash
197
+ testzeus test-runs watch <run-id>
198
+ testzeus test-runs watch <run-id> --interval 10
199
+ ```
200
+
201
+ ### Download Test Run Attachments
202
+
203
+ ```bash
204
+ testzeus test-runs download-attachments <run-id>
205
+ testzeus test-runs download-attachments <run-id> --output-dir ./my-attachments
206
+ ```
207
+
208
+ ## Test Data
209
+
210
+ ### List Test Data
211
+
212
+ ```bash
213
+ testzeus test-data list
214
+ ```
215
+
216
+ Filter by type:
217
+ ```bash
218
+ testzeus test-data list --filters type=test
219
+ ```
220
+
221
+ ### Get Test Data Details
222
+
223
+ ```bash
224
+ testzeus test-data get <data-id>
225
+ testzeus test-data get <data-id> --expand related_entities
226
+ ```
227
+
228
+ ### Create Test Data
229
+
230
+ Create with inline content:
231
+
232
+ ```bash
233
+ testzeus test-data create --name "Test Data 1" --input-data "{\"key\":\"value\"}"
234
+ ```
235
+
236
+ Create with data from a file:
237
+
238
+ ```bash
239
+ testzeus test-data create --name "Test Data" --file ./data.json
240
+ ```
241
+
242
+ Additional options:
243
+ ```bash
244
+ testzeus test-data create --name "Test Data" --type test --status ready --file ./data.json
245
+ ```
246
+
247
+ ### Update Test Data
248
+
249
+ Update name and other properties:
250
+
251
+ ```bash
252
+ testzeus test-data update <data-id> --name "New Data Name" --type updated --status ready
253
+ ```
254
+
255
+ Update data content from text:
256
+
257
+ ```bash
258
+ testzeus test-data update <data-id> --input-data "{\"key\":\"updated\"}"
259
+ ```
260
+
261
+ Update data content from a file:
262
+
263
+ ```bash
264
+ testzeus test-data update <data-id> --file ./updated_data.json
265
+ ```
266
+
267
+ ### Delete Test Data
268
+
269
+ ```bash
270
+ testzeus test-data delete <data-id>
271
+ ```
272
+
273
+ ## Configuration
274
+
275
+ The CLI stores configuration and credentials in your user's config directory. Different profiles can be used to manage multiple TestZeus environments.
276
+
277
+ Default configuration location:
278
+ - Linux/Mac: `~/.testzeus/config.yaml`
279
+ - Windows: `%APPDATA%\testzeus\config.yaml`
280
+
281
+ Passwords are securely stored in your system's keyring.
282
+
283
+ ## Examples
284
+
285
+ ### Complete Workflow
286
+
287
+ ```bash
288
+ # Login to TestZeus
289
+ testzeus login
290
+
291
+ # Create test data
292
+ testzeus test-data create --name "User Data" --input-data "{\"username\":\"testuser\"}"
293
+
294
+ # Create a new test with features from a file
295
+ testzeus tests create --name "Login Test" --feature-file ./features/login.feature --data <test_data_id>
296
+
297
+ # Run the test
298
+ testzeus test-runs create --name "Login Run 1" --test <test_id>
299
+
300
+ # Watch the test run progress
301
+ testzeus test-runs watch <test_run_id>
302
+
303
+ # Check detailed results
304
+ testzeus test-runs get-expanded <test_run_id>
305
+
306
+ # Download any attachments generated during the run
307
+ testzeus test-runs download-attachments <test_run_id> --output-dir ./results
308
+ ```
309
+
310
+ ## Error Handling
311
+
312
+ When an error occurs, the CLI will display an error message. For more detailed information, run any command with the `--verbose` flag:
313
+
314
+ ```bash
315
+ testzeus tests list --verbose
316
+ ```
317
+
318
+ ## Output Formats
319
+
320
+ The CLI supports multiple output formats:
321
+
322
+ - `table`: Human-readable tabular format (default)
323
+ - `json`: JSON format for programmatic usage
324
+ - `yaml`: YAML format
325
+
326
+ Example:
327
+ ```bash
328
+ testzeus tests list --format json
329
+ ```
330
+
331
+ ## Development and Contribution
332
+
333
+ To contribute to the TestZeus CLI, fork the repository and install development dependencies:
334
+
335
+ ```bash
336
+ pip install -e ".[dev]"
337
+ ```
338
+
339
+ ### Release Process
340
+
341
+ The TestZeus CLI uses GitHub Actions for automated releases to PyPI. To create a release:
342
+
343
+ 1. Use the Makefile's release target: `make release`
344
+ 2. This will:
345
+ - Prompt for version bump type (patch, minor, major)
346
+ - Update the version in pyproject.toml
347
+ - Commit and create a git tag
348
+ - Push changes and tags to GitHub
349
+ 3. The tag push will automatically trigger the GitHub Actions publish workflow
@@ -0,0 +1,328 @@
1
+ # TestZeus CLI
2
+
3
+ A powerful command-line interface for the TestZeus testing platform.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install testzeus-cli
9
+ ```
10
+
11
+ ## Authentication
12
+
13
+ Before using the CLI, you need to authenticate with the TestZeus platform:
14
+
15
+ ```bash
16
+ testzeus login
17
+ ```
18
+
19
+ You will be prompted to enter your email and password. Your credentials are securely stored in your system's keyring.
20
+
21
+ ```bash
22
+ testzeus login --profile dev
23
+ ```
24
+
25
+ Authentication automatically detects and stores your tenant information, which will be used for all subsequent commands.
26
+
27
+ ### Auth Commands
28
+
29
+ | Command | Description |
30
+ |---------|-------------|
31
+ | `login` | Authenticate with TestZeus |
32
+ | `logout` | Log out and remove stored credentials |
33
+ | `whoami` | Display current authentication status |
34
+
35
+ ## Global Options
36
+
37
+ The following options can be used with any command:
38
+
39
+ | Option | Description |
40
+ |--------|-------------|
41
+ | `--profile` | Configuration profile to use (default: "default") |
42
+ | `--api-url` | Custom TestZeus API URL |
43
+ | `--verbose` | Enable verbose output |
44
+ | `--format` | Output format: json, table, or yaml (default: table) |
45
+
46
+ ## Managing Tests
47
+
48
+ ### List Tests
49
+
50
+ ```bash
51
+ testzeus tests list
52
+ ```
53
+
54
+ Filter test list with key-value pairs:
55
+ ```bash
56
+ testzeus tests list --filters status=draft
57
+ ```
58
+
59
+ Sort and expand related entities:
60
+ ```bash
61
+ testzeus tests list --sort created --expand tags,test_data
62
+ ```
63
+
64
+ ### Get Test Details
65
+
66
+ ```bash
67
+ testzeus tests get <test-id>
68
+ testzeus tests get <test-id> --expand tags,test_data
69
+ ```
70
+
71
+ ### Create Test
72
+
73
+ Create a test with text-based features:
74
+
75
+ ```bash
76
+ testzeus tests create --name "My Test" --feature "Feature: Test something"
77
+ ```
78
+
79
+ Create a test with features from a file:
80
+
81
+ ```bash
82
+ testzeus tests create --name "My Test" --feature-file ./features.txt
83
+ ```
84
+
85
+ Additional options:
86
+ ```bash
87
+ testzeus tests create --name "My Test" --feature-file ./features.txt --status ready --data data_id1 --data data_id2 --tags tag1 --tags tag2 --environment env_id
88
+ ```
89
+
90
+ ### Update Test
91
+
92
+ Update test name:
93
+
94
+ ```bash
95
+ testzeus tests update <test-id> --name "New Name"
96
+ ```
97
+
98
+ Update test features from text:
99
+
100
+ ```bash
101
+ testzeus tests update <test-id> --feature "Updated feature content"
102
+ ```
103
+
104
+ Update test features from a file:
105
+
106
+ ```bash
107
+ testzeus tests update <test-id> --feature-file ./updated_features.txt
108
+ ```
109
+
110
+ Update other properties:
111
+ ```bash
112
+ testzeus tests update <test-id> --status ready --data data_id1 --tags tag1 --environment env_id
113
+ ```
114
+
115
+ ### Solve Test
116
+
117
+ Generate a solution for a test:
118
+
119
+ ```bash
120
+ testzeus tests solve <test-id>
121
+ ```
122
+
123
+ Save the solution to a file:
124
+
125
+ ```bash
126
+ testzeus tests solve <test-id> --output-file ./solution.txt
127
+ ```
128
+
129
+ ### Delete Test
130
+
131
+ ```bash
132
+ testzeus tests delete <test-id>
133
+ ```
134
+
135
+ ## Test Runs
136
+
137
+ ### List Test Runs
138
+
139
+ ```bash
140
+ testzeus test-runs list
141
+ ```
142
+
143
+ Filter runs by status:
144
+
145
+ ```bash
146
+ testzeus test-runs list --filters status=running
147
+ ```
148
+
149
+ ### Get Test Run Details
150
+
151
+ ```bash
152
+ testzeus test-runs get <run-id>
153
+ ```
154
+
155
+ Get expanded details including all outputs and steps:
156
+
157
+ ```bash
158
+ testzeus test-runs get-expanded <run-id>
159
+ ```
160
+
161
+ ### Create and Start Test Run
162
+
163
+ ```bash
164
+ testzeus test-runs create --name "Run 1" --test <test-id>
165
+ ```
166
+
167
+ ### Cancel Test Run
168
+
169
+ ```bash
170
+ testzeus test-runs cancel <run-id>
171
+ ```
172
+
173
+ ### Watch Test Run Progress
174
+
175
+ ```bash
176
+ testzeus test-runs watch <run-id>
177
+ testzeus test-runs watch <run-id> --interval 10
178
+ ```
179
+
180
+ ### Download Test Run Attachments
181
+
182
+ ```bash
183
+ testzeus test-runs download-attachments <run-id>
184
+ testzeus test-runs download-attachments <run-id> --output-dir ./my-attachments
185
+ ```
186
+
187
+ ## Test Data
188
+
189
+ ### List Test Data
190
+
191
+ ```bash
192
+ testzeus test-data list
193
+ ```
194
+
195
+ Filter by type:
196
+ ```bash
197
+ testzeus test-data list --filters type=test
198
+ ```
199
+
200
+ ### Get Test Data Details
201
+
202
+ ```bash
203
+ testzeus test-data get <data-id>
204
+ testzeus test-data get <data-id> --expand related_entities
205
+ ```
206
+
207
+ ### Create Test Data
208
+
209
+ Create with inline content:
210
+
211
+ ```bash
212
+ testzeus test-data create --name "Test Data 1" --input-data "{\"key\":\"value\"}"
213
+ ```
214
+
215
+ Create with data from a file:
216
+
217
+ ```bash
218
+ testzeus test-data create --name "Test Data" --file ./data.json
219
+ ```
220
+
221
+ Additional options:
222
+ ```bash
223
+ testzeus test-data create --name "Test Data" --type test --status ready --file ./data.json
224
+ ```
225
+
226
+ ### Update Test Data
227
+
228
+ Update name and other properties:
229
+
230
+ ```bash
231
+ testzeus test-data update <data-id> --name "New Data Name" --type updated --status ready
232
+ ```
233
+
234
+ Update data content from text:
235
+
236
+ ```bash
237
+ testzeus test-data update <data-id> --input-data "{\"key\":\"updated\"}"
238
+ ```
239
+
240
+ Update data content from a file:
241
+
242
+ ```bash
243
+ testzeus test-data update <data-id> --file ./updated_data.json
244
+ ```
245
+
246
+ ### Delete Test Data
247
+
248
+ ```bash
249
+ testzeus test-data delete <data-id>
250
+ ```
251
+
252
+ ## Configuration
253
+
254
+ The CLI stores configuration and credentials in your user's config directory. Different profiles can be used to manage multiple TestZeus environments.
255
+
256
+ Default configuration location:
257
+ - Linux/Mac: `~/.testzeus/config.yaml`
258
+ - Windows: `%APPDATA%\testzeus\config.yaml`
259
+
260
+ Passwords are securely stored in your system's keyring.
261
+
262
+ ## Examples
263
+
264
+ ### Complete Workflow
265
+
266
+ ```bash
267
+ # Login to TestZeus
268
+ testzeus login
269
+
270
+ # Create test data
271
+ testzeus test-data create --name "User Data" --input-data "{\"username\":\"testuser\"}"
272
+
273
+ # Create a new test with features from a file
274
+ testzeus tests create --name "Login Test" --feature-file ./features/login.feature --data <test_data_id>
275
+
276
+ # Run the test
277
+ testzeus test-runs create --name "Login Run 1" --test <test_id>
278
+
279
+ # Watch the test run progress
280
+ testzeus test-runs watch <test_run_id>
281
+
282
+ # Check detailed results
283
+ testzeus test-runs get-expanded <test_run_id>
284
+
285
+ # Download any attachments generated during the run
286
+ testzeus test-runs download-attachments <test_run_id> --output-dir ./results
287
+ ```
288
+
289
+ ## Error Handling
290
+
291
+ When an error occurs, the CLI will display an error message. For more detailed information, run any command with the `--verbose` flag:
292
+
293
+ ```bash
294
+ testzeus tests list --verbose
295
+ ```
296
+
297
+ ## Output Formats
298
+
299
+ The CLI supports multiple output formats:
300
+
301
+ - `table`: Human-readable tabular format (default)
302
+ - `json`: JSON format for programmatic usage
303
+ - `yaml`: YAML format
304
+
305
+ Example:
306
+ ```bash
307
+ testzeus tests list --format json
308
+ ```
309
+
310
+ ## Development and Contribution
311
+
312
+ To contribute to the TestZeus CLI, fork the repository and install development dependencies:
313
+
314
+ ```bash
315
+ pip install -e ".[dev]"
316
+ ```
317
+
318
+ ### Release Process
319
+
320
+ The TestZeus CLI uses GitHub Actions for automated releases to PyPI. To create a release:
321
+
322
+ 1. Use the Makefile's release target: `make release`
323
+ 2. This will:
324
+ - Prompt for version bump type (patch, minor, major)
325
+ - Update the version in pyproject.toml
326
+ - Commit and create a git tag
327
+ - Push changes and tags to GitHub
328
+ 3. The tag push will automatically trigger the GitHub Actions publish workflow
@@ -0,0 +1,33 @@
1
+ [build-system]
2
+ requires = ["poetry-core>=1.0.0"]
3
+ build-backend = "poetry.core.masonry.api"
4
+
5
+ [tool.poetry]
6
+ name = "testzeus-cli"
7
+ version = "0.0.2"
8
+ description = "Command-line interface for TestZeus testing platform"
9
+ authors = ["Shriyansh Agnihotri <shriyansh@testzeus.com>"]
10
+ readme = "README.md"
11
+ repository = "https://github.com/test-zeus-ai/testzeus-cli"
12
+ classifiers = [
13
+ "License :: OSI Approved :: MIT License",
14
+ "Programming Language :: Python :: 3.11",
15
+ ]
16
+
17
+ [tool.poetry.dependencies]
18
+ python = ">=3.11"
19
+ click = "^8.1.3"
20
+ rich = "^13.3.1"
21
+ pydantic = "^2.0.0"
22
+ pyyaml = "^6.0"
23
+ keyring = "^24.0.0"
24
+ ipdb = "^0.13.13"
25
+ testzeus-sdk = "^0.0.4"
26
+
27
+ [tool.poetry.group.dev.dependencies]
28
+ pytest = "^7.3.1"
29
+ black = "^23.3.0"
30
+ isort = "^5.12.0"
31
+
32
+ [tool.poetry.scripts]
33
+ testzeus = "testzeus_cli.cli:main"