[ https://issues.apache.org/jira/browse/OFBIZ-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858552#action_12858552 ]
Bob Morley commented on OFBIZ-3670: ----------------------------------- Hey Scott, 1) This base test case uses the standard transaction rollback system. 2) The individual writing the unit test can decide what they should extend -- I am not suggesting that all unit tests should extend the RollbackTestCase; they may extend the StandaloneTestCase (which does not have the rollback nature). There were tests in my travels which were explicitly calling a "rollback" at the end of their test which this pattern would avoid. I would also argue that it is bad practice for having dependency in your test classes in the first place. 3) This is not providing a different approach at all; it merely provides extra functionality into the exist test framework. The tests remain in the testdef and are executed through standard means, you simply have the ability to execute the test immediately from Eclipse and get all of the tooling associated with that. There is a method of executing the TestRunContainer to pass in arguments on which test to run. It is cumbersome to use in the IDE; but if people choose to execute their tests in that way then there is nothing about this patch that prevents that. In fact, I write the unit test and execute it through eclipse (individual methods, the whole class) get the tooling in Eclipse (or any other IDE) and then I add it to the testdef and execute the entire suite of tests form the command-line before creating any patch. > TestCase base classes providing ability to execute unit tests in Eclipse in > "standalone" mode > --------------------------------------------------------------------------------------------- > > Key: OFBIZ-3670 > URL: https://issues.apache.org/jira/browse/OFBIZ-3670 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bob Morley > Fix For: SVN trunk > > Attachments: OFBIZ-3670_StandaloneTestEnhancement.patch > > > This patch provides the framework that allows junit unit tests to be executed > directly in Eclipse (without having to invoke Start directly). It total it > contains: > - BaseTestCase - very top of the TestCase stack containing ofbiz specific > assertions > - StandaloneTestCase - determines if application has executed "Start"; if not > it will execute a scaled down "Start unittest" that is used in Eclipse > - RollbackTestCase - extends standalone and provides a transaction w/ > auto-rollback > - TestRunContainer - provides ability to disable dispatcher attributes via > configuration (used for unittest-containers.xml) > - GeoWorkerTest - unittester that provides "full" coverage of GeoWorker; can > be executed from Eclipse or from command-line as it is plugged into standard > testdef framework. Creates its own entities with transaction start/rollback > so it can be re-executed. > Would appreciate if this can be a priority so I can provide additional test > cases to boost our code coverage that will utilize these features. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.