Hi, oh, good idea, that solves the debugging problem! But mvn site and jxr still won't work.
Regards /Ernst On Thu, May 7, 2009 at 15:01, Jian Fang <[email protected]> wrote: > There is another workaround for this, for JUnit assert statements, you can > always specify > a message with it. For example, the method > > assertEquals(long expected, long actual) > > has another signature as follows, > > assertEquals(java.lang.String message, long expected, long actual) > > which lets you write some message there. It is also a good coding practice > because > you know what you try to assert. > > Thanks, > > Jian > > > On Thu, May 7, 2009 at 8:44 AM, Ernst <[email protected]> wrote: >> >> Hi, >> >> ok, after some digging I think I understand how it's integrated. >> JXR is nice and all but it's another thing that needs to know which >> source file and line the assert came from to build the cross-reference >> information. >> So it doesn't solve the issue, I still get Unknown Source. >> >> Regards >> /Ernst >> >> On May 6, 4:26 pm, John <[email protected]> wrote: >> > Ernst, >> > >> > The following line >> > >> > at test.SomethingTestCase.testDuplicateName(Unknown Source) >> > >> > indicated that there was no line number information there, otherwise, >> > you should be able to see where >> > the problem happened. >> > >> > I never used but saw the Source Code Cross Reference at >> > >> > http://maven.apache.org/plugins/maven-surefire-report-plugin/examples... >> > >> > seems you need to add maven-jxr-plugin to your pom. >> > >> > <reporting> >> > <plugins> >> > <plugin> >> > <groupId>org.apache.maven.plugins</groupId> >> > <artifactId>maven-surefire-report-plugin</artifactId> >> > <version>2.4.2</version> >> > <configuration> >> > <!-- place your configuration here --> >> > </configuration> >> > </plugin> >> > <plugin> >> > <groupId>org.apache.maven.plugins</groupId> >> > <artifactId>maven-jxr-plugin</artifactId> >> > <version>2.1</version> >> > </plugin> >> > </plugins> >> > </reporting> >> > >> > Please let me know if this works. If it does, I will also add this to >> > our Tellurium Maven archetypes. >> > >> > Thanks, >> > >> > Jian >> > >> > On May 6, 8:12 am, Ernst <[email protected]> wrote: >> > >> > > Hi, >> > >> > > In the example report below I'm told that an assertTrue failed. >> > > But not which one, and I have multiple! >> > > Am I doing something wrong or is this a general problem? >> > >> > > From target/surefire-reports/test.SomethingTestCase.txt: >> > >> > > >> > > ------------------------------------------------------------------------------- >> > > Test set: test.SomethingTestCase >> > > >> > > ------------------------------------------------------------------------------- >> > > Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 19.51 >> > > sec <<< FAILURE! >> > > testDuplicateName(test.SomethingTestCase) Time elapsed: 3.756 sec >> > > <<< FAILURE! >> > > java.lang.AssertionError: >> > > at org.junit.Assert.fail(Assert.java:74) >> > > at org.junit.Assert.assertTrue(Assert.java:37) >> > > at org.junit.Assert.assertTrue(Assert.java:46) >> > > at test.SomethingTestCase.testDuplicateName(Unknown Source) >> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> > > at sun.reflect.NativeMethodAccessorImpl.invoke >> > > (NativeMethodAccessorImpl.java:39) >> > > ...cut... >> > >> > > Regards >> > > /Ernst >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tellurium-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tellurium-users?hl=en -~----------~----~----~----~------~----~------~--~---
