@devassure/cli 1.0.5 → 1.0.8

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # DevAssure CLI
1
+ # DevAssure Agent CLI
2
2
 
3
3
  Command-line interface for DevAssure Testing Agent - Autonomous agent executing tests from natural language instructions.
4
4
 
@@ -62,8 +62,6 @@ Add test cases to the project by adding yaml files to the `.devassure/tests` fol
62
62
 
63
63
  Example test case file:
64
64
 
65
- ```yaml
66
-
67
65
  ```yaml
68
66
  summary: Sample test case
69
67
  steps:
@@ -123,6 +121,7 @@ default:
123
121
 
124
122
  - **`devassure run-tests`** - Run tests using current directory as test cases directory
125
123
  - `--path <path>` - Project path (default: current directory)
124
+ - `--csv <path>` - Path to CSV file containing test cases (relative or absolute). Relative paths in order: current directory, `.devassure` are supported. File must exist and have `.csv` extension.
126
125
  - `--tag <tags>` / `--tags <tags>` - Comma-separated tag values (e.g., `--tag=tag1,tag2,tag3`)
127
126
  - `--priority <priorities>` / `--priorities <priorities>` - Comma-separated priority values (e.g., `--priority=P0,P1`)
128
127
  - `--folder <folders>` / `--folders <folders>` - Comma-separated folder paths (e.g., `--folder=admin/users,project/integration`)
@@ -224,12 +223,19 @@ devassure run-tests --tag=smoke --priority=P0 --folder=admin/users
224
223
  # Use raw filter string (takes precedence over other filter parameters)
225
224
  devassure run-tests --filter="tag = tag1,tag2 && priority = P0"
226
225
 
226
+ # Use keyword search to filter tests (this will do text match on summary, steps, tags)
227
+ devassure run-tests --filter="query = dashboard"
228
+
227
229
  # All parameters support plural forms
228
230
  devassure run-tests --tags=smoke,regression --priorities=P0,P1 --folders=admin/users
229
231
 
230
232
  # Run tests and archive reports to a folder (zip created after run completes)
231
233
  devassure run-tests --archive=./reports
232
234
  devassure run --archive=/tmp/archives
235
+
236
+ # Run tests from a CSV file (relative path resolved from project path)
237
+ devassure run-tests --csv=sample-tests.csv
238
+ devassure run --csv=.devassure/sample-tests.csv
233
239
  ```
234
240
 
235
241
  ### Archiving and Opening Reports
@@ -258,6 +264,166 @@ devassure summary --session-id=<session-id>
258
264
  devassure summary --last --json
259
265
  ```
260
266
 
