Hi,
I was trying to migrate to 3.0 version but I have problem with http status check,.
Most likely I’m missing something but I don’t understand what changed in 3.0
I had this code
def reportScenario(duration:DurationInt,exitAsap:Boolean=false) = {
during(duration.seconds, "counter", exitAsap) {
exec(
http("GetCost by Month ProductName")
.post("v2/aggregate")
.body(
StringBody(BodyStringsAws.reportsOverViewByProduct(
Constants.startDate, Constants.endDate,
s""" "Tenant":["${Tenants.Flex} "]""",
""" "operation","tenant" """
))).asJSON
.check(status.is(400))
).pause(Constants.pauseDuration)
}
}
}
In 2.3 this check was working but in version 3.0 I have error
found : io.gatling.core.check.CheckBuilder[io.gatling.http.check.status.HttpStatusCheckType,io.gatling.http.response.Response,Int]
with io.gatling.core.check.SaveAs[io.gatling.http.check.status.HttpStatusCheckType,io.gatling.http.response.Response,Int]
[error] required: io.gatling.http.check.HttpCheck
[error] .check(status.is(400))
For get request it’s seems that it’s OK.
Any suggestions ?
Lukasz