录制接口如下
.exec(http("request_0")
.post("/dologin.json")
.headers(headers_0)
.formParam("userForm.email", "xxxxxxx")
.formParam("userForm.password", "xxxxxx")
.resources(
http("request_2")
.get("/")
.headers(headers_2),
http("request_5")
.post("/ajax/websiteProfile/online.json")
.headers(headers_5),
http("request_6")
.post("/user/loginuser.json")
.headers(headers_5),
http("request_7")
.post("/islogin.json")
.headers(headers_5),
http("request_8")
.post("/shopCart/ajax/shopcartnums.json")
.headers(headers_0)
.formParam("type", "1"),
http("request_9")
.post("/letter/queryUnReadLetter.json")
.headers(headers_5),
http("request_10")
.post("/front/ajax/course.json")
.headers(headers_10)
.formParam("subjectId", "0"),
http("request_11")
.post("/ajax/subject.json")
.headers(headers_11),
http("request_12")
.post("/front/ajax/article/getImportantArtile.json")
.headers(headers_5),
http("request_13")
.post("/ajax/subject/course.json")
.headers(headers_10)
.formParam("subjectId", "260")))
因为单测 dologin 接口的性能还 ok,但是录制登陆场景走的是如上请求,并发不到多少就挂了,
没有理解.resources(http("request_1").....) 的形式对性能有所影响,请大神指教。