You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Tim McConnell (JIRA)" <ji...@apache.org> on 2008/08/18 23:07:44 UTC

[jira] Created: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

"About Eclipse Platform" testcase
---------------------------------

                 Key: GERONIMODEVTOOLS-485
                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
             Project: Geronimo-Devtools
          Issue Type: Sub-task
            Reporter: Tim McConnell
            Assignee: Ashish Jain




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "Tim McConnell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626760#action_12626760 ] 

Tim McConnell commented on GERONIMODEVTOOLS-485:
------------------------------------------------

Hi Ashish, This intent of this testcase is just to ensure that the GEP is properly and fully installed and should be fairly simple. It won't involve a web browser so should not use selenium. Instead it should be very simple to use Abbot to open the help dialog for Eclispe to ensure the Geronimo icon is present, which is a good indication that the GEP is installed. I don't know if Abbot can be used to programmatically determine if that icon is there or not. BJ, do you know ??  

> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Jain updated GERONIMODEVTOOLS-485:
-----------------------------------------

    Attachment: GERONIMODEVTOOLS-485.patch

> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>         Attachments: GERONIMODEVTOOLS-485.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628101#action_12628101 ] 

Ashish Jain commented on GERONIMODEVTOOLS-485:
----------------------------------------------

Somehow I hit the same error while using
aHelper.clickToolItem(workbenchShell,"Apache.org - Geronimo v21 Server Tools Core Plug-in");

Added a debug code also to see if it is looking for all the ToolItems. Done 6 times suggest it is looking into all of them, but somehow not able to find the Apache Toolitem.

done
done
done
done
done
done
abbot.swt.finder.generic.NotFoundException
	at abbot.swt.finder.generic.FinderImpl.found(FinderImpl.java:74)
	at abbot.swt.finder.generic.FinderImpl.find(FinderImpl.java:65)
	at org.apache.geronimo.testsuite.common.ui.AbbotHelper.clickToolItem(AbbotHelper.java:137)
	at org.apache.geronimo.testsuite.v21.ui.NewServerTest.testAllGeronimoGUI(NewServerTest.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)testAllGeronimoGUI: 
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at abbot.swt.junit.extensions.SWTTestCase.runBareWrapper(SWTTestCase.java:278)
	at abbot.swt.junit.extensions.SWTTestCase.access$2(SWTTestCase.java:275)
	at abbot.swt.junit.extensions.SWTTestCase$4.execute(SWTTestCase.java:252)
	at abbot.swt.junit.extensions.UserThread.run(UserThread.java:75)
3.296 sec.


> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629169#action_12629169 ] 

B.J. Reed commented on GERONIMODEVTOOLS-485:
--------------------------------------------

Thanks Ashish, this patch works for me, but I have several cosmetic issues.

1) EclipseUI.java has no copyright or @version $Rev$ $Date$ line
2) EclipseUI.java has 2 unused imports which show as warnings
3) EclipseUI.java and Abbot.java using tabs in stead of spaces
4) some other spacing issues that would make the code look nice (see below)
5) AbbotHelper.java rename clickButtonForToolItem to clickImageButton - it's a regular button with an image on it that we are clicking, not a ToolItem like I originally thought it was.

For EclipseUI.java, it should probably look more like this...


public class EclipseUI extends WorkbenchTestCase {
    Shell aShell;
    AbbotHelper aHelper;

.......


           //aHelper.clickItem(newShell, "Geronimo v2.1 Server Adapter");*/
        }
        catch(Exception e) {
            e.printStackTrace();
        }
    }
}


> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>         Attachments: GERONIMODEVTOOLS-485.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

B.J. Reed closed GERONIMODEVTOOLS-485.
--------------------------------------

    Resolution: Fixed

Applied patch at r693553 that included the changes mentioned before.  Also needed to update the test.xml so that the new Abbot testcase will be run during the maven build process.  Thanks to Ashish Jain for the patch.

> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>         Attachments: GERONIMODEVTOOLS-485.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "Tim McConnell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623824#action_12623824 ] 

Tim McConnell commented on GERONIMODEVTOOLS-485:
------------------------------------------------

Status of GERONIMODEVTOOLS-482 should be updated to "Closed" when this testcase is implemented....

> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628084#action_12628084 ] 

Ashish Jain commented on GERONIMODEVTOOLS-485:
----------------------------------------------

While using the tool tip helper method it seems finder is not able to find the ToolItem for Apache icon. Here is just a test code which I was trying for some other icon
aHelper.clickMenuItem(workbenchShell, new String[] {"&Help", "&About Eclipse Platform"});
            aHelper.clickToolItem(workbenchShell,"Eclipse.org-Mylyn");
