From: Timothy W. <tw...@us...> - 2007-10-19 13:37:16
|
If you want to use the same ApplicationFrame in both tests, then you need a test suite setup/teardown, and supply the test fixture with a custom Hierarchy (the default is TestHierarchy, which will filter out any components that already exist at the start of the test). If you instantiate your ApplicationFrame in the TestCase setup, it will be disposed automatically after the test is run. Make sure the main frame of your application disposes of itself properly; what will it do if two instances are run within the same VM? On Oct 19, 2007, at 9:15 AM, Jawahar Lal wrote: > HI, > > I have created a ApplicationTestClass to test my gui > application. I have written two test case i.e. testTitile() and > testComboboxSeletedItem(). These both the tests depends on the main > frame "ApplicationFrame" > > testTitle() checks the title of the application is "MyApplication" > testComboboxSelectedItem() checks the selected item of combobox > is "This is Important Item" > > Because both the test depends on ApplicationFrame, I created the > structure of my TestClass as follow > > public class ApplicationTestClass extends ComponentTestFixture > { > Frame mainframe; > > protected void setUp() throws Exception { > mainframe = // Initializing the mainframe of my > application; > } > > public void testTitle(){ > //Checks the title of mainframe > } > > public void testtestComboboxSelectedItem(){ > // finds the combobox and checks it selected item > > } > } > > Problem is that if I run the test class with having either of one > test Method, test gets successful. If I include both the methods > for testing I got "JUnit results root node" no any exception or > failure. > > Should I need to instantiate mainframe in each method ? What I > doing wrong. Please help me. > > Thanks > > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > abbot-users mailing list > abb...@li... > https://lists.sourceforge.net/lists/listinfo/abbot-users Timothy Wall http://abbot.sf.net |