Hello,

I appreciate your help Brian!

I changed my POM as follows:

*<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit4</artifactId>
                        <version>2.7.2</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                </configuration>
  </plugin>*

It now seems "something" is being run. Here is the output now:
*-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running TestSuite
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.769 sec

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0*

Notice the "Running TestSuite". However it still fails to find my test
methods. I suspect it might have to do with this:

*[DEBUG] Adding to surefire test classpath:
/home/julien/.m2/repository/org/apache/maven/surefire/surefire-testng/2.4.3/surefire-testng-2.4.3.jar
[DEBUG] Adding to surefire test classpath:
/home/julien/.m2/repository/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.jar
[DEBUG] Adding to surefire test classpath:
/home/julien/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
[DEBUG] Adding to surefire test classpath:
/home/julien/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[DEBUG] Adding to surefire test classpath:
/home/julien/.m2/repository/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3.jar
*
Notice it says it is using version 3.8.1 of Junit...

However it goes on to say:
Test Classpath :
...
*[DEBUG]   /home/julien/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar*
...

So what is the difference between the "surefire test classpath" and the
"Test classpath"?

Here is how my test method is named and annotated:
   *@Test
    public void test() {*
...

Any idea what is wrong?
J.


2011/7/19 Brian Topping <[email protected]>

> Julien,
>
> Sorry I didn't notice you had responded.  Like most mailing lists, one
> thing to keep in mind is we're all doing this for free and at one time or
> another someone helped us out.  So we're just returning the favor.
>
> Anyway, your logs show the line:
>
> > [DEBUG]   (f) testSourceDirectory =
> > /home/julien/Documents/donnees/projets/Site emploi
> > finance/java/cheetah/web/src/test/java
>
> I see you made many changes like removing spaces and that would have also
> been my first suggestion.
>
> Now, please run the mvn command with -X again.  There's no need now to send
> the entire file, just search through the output for "testSourceDirectory"
> and make sure you can do "ls /home/julien/Documents/donnees/projets/Site
> emploi finance/java/cheetah/web/src/test/java" from the command line, for
> instance, but using whatever the new output from that line is.
>
> Also, take a look at the web page for the surefire plugin configuration at
> http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html.
>  Note how testSourceDirectory is documented there, along with every other
> parameter in your -X output.  Pay close attention to each one, mapping it
> back to the documentation, then ask questions about the ones you don't
> understand and think might be causing problems.
>
> In the worst case, regenerate the project using a project archetype in a
> second directory and look how it gets set up there.
>
> Cheers, Brian
>
> On Jul 19, 2011, at 2:36 AM, Julien Martin wrote:
>
> > up
> >
> > 2011/7/17 Julien Martin <[email protected]>
> >
> >> Hello Thomas and thank you for the reply,
> >> Yes the tests are indeed located there.
> >> I was not able to reproduce the bug unfortunately...
> >> Does anyone have any idea where else to look for a problem?
> >> Regards,
> >> Julien.
> >>
> >>
> >>
> >> 2011/7/17 Thomas Sundberg <[email protected]>
> >>
> >>> Hi Julien!
> >>>
> >>> You still haven't told us where your tests are locted. They should be
> >>> located in the directory
> >>>
> >>> src/test/java/com/cheetah/web/pages
> >>>
> >>> to be picked up and executed by Surefire.
> >>>
> >>> Is it possible to clone your project, remove almost everything and
> >>> keep a Hello world so you are able to locate the problem with a
> >>> minimal set of possible problems and then add the things you want,
> >>> step by step?
> >>>
> >>> HTH
> >>> Thomas
>
> <snip/>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to