geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Geronimo Wiki] Update of "Building" by JohnSisson
Date Tue, 26 Apr 2005 01:12:49 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Geronimo Wiki" for change notification.

The following page has been changed by JohnSisson:
http://wiki.apache.org/geronimo/Building

The comment on the change is:
Some notes on diagnosing failed tests for newbies

------------------------------------------------------------------------------
  
  You can also start the server using "maven run:server" or "maven debug:server", but startup
using maven disables the ctrl-C proper shutdown.
  
+ = Diagnosing a Failed Test =
+ 
+ The following are some quick tips.  For further information on unit tests, refer to the
[http://maven.apache.org/reference/plugins/test/ Maven Test Plugin] and the [http://www.junit.org/index.htm
JUnit documentation]
+ 
+  * Refer to the test log file (usually has a `.log` file extension) in the `test-reports`
directory of the module that contains the failing test for events that occured during the
execution of tests. 
+ 
+  * Refer to the the log file for the individual test that failed.  The file name has the
format `TEST-`testclassname`.txt`
+ 
+  * Try running the failing test in isolation. For example:  
+  {{{
+ maven -o -Dtestcase=org.apache.geronimo.FooBarTest test:single
+  }}}
+  * Ascertain whether the test is forked by JUnit (executed in a different process to JUnit).
 For example, if a geronimo connector test failed, then see whether the `maven.junit.fork`
property is set in the `geronimo\modules\connector\project.properties` file.
+   * To debug a test that is not forked by JUnit, set the `MAVEN_OPTS` environment variable
to configure the debugger so that Maven and the JUnit unit test run under the debugger and
run the single test as shown above.[[BR]]
+   UNIX Korn shell example:
+    {{{
+ export MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+    }}}
+   Windows example:
+    {{{
+ set MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
+     }}}
+   * To debug a test that is forked by JUnit, you need to configure the debugger via the
`maven.junit.jvmargs` property.  For example: 
+     {{{
+ maven -o -Dmaven.junit.jvmargs="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
-Dtestcase=org.apache.geronimo.FooBarTest test:single
+     }}}
+ 
  = Bypassing Tests =
  
  If you don't want to run test at all, try adding `-Dmaven.test.skip=true` to your maven
command line.
@@ -183, +210 @@

  
   You need to set the MaxUserPort to a larger value and reduce the TcpTimedWaitDelay in the
registry settings.  See the following for further details:
  
-  [http://support.microsoft.com/kb/196271/EN-US/]
+  [http://support.microsoft.com/kb/196271/EN-US/][[BR]]
   [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/randz/protocol/tcp_time-wait_delay.asp]
  
   This problem has been encountered whilst running the OpenEJB itests suite.

Mime
View raw message