apirestful-authenticationrunscope

How to save global variable in runscope


I want to save a value from 1 API request body to Shared Environments.Where i can use that value in other API`s Test(So how to reuse in another request body and headers).

Note: I don`t want to use subtest.


Solution

  • We don't have a built-in way to set environment variables during test execution. We have a workaround using the Runscope API you can use. I'm not sure why you don't want to use a subtest, but encapsulating this request to the Runscope API in a subtest is the best way to do it in a reusable manor.