My JUnit tests require three environment variables to be set. It is infuriating to have to set these for each new test class.
How can I avoid this?
Select Run > Edit Configurations...
, open the Defaults
(Templates
since IDEA 2020) node in the left tree and select JUnit
. Now add your environment variables in the main panel and click Apply
or OK
. From now on, those variables will be added to every new JUnit run configuration in your project.