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
As a branch of #2259 issue and as a useful utility for having a more consistent behaviour for #796 and some other issues, we want to export a test.options object as part of the k6/execution API.
The common exported config object export const options = { ... } has some lack, it hasn't the capability to get accurate values within the VU's code like the following example:
exportdefaultfunction(){console.log(options.tags.mytag);// it prints undefined}
The issue is that options get overwritten after they get merged with everything else (cli flags, env and so on). This overwriting though for some reason is really complicated and in this particular case options.tags is just set to its internal type that is a wrapper around a map, not just a map. As such it does not have properties such as mytag.
As a branch of #2259 issue and as a useful utility for having a more consistent behaviour for #796 and some other issues, we want to export a
test.options
object as part of thek6/execution
API.The common exported config object
export const options = { ... }
has some lack, it hasn't the capability to get accurate values within the VU's code like the following example:The why is extensively explained by this comment:
Proposal
goja.Object
the available consolidated and derived config from thelib.State.Options
.options
object is executed. (Maybe also on getting?)The text was updated successfully, but these errors were encountered: