How do I view the H2 in-memory database while integration tests are running? The H2WebServer is started at the beginning of my integration tests. But the H2WebServer doesn't respond to my browser request when I have set a breakpoint in the code which makes it impossible to actually view the database..
If you add this to your spring config file for the test context, you should be able to connect to the database with a regular SQL client such as Squirrel.
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>org.hsqldb.jdbcDriver</value>
</property>
<property name="url">
<value>
jdbc:hsqldb:hsql://localhost/xdb;check_props=true;default_schema=true;
</value>
</property>
<property name="username">
<value>sa</value>
</property>
<property name="password">
<value></value>
</property>
</bean>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With