flowstride 1.0.20-rc.6 → 1.0.20
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/NATIVE_CI.md +88 -169
- package/README.md +46 -214
- package/dist/adapters/web/playwright.d.ts +4 -1
- package/dist/adapters/web/playwright.js +69 -2
- package/dist/cli/index.js +1 -1
- package/dist/runner/flow_worker.js +39 -34
- package/dist/security/redaction.js +3 -1
- package/dist/sessions/manager.js +3 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/utils/replayRequest.d.ts +8 -0
- package/dist/utils/replayRequest.js +77 -0
- package/package.json +6 -4
- package/src/ui/dist/assets/{index-DVwp0K-J.js → index-B7MuBTWm.js} +15 -17
- package/src/ui/dist/index.html +1 -1
package/NATIVE_CI.md
CHANGED
|
@@ -1,179 +1,98 @@
|
|
|
1
|
-
# Native CI and browser-game
|
|
1
|
+
# Native CI and browser-game testing
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
execution remains retired. Existing npm OSS / private Pro archive distribution
|
|
5
|
-
and fallback remain supported. Consumer project migrations are managed separately. Native CI uses protocol 1.
|
|
6
|
-
The public CLI selects compatible Pro engines or logs the reason and falls back
|
|
7
|
-
to OSS. Older Pro CLIs may own the npm binary and do not understand the new
|
|
8
|
-
commands; install both candidates when testing the Pro path.
|
|
3
|
+
Flowstride runs `.flow` tests locally and in CI without a custom runner wrapper.
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
installs that engine's matching Chromium.
|
|
5
|
+
## Installation and execution
|
|
12
6
|
|
|
13
|
-
|
|
7
|
+
Use Node.js 22.12 or newer. Install Flowstride as a project dependency and commit the lockfile:
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
```sh
|
|
10
|
+
npm install --save-dev flowstride
|
|
11
|
+
npx flowstride install
|
|
12
|
+
npx flowstride run flows --ci
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
In CI, use `npm ci` before browser installation and test execution. Browser installation uses the Chromium version matching the installed Flowstride engine. Linux runners may require system browser dependencies; the generated GitHub workflow handles installation for its runner.
|
|
16
|
+
|
|
17
|
+
Eligible Pro users authenticate using `npx flowstride login`. In CI, supply the developer token through the `FLOWSTRIDE_TOKEN` secret, never in committed files. Install project dependencies before login, then install the matching browser and run the tests. The OS CLI uses compatible, authorized Pro installations and falls back to OS when Pro is unavailable.
|
|
18
|
+
|
|
19
|
+
Generate a GitHub Actions workflow explicitly:
|
|
19
20
|
|
|
20
21
|
```sh
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
npx flowstride ci init github
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The command requires an npm project with a committed lockfile and refuses to overwrite an existing workflow. It does not run automatically during installation.
|
|
26
|
+
|
|
27
|
+
## Configuration and reports
|
|
28
|
+
|
|
29
|
+
`flowstride.config.json` supports `testDir`, `baseUrl`, `timeout`, `device` (`desktop`, `phone`, `landscape`), optional `viewport`, `pluginsDir`, `artifactsDir`, `recordVideo` (boolean), `browserErrors` (`fail` or `record`), and `webServer` (`command`, local readiness `url`, optional `cwd` and `timeout`).
|
|
30
|
+
|
|
31
|
+
Malformed configuration and unsafe output paths fail before execution. Configuration, plugin, environment, upload, session and output paths must remain inside the project, including resolved symlinks.
|
|
32
|
+
|
|
33
|
+
Native CI is selected by `--ci` or a recognized CI environment. It runs headlessly without a dashboard server and returns nonzero for failed, incomplete, crashed or interrupted execution. JSON and JUnit reports are written at the configured artifact root, which defaults to `flowstride-artifacts`. Media and attachments use a unique run directory referenced by the summary.
|
|
34
|
+
|
|
35
|
+
Flow discovery is recursive. `.first.flow` files run before ordinary files. A failed scenario leaves its remaining steps untested and execution continues to later scenarios. `--bail` stops later work; Pro executes bail runs sequentially.
|
|
36
|
+
|
|
37
|
+
An optional configured local web server is started and stopped with the run. Flowstride rejects a readiness URL that is already serving.
|
|
38
|
+
|
|
39
|
+
Cloud reporting is disabled by default in native CI. Set `cloudSync: true` to enable authenticated reporting. Reporting and video status are recorded separately in the summary and `.flowstride/cloud-sync.json`; a reporting failure does not change a passed test into a failed test.
|
|
40
|
+
|
|
41
|
+
## Browser-game actions
|
|
42
|
+
|
|
43
|
+
Register the built-in alias:
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
let game = "flowstride:game";
|
|
26
47
|
```
|
|
27
48
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
entry point must be covered when checking fallback.
|
|
33
|
-
|
|
34
|
-
The sample in `examples/native-game` uses a tiny local canvas game. Copy its
|
|
35
|
-
files into a disposable project containing the installed candidates, then run
|
|
36
|
-
the command above. `server.mjs` is the game fixture's HTTP server; it contains no
|
|
37
|
-
Flowstride runner, adapter, worker, or CI orchestration code. A real application
|
|
38
|
-
uses its normal development/start command instead.
|
|
39
|
-
|
|
40
|
-
## Configuration
|
|
41
|
-
|
|
42
|
-
`flowstride.config.json` supports `testDir`, `baseUrl`, `timeout`, `device`
|
|
43
|
-
(`desktop`, `phone`, `landscape`), optional `viewport`, `pluginsDir`,
|
|
44
|
-
`artifactsDir`, `recordVideo` (boolean), `browserErrors` (`fail` or `record`), and
|
|
45
|
-
`webServer` (`command`, local readiness `url`, optional `cwd` and `timeout`).
|
|
46
|
-
Malformed configuration and unsafe output paths fail before execution.
|
|
47
|
-
|
|
48
|
-
Native CI is selected by `--ci` or a recognized CI environment. It runs without
|
|
49
|
-
a dashboard server, returns nonzero for failed/incomplete/crashed execution,
|
|
50
|
-
and writes latest `summary.json`/`junit.xml` reports at the configured artifact
|
|
51
|
-
root. Media and attachments go into a unique run directory referenced by the
|
|
52
|
-
summary, so local reruns retain history without mixing evidence.
|
|
53
|
-
SIGINT/SIGTERM produce interrupted results. The run owns its optional local
|
|
54
|
-
server and refuses an already-serving readiness URL.
|
|
55
|
-
|
|
56
|
-
Cloud reporting is off by default in native CI. `cloudSync: true` explicitly
|
|
57
|
-
allows existing authenticated reporting; matching Cloud deployment and configured media storage are required. Reporting and
|
|
58
|
-
video status are written separately in the summary and `.flowstride/cloud-sync.json`;
|
|
59
|
-
a reporting failure does not turn a passed test into a failed test. Normal interactive reporting and the restored
|
|
60
|
-
Cloud URL overrides remain separate from retired managed execution.
|
|
61
|
-
|
|
62
|
-
`npx flowstride ci init github` generates a workflow explicitly, never during
|
|
63
|
-
installation, and refuses to overwrite it. It assumes an npm project with a
|
|
64
|
-
committed lockfile. Other package managers and monorepos can use the composite
|
|
65
|
-
action's install-command and working-directory inputs. The composite action is
|
|
66
|
-
in the OSS repository's `action/` directory and becomes remotely usable only
|
|
67
|
-
once that source is pushed. Pin its commit when configuring a consumer workflow.
|
|
68
|
-
Pro jobs pass a developer token as a secret; dependency installation precedes
|
|
69
|
-
Pro login/install, matching-browser installation, execution, and artifact upload.
|
|
70
|
-
|
|
71
|
-
## Native game actions
|
|
72
|
-
|
|
73
|
-
Register the built-in alias with `let game = "flowstride:game"`. It requires no
|
|
74
|
-
custom plugin file. Available actions:
|
|
75
|
-
|
|
76
|
-
- `tap`: canvas selector, x/y; relative coordinates by default, or `unit: "pixels"`.
|
|
77
|
-
- `drag`/`swipe`: canvas, from/to coordinates, optional duration and input type.
|
|
49
|
+
The built-in game API provides:
|
|
50
|
+
|
|
51
|
+
- `tap`: canvas selector and coordinates; relative coordinates by default, or `unit: "pixels"`.
|
|
52
|
+
- `drag` and `swipe`: canvas, start/end coordinates, optional duration and input type.
|
|
78
53
|
- `key`: key name and optional hold duration.
|
|
79
54
|
- `checkpoint`: named screenshot, optionally of one canvas.
|
|
80
|
-
- `snapshot` and `expectVisual`: canvas comparison with explicit
|
|
81
|
-
- `state
|
|
82
|
-
- `snapshotState
|
|
83
|
-
- `fixture`: a named fixture registered by the application in
|
|
84
|
-
- `select`: a stable object ID resolved by
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
physical
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
`
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
missing/broken Pro and revoked-token fallback. Validate GitHub's Linux execution,
|
|
125
|
-
real licensed download after local acceptance.
|
|
126
|
-
No push, npm publication, Cloud archive replacement or Naija Throne migration
|
|
127
|
-
is performed by building these candidates.
|
|
128
|
-
|
|
129
|
-
## Combined candidate behavior
|
|
130
|
-
|
|
131
|
-
Node.js 22.12 or newer is required. Flow discovery is recursive; `.first.flow`
|
|
132
|
-
files run before ordinary files. Reports identify nested flows by their relative
|
|
133
|
-
paths, and same-named videos receive distinct filenames. A failed scenario skips
|
|
134
|
-
its remaining steps and continues to later scenarios. `--bail` stops later work;
|
|
135
|
-
Pro executes bail runs sequentially. `only.Scenario:` selects that file's focus
|
|
136
|
-
scenario and report planning uses the same selection.
|
|
137
|
-
|
|
138
|
-
Configuration, plugin, environment, upload, vault and output paths must stay
|
|
139
|
-
inside the project, including resolved symlinks. Move shared fixtures into the
|
|
140
|
-
project rather than referring to external files. `FLOWSTRIDE_API_URL` takes
|
|
141
|
-
precedence over `NEXTJS_WEBHOOK_URL`; the legacy completion suffix is normalized.
|
|
142
|
-
Managed runner commands remain retired.
|
|
143
|
-
|
|
144
|
-
Logs redact credential fields, known generated secrets and signed capabilities.
|
|
145
|
-
Redaction cannot guarantee removal of arbitrary application data or visible
|
|
146
|
-
secrets in screenshots/videos. Review artifact access and test data accordingly.
|
|
147
|
-
|
|
148
|
-
The Pro installer rejects unsafe or incomplete archives, downloads above 32 MiB,
|
|
149
|
-
and checksum mismatches. Older Cloud servers without checksum headers remain
|
|
150
|
-
compatible and emit a warning; `FLOWSTRIDE_PRO_SHA256` can pin an expected digest.
|
|
151
|
-
On failed npm installation the previous Pro directory and CLI launchers are
|
|
152
|
-
restored. This is not a transaction over every project dependency npm may alter;
|
|
153
|
-
use a disposable project for candidate acceptance.
|
|
154
|
-
|
|
155
|
-
## Dashboard tab history
|
|
156
|
-
|
|
157
|
-
Completed test tabs restore that file's last captured step by default. Selecting
|
|
158
|
-
an earlier step remembers its history cursor separately for each file. A sidebar
|
|
159
|
-
step also selects the owning tab. Return to Live applies only to the selected
|
|
160
|
-
file, and a new suite/rerun clears old cursors and screens. Runner console and
|
|
161
|
-
network panels show the selected file's records; the full Logs view retains
|
|
162
|
-
suite-wide history. Flows/steps without screenshots show an explicit empty
|
|
163
|
-
state rather than another flow's screen.
|
|
164
|
-
|
|
165
|
-
Run `npm run test:dashboard:unit` for the Zustand store/history unit tests and
|
|
166
|
-
`npm run test:dashboard` for those tests plus the real Chromium dashboard
|
|
167
|
-
regression. The browser regression runs real local browser flows, then replays
|
|
168
|
-
their worker events over WebSocket into the built dashboard. It also supplies
|
|
169
|
-
explicit API-only/background-event fixtures. No live Cloud is required.
|
|
170
|
-
|
|
171
|
-
### Local cURL debugging
|
|
172
|
-
|
|
173
|
-
The interactive local dashboard keeps its cURL preview [REDACTED]. Copy raw cURL
|
|
174
|
-
uses the original request held separately in local memory, including its headers
|
|
175
|
-
and body. Other log fields stay redacted. Native CI and Cloud reporting continue redacting cURL and
|
|
176
|
-
credentials. Raw cURL is not restored for already-redacted historical runs.
|
|
177
|
-
The interactive runner binds to 127.0.0.1 and restricts HTTP Host/Origin and
|
|
178
|
-
WebSocket Origin to its own loopback address and port. Raw commands remain in
|
|
179
|
-
local debugger memory and IPC; they are not written to CI or Cloud reports.
|
|
55
|
+
- `snapshot` and `expectVisual`: canvas comparison with explicit change thresholds.
|
|
56
|
+
- `state` and `expectState`: exposed application state with optional dotted paths.
|
|
57
|
+
- `snapshotState` and `expectPreserved`: compare selected state across actions or reloads.
|
|
58
|
+
- `fixture`: a named fixture explicitly registered by the application in test mode.
|
|
59
|
+
- `select`: a stable object ID resolved by a game bridge, followed by real pointer input.
|
|
60
|
+
|
|
61
|
+
The package includes a small runnable example in `examples/native-game`. Its HTTP server serves the fixture application; it is not a custom test runner. Use your application's normal start command for your own game.
|
|
62
|
+
|
|
63
|
+
Visual checks measure pixel differences. Pair them with state or UI assertions to verify gameplay behavior. Mobile profiles emulate Chromium devices; physical device testing is a separate qualification. Touch dragging currently uses Chromium CDP.
|
|
64
|
+
|
|
65
|
+
## Application bridges
|
|
66
|
+
|
|
67
|
+
For a generic browser game, import `registerGame` from `flowstride/dist/game/bridge.js`. Supply `readState` and optional test-only fixtures.
|
|
68
|
+
|
|
69
|
+
For Three.js, import `registerThreeGame` from `flowstride/dist/game/three-bridge.js`. Register the live scene, camera, canvas, your application's `Vector3` and `Raycaster` constructors, and an optional map of stable object IDs. Alternatively, assign `userData.flowstrideId` to scene objects. Optional local pick points use `userData.flowstridePickPoint: [x, y, z]`.
|
|
70
|
+
|
|
71
|
+
The bridge projects and raycasts the live scene. Hidden, occluded, off-screen, covered or non-pickable objects fail explicitly. It creates no renderer or animation loop. Dispose the bridge when replacing the scene.
|
|
72
|
+
|
|
73
|
+
Application fixtures are available only when explicitly registered with `testMode: true`. Enable this in dedicated test builds, never public production builds. Your application still defines its own rules, observable state and fixtures.
|
|
74
|
+
|
|
75
|
+
Custom plugins receive `sdk.game`, `sdk.browser.page()` and `sdk.run`, including artifact attachment support, alongside the existing SDK.
|
|
76
|
+
|
|
77
|
+
## Assertions and browser sessions
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
flow.expect attribute "#order" "data-state" "approved";
|
|
81
|
+
flow.expect attribute "#order" "class" contains "selected";
|
|
82
|
+
flow.save session "browser" persist;
|
|
83
|
+
flow.use session "browser";
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Attribute comparisons wait up to the configured timeout. Exact matching is case-sensitive; `contains` checks a substring. Missing attributes fail even when the expected value is empty.
|
|
87
|
+
|
|
88
|
+
Sessions capture cookies, local storage, session storage and the current HTTP(S) storage origin. Session storage is restored immediately on the matching origin or before its first matching navigation. It is not seeded into unrelated origins. The initial seed is then removed so later application changes and reloads are preserved.
|
|
89
|
+
|
|
90
|
+
Existing cookie/local-storage snapshots remain compatible. Older snapshots with session storage but no origin use the current application origin or configured `baseUrl`; open the application first or set `baseUrl` if neither is available. Restoration merges saved keys into storage. This is a single-origin storage snapshot.
|
|
91
|
+
|
|
92
|
+
## Interactive history and debugging
|
|
93
|
+
|
|
94
|
+
Each completed flow tab restores its own last captured screen. Selecting an earlier step remembers a separate history cursor for that file. Flows without screenshots show an empty state. New runs clear previous screens and cursors.
|
|
95
|
+
|
|
96
|
+
The local cURL preview remains `[REDACTED]`. Copy uses the original captured request held in interactive debugger memory. Already-redacted historical data cannot be recovered. CI and Cloud reports retain redaction.
|
|
97
|
+
|
|
98
|
+
Review artifact access and test data: credential redaction does not remove every possible application secret, and screenshots or videos can show sensitive information.
|
package/README.md
CHANGED
|
@@ -1,256 +1,88 @@
|
|
|
1
1
|
# Flowstride
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Flowstride OS is an open source framework for browser, API and manual testing. Write readable `.flow` tests, inspect execution in the local dashboard, or run headlessly in CI.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[Documentation](https://docs.flowstride.io/) · [Flowstride Cloud](https://cloud.flowstride.io/)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Requirements
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- Node.js 22.12 or newer.
|
|
10
|
+
- Chromium installed through Flowstride for browser tests.
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
+
## Get started
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
Install Flowstride in your project:
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **Live Visual Dashboard**: Watch your tests run step-by-step, inspect DOM snapshots, trace network activity, and manually replay API requests directly from the UI.
|
|
18
|
-
- **Built-in State Management**: Save and inject browser sessions (cookies, local storage) with a single command to bypass repetitive login steps.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Installation & Quick Start
|
|
23
|
-
|
|
24
|
-
Flowstride requires Node.js 18 or higher.
|
|
25
|
-
|
|
26
|
-
**1. Install globally (or as a dev dependency in your project):**
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
npm i flowstride --save-dev
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**2. Initialize a new Flowstride workspace:**
|
|
33
|
-
|
|
34
|
-
```bash
|
|
16
|
+
```sh
|
|
17
|
+
npm install --save-dev flowstride
|
|
35
18
|
npx flowstride init
|
|
19
|
+
npx flowstride run flows/example.flow
|
|
36
20
|
```
|
|
37
21
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
**3. Install VS Code Extension (Highly Recommended):**
|
|
41
|
-
|
|
42
|
-
To get the best developer experience, including syntax highlighting, auto-completion, and native IDE support for .flow files, install our official VS Code extension directly via the VS Code CLI.
|
|
43
|
-
|
|
44
|
-
Run the command below:
|
|
22
|
+
`init` creates the project folders and an example flow, and installs Chromium. You can also install the matching browser explicitly:
|
|
45
23
|
|
|
46
|
-
```
|
|
47
|
-
|
|
24
|
+
```sh
|
|
25
|
+
npx flowstride install
|
|
48
26
|
```
|
|
49
27
|
|
|
50
|
-
|
|
28
|
+
An example flow:
|
|
51
29
|
|
|
52
|
-
|
|
30
|
+
```text
|
|
31
|
+
Feature: Home page
|
|
53
32
|
|
|
54
|
-
|
|
55
|
-
npx flowstride run
|
|
33
|
+
Scenario: Show the sign-in form
|
|
56
34
|
|
|
57
|
-
|
|
35
|
+
Given "Open the application"
|
|
36
|
+
flow.open "https://your-application.example/login";
|
|
58
37
|
|
|
59
|
-
|
|
38
|
+
Then "The sign-in button is visible"
|
|
39
|
+
flow.expect visible "Sign in";
|
|
60
40
|
```
|
|
61
41
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
**5. Login to Flowstride Cloud:**
|
|
42
|
+
Replace the URL and assertion with values from your own application.
|
|
65
43
|
|
|
66
|
-
|
|
44
|
+
## Native CI
|
|
67
45
|
|
|
68
|
-
```
|
|
69
|
-
npx flowstride
|
|
46
|
+
```sh
|
|
47
|
+
npx flowstride run flows --ci
|
|
70
48
|
```
|
|
71
49
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## Privacy & Data Security
|
|
75
|
-
|
|
76
|
-
Flowstride is designed with a **zero-trust, local-first architecture**. Whether you are testing internal microservices, staging environments, or production APIs, your sensitive data, PHI, and credentials remain strictly on your infrastructure.
|
|
77
|
-
|
|
78
|
-
### Open Source Core: 100% Local Isolation
|
|
79
|
-
|
|
80
|
-
The Open Source version of Flowstride operates entirely as an ephemeral, local execution engine.
|
|
81
|
-
|
|
82
|
-
- **Air-Gapped Execution:** Flowstride does not "phone home." The OS runner executes strictly on your local machine or within your private CI/CD pipeline. There is no external Flowstride database storing your test payloads or network logs.
|
|
83
|
-
|
|
84
|
-
- **Ephemeral Memory:** Flowstride is inherently stateless. API request headers, response bodies, and DOM snapshots exist only in Node.js RAM during execution. The millisecond the execution process terminates, all memory is wiped.
|
|
85
|
-
|
|
86
|
-
- **The DevTools Analogy:** Our network interception works natively within Playwright's browser context routing. It is fundamentally identical to opening the Chrome DevTools "Network" tab locally. We do not act as an external Man-In-The-Middle (MITM) proxy.
|
|
87
|
-
|
|
88
|
-
- **Opt-In Local State:** Artifacts saved to disk—such as execution videos (`.flowstride/mock-cloud/`) or explicitly persisted browser states (`.flowstride/sessions/`)—are written strictly to your local file system to mirror the functionality of tools like Postman. _(Note: We strongly recommend adding `.flowstride/` to your `.gitignore` to prevent accidental credential commits)._
|
|
89
|
-
|
|
90
|
-
### Flowstride Enterprise: Secure Cloud Telemetry
|
|
91
|
-
|
|
92
|
-
For teams using Flowstride Enterprise to aggregate multi-flow metrics, we maintain a strict metadata-only boundary.
|
|
93
|
-
|
|
94
|
-
- **Metadata, Not Payloads:** When cloud sync is active, Flowstride routes only execution metadata to your team's dashboard (e.g., Workspace ID, execution duration, total steps, and pass/fail tallies). **Zero bytes** of request headers, bearer tokens, or JSON bodies are ever transmitted to Flowstride Cloud.
|
|
95
|
-
|
|
96
|
-
- **Deep Debugging Stays Local:** The rich, interactive visual dashboard, including the JSON explorer and API Replay tools, runs on a dynamic, locally bound port on your machine. You get the UI of a modern cloud app with the security of a local binary.
|
|
97
|
-
|
|
98
|
-
### CI/CD Leak Protection & Terminal Hygiene
|
|
99
|
-
|
|
100
|
-
Standard testing frameworks do dump failing API requests, and response bodies directly into the terminal so developers can debug them. In a CI/CD environment, this is a massive security liability, as those secrets are permanently burned into plaintext Jenkins, GitHub Actions, or GitLab CI logs.
|
|
101
|
-
|
|
102
|
-
Flowstride completely neutralizes this threat by architecturally separating execution output from diagnostic telemetry:
|
|
103
|
-
|
|
104
|
-
1. **Clean Standard Output (`stdout`):** Flowstride's terminal output only displays high-level, human-readable BDD execution steps (e.g., `✔ Given "User lands on home page"` or `✖ Action Failed`). No JSON request bodies, `cURL` strings, or bearer tokens are ever printed to the terminal console.
|
|
50
|
+
CI runs headlessly, returns a nonzero exit code for failed or interrupted execution, and writes JSON and JUnit reports to `flowstride-artifacts` by default. Screenshots, videos and attachments are associated with their run.
|
|
105
51
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
3. **Total Evaporation:** Because CI/CD runners only capture `stdout` text and do not connect to local WebSockets, your highly sensitive diagnostic data simply evaporates the moment the pipeline execution ends. Your pipeline logs remain 100% free of plaintext secrets.
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## The `.flow` Syntax
|
|
113
|
-
|
|
114
|
-
Flowstride utilizes a custom `.flow` file extension. It seamlessly pairs descriptive BDD steps (Given, When, And, Then) with direct, executable `flow.` commands.
|
|
115
|
-
|
|
116
|
-
Here is an example of a standard UI and API flow:
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
// Signing up a new user via API call.
|
|
120
|
-
Given "User signup via API call"
|
|
121
|
-
flow.post "/api/signup" with reqBody
|
|
122
|
-
"""
|
|
123
|
-
{
|
|
124
|
-
"firstName": "Mike",
|
|
125
|
-
"lastName": "Doe",
|
|
126
|
-
"dob": "1995-05-10",
|
|
127
|
-
"sex": "male",
|
|
128
|
-
"email": "user@flowstridemail.com",
|
|
129
|
-
"password": "$randomPassword"
|
|
130
|
-
}
|
|
131
|
-
"""
|
|
132
|
-
flow.extract resBody "userId" as "newUserId"
|
|
133
|
-
flow.expect status "201"
|
|
134
|
-
|
|
135
|
-
// Approving the new user from admin via API call
|
|
136
|
-
When "A new signup user is approved by the Admin"
|
|
137
|
-
flow.post "/api/approve" with reqBody
|
|
138
|
-
"""
|
|
139
|
-
{
|
|
140
|
-
"userId": "@newUserId"
|
|
141
|
-
}
|
|
142
|
-
"""
|
|
143
|
-
|
|
144
|
-
And "Confirm Status Code is 200"
|
|
145
|
-
flow.expect status "200"
|
|
146
|
-
|
|
147
|
-
And "Confirm resBody message is successful"
|
|
148
|
-
flow.expect resBody "message" equals "User approved successfully"
|
|
149
|
-
|
|
150
|
-
And "Confirm user status to be active"
|
|
151
|
-
flow.expect resBody "user.status" equals "active"
|
|
152
|
-
|
|
153
|
-
// Using the newly registered user credentials to login via the UI
|
|
154
|
-
When "User lands on home page"
|
|
155
|
-
flow.open "/login"
|
|
156
|
-
|
|
157
|
-
And "User clicks on Log in, near Sign Up"
|
|
158
|
-
flow.click "Log in" near "Sign up"
|
|
159
|
-
|
|
160
|
-
And "User inputs newly created credentials"
|
|
161
|
-
flow.type "Email" "user@flowstridemail.com"
|
|
162
|
-
flow.type "Password" "@randomPassword" // Reusing the random password from API call
|
|
163
|
-
|
|
164
|
-
Then "Click on Login button"
|
|
165
|
-
flow.click button "Login"
|
|
52
|
+
To generate a GitHub Actions workflow in an npm project with a committed lockfile:
|
|
166
53
|
|
|
54
|
+
```sh
|
|
55
|
+
npx flowstride ci init github
|
|
167
56
|
```
|
|
168
57
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
## Command Reference
|
|
172
|
-
|
|
173
|
-
### Browser Navigation & Context
|
|
58
|
+
Workflow generation is explicit; package installation does not create a workflow. See [NATIVE_CI.md](./NATIVE_CI.md) for configuration and browser-game testing.
|
|
174
59
|
|
|
175
|
-
|
|
176
|
-
| :--------- | :----------------------------- | :--------------------------------------------------------------- |
|
|
177
|
-
| `open` | `flow.open "https://site.com"` | Navigates the browser to the specified URL. |
|
|
178
|
-
| `switchTo` | `flow.switchTo "next"` | Switches to a new tab or window by title/URL or relation. |
|
|
179
|
-
| `close` | `flow.close "Modal Title"` | Geometrically calculates and clicks the close button of a modal. |
|
|
60
|
+
## Local dashboard and manual testing
|
|
180
61
|
|
|
181
|
-
|
|
62
|
+
Interactive runs open a dashboard for execution, per-flow screen history, network inspection and API Replay. The local cURL preview remains redacted; its Copy control copies the original captured request when it is still available in the interactive debugger.
|
|
182
63
|
|
|
183
|
-
|
|
184
|
-
| :----------- | :---------------------------------------- | :-------------------------------------------------------------- |
|
|
185
|
-
| `click` | `flow.click "Submit"` | Clicks an element based on text, CSS, or spatial relation. |
|
|
186
|
-
| `forceClick` | `flow.forceClick "#hidden-btn"` | Bypasses Playwright's actionability checks to force a click. |
|
|
187
|
-
| `type` | `flow.type "Email" "test@test.com"` | Types value into an input field matching the target. |
|
|
188
|
-
| `passcode` | `flow.passcode "OTP" "123456"` | Specifically handles split OTP/Passcode input arrays. |
|
|
189
|
-
| `select` | `flow.select "Option 1" from "Dropdown"` | Selects an option from a native select or custom portal. |
|
|
190
|
-
| `check` | `flow.check "Terms and Conditions"` | Checks a checkbox or radio button. |
|
|
191
|
-
| `upload` | `flow.upload "Avatar" "path/to/file.jpg"` | Uploads a local file to a file input element. |
|
|
192
|
-
| `drag` | `flow.drag "Item A" into "Zone B"` | Drags a source element and drops it into a destination element. |
|
|
64
|
+
For visual manual test design and execution:
|
|
193
65
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
| :--------------- | :------------------------------------- | :----------------------------------------------------- |
|
|
198
|
-
| `expect visible` | `flow.expect visible "Success"` | Asserts an element is attached to the DOM and visible. |
|
|
199
|
-
| `expect text` | `flow.expect text "Error"` | Asserts specific text is present in the UI. |
|
|
200
|
-
| `expect value` | `flow.expect value "Username" "admin"` | Asserts the input value of a targeted field. |
|
|
201
|
-
|
|
202
|
-
### Session Management
|
|
203
|
-
|
|
204
|
-
| Command | Example | Description |
|
|
205
|
-
| :------------- | :------------------------- | :---------------------------------------------------------------------------- |
|
|
206
|
-
| `save session` | `flow.save session "Auth"` | Captures current cookies/storage into memory (add `persist` to save to disk). |
|
|
207
|
-
| `use session` | `flow.use session "Auth"` | Injects previously saved cookies/storage directly into the browser. |
|
|
208
|
-
|
|
209
|
-
### API Testing
|
|
210
|
-
|
|
211
|
-
| Command | Example | Description |
|
|
212
|
-
| :----------------------------- | :-------------------------------------------- | :----------------------------------------------------------------- |
|
|
213
|
-
| `get`, `post`, `put`, `delete` | `flow.post "/api/users" with reqBody "{...}"` | Executes HTTP requests natively via Undici. |
|
|
214
|
-
| `extract` | `flow.extract resBody "token" as "jwt"` | Parses API responses and saves data to a local or global variable. |
|
|
215
|
-
| `expect status` | `flow.expect status "200"` | Asserts the HTTP status code of the last API call. |
|
|
216
|
-
|
|
217
|
-
_(For a complete list of commands, API assertions, and plugin integration rules, please see the official documentation)._
|
|
218
|
-
|
|
219
|
-
---
|
|
220
|
-
|
|
221
|
-
## Interactive Dashboard
|
|
222
|
-
|
|
223
|
-
Running a `.flow` file automatically boots the Flowstride Dashboard.
|
|
224
|
-
|
|
225
|
-
- **Live Execution:** Watch tests execute in real-time with an integrated screencast.
|
|
226
|
-
- **Step Diagnostics:** Click on any step (Pass or Fail) to view exact execution context, error stack traces, and a DOM snapshot with the target element highlighted.
|
|
227
|
-
- **Network Interception:** View all intercepted XHR/Fetch requests. You can click **Replay** on any API log to independently re-execute the request from the Node.js backend natively.
|
|
228
|
-
- **Soft Kill & Rerun:** Use the top navigation bar to seamlessly abort running tests, clear state, and restart execution without touching the terminal.
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Flowstride OS vs. Enterprise
|
|
66
|
+
```sh
|
|
67
|
+
npx flowstride manual
|
|
68
|
+
```
|
|
233
69
|
|
|
234
|
-
|
|
70
|
+
## Flowstride Pro
|
|
235
71
|
|
|
236
|
-
|
|
72
|
+
Eligible Flowstride Cloud users install Pro through the authenticated private channel:
|
|
237
73
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
- **High-Fidelity PDF Exports**: Programmatic, C-suite ready PDF report generation.
|
|
242
|
-
- **Cloud Storage & History**: Store all your test runs in the cloud to access and reference them at any time.
|
|
243
|
-
- **Native Integrations**: Seamlessly connect your testing workflows directly with Jira and Slack.
|
|
244
|
-
- **Massive Team Collaboration**: Scale your operations by connecting with 70+ team members in a shared workspace.
|
|
74
|
+
```sh
|
|
75
|
+
npx flowstride login
|
|
76
|
+
```
|
|
245
77
|
|
|
246
|
-
|
|
78
|
+
The OS CLI selects a compatible, authorized Pro engine when available and falls back to OS when Pro cannot be used. Pro is distributed privately.
|
|
247
79
|
|
|
248
|
-
##
|
|
80
|
+
## Test data and artifacts
|
|
249
81
|
|
|
250
|
-
|
|
82
|
+
Flowstride redacts recognized credentials in logs and reports. Redaction cannot guarantee removal of arbitrary application data, and screenshots or videos can contain sensitive information. Use appropriate test data and restrict access to artifacts, persisted sessions and raw requests copied for debugging.
|
|
251
83
|
|
|
252
|
-
|
|
84
|
+
Keep `.flowstride/` and `flowstride-artifacts/` out of version control. CI Cloud reporting is disabled by default and requires explicit configuration and valid credentials.
|
|
253
85
|
|
|
254
86
|
## License
|
|
255
87
|
|
|
256
|
-
|
|
88
|
+
MIT.
|
|
@@ -8,6 +8,8 @@ export declare class WebAdapter {
|
|
|
8
8
|
private page;
|
|
9
9
|
private discoveredPages;
|
|
10
10
|
private dialogHandler;
|
|
11
|
+
private pendingSessionStorageRestore;
|
|
12
|
+
private clearSessionStorageRestore;
|
|
11
13
|
constructor(config: FlowstrideConfig);
|
|
12
14
|
getPage(): Page;
|
|
13
15
|
initialise(audioInjectionPath?: string): Promise<void>;
|
|
@@ -15,11 +17,12 @@ export declare class WebAdapter {
|
|
|
15
17
|
rejectDialog(): Promise<void>;
|
|
16
18
|
injectAudio(filePath: string): Promise<void>;
|
|
17
19
|
switchTo(target: string): Promise<void>;
|
|
18
|
-
injectStorage(cookies?: any[], localStorage?: Record<string, string>, fallbackDomain?: string): Promise<void>;
|
|
20
|
+
injectStorage(cookies?: any[], localStorage?: Record<string, string>, fallbackDomain?: string, sessionStorage?: Record<string, string>, storageOrigin?: string): Promise<void>;
|
|
19
21
|
getState(): Promise<{
|
|
20
22
|
cookies: any[];
|
|
21
23
|
localStorage: Record<string, string>;
|
|
22
24
|
sessionStorage: Record<string, string>;
|
|
25
|
+
storageOrigin?: string;
|
|
23
26
|
}>;
|
|
24
27
|
getCurrentUrl(): string;
|
|
25
28
|
navigate(url: string): Promise<void>;
|