Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow isolated options configuration when running parallel scripts #2944

Closed
pranatikolla opened this issue Feb 27, 2023 · 2 comments
Closed

Comments

@pranatikolla
Copy link

Hello,

I am trying to run two test scripts in parallel by calling their functions within a main script.

export { default as func01 } from './Script1.js';
export { default as func02 } from './Script2.js';

export let optionsFunc02 = {
scenarios: {
executor: 'constant-vus',
gracefulStop: '10s',
duration: '1m30s',
vus: 1,
exec: 'func02',
},
insecureSkipTLSVerify: true
};

export let options = {
scenarios: {
'irisPages' : {
executor: 'constant-vus',
gracefulStop: '10s',
duration: '1m30s',
vus: 1,
exec: 'func01',
},
'addMocks' : optionsFunc02.scenarios,
},

noVUConnectionReuse: true,
noConnectionReuse: true,
insecureSkipTLSVerify: optionsFunc02.insecureSkipTLSVerify

};

However the below three options get applied to both the scripts. I want to be able to set these differently for individual scripts just like we can for scenarios.
noVUConnectionReuse: true,
noConnectionReuse: true,
insecureSkipTLSVerify: optionsFunc02.insecureSkipTLSVerify

@na--
Copy link
Member

na-- commented Feb 27, 2023

This is something that we can't currently do, and it's already tackled in two different issues, so I'll close this one in favor of them:

  1. On the network connection side, it should be possible to specify custom HTTP (and other) clients that don't rely on the global insecureSkipTLSVerify / noConnectionReuse / noVUConnectionReuse / etc. options to define this behavior. This is currently tracked in k6 extension: New experimental HTTP API #2461
  2. On the test execution side, it should be possible for k6 to execute multiple scripts, each with different options. This is currently tracked in Test suites / execute multiple scripts with k6 #1342

Also, please use the issue templates in the future, or ask your questions in the community forum, not as github issues.

@pranatikolla
Copy link
Author

Sure. I'd been asked to raise this issue here by Alex and Pawel so that they can plan and add it to the pipeline.
Thanks for the references though and I will go through them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants