0

I have problem with compare to types. I try to get some parameter from json and then compare it with String value. It looks like:

val x: HttpCheck = jsonPath("some path").saveAs("x")

and then

.exec(some code).asLongAs(x != "aaa") {
    some code
}

In this way it doesn't work. In know that I trided to comapre two diffrent types and I don't know how to convert HttpCheck to String. Do have any idea how to resolve this problem? Thanks for your help.

mpm
  • 3,534
  • 23
  • 33
vott
  • 53
  • 8

1 Answers1

0

You dont have an x value. All you have is session that stored something under "x" key. To retrive it from session you eithrer can do it explicitly

session.get("x").as[String]

or try to use Gatling EL "${x}". This might work:

.exec(some code).asLongAs("${x}" != "aaa") {
    some code
}
mpm
  • 3,534
  • 23
  • 33