I'm trying to write some JUnit tests for BORG and I wanted to start by running the existing tests. However, I get NullPointerException as DBHelper.getController() in part DBHelper.getController().connect("jdbc:hsqldb:mem:whatever"); seems to be null.
Could you help me connect to the memory database?
Have you checked out the latest 1.8 code from Git? I switched from ANT to Maven a few weeks ago.
The Junit tests are run as part of the Maven build. The test setup is:
and hsqldb is in the runtime classpath in the POM.
If you are using the ANT-based code, I'd have to go back and look, so let me know.
Thank you for your reply. I'm using ANT-based code. I'm writing a test case for Address Book using Sikuli and I'd like to connect to the memory database at the beginning of test.
For now, my workaround is to connect to the main database and delete test entries after testing.
Do you think this kind of tests could be useful for the project? I will have test case finished tomorrow, can I email it to you?
Perhaps you should try changing hsqldb to h2 in the jdbc url? Maybe that will work better.
Such tests would be useful.
Also, I've never heard of Sikuli and it's always good to learn something new.
I have emailed you parts I have already done. As you will see I call Borg main method in my test. For further cases it would be useful to set prefs for testing, could you tell me how to do it?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.