We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Javascript templating issue in latest version of k6
working - docker run -v ${PWD}:/test loadimpact/k6:0.39.0-24-g0127a508 run /test/test-1.js
docker run -v ${PWD}:/test loadimpact/k6:0.39.0-24-g0127a508 run /test/test-1.js
not working - docker run -v ${PWD}:/test loadimpact/k6:0.39.0-25-ge2316a28 run /test/test-1.js
docker run -v ${PWD}:/test loadimpact/k6:0.39.0-25-ge2316a28 run /test/test-1.js
/* conf-test-1.js */ export const options = { stages: [ { duration: '5s', target: 2 } ], thresholds: { 'http_req_duration': ['p(99)<1500'] }, }; export function get_url(){ return `${BASE_URL}/auth/token/login/`; } /* test-1.js */ import http from 'k6/http'; import { check, group, sleep } from 'k6'; import { get_url } from './conf-test-1.js' export { options } from './conf-test-1.js' const BASE_URL = 'https://test-api.k6.io'; const USERNAME = 'TestUser'; const PASSWORD = 'SuperCroc2020'; export default () => { const loginRes = http.post(get_url(), { username: USERNAME, password: PASSWORD, }); const authHeaders = { headers: { Authorization: `Bearer ${loginRes.json('access')}`, }, }; const myObjects = http.get(`${BASE_URL}/my/crocodiles/`, authHeaders).json(); check(myObjects, { 'retrieved crocodiles': (obj) => obj.length > 0 }); sleep(1); };
The text was updated successfully, but these errors were encountered:
grafana/k6#2623 (comment)
Sorry, something went wrong.
No branches or pull requests
Javascript templating issue in latest version of k6
working -
docker run -v ${PWD}:/test loadimpact/k6:0.39.0-24-g0127a508 run /test/test-1.js
not working -
docker run -v ${PWD}:/test loadimpact/k6:0.39.0-25-ge2316a28 run /test/test-1.js
The text was updated successfully, but these errors were encountered: