testzeus-cli 0.0.15__tar.gz → 0.0.17__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.
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/PKG-INFO +170 -2
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/README.md +166 -1
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/pyproject.toml +5 -3
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/cli.py +12 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/environments.py +46 -4
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/extensions.py +6 -2
- testzeus_cli-0.0.17/testzeus_cli/commands/hypermind_code_blocks.py +412 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/notification_channels.py +10 -2
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/tags.py +12 -2
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/test_data.py +23 -3
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/test_report_schedules.py +10 -2
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/test_run_groups.py +138 -2
- testzeus_cli-0.0.17/testzeus_cli/commands/test_suite_node_runs.py +71 -0
- testzeus_cli-0.0.17/testzeus_cli/commands/test_suite_runs.py +218 -0
- testzeus_cli-0.0.17/testzeus_cli/commands/test_suite_schedules.py +217 -0
- testzeus_cli-0.0.17/testzeus_cli/commands/test_suites.py +248 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/tests.py +196 -4
- testzeus_cli-0.0.17/testzeus_cli/commands/user_integrations.py +127 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/config.py +4 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/utils/validators.py +30 -1
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/LICENSE +0 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/__init__.py +0 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/auth.py +0 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/__init__.py +0 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/test_runs.py +0 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/commands/tests_ai_generator.py +0 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/utils/__init__.py +0 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/utils/auth.py +0 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/utils/client.py +0 -0
- {testzeus_cli-0.0.15 → testzeus_cli-0.0.17}/testzeus_cli/utils/formatters.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: testzeus-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.17
|
|
4
4
|
Summary: Command-line interface for TestZeus testing platform
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Shriyansh Agnihotri
|
|
@@ -11,14 +11,16 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Requires-Dist: aiohttp (>=3.13.3,<4.0.0)
|
|
14
15
|
Requires-Dist: click (>=8.1.3,<9.0.0)
|
|
16
|
+
Requires-Dist: cryptography (>=46.0.5,<47.0.0)
|
|
15
17
|
Requires-Dist: ipdb (>=0.13.13,<0.14.0)
|
|
16
18
|
Requires-Dist: keyring (>=24.0.0,<25.0.0)
|
|
17
19
|
Requires-Dist: pocketbase (>=0.15.0,<0.16.0)
|
|
18
20
|
Requires-Dist: pydantic (>=2.0.0,<3.0.0)
|
|
19
21
|
Requires-Dist: pyyaml (>=6.0,<7.0)
|
|
20
22
|
Requires-Dist: rich (>=13.3.1,<14.0.0)
|
|
21
|
-
Requires-Dist: testzeus-sdk (>=0.0.
|
|
23
|
+
Requires-Dist: testzeus-sdk (>=0.0.15,<0.0.16)
|
|
22
24
|
Requires-Dist: toml (>=0.10.2,<0.11.0)
|
|
23
25
|
Project-URL: Repository, https://github.com/test-zeus-ai/testzeus-cli
|
|
24
26
|
Description-Content-Type: text/markdown
|
|
@@ -112,6 +114,21 @@ Additional options:
|
|
|
112
114
|
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 --execution-mode strict
|
|
113
115
|
```
|
|
114
116
|
|
|
117
|
+
Set default runtime inputs and outputs used by suite orchestration:
|
|
118
|
+
```bash
|
|
119
|
+
testzeus tests create \
|
|
120
|
+
--name "Login Test" \
|
|
121
|
+
--feature-file ./login.feature \
|
|
122
|
+
--test-params '{"base_url":"https://staging.example.com","tenant_slug":"acme"}' \
|
|
123
|
+
--output-schema '{"browser_auth_state":{"type":"file"}}'
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Read a test's merged input metadata and list suites that reference it:
|
|
127
|
+
```bash
|
|
128
|
+
testzeus tests input-params <test-id>
|
|
129
|
+
testzeus tests dependent-suites <test-id>
|
|
130
|
+
```
|
|
131
|
+
|
|
115
132
|
### Update Test
|
|
116
133
|
|
|
117
134
|
Update test name:
|
|
@@ -137,6 +154,13 @@ Update other properties:
|
|
|
137
154
|
testzeus tests update <test-id> --status ready --data data_id1 --tags tag1 --environment env_id
|
|
138
155
|
```
|
|
139
156
|
|
|
157
|
+
Update default runtime inputs or outputs:
|
|
158
|
+
```bash
|
|
159
|
+
testzeus tests update <test-id> \
|
|
160
|
+
--test-params-file ./test-params.json \
|
|
161
|
+
--output-schema-file ./output-schema.json
|
|
162
|
+
```
|
|
163
|
+
|
|
140
164
|
### Delete Test
|
|
141
165
|
|
|
142
166
|
```bash
|
|
@@ -189,6 +213,78 @@ testzeus test-runs download-attachments <run-id>
|
|
|
189
213
|
testzeus test-runs download-attachments <run-id> --output-dir ./my-attachments
|
|
190
214
|
```
|
|
191
215
|
|
|
216
|
+
## Test Suites
|
|
217
|
+
|
|
218
|
+
### List and Get Test Suites
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
testzeus test-suites list
|
|
222
|
+
testzeus test-suites get <suite-id>
|
|
223
|
+
testzeus test-suites get <suite-id> --expand tests,environment
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Create and Update Test Suites
|
|
227
|
+
|
|
228
|
+
Create a suite from a workflow definition:
|
|
229
|
+
```bash
|
|
230
|
+
testzeus test-suites create \
|
|
231
|
+
--name "checkout-suite" \
|
|
232
|
+
--workflow-definition '{"version":"1.0","nodes":[{"id":"login","name":"Login","test_id":"test_login"},{"id":"checkout","name":"Checkout","test_id":"test_checkout"}],"edges":[{"id":"login-to-checkout","from_node":"login","to_node":"checkout","dependency_type":"temporal"}],"outputs":[]}' \
|
|
233
|
+
--default-inputs '{"base_url":"https://staging.example.com"}' \
|
|
234
|
+
--input-schema '[{"name":"base_url","type":"string","required":true}]' \
|
|
235
|
+
--execution-mode lenient
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Update a suite:
|
|
239
|
+
```bash
|
|
240
|
+
testzeus test-suites update <suite-id> --status ready --notification-channels channel_1,channel_2
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Delete a suite:
|
|
244
|
+
```bash
|
|
245
|
+
testzeus test-suites delete <suite-id>
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Test Suite Runs
|
|
249
|
+
|
|
250
|
+
Start a suite run:
|
|
251
|
+
```bash
|
|
252
|
+
testzeus test-suite-runs create \
|
|
253
|
+
--name "checkout-suite-run" \
|
|
254
|
+
--test-suite <suite-id> \
|
|
255
|
+
--input-values '{"base_url":"https://staging.example.com"}'
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Inspect and control a suite run:
|
|
259
|
+
```bash
|
|
260
|
+
testzeus test-suite-runs list --filters status=running
|
|
261
|
+
testzeus test-suite-runs get <suite-run-id>
|
|
262
|
+
testzeus test-suite-runs pause <suite-run-id> --mode graceful --reason "maintenance window"
|
|
263
|
+
testzeus test-suite-runs resume <suite-run-id>
|
|
264
|
+
testzeus test-suite-runs cancel <suite-run-id>
|
|
265
|
+
testzeus test-suite-runs delete <suite-run-id>
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Test Suite Node Runs
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
testzeus test-suite-node-runs list --filters test_suite_run=<suite-run-id>
|
|
272
|
+
testzeus test-suite-node-runs get <node-run-id>
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Test Suite Schedules
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
testzeus test-suite-schedules list
|
|
279
|
+
testzeus test-suite-schedules create \
|
|
280
|
+
--name "daily-checkout" \
|
|
281
|
+
--test-suite <suite-id> \
|
|
282
|
+
--cron-expression "0 9 * * *" \
|
|
283
|
+
--input-values '{"base_url":"https://staging.example.com"}'
|
|
284
|
+
testzeus test-suite-schedules update <schedule-id> --inactive
|
|
285
|
+
testzeus test-suite-schedules delete <schedule-id>
|
|
286
|
+
```
|
|
287
|
+
|
|
192
288
|
## Test Data
|
|
193
289
|
|
|
194
290
|
### List Test Data
|
|
@@ -708,6 +804,51 @@ testzeus test-run-group execute \
|
|
|
708
804
|
**Default Values:**
|
|
709
805
|
- `--execution-mode`: `lenient` (options: lenient, strict)
|
|
710
806
|
|
|
807
|
+
### Execute and Monitor Test Run Group Status
|
|
808
|
+
|
|
809
|
+
Execute a test run group and monitor until completion. This is useful for CI/CD pipelines where you want to wait for tests to complete before proceeding. This command does NOT wait for CTRF report generation or download reports.
|
|
810
|
+
|
|
811
|
+
Execute and monitor with test IDs:
|
|
812
|
+
|
|
813
|
+
```bash
|
|
814
|
+
testzeus test-run-group execute-and-monitor-status \
|
|
815
|
+
--name "ci-tests" \
|
|
816
|
+
--test-ids "test1,test2,test3"
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
Execute and monitor with tags:
|
|
820
|
+
|
|
821
|
+
```bash
|
|
822
|
+
testzeus test-run-group execute-and-monitor-status \
|
|
823
|
+
--name "smoke-tests" \
|
|
824
|
+
--tags "smoke,critical"
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
Execute with custom polling interval:
|
|
828
|
+
|
|
829
|
+
```bash
|
|
830
|
+
testzeus test-run-group execute-and-monitor-status \
|
|
831
|
+
--name "regression-tests" \
|
|
832
|
+
--test-ids "test1,test2" \
|
|
833
|
+
--interval 60 \
|
|
834
|
+
--environment env_id \
|
|
835
|
+
--notification-channels "channel1,channel2"
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
**Required Parameters:**
|
|
839
|
+
- `--name`: Test run group name (required)
|
|
840
|
+
- Either `--test-ids` OR `--tags` (required, but not both)
|
|
841
|
+
|
|
842
|
+
**Options:**
|
|
843
|
+
- `--environment`: Environment ID (optional)
|
|
844
|
+
- `--notification-channels`: Comma-separated notification channel IDs (optional)
|
|
845
|
+
- `--interval`: Polling interval in seconds (default: 30)
|
|
846
|
+
|
|
847
|
+
**Notes:**
|
|
848
|
+
- Monitors only the group status (not CTRF report status)
|
|
849
|
+
- Does NOT download reports - use `download-report` command separately if needed
|
|
850
|
+
- Returns success when status is `completed`, failure when `cancelled`, `failed`, or `error`
|
|
851
|
+
|
|
711
852
|
### Delete Test Run Group
|
|
712
853
|
|
|
713
854
|
```bash
|
|
@@ -886,6 +1027,32 @@ testzeus test-run-group cancel <group-id>
|
|
|
886
1027
|
testzeus test-run-group delete <group-id>
|
|
887
1028
|
```
|
|
888
1029
|
|
|
1030
|
+
### CI/CD Integration with execute-and-monitor-status
|
|
1031
|
+
|
|
1032
|
+
For CI/CD pipelines, use `execute-and-monitor-status` to run tests and wait for completion:
|
|
1033
|
+
|
|
1034
|
+
```bash
|
|
1035
|
+
# Run tests and wait for completion (useful in CI/CD)
|
|
1036
|
+
testzeus test-run-group execute-and-monitor-status \
|
|
1037
|
+
--name "ci-pipeline-$(date +%Y%m%d-%H%M%S)" \
|
|
1038
|
+
--tags "smoke,regression" \
|
|
1039
|
+
--interval 30
|
|
1040
|
+
|
|
1041
|
+
# The command exits with success (0) when tests complete
|
|
1042
|
+
# and failure (1) when tests fail, are cancelled, or error out
|
|
1043
|
+
```
|
|
1044
|
+
|
|
1045
|
+
Example GitHub Actions workflow:
|
|
1046
|
+
|
|
1047
|
+
```yaml
|
|
1048
|
+
- name: Run TestZeus Tests
|
|
1049
|
+
run: |
|
|
1050
|
+
testzeus test-run-group execute-and-monitor-status \
|
|
1051
|
+
--name "pr-tests-${{ github.run_id }}" \
|
|
1052
|
+
--tags "smoke" \
|
|
1053
|
+
--interval 30
|
|
1054
|
+
```
|
|
1055
|
+
|
|
889
1056
|
## Error Handling
|
|
890
1057
|
|
|
891
1058
|
When an error occurs, the CLI will display an error message. For more detailed information, run any command with the `--verbose` flag:
|
|
@@ -926,3 +1093,4 @@ The TestZeus CLI uses GitHub Actions for automated releases to PyPI. To create a
|
|
|
926
1093
|
- Commit and create a git tag
|
|
927
1094
|
- Push changes and tags to GitHub
|
|
928
1095
|
3. The tag push will automatically trigger the GitHub Actions publish workflow
|
|
1096
|
+
|
|
@@ -87,6 +87,21 @@ Additional options:
|
|
|
87
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 --execution-mode strict
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
+
Set default runtime inputs and outputs used by suite orchestration:
|
|
91
|
+
```bash
|
|
92
|
+
testzeus tests create \
|
|
93
|
+
--name "Login Test" \
|
|
94
|
+
--feature-file ./login.feature \
|
|
95
|
+
--test-params '{"base_url":"https://staging.example.com","tenant_slug":"acme"}' \
|
|
96
|
+
--output-schema '{"browser_auth_state":{"type":"file"}}'
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Read a test's merged input metadata and list suites that reference it:
|
|
100
|
+
```bash
|
|
101
|
+
testzeus tests input-params <test-id>
|
|
102
|
+
testzeus tests dependent-suites <test-id>
|
|
103
|
+
```
|
|
104
|
+
|
|
90
105
|
### Update Test
|
|
91
106
|
|
|
92
107
|
Update test name:
|
|
@@ -112,6 +127,13 @@ Update other properties:
|
|
|
112
127
|
testzeus tests update <test-id> --status ready --data data_id1 --tags tag1 --environment env_id
|
|
113
128
|
```
|
|
114
129
|
|
|
130
|
+
Update default runtime inputs or outputs:
|
|
131
|
+
```bash
|
|
132
|
+
testzeus tests update <test-id> \
|
|
133
|
+
--test-params-file ./test-params.json \
|
|
134
|
+
--output-schema-file ./output-schema.json
|
|
135
|
+
```
|
|
136
|
+
|
|
115
137
|
### Delete Test
|
|
116
138
|
|
|
117
139
|
```bash
|
|
@@ -164,6 +186,78 @@ testzeus test-runs download-attachments <run-id>
|
|
|
164
186
|
testzeus test-runs download-attachments <run-id> --output-dir ./my-attachments
|
|
165
187
|
```
|
|
166
188
|
|
|
189
|
+
## Test Suites
|
|
190
|
+
|
|
191
|
+
### List and Get Test Suites
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
testzeus test-suites list
|
|
195
|
+
testzeus test-suites get <suite-id>
|
|
196
|
+
testzeus test-suites get <suite-id> --expand tests,environment
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Create and Update Test Suites
|
|
200
|
+
|
|
201
|
+
Create a suite from a workflow definition:
|
|
202
|
+
```bash
|
|
203
|
+
testzeus test-suites create \
|
|
204
|
+
--name "checkout-suite" \
|
|
205
|
+
--workflow-definition '{"version":"1.0","nodes":[{"id":"login","name":"Login","test_id":"test_login"},{"id":"checkout","name":"Checkout","test_id":"test_checkout"}],"edges":[{"id":"login-to-checkout","from_node":"login","to_node":"checkout","dependency_type":"temporal"}],"outputs":[]}' \
|
|
206
|
+
--default-inputs '{"base_url":"https://staging.example.com"}' \
|
|
207
|
+
--input-schema '[{"name":"base_url","type":"string","required":true}]' \
|
|
208
|
+
--execution-mode lenient
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Update a suite:
|
|
212
|
+
```bash
|
|
213
|
+
testzeus test-suites update <suite-id> --status ready --notification-channels channel_1,channel_2
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Delete a suite:
|
|
217
|
+
```bash
|
|
218
|
+
testzeus test-suites delete <suite-id>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Test Suite Runs
|
|
222
|
+
|
|
223
|
+
Start a suite run:
|
|
224
|
+
```bash
|
|
225
|
+
testzeus test-suite-runs create \
|
|
226
|
+
--name "checkout-suite-run" \
|
|
227
|
+
--test-suite <suite-id> \
|
|
228
|
+
--input-values '{"base_url":"https://staging.example.com"}'
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Inspect and control a suite run:
|
|
232
|
+
```bash
|
|
233
|
+
testzeus test-suite-runs list --filters status=running
|
|
234
|
+
testzeus test-suite-runs get <suite-run-id>
|
|
235
|
+
testzeus test-suite-runs pause <suite-run-id> --mode graceful --reason "maintenance window"
|
|
236
|
+
testzeus test-suite-runs resume <suite-run-id>
|
|
237
|
+
testzeus test-suite-runs cancel <suite-run-id>
|
|
238
|
+
testzeus test-suite-runs delete <suite-run-id>
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Test Suite Node Runs
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
testzeus test-suite-node-runs list --filters test_suite_run=<suite-run-id>
|
|
245
|
+
testzeus test-suite-node-runs get <node-run-id>
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Test Suite Schedules
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
testzeus test-suite-schedules list
|
|
252
|
+
testzeus test-suite-schedules create \
|
|
253
|
+
--name "daily-checkout" \
|
|
254
|
+
--test-suite <suite-id> \
|
|
255
|
+
--cron-expression "0 9 * * *" \
|
|
256
|
+
--input-values '{"base_url":"https://staging.example.com"}'
|
|
257
|
+
testzeus test-suite-schedules update <schedule-id> --inactive
|
|
258
|
+
testzeus test-suite-schedules delete <schedule-id>
|
|
259
|
+
```
|
|
260
|
+
|
|
167
261
|
## Test Data
|
|
168
262
|
|
|
169
263
|
### List Test Data
|
|
@@ -683,6 +777,51 @@ testzeus test-run-group execute \
|
|
|
683
777
|
**Default Values:**
|
|
684
778
|
- `--execution-mode`: `lenient` (options: lenient, strict)
|
|
685
779
|
|
|
780
|
+
### Execute and Monitor Test Run Group Status
|
|
781
|
+
|
|
782
|
+
Execute a test run group and monitor until completion. This is useful for CI/CD pipelines where you want to wait for tests to complete before proceeding. This command does NOT wait for CTRF report generation or download reports.
|
|
783
|
+
|
|
784
|
+
Execute and monitor with test IDs:
|
|
785
|
+
|
|
786
|
+
```bash
|
|
787
|
+
testzeus test-run-group execute-and-monitor-status \
|
|
788
|
+
--name "ci-tests" \
|
|
789
|
+
--test-ids "test1,test2,test3"
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
Execute and monitor with tags:
|
|
793
|
+
|
|
794
|
+
```bash
|
|
795
|
+
testzeus test-run-group execute-and-monitor-status \
|
|
796
|
+
--name "smoke-tests" \
|
|
797
|
+
--tags "smoke,critical"
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
Execute with custom polling interval:
|
|
801
|
+
|
|
802
|
+
```bash
|
|
803
|
+
testzeus test-run-group execute-and-monitor-status \
|
|
804
|
+
--name "regression-tests" \
|
|
805
|
+
--test-ids "test1,test2" \
|
|
806
|
+
--interval 60 \
|
|
807
|
+
--environment env_id \
|
|
808
|
+
--notification-channels "channel1,channel2"
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
**Required Parameters:**
|
|
812
|
+
- `--name`: Test run group name (required)
|
|
813
|
+
- Either `--test-ids` OR `--tags` (required, but not both)
|
|
814
|
+
|
|
815
|
+
**Options:**
|
|
816
|
+
- `--environment`: Environment ID (optional)
|
|
817
|
+
- `--notification-channels`: Comma-separated notification channel IDs (optional)
|
|
818
|
+
- `--interval`: Polling interval in seconds (default: 30)
|
|
819
|
+
|
|
820
|
+
**Notes:**
|
|
821
|
+
- Monitors only the group status (not CTRF report status)
|
|
822
|
+
- Does NOT download reports - use `download-report` command separately if needed
|
|
823
|
+
- Returns success when status is `completed`, failure when `cancelled`, `failed`, or `error`
|
|
824
|
+
|
|
686
825
|
### Delete Test Run Group
|
|
687
826
|
|
|
688
827
|
```bash
|
|
@@ -861,6 +1000,32 @@ testzeus test-run-group cancel <group-id>
|
|
|
861
1000
|
testzeus test-run-group delete <group-id>
|
|
862
1001
|
```
|
|
863
1002
|
|
|
1003
|
+
### CI/CD Integration with execute-and-monitor-status
|
|
1004
|
+
|
|
1005
|
+
For CI/CD pipelines, use `execute-and-monitor-status` to run tests and wait for completion:
|
|
1006
|
+
|
|
1007
|
+
```bash
|
|
1008
|
+
# Run tests and wait for completion (useful in CI/CD)
|
|
1009
|
+
testzeus test-run-group execute-and-monitor-status \
|
|
1010
|
+
--name "ci-pipeline-$(date +%Y%m%d-%H%M%S)" \
|
|
1011
|
+
--tags "smoke,regression" \
|
|
1012
|
+
--interval 30
|
|
1013
|
+
|
|
1014
|
+
# The command exits with success (0) when tests complete
|
|
1015
|
+
# and failure (1) when tests fail, are cancelled, or error out
|
|
1016
|
+
```
|
|
1017
|
+
|
|
1018
|
+
Example GitHub Actions workflow:
|
|
1019
|
+
|
|
1020
|
+
```yaml
|
|
1021
|
+
- name: Run TestZeus Tests
|
|
1022
|
+
run: |
|
|
1023
|
+
testzeus test-run-group execute-and-monitor-status \
|
|
1024
|
+
--name "pr-tests-${{ github.run_id }}" \
|
|
1025
|
+
--tags "smoke" \
|
|
1026
|
+
--interval 30
|
|
1027
|
+
```
|
|
1028
|
+
|
|
864
1029
|
## Error Handling
|
|
865
1030
|
|
|
866
1031
|
When an error occurs, the CLI will display an error message. For more detailed information, run any command with the `--verbose` flag:
|
|
@@ -900,4 +1065,4 @@ The TestZeus CLI uses GitHub Actions for automated releases to PyPI. To create a
|
|
|
900
1065
|
- Update the version in pyproject.toml
|
|
901
1066
|
- Commit and create a git tag
|
|
902
1067
|
- Push changes and tags to GitHub
|
|
903
|
-
3. The tag push will automatically trigger the GitHub Actions publish workflow
|
|
1068
|
+
3. The tag push will automatically trigger the GitHub Actions publish workflow
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "testzeus-cli"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.17"
|
|
8
8
|
description = "Command-line interface for TestZeus testing platform"
|
|
9
9
|
authors = ["Shriyansh Agnihotri <shriyansh@testzeus.com>"]
|
|
10
10
|
readme = "README.md"
|
|
@@ -22,13 +22,15 @@ pydantic = "^2.0.0"
|
|
|
22
22
|
pyyaml = "^6.0"
|
|
23
23
|
keyring = "^24.0.0"
|
|
24
24
|
ipdb = "^0.13.13"
|
|
25
|
-
testzeus-sdk = "^0.0.
|
|
25
|
+
testzeus-sdk = "^0.0.15"
|
|
26
26
|
pocketbase = "^0.15.0"
|
|
27
27
|
toml = "^0.10.2"
|
|
28
|
+
aiohttp = "^3.13.3"
|
|
29
|
+
cryptography = "^46.0.5"
|
|
28
30
|
|
|
29
31
|
[tool.poetry.group.dev.dependencies]
|
|
30
32
|
pytest = "^7.3.1"
|
|
31
|
-
black = "
|
|
33
|
+
black = ">=26.3.1,<27.0"
|
|
32
34
|
isort = "^5.12.0"
|
|
33
35
|
python-dotenv = "^1.0.0"
|
|
34
36
|
ipykernel = "^6.29.5"
|
|
@@ -10,6 +10,10 @@ from testzeus_cli import __version__
|
|
|
10
10
|
from testzeus_cli.auth import login_command, logout_command, whoami_command
|
|
11
11
|
from testzeus_cli.commands.tests import tests_group
|
|
12
12
|
from testzeus_cli.commands.test_runs import test_runs_group
|
|
13
|
+
from testzeus_cli.commands.test_suite_node_runs import test_suite_node_runs_group
|
|
14
|
+
from testzeus_cli.commands.test_suite_runs import test_suite_runs_group
|
|
15
|
+
from testzeus_cli.commands.test_suite_schedules import test_suite_schedules_group
|
|
16
|
+
from testzeus_cli.commands.test_suites import test_suites_group
|
|
13
17
|
from testzeus_cli.commands.test_run_groups import test_run_groups_group
|
|
14
18
|
from testzeus_cli.commands.test_data import test_data_group
|
|
15
19
|
from testzeus_cli.commands.tags import tags_group
|
|
@@ -18,6 +22,8 @@ from testzeus_cli.commands.test_report_schedules import test_report_schedules_gr
|
|
|
18
22
|
from testzeus_cli.commands.notification_channels import notification_channels_group
|
|
19
23
|
from testzeus_cli.commands.extensions import extensions_group
|
|
20
24
|
from testzeus_cli.commands.tests_ai_generator import tests_ai_generator_group
|
|
25
|
+
from testzeus_cli.commands.hypermind_code_blocks import hypermind_code_blocks_group
|
|
26
|
+
from testzeus_cli.commands.user_integrations import user_integrations_group
|
|
21
27
|
|
|
22
28
|
# New command groups can be imported here when implemented
|
|
23
29
|
|
|
@@ -52,6 +58,10 @@ cli.add_command(logout_command)
|
|
|
52
58
|
cli.add_command(whoami_command)
|
|
53
59
|
cli.add_command(tests_group)
|
|
54
60
|
cli.add_command(test_runs_group)
|
|
61
|
+
cli.add_command(test_suites_group)
|
|
62
|
+
cli.add_command(test_suite_runs_group)
|
|
63
|
+
cli.add_command(test_suite_node_runs_group)
|
|
64
|
+
cli.add_command(test_suite_schedules_group)
|
|
55
65
|
cli.add_command(test_run_groups_group)
|
|
56
66
|
cli.add_command(test_data_group)
|
|
57
67
|
cli.add_command(tags_group)
|
|
@@ -60,6 +70,8 @@ cli.add_command(test_report_schedules_group)
|
|
|
60
70
|
cli.add_command(notification_channels_group)
|
|
61
71
|
cli.add_command(extensions_group)
|
|
62
72
|
cli.add_command(tests_ai_generator_group)
|
|
73
|
+
cli.add_command(hypermind_code_blocks_group)
|
|
74
|
+
cli.add_command(user_integrations_group)
|
|
63
75
|
# New command groups can be added here when implemented
|
|
64
76
|
|
|
65
77
|
|
|
@@ -11,7 +11,7 @@ from testzeus_sdk import TestZeusClient
|
|
|
11
11
|
from testzeus_cli.config import get_client_config
|
|
12
12
|
from testzeus_cli.utils.formatters import format_output, print_message
|
|
13
13
|
from testzeus_cli.utils.auth import initialize_client_with_token
|
|
14
|
-
from testzeus_cli.utils.validators import parse_key_value_pairs
|
|
14
|
+
from testzeus_cli.utils.validators import parse_key_value_pairs, validate_tenant_ownership
|
|
15
15
|
|
|
16
16
|
console = Console()
|
|
17
17
|
|
|
@@ -57,6 +57,10 @@ def environments_group():
|
|
|
57
57
|
help="Path to text file with environment data",
|
|
58
58
|
)
|
|
59
59
|
@click.option("--tags", help="Comma-separated list of tags")
|
|
60
|
+
@click.option(
|
|
61
|
+
"--connected-environments",
|
|
62
|
+
help="Comma-separated list of environment IDs or names to connect",
|
|
63
|
+
)
|
|
60
64
|
@click.option(
|
|
61
65
|
"--file",
|
|
62
66
|
"-f",
|
|
@@ -64,7 +68,7 @@ def environments_group():
|
|
|
64
68
|
help="Path to text file with environment data",
|
|
65
69
|
)
|
|
66
70
|
@click.pass_context
|
|
67
|
-
def create(ctx, name, status, data, data_file, tags, file):
|
|
71
|
+
def create(ctx, name, status, data, data_file, tags, connected_environments, file):
|
|
68
72
|
"""Create a new environment"""
|
|
69
73
|
|
|
70
74
|
if data and data_file:
|
|
@@ -102,6 +106,9 @@ def create(ctx, name, status, data, data_file, tags, file):
|
|
|
102
106
|
if tags:
|
|
103
107
|
params["tags"] = tags.split(",")
|
|
104
108
|
|
|
109
|
+
if connected_environments:
|
|
110
|
+
params["connected_environments"] = connected_environments.split(",")
|
|
111
|
+
|
|
105
112
|
if file:
|
|
106
113
|
try:
|
|
107
114
|
params["supporting_data_files"] = FileUpload(file, open(file, "rb"))
|
|
@@ -164,7 +171,7 @@ def delete(ctx, env_id):
|
|
|
164
171
|
"""Delete an environment"""
|
|
165
172
|
|
|
166
173
|
async def _run():
|
|
167
|
-
config, token,
|
|
174
|
+
config, token, stored_tenant_id, _ = get_client_config(
|
|
168
175
|
ctx.obj["PROFILE"], api_url=ctx.obj.get("API_URL")
|
|
169
176
|
)
|
|
170
177
|
client = TestZeusClient(**config)
|
|
@@ -173,6 +180,11 @@ def delete(ctx, env_id):
|
|
|
173
180
|
initialize_client_with_token(client, token)
|
|
174
181
|
else:
|
|
175
182
|
await client.ensure_authenticated()
|
|
183
|
+
|
|
184
|
+
# Validate tenant ownership before deleting
|
|
185
|
+
env = await client.environments.get_one(env_id)
|
|
186
|
+
validate_tenant_ownership(env.data, stored_tenant_id, "environment")
|
|
187
|
+
|
|
176
188
|
await client.environments.delete(env_id)
|
|
177
189
|
return {"id": env_id}
|
|
178
190
|
|
|
@@ -224,6 +236,10 @@ def get(ctx, env_id, expand):
|
|
|
224
236
|
help="Path to text file with new environment data",
|
|
225
237
|
)
|
|
226
238
|
@click.option("--tags", help="Comma-separated list of tags")
|
|
239
|
+
@click.option(
|
|
240
|
+
"--connected-environments",
|
|
241
|
+
help="Comma-separated list of environment IDs or names to connect",
|
|
242
|
+
)
|
|
227
243
|
@click.option(
|
|
228
244
|
"--file",
|
|
229
245
|
"-f",
|
|
@@ -231,7 +247,7 @@ def get(ctx, env_id, expand):
|
|
|
231
247
|
help="Path to text file with environment data",
|
|
232
248
|
)
|
|
233
249
|
@click.pass_context
|
|
234
|
-
def update(ctx, env_id, name, status, data, data_file, tags, file):
|
|
250
|
+
def update(ctx, env_id, name, status, data, data_file, tags, connected_environments, file):
|
|
235
251
|
"""Update an environment"""
|
|
236
252
|
|
|
237
253
|
if data and data_file:
|
|
@@ -254,6 +270,11 @@ def update(ctx, env_id, name, status, data, data_file, tags, file):
|
|
|
254
270
|
initialize_client_with_token(client, token)
|
|
255
271
|
else:
|
|
256
272
|
await client.ensure_authenticated()
|
|
273
|
+
|
|
274
|
+
# Validate tenant ownership before updating
|
|
275
|
+
env = await client.environments.get_one(env_id)
|
|
276
|
+
validate_tenant_ownership(env.data, tenant_id, "environment")
|
|
277
|
+
|
|
257
278
|
updates = {"tenant": tenant_id, "modified_by": user_id}
|
|
258
279
|
has_updates = False
|
|
259
280
|
|
|
@@ -277,6 +298,13 @@ def update(ctx, env_id, name, status, data, data_file, tags, file):
|
|
|
277
298
|
updates["tags"] = None
|
|
278
299
|
has_updates = True
|
|
279
300
|
|
|
301
|
+
if connected_environments:
|
|
302
|
+
if connected_environments == "none":
|
|
303
|
+
updates["connected_environments"] = None
|
|
304
|
+
else:
|
|
305
|
+
updates["connected_environments"] = connected_environments.split(",")
|
|
306
|
+
has_updates = True
|
|
307
|
+
|
|
280
308
|
if file:
|
|
281
309
|
try:
|
|
282
310
|
updates["supporting_data_files"] = FileUpload(
|
|
@@ -321,6 +349,11 @@ def upload_file(ctx, env_id, file_path):
|
|
|
321
349
|
initialize_client_with_token(client, token)
|
|
322
350
|
else:
|
|
323
351
|
await client.ensure_authenticated()
|
|
352
|
+
|
|
353
|
+
# Validate tenant ownership before updating
|
|
354
|
+
env = await client.environments.get_one(env_id)
|
|
355
|
+
validate_tenant_ownership(env.data, tenant_id, "environment")
|
|
356
|
+
|
|
324
357
|
file_path_validated = Path(file_path)
|
|
325
358
|
if not file_path_validated.exists():
|
|
326
359
|
print_message(f"[red]File not found:[/red] {file_path}", ctx.obj["FORMAT"])
|
|
@@ -359,6 +392,11 @@ def delete_all_files(ctx, env_id):
|
|
|
359
392
|
initialize_client_with_token(client, token)
|
|
360
393
|
else:
|
|
361
394
|
await client.ensure_authenticated()
|
|
395
|
+
|
|
396
|
+
# Validate tenant ownership before updating
|
|
397
|
+
env = await client.environments.get_one(env_id)
|
|
398
|
+
validate_tenant_ownership(env.data, tenant_id, "environment")
|
|
399
|
+
|
|
362
400
|
await client.environments.update(
|
|
363
401
|
env_id,
|
|
364
402
|
{
|
|
@@ -398,7 +436,11 @@ def remove_file(ctx, env_id, file_path):
|
|
|
398
436
|
initialize_client_with_token(client, token)
|
|
399
437
|
else:
|
|
400
438
|
await client.ensure_authenticated()
|
|
439
|
+
|
|
440
|
+
# Validate tenant ownership before updating
|
|
401
441
|
env_data = await client.environments.get_one(env_id)
|
|
442
|
+
validate_tenant_ownership(env_data.data, tenant_id, "environment")
|
|
443
|
+
|
|
402
444
|
file_name = None
|
|
403
445
|
if env_data.supporting_data_files:
|
|
404
446
|
for file in env_data.supporting_data_files:
|
|
@@ -11,7 +11,7 @@ from pathlib import Path
|
|
|
11
11
|
from testzeus_sdk import TestZeusClient
|
|
12
12
|
from testzeus_cli.config import get_client_config
|
|
13
13
|
from testzeus_cli.utils.formatters import format_output, print_message
|
|
14
|
-
from testzeus_cli.utils.validators import validate_id, parse_key_value_pairs
|
|
14
|
+
from testzeus_cli.utils.validators import validate_id, validate_tenant_ownership, parse_key_value_pairs
|
|
15
15
|
from testzeus_cli.utils.auth import initialize_client_with_token
|
|
16
16
|
|
|
17
17
|
console = Console()
|
|
@@ -167,7 +167,7 @@ def delete_extension(ctx, extension_id):
|
|
|
167
167
|
"""Delete an extension"""
|
|
168
168
|
|
|
169
169
|
async def _run():
|
|
170
|
-
config, token,
|
|
170
|
+
config, token, stored_tenant_id, _ = get_client_config(
|
|
171
171
|
ctx.obj["PROFILE"], api_url=ctx.obj.get("API_URL")
|
|
172
172
|
)
|
|
173
173
|
client = TestZeusClient(**config)
|
|
@@ -180,6 +180,10 @@ def delete_extension(ctx, extension_id):
|
|
|
180
180
|
else:
|
|
181
181
|
await client.ensure_authenticated()
|
|
182
182
|
|
|
183
|
+
# Validate tenant ownership before deleting
|
|
184
|
+
extension = await client.extensions.get_one(extension_id_validated)
|
|
185
|
+
validate_tenant_ownership(extension.data, stored_tenant_id, "extension")
|
|
186
|
+
|
|
183
187
|
success = await client.extensions.delete(extension_id_validated)
|
|
184
188
|
return {"success": success, "id": extension_id_validated}
|
|
185
189
|
|