Testing JLense Applications and Developing a JLense Test CaseThe JLense org.jlense.test plugin provides a basic framework for running JUnit test cases. JUnit is a toolkit for building and running tests. When testing some unit of code that will eventually be deployed in the JLense platform it is important that the code be tested inside the JLense runtime environment. This is so that the tests will be executed in the same runtime environment as they wil eventually run. For instance, class loading is one of the biggest sources of problems for developers that are new to the JLense environment, and class loading problems will only be detected if tests are run inside Eclipse. The org.jlense.test plugin provides support for running tests in two ways:
The org.jledger.ui plugin contains several test cases that you can use as an example of how to creeate your own test cases. Below are the org.jlense.test.testCases extension declarations from the org.jledger.ui/plugin.xml file: <extension id="AccountTest" point="org.jlense.test.testCases"> <test name="AccountTest" class="org.jledger.ui.accounts.AccountTest"/> </extension> <extension id="ChartOfAccountsTest" point="org.jlense.test.testCases"> <test name="ChartOfAccountsTest" class="org.jledger.ui.accounts.ChartOfAccountsTest"/> </extension> <extension id="AccountTriggerTest" point="org.jlense.test.testCases"> <test name="AccountTriggerTest" class="org.jledger.ui.accounts.AccountTriggerTest"/> </extension> <extension id="AccountNotificationTest" point="org.jlense.test.testCases"> <test name="AccountNotificationTest" class="org.jledger.ui.accounts.AccountNotificationTest"/> </extension> |