| Apache CXF > Navigation > Testing-Debugging |
Home
Download
Issue Reporting![]()
Mailing Lists
Project Status
Roadmap
Special Thanks
User's Guide![]()
FAQ
Release Notes
2.1 Migration Guide
Resources and Articles
Architecture Guide![]()
Building
Testing-Debugging
Getting Involved
People
Setting up Eclipse
Source Repository
Release Management
Coding Guidelines
CXF uses a standard maven build system and unit testing conventions. For those not familiar with that, here are some basic hints:
We have a special "systest" maven module that contains a large number of more complex test cases that involve full client/server interactions, server startups, etc... For the most part, they are just JUnit tests exactly like above, but test broader aspects. We have special utility classes (see below) to help these tests fork server process, test results, etc... Running the systests is exactly like running the unit tests, just in the systest module.
There are generally two ways of running a test in a debugger.
export JPDA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" export MAVEN_OPTS="-XX:MaxPermSize=192m -Xmx512M $JPDA_OPTS"
Then you would need to run the test like "mvn test -Dtest=MyTest -Dsurefire.fork.mode=never". When mvn starts, you can attach your external debugger to it and assign breakpoints and such.
Caveats: When debugging systests, they tend to fork background servers. If you need to debug the server side part of the interaction, you will need to disable that forking. Usually, the easiest way is to find the "setup" code for the test and look for a "launchServer(Server.class)" line and add a ", true" parameter to tell the server launcher to run the server "in process".