Automatically add properties when running JUnit in Eclipse

后端 未结 5 902
猫巷女王i
猫巷女王i 2021-02-04 05:08

In order to run my unit tests on my Eclipse, I need to set some properties for the VM.

Thus, when I first run my JUnit test, I go in \"Open Run Dialog\", then in my JUni

5条回答
  •  无人及你
    2021-02-04 05:34

    Agreed used method in this way in one of my junit tests and it worked

    
    
         @BeforeClass
            public static void setupProperties() {
                System.setProperty("catalina.base", "C:\\sam-tomcat-7.0.42");
            }
    
    

提交回复
热议问题