Update variables-overview.md

This commit is contained in:
Robert Wallach
2018-03-20 15:27:19 -05:00
committed by GitHub
parent 4a30fb24d6
commit 5a31ed0603

View File

@@ -3,7 +3,7 @@
Variables in Stoplight provide a powerful and intuitive way to dynamically set,
update, and retrieve information at any step in a Scenario.
Variables are stored in an [environment](../editor/environments.md). You can define one or more environments,
Variables are stored in an [environment](/platform/editor-basics/environments). You can define one or more environments,
each with their own variables. This makes it easy to quickly swap out sets of
variables during testing.
@@ -18,13 +18,12 @@ so that the host can quickly be changed to test multiple server locations (devel
There are two scopes for variables, which affect how and when they can be used.
* __Environment Variables__ - Environment variables are scoped to the project, and are shared amongst all steps in your test run. They are persisted between test runs, and are great for data that does not change often (hostnames, ports, etc). See [here](./variables-environment.md) for more information on how to use environment variables.
* __Environment Variables__ - Environment variables are scoped to the project, and are shared amongst all steps in your test run. They are persisted between test runs, and are great for data that does not change often (hostnames, ports, etc). See [here](/testing/using-variables/environment) for more information on how to use environment variables.
* __Context Variables__ - Context variables are scoped to the scenario, and are reset on every test run. They are useful to persist test and application state between scenario steps. Context variables are great for temporary information that is only relevant to the current test run. For example, you might store a newly created `userId` returned in your first step, to be used in the second step. This `userId` changes on every test run, which makes it a good context variable candidate. See [here](./variables-context.md) for more information on how to use context variables.
* __Context Variables__ - Context variables are scoped to the scenario, and are reset on every test run. They are useful to persist test and application state between scenario steps. Context variables are great for temporary information that is only relevant to the current test run. For example, you might store a newly created `userId` returned in your first step, to be used in the second step. This `userId` changes on every test run, which makes it a good context variable candidate. See [here](/testing/using-variables/context) for more information on how to use context variables.
***
**Related**
* [Environment Variables](./variables-environment.md)
* [Context Variables](./variables-context.md)
**Related Articles**
- [$$.env (Environment)](/testing/using-variables/environment)
- [$.ctx(Context)](/testing/using-variables/context)