You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ole Ersoy <ol...@yahoo.com> on 2006/07/24 17:20:39 UTC

JUnit Output Directory

Hi,

Does anyone know whether I can specify which directory
a junit test will run in.

If I run them the way they are, all the output will go
in the root project directory, however I prefer if it
goes into src/test/output.

Thanks,
- Ole




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: JUnit Output Directory

Posted by Douglas Ferguson <do...@epsiia.com>.
I am trying to test a class that produces a file. I'd like the file to be
generated in the target directory.
Is there a way to pass the target directory to JUnit. 
The documenation on surefire says that system properties won't evaluate
non-string properties, speicifically siting this example 

"...will literally pass $project.build.outputDirectory because the value of
that expression is a File, not a String."


http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html


Denis Cabasson wrote:
> 
> 
> Ole Ersoy wrote:
>> 
>> Hi,
>> 
>> Does anyone know whether I can specify which directory
>> a junit test will run in.
>> 
> 
> What kind of output do your Junit tests have?
> 
> IMHO, Junit shouldn't have any output, except for failure of the test.
> Junit is about automatised tests. Such test shouldn't have any output.
> Moreover, if your tests have any output, it should definitly goes in the
> target directory, not in the src...
> 
> Denis.
> 
> 

-- 
View this message in context: http://www.nabble.com/JUnit-Output-Directory-tf1993004.html#a6602074
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: JUnit Output Directory

Posted by Denis Cabasson <de...@insee.fr>.

Ole Ersoy wrote:
> 
> Hi,
> 
> Does anyone know whether I can specify which directory
> a junit test will run in.
> 

What kind of output do your Junit tests have?

IMHO, Junit shouldn't have any output, except for failure of the test. Junit
is about automatised tests. Such test shouldn't have any output.
Moreover, if your tests have any output, it should definitly goes in the
target directory, not in the src...

Denis.

-- 
View this message in context: http://www.nabble.com/JUnit-Output-Directory-tf1993004.html#a5481005
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org