Hi,
I have a problem with assertions, maybe I’m doing something wrong but I don’t have any ideas where I should look for a fix.
So my solution looks like this:
I have a function for creating the scenario
object Utils {
def createScenario(name:String,chains:ChainBuilder*):ScenarioBuilder={
scenario(name).exec(chains)
}
}
Then I have my scenario
object Product {
def reportScenario(duration:DurationInt,exitAsap:Boolean=false) = {
during(duration.seconds, "counter", exitAsap) {
exec(
http("Get Cost")
.post("/aggregate")
.body(
StringBody(BodyStrings.ByProduct(Constants.startDate, Constants.endDate,
s""" "Tenant":["${Tenants.*User*} "]""",
""" "month", "productname""""
))).asJSON
.check(status.is(200))
).pause(Constants.pauseDuration)
.exec(
http("Get usage")
.post("aggregate/usage")
.body(
StringBody(BodyStrings.ByProduct(Constants.startDate, Constants.endDate,
s""" "Tenant":["${Tenants.*User*} "]""",
""" "month", "usagetype""""
))).asJSON
.check(status.is(200))
).pause(Constants.pauseDuration)
.exec(
http("Get enant")
.post("aggregate/tenant")
.body(
StringBody(BodyStringsAws.ByProduct(Constants.startDate, Constants.endDate,
s""" "Tenant":["${Tenants.User} "]""",
""" "month", "tenant""""
))).asJSON
.check(status.is(200)) )
}
}
I run it from this class