JUnit supports a child element <jvmarg ...> which should do what you want.
I assume you were using the fork=yes attribute since this starts a new JVM for the test run, thus the parameters you send into ant at the command line ant -Dfoo=bar do not necessarily propagate to the JVM running the tests.
How do I set file.encoding for a junit test in ant?
最新推荐文章于 2024-08-26 22:23:00 发布