Open robin-miro opened 4 months ago
The relevant code is here, it's definitely possible to make it take other values into account. https://github.com/artilleryio/artillery/blob/main/packages/artillery-engine-playwright/index.js#L290
I'm curious to learn more about how/why you're overriding the target. It looks like your test may be injecting a different target into different VUs, which I presume the VU then uses for page.goto()
calls?
Is there a reason that overriding config.target
at runtime doesn't work? E.g. with something like artillery run --target https://mytargetoverride.com
?
Hey @hassy
The target url will be like [something].mydomain.com
, each customer may have their own sub-domain.
During the test, we are reading the data from a CSV file, within this CSV file, it will tell what is this "[something]"
so ideally, I would prefer to read variables from the CSV file and then directly use them within config.yaml
, such as
target: "{{ $something }}.mydomain.com"
since it is not supported, then we use a workaround
target: "replace_me.mydomain.com"
and inside JS file, we did
vuContext.vars.target = vuContext.vars.target.replace("replace_me", vuContext.vars.something)
unctionally it works perfectly, but metrics don't if we don't turn on "showAllPage".
Would like to hear your opinion?
My suggestion:
showAllPageMetrics
by default isfalse
, it enables webvitals metrics if the URL start withtarget
but it doesn't work if
target
is changed within runtime (within js file)in JS
Version info:
I expected to see this happen: