0
응답 본문을 동적으로 검증하려고합니다. 사용자 권한에 따라 다른 본문을 반환하는 종점이 있습니다. 예를 들어 :Gatling의 동적 체크 빌드
user: a
{
"one": "a",
"two": "b"
}
user: b
{
"one": "a",
"three": "c"
}
내가 한 JSON 필드가 이런 방식으로 존재인지 아닌지 검증하는 jsonPath
를 사용할 수 있다는 것을 알고, 내가 공급 장치를 사용하여, 그것은 구성 만들고 싶어하지만
http("Request")
.get(url)
.header(user_a_token)
.check(jsonPath("one").exists)
.check(jsonPath("two").exists)
.check(jsonPath("three").notExists)
또는 다음과 같습니다.
http("Request")
.get(url)
.header(user_token)
// iterate a list of Strings with the json field names
생각 하시겠습니까?