You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* WIP: having sequential index for each VU
* common entry point for all tests
* common account derivation step
* clean siwe + getProfile test
* point to index.ts entry point
* mute/restor metrics functions
* update derive accounts
* update authentication
* run with logs & index allocator script
* minor improvements in config
* example getProfile
* clean up
* fmt & clean up
* update download test
* clean up
* update download test
* improve download test
* simplify running test command
* clean up
* update readme
* fmt
* clean up unauth calls
* remove duplicated function
* Update scripts/run-with-logs.ts
Co-authored-by: Herman Obst Demaestri <hodemaestri@gmail.com>
* Remove unnecessary endpoint query
* rename run script
* update with new script name
* better private key error handling
* add typecheck
* fmt
---------
Co-authored-by: Herman Obst Demaestri <hodemaestri@gmail.com>
-`auth.siwe.err` (only if SIWE fails; init steps are muted so only errors surface)
149
+
150
+
## How initialization + mute metrics works
138
151
139
-
## Per-VU private keys (Artillery payload)
152
+
Most scenarios follow the same pattern:
153
+
-**Init** (muted): `deriveAccount` → `SIWE`
154
+
-**Actions** (not muted): call one or more action processors (e.g. `actionGetProfile`, `downloadFile`)
140
155
141
-
This test expects a per-VU `privateKey` variable from `config.payload` in `scenarios/artillery.yml`.
156
+
The muting is controlled by two processor steps:
157
+
-`muteMetrics`: while muted, the metrics helper will **only emit `*.err` counters**; it drops ok counters + histograms.
158
+
-`unmuteMetrics`: restores normal metric emission for the action phase.
142
159
143
-
1) Create `data/private_keys.csv` (ignored by git), based on the example:
144
-
-`data/private_keys.example.csv`
160
+
This keeps summaries focused on action timings while still surfacing setup/auth failures.
145
161
146
-
Notes:
147
-
-`pnpm preflight` will use `STORAGEHUB_PRIVATE_KEY`**if set**, otherwise it will use the **first key** in `data/private_keys.csv`.
148
-
- If Artillery does not inject `privateKey` into `context.vars` (depends on engine/runtime), the scenario will fall back to reading keys directly from `data/private_keys.csv` (round-robin).
162
+
### What `deriveAccount` does
163
+
- Picks a unique account index (via the local index allocator started by `scripts/run-scenario.ts`)
164
+
- Derives an account from `TEST_MNEMONIC`
165
+
- Persists `privateKey` (and derivation metadata) into Artillery vars for later steps
149
166
150
-
2) Run:
167
+
### What `SIWE` does
168
+
- Reads the derived `privateKey`
169
+
- Calls the SDK SIWE auth (`mspClient.auth.SIWE(...)`)
170
+
- Persists the resulting `__siweSession` into Artillery vars
171
+
172
+
## How to add a new test
173
+
174
+
1)**Create a scenario file** under `scenarios/` (for example `scenarios/myTest.yml`).
When init steps are wrapped with `muteMetrics`/`unmuteMetrics`, only `*.err` counters from init will appear in the summary (ok + histograms are muted).
0 commit comments