You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by MrPotatoe <gr...@gmail.com> on 2009/11/11 16:14:53 UTC
There are no tests to run
Hi,
I have set up maven to run my test.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<includes>
<include>${basedir}/src/**/Test*.java</include>
</includes>
</configuration>
</plugin>
I have several tests, inherited from TestCase
public class TestToy extends TestCase {
public void testPrueba(){
...
But when I run mvn test I get:
[WARNING] Not decrypting password for server 'gmr-central' due to exception
in s
ecurity handler.
Ensure that you have configured your master password file (and relocation if
app
ropriate)
See the installation instructions for details.
Cause: ***.m2\settings-security.xml (El sistem
a no puede hallar el archivo especificado)
[WARNING] Not decrypting password for server 'subversion' due to exception
in se
curity handler.
Ensure that you have configured your master password file (and relocation if
app
ropriate)
See the installation instructions for details.
Cause: ***.m2\settings-security.xml (El sistem
a no puede hallar el archivo especificado)
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building
[INFO] task-segment: [test]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources,
i.e. build is platform dependent!
[INFO] Copying 5 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
***workspace\Proyecto\src\test\resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: ***\Proyecto\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 minute 16 seconds
[INFO] Finished at: Wed Nov 11 14:59:09 GMT 2009
[INFO] Final Memory: 16M/30M
[INFO]
------------------------------------------------------------------------
Thanks
--
View this message in context: http://old.nabble.com/There-are-no-tests-to-run-tp26302586p26302586.html
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: There are no tests to run
Posted by MrPotatoe <gr...@gmail.com>.
Thank you all. It works:
<build>
...
<testSourceDirectory>${basedir}/src/es/gmrcanarias/pandora/test</testSourceDirectory>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<includes>
<include>**/Test*.java</include>
</includes>
</configuration>
</plugin>
--
View this message in context: http://old.nabble.com/There-are-no-tests-to-run-tp26302586p26315293.html
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: There are no tests to run
Posted by "Adam Leggett (UPCO)" <ad...@upco.co.uk>.
If you absolutely *must* put your tests in a dir other than the
convention then you can configure that too:
http://maven.apache.org/pom.html#Directories
On Wed, 2009-11-11 at 09:48 -0600, Wayne Fay wrote:
> > <includes>
> > <include>${basedir}/src/**/Test*.java</include>
> > </includes>
>
> In Maven, tests belong in ${basedir}/src/test/java. Move them there,
> remove this include from surefire plugin node, and everything should
> run just fine. (AKA stop fighting Maven and start using it, drink the
> kool-aid, etc...)
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: There are no tests to run
Posted by Wayne Fay <wa...@gmail.com>.
> <includes>
> <include>${basedir}/src/**/Test*.java</include>
> </includes>
In Maven, tests belong in ${basedir}/src/test/java. Move them there,
remove this include from surefire plugin node, and everything should
run just fine. (AKA stop fighting Maven and start using it, drink the
kool-aid, etc...)
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: There are no tests to run
Posted by Anders Hammar <an...@hammar.net>.
I think your include line should be
<include>**/Test*.java</include>
http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusion.html
Then try
mvn clean test
If you still have problems, check that the surefire plugin doesn't say "No
sources to compile" (as it does in your post below), as that would suggest
that it doesn't find your test classes (i.e. you've put them in the wrong
directory).
/Anders
On Wed, Nov 11, 2009 at 16:14, MrPotatoe <gr...@gmail.com> wrote:
>
>
> Hi,
>
> I have set up maven to run my test.
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.4.3</version>
> <configuration>
> <includes>
> <include>${basedir}/src/**/Test*.java</include>
> </includes>
> </configuration>
> </plugin>
>
> I have several tests, inherited from TestCase
>
> public class TestToy extends TestCase {
> public void testPrueba(){
> ...
>
> But when I run mvn test I get:
>
> [WARNING] Not decrypting password for server 'gmr-central' due to exception
> in s
> ecurity handler.
> Ensure that you have configured your master password file (and relocation
> if
> app
> ropriate)
> See the installation instructions for details.
> Cause: ***.m2\settings-security.xml (El sistem
> a no puede hallar el archivo especificado)
> [WARNING] Not decrypting password for server 'subversion' due to exception
> in se
> curity handler.
> Ensure that you have configured your master password file (and relocation
> if
> app
> ropriate)
> See the installation instructions for details.
> Cause: ***.m2\settings-security.xml (El sistem
> a no puede hallar el archivo especificado)
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building
> [INFO] task-segment: [test]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources,
> i.e. build is platform dependent!
> [INFO] Copying 5 resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources,
> i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> ***workspace\Proyecto\src\test\resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] No sources to compile
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: ***\Proyecto\target\surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
>
> Results :
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 minute 16 seconds
> [INFO] Finished at: Wed Nov 11 14:59:09 GMT 2009
> [INFO] Final Memory: 16M/30M
> [INFO]
> ------------------------------------------------------------------------
>
> Thanks
> --
> View this message in context:
> http://old.nabble.com/There-are-no-tests-to-run-tp26302586p26302586.html
> 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: There are no tests to run
Posted by Upul Godage <up...@gmail.com>.
If you don't have the test classes in the default location maven is
looking, src/test/java, then you have to give the location.
<build>
<testSourceDirectory>src/test</testSourceDirectory>
The includes are relative to that location, I think.
Upul
On Wed, Nov 11, 2009 at 8:44 PM, MrPotatoe <gr...@gmail.com> wrote:
>
>
> Hi,
>
> I have set up maven to run my test.
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.4.3</version>
> <configuration>
> <includes>
> <include>${basedir}/src/**/Test*.java</include>
> </includes>
> </configuration>
> </plugin>
>
> I have several tests, inherited from TestCase
>
> public class TestToy extends TestCase {
> public void testPrueba(){
> ...
>
> But when I run mvn test I get:
>
> [WARNING] Not decrypting password for server 'gmr-central' due to exception
> in s
> ecurity handler.
> Ensure that you have configured your master password file (and relocation if
> app
> ropriate)
> See the installation instructions for details.
> Cause: ***.m2\settings-security.xml (El sistem
> a no puede hallar el archivo especificado)
> [WARNING] Not decrypting password for server 'subversion' due to exception
> in se
> curity handler.
> Ensure that you have configured your master password file (and relocation if
> app
> ropriate)
> See the installation instructions for details.
> Cause: ***.m2\settings-security.xml (El sistem
> a no puede hallar el archivo especificado)
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building
> [INFO] task-segment: [test]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources,
> i.e. build is platform dependent!
> [INFO] Copying 5 resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources,
> i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> ***workspace\Proyecto\src\test\resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] No sources to compile
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: ***\Proyecto\target\surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
>
> Results :
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 minute 16 seconds
> [INFO] Finished at: Wed Nov 11 14:59:09 GMT 2009
> [INFO] Final Memory: 16M/30M
> [INFO]
> ------------------------------------------------------------------------
>
> Thanks
> --
> View this message in context: http://old.nabble.com/There-are-no-tests-to-run-tp26302586p26302586.html
> 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
>
>
--
http://upulgodage.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org