I have created multiple ChainBuilders that utilize Pebble templates in their http requests.
Throughout the simulation I am setting variables to the session.
In the chain builders the variables I set to the session are still present but their values are set to null.
I am following the documentation when setting session variables.
Is this some asynchronous issue?
Does this mean I need to be extremely explicit on what I set in each session?
My idea is that if I set the size property on a session once, that all following chains can lookup size and it will be 6, until its overwritten or another session starts which could have a different size.
You are correct, that is why I reassign the result of x.set to the session variable. To overwrite the session after using set.
When I debug in IntelliJ. The session’s attributes map contains the keys that I set earlier, its just that their values are null. I know from earlier experience if I did not overwrite the session that the keys wouldnt exists in the sessions attribute map.
Both ChainBuilders are executed in the same ScenarioBuilder. The chain builders are held in seperate classes.
So the ScenarioBuilder looks like
ScenarioBuilder scn = scenario("Find and Eat A Fruit")
.exec(new FindClass().findFruit())
.exec(new EatClass().eatFruit())
Turns out the nulls came from an incorrect Key used in a get on a Java Map, which was later used in a session set. Thats where the magic nulls came from.