Hi Team,
I’m facing this issue:
Contents of home/vivekchamoli/K6/requests/GET_ListTodos.js file
import http from ‘k6/http’;
export function GET_ListTodos() {
let base_url= ‘https://gorest.co.in’;let resp_GET_ListTodos = http.get(base_url + '/public/v1/todos', { tags: {name: 'GET_ListTodos'} }); check( resp_GET_ListTodos, { 'is status 200': (r) => r.status === 200 } );
}
Contents of scenarios/gorest_test.js:
import { GET_ListTodos } from ‘/home/vivekchamoli/K6/requests/GET_ListTodos.js’;
export let options = {
scenarios: {
scenario_GET_ListTodos: {
executor: ‘ramping-vus’,
exec: ‘GET_ListTodos’ ,
stages: [
{ duration: ‘5s’, target: 50 },
{ duration: ‘5s’, target: 0}
]
}
}
}
When I’m running:
k6 run scenarios/gorest_test.js
Getting this error:
ERRO[0000] no exported functions in script
Please help…