If else condition inside check in gatling

Hi ,

I need to implement a if else condition in my gatling check. For example in below i might get items array in json response as empty. So i need to check if items is empty i need to execute another set of action. Can you please let me know how I can achieve this.


When using a check, the default verify step is exists, so you have to use “whatever” instead if having your check find nothing is acceptable:

Then, you can use a doIf in order to perform a chain of actions on certain conditions:

For example:
doId(session => !session.isAttributeDefined(“MyAlbumId”)) {