@devassure/cli 1.0.5 → 1.0.6
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 +142 -2
- package/dist/index.js +18 -16
- package/package.json +1 -1
- package/scripts/run-devassure.cjs +29 -0
package/README.md
CHANGED
|
@@ -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`)
|
|
@@ -230,6 +229,10 @@ devassure run-tests --tags=smoke,regression --priorities=P0,P1 --folders=admin/u
|
|
|
230
229
|
# Run tests and archive reports to a folder (zip created after run completes)
|
|
231
230
|
devassure run-tests --archive=./reports
|
|
232
231
|
devassure run --archive=/tmp/archives
|
|
232
|
+
|
|
233
|
+
# Run tests from a CSV file (relative path resolved from project path)
|
|
234
|
+
devassure run-tests --csv=sample-tests.csv
|
|
235
|
+
devassure run --csv=.devassure/sample-tests.csv
|
|
233
236
|
```
|
|
234
237
|
|
|
235
238
|
### Archiving and Opening Reports
|
|
@@ -258,6 +261,143 @@ devassure summary --session-id=<session-id>
|
|
|
258
261
|
devassure summary --last --json
|
|
259
262
|
```
|
|
260
263
|
|
|
264
|
+
## Sample configuration files
|
|
265
|
+
|
|
266
|
+
All configuration files live under `.devassure/`. Below are sample contents for each file type.
|
|
267
|
+
|
|
268
|
+
### app.yaml
|
|
269
|
+
|
|
270
|
+
App description and rules for the agent:
|
|
271
|
+
|
|
272
|
+
```yaml
|
|
273
|
+
description: >
|
|
274
|
+
About my app
|
|
275
|
+
in multi line
|
|
276
|
+
rules:
|
|
277
|
+
- User can't create more than 3 projects
|
|
278
|
+
- Any data deleted can't be restored
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### personas.yaml
|
|
282
|
+
|
|
283
|
+
(Optional) User personas used in tests:
|
|
284
|
+
|
|
285
|
+
```yaml
|
|
286
|
+
normal_user:
|
|
287
|
+
description: No admin access can do all other operations
|
|
288
|
+
age_group: 18-30
|
|
289
|
+
gender: M
|
|
290
|
+
region: USA
|
|
291
|
+
admin:
|
|
292
|
+
description: Admin can add or delete other users and manage privileges
|
|
293
|
+
deactivated_user:
|
|
294
|
+
description: Login is deactivated by admin
|
|
295
|
+
expired_user:
|
|
296
|
+
description: License has expired
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### test_data.yaml
|
|
300
|
+
|
|
301
|
+
Default URL, users, and test data per environment:
|
|
302
|
+
|
|
303
|
+
> If data keys are not present for a specific environment, the default data will be used.
|
|
304
|
+
|
|
305
|
+
```yaml
|
|
306
|
+
default:
|
|
307
|
+
url: 'http://localhost:3000'
|
|
308
|
+
users:
|
|
309
|
+
default:
|
|
310
|
+
user_name: 'user@test.com'
|
|
311
|
+
password: 12345678
|
|
312
|
+
admin:
|
|
313
|
+
user_name: 'admin@test.com'
|
|
314
|
+
password: 12345678
|
|
315
|
+
stripe_data:
|
|
316
|
+
allowed_card:
|
|
317
|
+
card: 4444 4444 4444 4444
|
|
318
|
+
wrong_cvv:
|
|
319
|
+
card: 1234 1234 1234 1234
|
|
320
|
+
expiry: 10/28
|
|
321
|
+
cvv: 123
|
|
322
|
+
test_otp: 1122
|
|
323
|
+
uat:
|
|
324
|
+
url: 'http://uat.myapp.com'
|
|
325
|
+
users:
|
|
326
|
+
default:
|
|
327
|
+
user_name: 'user@uat.com'
|
|
328
|
+
password: 12345678
|
|
329
|
+
admin:
|
|
330
|
+
user_name: 'admin@uat.com'
|
|
331
|
+
password: 12345678
|
|
332
|
+
test_otp: 2345
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### agent_instructions.yaml
|
|
336
|
+
|
|
337
|
+
Instructions for the agent during test execution:
|
|
338
|
+
|
|
339
|
+
```yaml
|
|
340
|
+
instructions:
|
|
341
|
+
- Reload the app and retry if app shows warning server is busy
|
|
342
|
+
- Sign up a new user and proceed if any of the given logins are not working
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### preferences.yaml
|
|
346
|
+
|
|
347
|
+
Browser and execution preferences:
|
|
348
|
+
|
|
349
|
+
```yaml
|
|
350
|
+
browsers:
|
|
351
|
+
default:
|
|
352
|
+
browser: chromium
|
|
353
|
+
resolution: 1920 x 1200
|
|
354
|
+
headless: true
|
|
355
|
+
workers: 2
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### csv_mapping.yaml
|
|
359
|
+
|
|
360
|
+
Column mappings when running tests from a CSV file (used with `--csv`). Maps CSV column names to test case fields:
|
|
361
|
+
|
|
362
|
+
```yaml
|
|
363
|
+
summary: Summary
|
|
364
|
+
steps: Steps
|
|
365
|
+
priority: Priority
|
|
366
|
+
tags: Tags
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Sample test cases
|
|
370
|
+
|
|
371
|
+
Example test case in `.devassure/tests/sample-test.yaml`:
|
|
372
|
+
|
|
373
|
+
```yaml
|
|
374
|
+
summary: Sample test case
|
|
375
|
+
steps:
|
|
376
|
+
- Open the application url
|
|
377
|
+
- Verify if the page loads successfully
|
|
378
|
+
- Verify if there are no error messages
|
|
379
|
+
priority: High
|
|
380
|
+
tags:
|
|
381
|
+
- sample
|
|
382
|
+
- ui
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Another example with multiple steps:
|
|
386
|
+
|
|
387
|
+
```yaml
|
|
388
|
+
summary: Login as admin and verify dashboard
|
|
389
|
+
steps:
|
|
390
|
+
- Open the application url
|
|
391
|
+
- Log in with admin credentials from test data
|
|
392
|
+
- Verify dashboard loads and shows admin menu
|
|
393
|
+
- Log out
|
|
394
|
+
priority: P0
|
|
395
|
+
tags:
|
|
396
|
+
- smoke
|
|
397
|
+
- login
|
|
398
|
+
- admin
|
|
399
|
+
```
|
|
400
|
+
|
|
261
401
|
## Support
|
|
262
402
|
|
|
263
403
|
For more information, visit [DevAssure](https://devassure.io) or run `devassure help` for command-specific help.
|