How to take VU ' ids according to Scenerio?

I have two scenerio and 3 VUs totally. In my CreatePicking domain I must call only CreatePicking Vus’ ids. When I use vu.idInInstance option in the CreatePicking function, I ‘m taking 3 id but I want only take 2 VUs’ id of Create Picking. There is no option like vu.idInScenerio. How can I solve this problem?

export const options = {
    scenarios: {
        PickingInProgressForLoadTestSeed: {
            executor: 'per-vu-iterations',
            exec: 'PickingInProgressForLoadTestSeed',
            vus: 1,
            iterations: 1,
            startTime: '0s'
        CreatePicking: {
            startTime: '45s',
            exec: 'CreatePicking',
            executor: 'per-vu-iterations',
            vus: 2,
            iterations: 1,
            maxDuration: '2m',

Tried below but now working again sometimes takes 3th Vus’id

import exec from ‘k6/execution’;

@FloorD @Leandro-SrPerf @mark do u have an idea?

Hey @Yusuf
I am not very sure of what is the question here.
I would advise avoid tagging directly people, but I am happy to answer if I can.
Gove a try to the other id for vu’s.

idInInstance integer The identifier of the VU across the instance.
idInTest integer The globally unique (across the whole test run) identifier of the VU.

Take a look at the possible options here:

Let me know if that was the question, or please clarify a bit further if not.

1 Like