@devassure/cli 1.0.15 → 1.1.2
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 +75 -1
- package/dist/index.js +41 -41
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -131,6 +131,21 @@ 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
|
+
|
|
134
149
|
- **`devassure resume`** - Resume an existing test session by session ID
|
|
135
150
|
- `--session-id <session-id>` - Session ID to resume (one of these or `--last` is required)
|
|
136
151
|
- `--last` - Resume the last executed session
|
|
@@ -196,6 +211,19 @@ devassure run-tests
|
|
|
196
211
|
devassure open-report --last
|
|
197
212
|
```
|
|
198
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
|
+
|
|
199
227
|
### Cleanup
|
|
200
228
|
|
|
201
229
|
```bash
|
|
@@ -414,7 +442,7 @@ tags:
|
|
|
414
442
|
|
|
415
443
|
## Actions
|
|
416
444
|
|
|
417
|
-
Actions group steps that can be reused across multiple tests. Add action YAML files under `.devassure/actions
|
|
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.
|
|
418
446
|
|
|
419
447
|
**Fields in an action file:**
|
|
420
448
|
|
|
@@ -645,6 +673,52 @@ tools:
|
|
|
645
673
|
npm run cleanupTestingProcess
|
|
646
674
|
```
|
|
647
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
|
+
|
|
648
722
|
## Proxy
|
|
649
723
|
|
|
650
724
|
If the `HTTP_PROXY` or `HTTPS_PROXY` environment variables are set, the CLI will use them to proxy requests.
|