In IntelliJ, how do I set default environment variables for new test configurations?

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.

enter image description here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)