0

I need to set some key/value pair in Environment section of Run Configurations file for my JUnit test class. However, if I add this value manually from eclipse, I can't push it to git repository because other people might work on another IDEs. How can I set the environment variable for this test run configuration file from java source code in the test suite? Thanks in advance.

Ahmet Eroğlu
  • 594
  • 1
  • 7
  • 23
  • This should be part of the unit test setup, not part of the IDE configuration. – RealSkeptic Jun 09 '20 at 14:00
  • @RealSkeptic how can I do that setup?:) – Ahmet Eroğlu Jun 09 '20 at 14:03
  • This guide includes an example of how to set system properties from a file at runtime: https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html But I would generally avoid that and rather use configuration from files directly, without setting them as global properties. – kapex Jun 09 '20 at 14:21

0 Answers0