2
ガトリング荷重テストが初めてです。そして、私は応答にエラー(406許容できない)を得た私の簡単なproject.Butの負荷テストをしたいと私のガトリングコードがガトリング荷重テストエラー:応答で406が受け入れられない
import io.gatling.core.Predef._
import io.gatling.http.Predef._
class simu extends Simulation {
val httpConf = http
.baseURL("http://172.24.15.225:10050/sample")
.header(HttpHeaderNames.Accept, HttpHeaderValues.ApplicationJson)
.acceptHeader("application/json, text/plain, */*")
.acceptEncodingHeader("gzip, deflate")
.acceptLanguageHeader("en-US,en;q=0.5")
val scn = scenario("Scenario Name")
.exec(
http("request_1")
.post("http://172.24.15.225:10050/sample")
.header(HttpHeaderNames.Accept, HttpHeaderValues.ApplicationJson)
//.check(status.is(406))
.body(StringBody("""{ "inputData": "Wonderful" }""")).asJSON
)
setUp(scn.inject(atOnceUsers(30)).protocols(httpConf))
}
を下回っており、上記の応答は
failed in Response
Errors ------------------------------------------------------------
status.find.in(200,304,201,202,203,204,205,206,207,208,209),
but actually found 406
人です私のコードを修正してください。 しかしRestAPI(郵便配達員)は応答を正しく返します。
を作品
以下のように私は – user666
..あなたはそれが一瞬受け入れヘッダを削除returning..tryある応答の種類を確認してくださいJSON形式に文字列型からの私の応答を変更しました私はポストマンrestapiを使用しました。応答を正しく返します。また、ヘッダー情報を削除すると、同じエラーが発生します。 – James