@devassure/cli 1.0.14 → 1.1.1

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 (3) hide show
  1. package/README.md +86 -1
  2. package/dist/index.js +36 -36
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -131,6 +131,25 @@ default:
131
131
  - **Note**: If `--filter`/`--filters` is provided, all other filter parameters (`--tag`, `--priority`, `--folder`, `--query`) are ignored
132
132
  - Alias: `devassure run` (same options apply)
133
133
 
134
+ ### E2E Test from Git Code Changes
135
+
136
+ - **`devassure test`** — Run tests scoped to **git code changes** (branch comparison or a specific commit). Uses the same test case discovery as `run-tests` (current directory as test cases root), but tells the agent which branch or commit to focus on.
137
+ - `--path <path>` — Project path (default: current directory)
138
+ - `--head <branch name>` — **Source** branch (changes under test); forwarded to the agent as `--source`. Optional when using branch mode.
139
+ - `--base <branch name>` — **Target** branch (baseline to compare against, usually the repo default); forwarded as `--target`. Optional when using branch mode.
140
+ - `--commit <commitId>` — Commit to test; forwarded as `--commit-id`. Use this for commit mode instead of `--head` / `--base`.
141
+ - `--archive <folder>` — Archive folder path; after the run, test reports are written as `devassure-results-<session-id>.zip` in this folder
142
+ - `--environment <env>` — Environment name (e.g. staging, production)
143
+ - `--url <url>` — Override default test URL (`test_data.default.url` and TEST DATA section)
144
+ - `--headless <bool>` — Run browser headless: `true` or `false` (omit for project default)
145
+ - **Branch vs commit**: If you pass any of `--head`, `--base`, or `--commit`, that mode is enabled. Omitting all three is equivalent to “no explicit ref”: the agent uses **current branch** as the source and the **repository default branch** as the target.
146
+
147
+ ### Resume Test Session
148
+
149
+ - **`devassure resume`** - Resume an existing test session by session ID
150
+ - `--session-id <session-id>` - Session ID to resume (one of these or `--last` is required)
151
+ - `--last` - Resume the last executed session
152
+
134
153
  ### Reports and Statistics
135
154
 
136
155
  - **`devassure archive-report`** - Archive report results for a test session into a zip file
@@ -192,6 +211,19 @@ devassure run-tests
192
211
  devassure open-report --last
193
212
  ```
194
213
 
214
+ ### E2E Test from Git Code Changes
215
+
216
+ ```bash
217
+ # 1. Test the diff of current branch vs default branch
218
+ devassure test
219
+
220
+ # 2. Explicit source and target branches
221
+ devassure test --head feature/login --base main
222
+
223
+ # 3. Test a specific commit
224
+ devassure test --commit abc1234567890
225
+ ```
226
+
195
227
  ### Cleanup
196
228
 
197
229
  ```bash
@@ -229,6 +261,13 @@ devassure run-tests --filter="query = dashboard"
229
261
  # All parameters support plural forms
230
262
  devassure run-tests --tags=smoke,regression --priorities=P0,P1 --folders=admin/users
231
263
 
264
+ # Resume the last session
265
+ devassure resume --last
266
+
267
+ # Resume a specific session
268
+ devassure resume --session-id=<session-id>
269
+ devassure resume --id=<session-id>
270
+
232
271
  # Run tests and archive reports to a folder (zip created after run completes)
233
272
  devassure run-tests --archive=./reports
234
273
  devassure run --archive=/tmp/archives
@@ -403,7 +442,7 @@ tags:
403
442
 
404
443
  ## Actions
405
444
 
406
- Actions group steps that can be reused across multiple tests. Add action YAML files under `.devassure/actions/`. To call an action, use its **name** as a step in a test file.
445
+ Actions group steps that can be reused across multiple tests. Add action YAML files under actions folder - `.devassure/actions/<action_name>.yaml`. To call an action, use its **name** as a step in a test file.
407
446
 
408
447
  **Fields in an action file:**
409
448
 
@@ -634,6 +673,52 @@ tools:
634
673
  npm run cleanupTestingProcess
635
674
  ```
636
675
 
676
+ ## Advanced test_data.
677
+
678
+ You can keep large or reusable `test_data` in separate YAML files and merge them into your scenario config using `!include`, so teams can share the same data across multiple scenarios/environments.
679
+ This works for both **single values** (strings/numbers/booleans) and **arrays of values** (e.g., multiple cards, multiple admin users, multiple payment methods).
680
+
681
+ ### Examples
682
+
683
+ #### Reusable actions YAML (multiple actions in one file)
684
+
685
+ ```yaml
686
+ # .devassure/actions/cart.yaml
687
+ - name: go_to_carts_page
688
+ description: Go to the carts page and verify the content
689
+ steps:
690
+ - Click on the carts icon
691
+ - Verify the carts page is opened
692
+
693
+ - name: add_to_cart
694
+ description: Add a product to the cart
695
+ steps:
696
+ - Click on the add to cart button
697
+ - Verify the product is added to the cart
698
+ ```
699
+
700
+ #### Reusable actions YAML (single action in one file)
701
+
702
+ ```yaml
703
+ # .devassure/actions/products.yaml
704
+ name: remove_from_cart
705
+ description: Remove a product from the cart
706
+ steps:
707
+ - Click on the remove button for the product
708
+ - Verify the product is removed from the cart
709
+ ```
710
+
711
+ #### Include reusable test_data into your test_data config
712
+
713
+ ```yaml
714
+ # .devassure/test_data.yaml
715
+ default:
716
+ url: http://127.0.0.1:4321
717
+
718
+ cart:
719
+ <<: !include test_data/cart.yaml
720
+ ```
721
+
637
722
  ## Proxy
638
723
 
639
724
  If the `HTTP_PROXY` or `HTTPS_PROXY` environment variables are set, the CLI will use them to proxy requests.