You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jiangshachina <ji...@gmail.com> on 2006/11/05 05:24:30 UTC

Add non-unit test in testSourceDirectory?

I find only unit test codes could be putted into dir testSourceDirectory, or
Maven would say "No Java test frameworks found".
Can I put non-test codes into the diretory?
How to config?
Thanks!

a cup of Java, cheers!
Sha Jiang
-- 
View this message in context: http://www.nabble.com/Add-non-unit-test-in-testSourceDirectory--tf2576286s177.html#a7181906
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: Add non-unit test in testSourceDirectory?

Posted by jiangshachina <ji...@gmail.com>.
I see.
Sometimes, I may have some non-JUnit codes. The codes also have testing
functions, but aren't used for final application.
I just put them into test source directory.

a cup of Java, cheers!
Sha Jiang


franz see wrote:
> 
> Good day to you, jiangshachina,
> 
> You can put anything you want in your src/main/test. but by default, it
> will treat src/main/test/**/*Test.java as JUnit tests thus, it will run
> those. 
> 
> Cheers, 
> Franz
> 
> 
> Arnaud Bailly-3 wrote:
>> 
>> jiangshachina <ji...@gmail.com> writes:
>> 
>>> From another view, can maven-surefire-plugin do this work, run test
>>> classes
>>> and skip non-test classes?
>>>
>> 
>> AFAIK, you can put pretty much anything you want in test source
>> directroy. Surefire plugin will detect test cases and suites for a
>> number of frameworks and run them. You may have support classes for
>> running your tests...
>> 
>> HTH
>> -- 
>> OQube < software engineering \ génie logiciel >
>> Arnaud Bailly, Dr.
>> \web> http://www.oqube.com
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Add-non-unit-test-in-testSourceDirectory--tf2576286s177.html#a7183337
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: Add non-unit test in testSourceDirectory?

Posted by franz see <fr...@gmail.com>.
Good day to you, jiangshachina,

You can put anything you want in your src/main/test. but by default, it will
treat src/main/test/**/*Test.java as JUnit tests thus, it will run those. 

Cheers, 
Franz


Arnaud Bailly-3 wrote:
> 
> jiangshachina <ji...@gmail.com> writes:
> 
>> From another view, can maven-surefire-plugin do this work, run test
>> classes
>> and skip non-test classes?
>>
> 
> AFAIK, you can put pretty much anything you want in test source
> directroy. Surefire plugin will detect test cases and suites for a
> number of frameworks and run them. You may have support classes for
> running your tests...
> 
> HTH
> -- 
> OQube < software engineering \ génie logiciel >
> Arnaud Bailly, Dr.
> \web> http://www.oqube.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Add-non-unit-test-in-testSourceDirectory--tf2576286s177.html#a7183270
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: Add non-unit test in testSourceDirectory?

Posted by jiangshachina <ji...@gmail.com>.
I checked the matter again.
I added junit jar file to dependencies, then the problem is resolved.
I ever thought that junit is depended automatically(implicitly).

a cup of Java, cheers!
Sha Jiang


Arnaud Bailly-3 wrote:
> 
> jiangshachina <ji...@gmail.com> writes:
> 
>> From another view, can maven-surefire-plugin do this work, run test
>> classes
>> and skip non-test classes?
>>
> 
> AFAIK, you can put pretty much anything you want in test source
> directroy. Surefire plugin will detect test cases and suites for a
> number of frameworks and run them. You may have support classes for
> running your tests...
> 
> HTH
> -- 
> OQube < software engineering \ génie logiciel >
> Arnaud Bailly, Dr.
> \web> http://www.oqube.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Add-non-unit-test-in-testSourceDirectory--tf2576286s177.html#a7183230
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: Add non-unit test in testSourceDirectory?

Posted by Arnaud Bailly <ab...@oqube.com>.
jiangshachina <ji...@gmail.com> writes:

> From another view, can maven-surefire-plugin do this work, run test classes
> and skip non-test classes?
>

AFAIK, you can put pretty much anything you want in test source
directroy. Surefire plugin will detect test cases and suites for a
number of frameworks and run them. You may have support classes for
running your tests...

HTH
-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


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


Re: Add non-unit test in testSourceDirectory?

Posted by jiangshachina <ji...@gmail.com>.
>From another view, can maven-surefire-plugin do this work, run test classes
and skip non-test classes?

a cup of Java, cheers!
Sha Jiang


jiangshachina wrote:
> 
> I find only unit test codes could be putted into dir testSourceDirectory,
> or Maven would say "No Java test frameworks found".
> Can I put non-test codes into the diretory?
> How to config?
> Thanks!
> 
> a cup of Java, cheers!
> Sha Jiang
> 

-- 
View this message in context: http://www.nabble.com/Add-non-unit-test-in-testSourceDirectory--tf2576286s177.html#a7182518
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