Skip to content
Ondrej Zizka edited this page Feb 27, 2017 · 1 revision

Debugging unit tests with maven

Debugging tests code

Run maven with command mvnDebug or use -Dmaven.surefire.debug java property more at http://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html

Debugging server calls during tests

Run maven with parameter: -Dserver.jvm.args="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y"

Debugging application

Run wildfly with --debug parameter

Inspecting the H2 database

http://www.jboss.org/quickstarts/eap/h2-console/

Using Postman

To use postman, do not select anything in Authorization tab and proceed right into Headers. Create new entry 'Authorization' and copy the header value from some recent request in browser network panel.

Be aware of changing token every few minutes. It gets annoying after while, so disabling security (for debugging) might be an option. In file services/src/main/webapp/WEB-INF/web.xml comment out <security-constraint> section.