# Context Variables (scenario parameters)

In a manner similar to traditional programming languages, the platform supports context (local) *variables*. These variables are designed for use within specific scenarios, and their scope is limited to the execution of those scenarios. In all other cases, they are assigned a *null* value.

## Adding context parameters in START step settings

You can setup context variables when creating a scenario ([START step](https://readme.directual.com/scenarios/editing-scenarios/system-steps/start-step) settings, **Parameters** tab):

![](https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Nnmtk9_gFGWOddsf6%2F-M6jEDhtYxwG-13OqPqI%2F-M6jdA_SNBwgpjJ4b1x0%2FCV.jpg?alt=media\&token=d355913f-2e4f-47a1-8a79-3b2b76224938)

## Using context variables in scenarios

You can both *write* and *read* context variables in your scenario as if they were regular object fields. You can invoke this variable typing or choosing `{{ContextVar.variableName}}`

## Setting up context parameters values in Link scenario step

You can set the context variables values in [Link scenario](https://readme.directual.com/scenarios/editing-scenarios/system-steps/link-scenario-step) step:

![](https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Nnmtk9_gFGWOddsf6%2F-MDnQKrEj-gZ_Gs__9tj%2F-MDpeGtuPDhFyGbggq9_%2Fcontext_vars.jpg?alt=media\&token=9c3085c7-3048-4cd4-8fd2-d9e7829020b3)

## Testing blocks with context variables

{% hint style="warning" %}
As mentioned before, a variable receives value only during the scenario run. Therefore, when testing blocks via [testing step](https://readme.directual.com/scenarios/testing-and-debugging), if set, the current value is returned.
{% endhint %}

![](https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Nnmtk9_gFGWOddsf6%2F-M6jEDhtYxwG-13OqPqI%2F-M6jdEKzJXB71xyu0AXs%2FCV-test.jpg?alt=media\&token=ba279081-a62f-47d6-918a-38439cc518ca)
