NTLM在K6中请求

时间:2018-04-16 22:09:34

标签: k6

我正在使用发行版v0.20.0-dev-dccb254测试NTLM auth。运行下面脚本的命令行如下所示: bin \ k6.exe运行--vus 3 --duration 30s scripts / getOrder.js

import http from "k6/http";
import { check, sleep } from "k6";

export default function() {
  let res = http.get("http://user:password@localhost:8247/orders/2377", {auth: "ntlm"});
  console.log("Status code: " + res.status);
  check(res, {
    "status was 200": (r) => r.status == 200
  });
  sleep(1);  
};

每个VU的第一个请求成功,但接下来的请求都失败了。这是K6的输出:

duration: 30s, iterations: -
     vus: 3,   max: 3

INFO[0002] Status code: 200                             -
INFO[0002] Status code: 200
INFO[0002] Status code: 200
WARN[0003] Request Failed                                error="Get http://user:password@localhost:8247/orders/2377: Invalid WWW-Authenticate header"
INFO[0003] Status code: 0
WARN[0003] Request Failed                                error="Get http://user:password@localhost:8247/orders/2377: Invalid WWW-Authenticate header"
INFO[0003] Status code: 0
...

0 个答案:

没有答案