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.
