How to set environment variables for running unit tests?

While running those tests I need to set some environment variables such as urls etc so that they point to the correct remote service.

How would I do this in rider? When I right click and "Run Tests", how do I make it to be aware of some files that can be interpreted as Environment variables?

0
3 comments

Hello @...,

 

You can set up environment variables, used during testing via Test Runner's Environment variables option. You can find more about this setting here.

 

Let us know if you have any questions.

4

Is it possible to load environment variables automatically from a file? E.g. an .env file?

0

Please sign in to leave a comment.