Skip to content

feat: normalize query string for playwright engine#3665

Merged
manfromanotherland merged 2 commits intomainfrom
ed-normalize-query-string
Jan 6, 2026
Merged

feat: normalize query string for playwright engine#3665
manfromanotherland merged 2 commits intomainfrom
ed-normalize-query-string

Conversation

@manfromanotherland
Copy link
Member

@manfromanotherland manfromanotherland commented Dec 4, 2025

Description

This PR introduces query string improvements for Playwright tests, to reduce the number of distinct metrics a test run can generate and help users get more meaningful data out of a test.

  • stripQueryString: as seen in the metrics-by-endpoint http plugin, query strings can now be removed — it defaults to false
  • normalizeQueryString: defaults to true, prevents too many distinct metrics, can be explicitly set to false to disable this behavior
    • For numeric values, it converts /page?id=123 to /page?id=NUMBER
    • For string values, it converts /page?plan=premium to /page?plan=STRING
    • When mixed values are present, it converts /page?id=123&plan=premium to /page?id=NUMBER&plan=STRING

Pre-merge checklist

This is for use by the Artillery team. Please leave this in if you're contributing to Artillery.

  • Does this require an update to the docs?
  • Does this require a changelog entry?

Copy link
Member Author

@hassy could you take a look please?

This PR introduces query string improvements for Playwright tests, to
reduce the number of distinct metrics a test run can generate and help
users get more meaninful data out of a test.

- `stripQueryString`: as seen in the `metrics-by-endpoint` http plugin,
query strings can now be removed — it defaults to `false`
- `normalizeQueryString`: defaults to `true`, prevents too many distinct
metrics, can be explicity set to `normalizeQueryString: false` to
disable this behavior
  - All params are sorted alphabetically by key before being normalized
  - For numeric values, it converts `/page?id=123` to `/page?id=NUMBER`
  - For string values, it converts `/page?plan=premium` to
`/page?plan=STRING`
  - When mixed values are present, it converts
`/page?id=123&plan=premium` to `/page?id=NUMBER&plan=STRING`
@manfromanotherland manfromanotherland force-pushed the ed-normalize-query-string branch 2 times, most recently from 6cb7fe2 to 492461e Compare January 6, 2026 22:31
It was missing the step to install playwright browsers to run playwright
based tests.
@manfromanotherland manfromanotherland force-pushed the ed-normalize-query-string branch from 492461e to b853a17 Compare January 6, 2026 23:37
@manfromanotherland manfromanotherland merged commit 8bf25eb into main Jan 6, 2026
44 checks passed
@manfromanotherland manfromanotherland deleted the ed-normalize-query-string branch January 6, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants