You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.
importhttpfrom"k6/http";import{check}from"k6";leturl,opts,r;exportletoptions={stages: [{target: 1,duration: "1s"}]};exportdefaultfunction(data){if(__VU>=1&&__VU<=1){if(__ITER<1){url="https://test.loadimpact.com/";opts={redirects: 999};r=http.request("GET",url,"",opts);check(r,{"Status code is 200": r=>{returnr.status==="200";}});}}}
As the check is using equality without type coercion we either need to make sure the response status entered by user in JMeter is converted to an integer when code is generated or that the check is == with type coercion, or the Status code is 200 check will fail. I think the former would be preferred, but maybe not possible.
The text was updated successfully, but these errors were encountered:
The following JMX:
Converts to this JS:
As the check is using equality without type coercion we either need to make sure the response status entered by user in JMeter is converted to an integer when code is generated or that the check is
==
with type coercion, or theStatus code is 200
check will fail. I think the former would be preferred, but maybe not possible.The text was updated successfully, but these errors were encountered: