struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David M. Karr)
Subject How to debug problem in TestDynaActionForm class?
Date Mon, 10 Mar 2003 01:43:10 GMT
I just decided to start looking at the unit tests, in order to look into
updating the Struts-EL test cases.

After just doing an update, and executing "test.tomcat.41" (with Tomcat-4.1.18
on Win2k), I get the following (I added a "println" of the form property, just
in case):

Testsuite: org.apache.struts.action.TestDynaActionForm
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.391 sec
------------- Standard Output ---------------
stringProperty[This is a string]
------------- ---------------- ---------------
------------- Standard Error -----------------
Mar 9, 2003 4:26:32 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
------------- ---------------- ---------------

Testcase: testBeanCreate took 0.381 sec
	Caused an ERROR
	at org.apache.struts.action.TestDynaActionForm.testBeanCreate(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(

So, I'm first trying to understand why this failing, but I'd also like to be
able to set up my debugger so that I can look at these issues a little closer.

My basic problem is that I can't figure out which "java" command line to change
to add the "-Xdebug" flag (and others).  For this, I thought it might be the
"java" task in the "start.tomcat.41" target in the "build-tests.xml" script.
This doesn't appear to be it, however, as my breakpoints in the test class go
unbroken, even though it hit my added println statement.

I know it got to the "java" command line that I changed, because it paused,
waiting for a debugger to connect to it.  Once I had my debugger connect, it
went on, but it never hit my breakpoints in the test class.

David M. Karr          ; Java/J2EE/XML/Unix/C++   ; SCJP; SCWCD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message