Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to see SQL statements issued by DbUnit using P6Spy?

dbunit issued sql statements
0
Posted

How to see SQL statements issued by DbUnit using P6Spy?

0

P6Spy is a transparent JDBC proxy-driver which log the statements performed against the actual driver you normally would use. Using p6spy allows to log the SQL statements issued by DbUnit. To install P6Spy, complete the following steps: • Put the p6spy.jar file in your classpath. • Move spy.properties into a directory listed in your classpath. Unlike JAR files, you do not directly reference your property file in the classpath (e.g.: if you have the file c:\r\proj\conf\spy.properties make sure you put c:\r\proj\conf in the classpath). • Modify your application to use the P6Spy database driver i.e. com.p6spy.engine.spy.P6SpyDriver. • Modify the realdriver line in the spy.properties file to reflect the wrapped database driver. An example of a modified realdriver line follows: realdriver = oracle.jdbc.driver.OracleDriver Installation is complete. When you run your application, a spy.log file is generated in the same directory from where you run the application. The log file contains a list

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123