Difference Between SL.variables and $.ctx


(Kmeister) #1

After looking at the docs here:

I’m confused what the difference between SL.variables and $.ctx are?

I’ve only been using $.ctx including storing data for use on other requests.
I am wondering if this is best practice.


(Kmeister) #2

Ah, I think i figured it out. $.ctx is available for anything building the request or capturing.
SL.variables is only avail in Script blocks.


(Taylor Barnett) #3

Context variables ($.ctx) are scoped to the scenario, and are reset on every test run. So if the data you are storing and using on other requests are on the same scenario. This should work.


(Taylor Barnett) #4