JUnit params

Hi,

I'm wondering how to access the "test runner parameters" that you can set in the JUnit config dialog, from within my test methods. The presumably synonymous program parameters in the application config dialog are passed in as the String[] args to main, but main is never called when using junit integration. I've seen several other queries in this forum about the same thing, but no answers. Docs do not tell me anything - I cannot find anything more than ~"pass parameters to test runner".

Thanks for any tips!

J

3 comments
Comment actions Permalink

So is this a bug? You can enter parameters for a unit test but you can't use them? What are people doing to get dynamic info into their tests? System properties? Property files? This is IJ 4.5.4, btw.

0
Comment actions Permalink

Julian Wood wrote:

So is this a bug? You can enter parameters for a unit test but you can't use them? What are people doing to get dynamic info into their tests? System properties? Property files? This is IJ 4.5.4, btw.


I usually use a system property to point out a properties file to read
more properties from.

/Kreiger



Attachment(s):
signature.asc
0

Please sign in to leave a comment.