From: Timothy W. <tw...@oc...> - 2004-07-28 14:25:52
|
Begin forwarded message: > From: "SourceForge.net" <no...@so...> > Date: July 28, 2004 10:21:29 AM EDT > To: no...@so... > Subject: [ abbot-Feature Requests-893786 ] ComponentTestFixture > setup/teardown for use elsewher > > Feature Requests item #893786, was opened at 2004-02-10 00:31 > Message generated for change (Comment added) made by twall > You can respond by visiting: > https://sourceforge.net/tracker/? > func=detail&atid=461493&aid=893786&group_id=50939 > >> Category: Framework >> Group: Next Release >> Status: Closed >> Priority: 1 > Submitted By: Nick Bauman (nixnixnix) >> Assigned to: Timothy Wall (twall) > Summary: ComponentTestFixture setup/teardown for use elsewher > > Initial Comment: > I can't run more than one UI test per JUnit run because > it seems like I can't clear out the graphics context > between test runs. > > I keeping getting this > MultipleComponentsFoundException, even though my > setup() and teardown() methods are nulling our > references to my components. > > This is what I keep getting (note, the pretty-printing of > the components found I added to the Abbot source): > > abbot.MultipleComponentsFoundException: Could not > distinguish between 2 components using <component > class="com.retek.platform.client.gui.editor.AbstractEditor" > name="exampleworkflow.field_label" />: > (0) com.retek.platform.client.gui.editor.AbstractEditor > [exampleworkflow.field_label,4,29,200x19,invalid,layout=c > om.retek.platform.client.gui.layout.TableLayout,alignment > X=null,alignmentY=null,border=,flags=1,maximumSize=,min > imumSize=,preferredSize=] > (1) com.retek.platform.client.gui.editor.AbstractEditor > [exampleworkflow.field_label,4,29,200x19,invalid,layout=c > om.retek.platform.client.gui.layout.TableLayout,alignment > X=null,alignmentY=null,border=,flags=1,maximumSize=,min > imumSize=,preferredSize=] > at abbot.script.ComponentReference.bestMatch > (ComponentReference.java:596) > at > abbot.script.ComponentReference.findInHierarchy > (ComponentReference.java:956) > at > abbot.script.ComponentReference.findInHierarchy > (ComponentReference.java:906) > at > com.retek.rpm.example.ExampleWorkflowTest2.testInit > (ExampleWorkflowTest2.java:46) > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:79) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:41) > at java.lang.reflect.Method.invoke > (Method.java:386) > at junit.framework.TestCase.runTest > (TestCase.java:154) > at junit.framework.TestCase.runBare > (TestCase.java:127) > at junit.framework.TestResult.protect > (TestResult.java:106) > at junit.framework.TestResult.runProtected > (TestResult.java:124) > at junit.framework.TestResult.run > (TestResult.java:109) > at junit.framework.TestCase.run > (TestCase.java:118) > at junit.framework.TestSuite.runTest > (TestSuite.java:208) > at junit.framework.TestSuite.run > (TestSuite.java:203) > at junit.framework.TestSuite.runTest > (TestSuite.java:208) > at junit.framework.TestSuite.run > (TestSuite.java:203) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run > Tests(RemoteTestRunner.java:392) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run > (RemoteTestRunner.java:276) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.mai > n(RemoteTestRunner.java:167) > > > > ---------------------------------------------------------------------- > >> Comment By: Timothy Wall (twall) > Date: 2004-07-28 14:21 > > Message: > Logged In: YES > user_id=54098 > > There are two primary elements that affect setup/teardown in this case. > > 1) abbot.util.SystemState > Saves/restores a number of system-related settings, including > properties > and locking key state > > 2) abbot.finder.TestHierarchy > Optionally ignores all extant components on creation, and provides for > disposing all components it knows about. > > > > ---------------------------------------------------------------------- > > Comment By: Nick Bauman (nixnixnix) > Date: 2004-02-13 00:28 > > Message: > Logged In: YES > user_id=24639 > > It seems like it would be a good thing to be able to use > ComponentTestFixture (or some subclass thereof) as a > delegate or visit ComponentTestFixture via a subclass of > TestCase instead of being forced into extending > ComponentTestFixture. > > ---------------------------------------------------------------------- > > Comment By: Nick Bauman (nixnixnix) > Date: 2004-02-10 01:29 > > Message: > Logged In: YES > user_id=24639 > > I can't do that because I must extend a BaseTestCase for our > application. I work around this by holding an instance of > the ComponentTestFixture in my BaseUITestCase, setting it up > and tearing it down appropriately. This should be working, > shouldn't it? > > ---------------------------------------------------------------------- > > Comment By: Timothy Wall (twall) > Date: 2004-02-10 01:03 > > Message: > Logged In: YES > user_id=54098 > > Use junit.extensions.abbot.ComponentTestFixture instead of TestCase and > the "context" will be cleaned up automatically so that it doesn't > interfere > with future runs. > > > > ---------------------------------------------------------------------- > > You can respond by visiting: > https://sourceforge.net/tracker/? > func=detail&atid=461493&aid=893786&group_id=50939 > |