What Variable type is best for path variables?

Are environment variables best for this? It seems too high level but I think that’s all that is working for parameterization of path variables in a request.

Update: I think collection variables are best actually.

Hi @TesterShaner,

It largely depends on your preference, but you might like to read the following documentation about variable scopes (and when they’re each recommended):

In general, collection variables are better if they’re for elements which would remain the same regardless of which environment you’re running against. So, consider this example URL below:

{{baseUrl}}/customers/{{customerId}}

In this situation, baseUrl would normally be set as an environment variable, so (for example) you can set the variable differently for your Production and Testing environments. On the other hand, customerId might be a collection variable, but only if you want to test with the same customer IDs in each environment; if the data is dynamic/different, then you may also want to set this as an environment variable.

1 Like