Mocking Environment Variables
Sometimes, your app might behave differently depending on an ENV variable's value or presence/absence.
Ideally, you'd want the values of a few important ENV vars to be the same across RECORD and REPLAY modes. You can achieve this by telling the hypertest sdk what these important ENV vars are.
Hypertest will monitor the important ENV vars in RECORD mode, and mock this value u REPLAY MODE transparently for you.
Monitoring only works in server contexts (inside an http/grpc/amqp etc request) and not for root contexts
This is how you tell hypertest to monitior specific env vars
You can only set important env variables once, so do this after the SDK has been initialized at the start of your application
Last updated