Parallel Test is giving error

I am trying to run following parallel test. But I get folllowing error.

import “./libs/shim/core.js”;

import “./libs/shim/urijs.js”;

import http from “k6/http”;

import { sleep } from ‘k6’;

export {default as script1} from ‘./test1.js’;

export {default as script2} from ‘./test2.js’;

export let options = {

scenarios: {

    'scenario1': {

        executor: 'per-vu-iterations',

        vus: 10,

        iterations: 10,

        duration: '10s',

        exec: 'script1',

    },

    'scenario2': {

        executor: 'per-vu-iterations',

        vus: 3,

        iterations: 3,

        duration: '15s',

        exec: 'script2',

    },
}

}

I am getting the following error when I execute this.

ERRO[0004] json: unknown field “duration”
ERROR: 255

What am I missing? Is it because script1.js and script2.js have their own separate options and thresholds? I want the ability to run the tests separately as well as in parallel. Is it possible?

Hey @Jay
Welcome to the community :partying_face:

If you want to use executor (per-vu-iterations etc.), you need to use the maxDuration instead of duration. You can review the document below.

Thank you.That worked.