I want to have some of my JUNit tests write additional files to the
"results" directory. I know I could easily hack my code to write to
that directory, but is there some elegant way that I can tap into the
JUnit "todir" attribute from within the context of the TestCase class.
Philip.Lourandos@gmail.com - 23 May 2007 17:02 GMT
> I want to have some of my JUNit tests write additional files to the
> "results" directory. I know I could easily hack my code to write to
> that directory, but is there some elegant way that I can tap into the
> JUnit "todir" attribute from within the context of the TestCase class.
I'm not too sure about retrieving the toDir from junit. But you could
always set a system property in ant(assuming you are using ant). With
spring I have a test application context I have all directories and
other test beans configured in.