I hit the following error



> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626747#action_12626747 ] 

Ashish Jain commented on GERONIMODEVTOOLS-485:
----------------------------------------------

Can I use selenium for this test case?

> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628085#action_12628085 ] 

Ashish Jain commented on GERONIMODEVTOOLS-485:
----------------------------------------------

abbot.swt.finder.generic.NotFoundException
	at abbot.swt.finder.generic.FinderImpl.found(FinderImpl.java:74)
	at abbot.swt.finder.generic.FinderImpl.find(FinderImpl.java:65)
	at org.apache.geronimo.testsuite.common.ui.AbbotHelper.clickToolItem(AbbotHelper.java:137)
	at org.apache.geronimo.testsuite.v21.ui.NewServerTest.testAllGeronimoGUI(NewServerTest.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at abbot.swt.junit.extensions.SWTTestCase.runBareWrapper(SWTTestCase.java:278)
	at abbot.swt.junit.extensions.SWTTestCase.access$2(SWTTestCase.java:275)
	at abbot.swt.junit.extensions.SWTTestCase$4.execute(SWTTestCase.java:252)
	at abbot.swt.junit.extensions.UserThread.run(UserThread.java:75)


> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "Tim McConnell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626982#action_12626982 ] 

Tim McConnell commented on GERONIMODEVTOOLS-485:
------------------------------------------------

Thanks BJ, so Ashish it appears you can in fact use Abbot to click on the Geronimo icon to then view and test for the installed Geronimo features.....

> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626953#action_12626953 ] 

B.J. Reed commented on GERONIMODEVTOOLS-485:
--------------------------------------------

In the AbbotHelper.java class (in our testsuite common plugin), we have a method clickToolItem which does a search on Tool Item Buttons by using their tool tip text.  We should be able to use that method or one very similar to it to find and click the Geronimo icon during an Abbot test run.


> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "Ashish Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626985#action_12626985 ] 

Ashish Jain commented on GERONIMODEVTOOLS-485:
----------------------------------------------

Thanks BJ/Tim/Ted for the comments! Reading about our testsuite from G wiki(http://cwiki.apache.org/GMOxDEV/geronimo-eclipse-plugin-gep-testsuite.html). Do we have more resources on abbot. I saw one on its API http://www.docjar.com/docs/api/test/AbbotHelper.html.
Thanks Ashish

> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628116#action_12628116 ] 

B.J. Reed commented on GERONIMODEVTOOLS-485:
--------------------------------------------

I see a few problems....the second line is still looking at the workbench and not the dialog

Went ahead and stepped through the Abbot code a little more.  Those things on the About dialog are not ToolItems, but are Buttons so we still want to use the WidgetToolTipMatcher inner class, but you'll also need to add to the getText method to handle instances of Button.  The fact that you found 6 ToolItems was just a coincidence.

So for the second call, you may want to copy the clickToolItem (...) method (since this one is ToolItem specific) and create one for clicking the Button by finding its tool tip text.  (I just named it clickButtonFromToolTipText below, but I'm sure there's a better name for it).

The code should look something like this:

Shell dialogShell = aHelper.clickMenuItem(workbenchShell, new String[] {"&Help", "&About Eclipse Platform"}, "About Eclipse Platform");
aHelper.clickButtonFromToolTipText(dialogShell,"Eclipse.org - Mylyn"); 


When stepping through the code, I went ahead and copied the tool tip texts that were available to me.
Eclipse.org - Help System Base
Eclipse.org - J2EE Standard Tools (JST)
Eclipse.org - Mylyn
Eclipse.org - EMF - Eclipse Modeling Framework
Apache.org - Geronimo v21 Server Tools Core Plug-in
Eclipse.org# - Data Tools Platform User Documentation
plus 4 nulls for the Buttons at the bottom of the dialog

> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "Ted Kirby (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626764#action_12626764 ] 

Ted Kirby commented on GERONIMODEVTOOLS-485:
--------------------------------------------

There are other ways to do this.  If you click the icon, you get more info.  This is probably hard to do as well.  You can manage config, or view installed features or plugins.

> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMODEVTOOLS-485) "About Eclipse Platform" testcase

Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628091#action_12628091 ] 

B.J. Reed commented on GERONIMODEVTOOLS-485:
--------------------------------------------

It looks to me like the tool tip text has some spaces in there.  Try

aHelper.clickToolItem(workbenchShell,"Eclipse.org - Mylyn"); 

or try the "Apache.org - Geronimo v21 Server Tools Core Plug-in"

> "About Eclipse Platform" testcase
> ---------------------------------
>
>                 Key: GERONIMODEVTOOLS-485
>                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-485
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Ashish Jain
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.