Pebble Templating dot (.) notation

Hi all,

I am having issues resolving the dot (.) notation of pebble templating in Gatling to retrieve attributes of variables, such as Map key values.

Here’s an example of a session attribute that I’ve defined:

session => session.set("location", Map("text" -> "Alabama"))

I’m trying to replace {{ location.text }} in the following json template file with the value “Alabama”:

   "text": "{{ location.text }}",

However, it looks like Gatling is unable to resolve the attribute, and therefore, the result is an empty string.

I am using version 3.2.1 of Gatling.

Any help would be appreciated, thanks!

Pebble is a Java library, so you can’t expect it to support Scala Map.

Ah, that would make sense.

After converting the map to a java.util.Map datatype using scala.collection.JavaConverters, I was able to successfully use Pebble dot (.) notation for traversing the map.