267
+ ## Sample configuration files
268
+
269
+ All configuration files live under `.devassure/`. Below are sample contents for each file type.
270
+
271
+ ### app.yaml
272
+
273
+ App description and rules for the agent:
274
+
275
+ ```yaml
276
+ description: >
277
+ About my app
278
+ in multi line
279
+ rules:
280
+ - User can't create more than 3 projects
281
+ - Any data deleted can't be restored
282
+ ```
283
+
284
+ ### personas.yaml
285
+
286
+ (Optional) User personas used in tests:
287
+
288
+ ```yaml
289
+ normal_user:
290
+ description: No admin access can do all other operations
291
+ age_group: 18-30
292
+ gender: M
293
+ region: USA
294
+ admin:
295
+ description: Admin can add or delete other users and manage privileges
296
+ deactivated_user:
297
+ description: Login is deactivated by admin
298
+ expired_user:
299
+ description: License has expired
300
+ ```
301
+
302
+ ### test_data.yaml
303
+
304
+ Default URL, users, and test data per environment:
305
+
306
+ > If data keys are not present for a specific environment, the default data will be used.
307
+
308
+ ```yaml
309
+ default:
310
+ url: 'http://localhost:3000'
311
+ users:
312
+ default:
313
+ user_name: 'user@test.com'
314
+ password: 12345678
315
+ admin:
316
+ user_name: 'admin@test.com'
317
+ password: 12345678
318
+ stripe_data:
319
+ allowed_card:
320
+ card: 4444 4444 4444 4444
321
+ wrong_cvv:
322
+ card: 1234 1234 1234 1234
323
+ expiry: 10/28
324
+ cvv: 123
325
+ test_otp: 1122
326
+ uat:
327
+ url: 'http://uat.myapp.com'
328
+ users:
329
+ default:
330
+ user_name: 'user@uat.com'
331
+ password: 12345678
332
+ admin:
333
+ user_name: 'admin@uat.com'
334
+ password: 12345678
335
+ test_otp: 2345
336
+ ```
337
+
338
+ ### agent_instructions.yaml
339
+
340
+ Instructions for the agent during test execution:
341
+
342
+ ```yaml
343
+ instructions:
344
+ - Reload the app and retry if app shows warning server is busy
345
+ - Sign up a new user and proceed if any of the given logins are not working
346
+ ```
347
+
348
+ ### preferences.yaml
349
+
350
+ Browser and execution preferences:
351
+
352
+ ```yaml
353
+ browsers:
354
+ default:
355
+ browser: chromium
356
+ resolution: 1920 x 1200
357
+ headless: true
358
+ workers: 2
359
+ ```
360
+
361
+ ### csv_mapping.yaml
362
+
363
+ Column mappings when running tests from a CSV file (used with `--csv`). Maps CSV column names to test case fields:
364
+
365
+ ```yaml
366
+ summary: Summary
367
+ steps: Steps
368
+ priority: Priority
369
+ tags: Tags
370
+ ```
371
+
372
+ ### Sample test cases
373
+
374
+ Example test case in `.devassure/tests/sample-test.yaml`:
375
+
376
+ ```yaml
377
+ summary: Sample test case
378
+ steps:
379
+ - Open the application url
380
+ - Verify if the page loads successfully
381
+ - Verify if there are no error messages
382
+ priority: High
383
+ tags:
384
+ - sample
385
+ - ui
386
+ ```
387
+
388
+ Another example with multiple steps:
389
+
390
+ ```yaml
391
+ summary: Login as admin and verify dashboard
392
+ steps:
393
+ - Open the application url
394
+ - Log in with admin credentials from test data
395
+ - Verify dashboard loads and shows admin menu
396
+ - Log out
397
+ priority: P0
398
+ tags:
399
+ - smoke
400
+ - login
401
+ - admin
402
+ ```
403
+
404
+ ## FAQ
405
+
406
+ **How to add new test cases?**
407
+ Add YAML files under `.devassure/tests/` (or `test/`), or use a CSV file with `--csv <path>` and optionally `.devassure/csv_mapping.yaml` to map columns to test fields.
408
+
409
+ **Is test case YAML always needed or can we use CSV only?**
410
+ No. You can run tests from CSV only: use `devassure run-tests --csv=<path>` and configure `.devassure/csv_mapping.yaml` so your CSV columns map to summary, steps, priority, and tags.
411
+
412
+ **What are the mandatory fields for a test case?**
413
+ For YAML test cases, `summary` and `steps` are required. `priority` and `tags` are optional. For CSV, the mapped columns must provide at least the equivalent of summary and steps.
414
+
415
+ **How to add a new environment?**
416
+ Add a new top-level key (e.g. `uat`) and its data in `.devassure/test_data.yaml`. Then run with `devassure run-tests --environment=uat` (or `--environment uat`). If you omit `--environment`, the `default` key in test_data.yaml is used.
417
+
418
+ **What are the supported browsers?**
419
+ Supported browsers are Chromium, Chrome, Edge. Controlled by `.devassure/preferences.yaml` under `browsers.default.browser`. The default is `chromium`. See the preferences.yaml section above for the structure.
420
+
421
+ **How to run with headless mode?**
422
+ In `.devassure/preferences.yaml`, set `browsers.default.headless: true`.
423
+
424
+ **How to run the tests in Continuous Integration?**
425
+ Use `devassure add-token <your-token>` to authenticate (no browser). Then run `devassure run-tests` with the options you need (e.g. `--csv`, `--filter`, `--tag`, `--priority`, `--archive` for saving report zips). You can retain only recent sessions with `devassure cleanup --retain-days 7` or `--retain-sessions 10`.
426
+
261
427
  ## Support
262
428
 
263
429
  For more information, visit [DevAssure](https://devassure.io) or run `devassure help` for command-specific help.