Trouble running scenarios

I have looked around and tried to follow some of the examples already covered in other post but still having issues running scenario.

I have multiple scripts (link1.js, link2.js etc ) that I recorded in browser. Now I want to run them as part of a scenario so they get executed at the same time.

Here is sample start.js file which is importing link1.js

import http from "k6/http";
import { url1 } from "./link1.js";


export const options = {
scenarios: {
    scenario_1: {
        executor: 'constant-vus',
        vus: 20,
        duration: '2m',
        gracefulStop: '5s',
        exec: 'url1'
    }
}
};

export function link1 () {
url1()
}

The error I get is-
ERRO[0000] There were problems with the specified script configuration: - Preformatted text executor scenario_1: function 'url1' not found in exports

Any help appreciated. Thanks,

You have exec: 'url1' in the scenario config, but your exported function is called link1. Either set exec: 'link1' or re-export the actual url1 function.

Duh…I see it. That was stupid on my part. Thanks :slight_smile: