SlideShare a Scribd company logo
1 of 13
Download to read offline
GEF Support in SWTBot

  Use a bot to test your GEF and GMF based applications



            Mariot Chauvin -   mariot.chauvin@obeo.fr
            Obeo (France)




                                                          1
GEF Support in SWTBot
                                                                Use a bot to test your GEF and GMF based applications




SWTBot presentation
   Tool for UI and functional testing

   Usable for SWT and Eclipse based applications

   Consistent API
        Wrappers for each SWT widget
        Finders to retrieve contributions based on conditions
        Matchers to write conditions in a expressive way




             © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                                   Use a bot to test your GEF and GMF based applications




SWTBot test example
@Test
public void canCreateANewJavaProject() throws Exception {
    bot.menu("File").menu("New").menu("Project...").click();
    SWTBotShell shell = bot.shell("New Project");
    shell.activate();


    bot.tree().select("Java Project");
    bot.button("Next >").click();
    bot.textWithLabel("Project name:").setText("MyFirstProject");
    bot.button("Finish").click();
}




                © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                                 Use a bot to test your GEF and GMF based applications




GEF presentation
   Framework for graphical editors with an MVC architecture

   Lightweight layout and rendering 2D toolkit

   MVC architecture agnostic of model representation
        EditParts play the role of controller
        Figures are the view instances
        EditPolicies encapsulate the behavior




              © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                          Use a bot to test your GEF and GMF based applications




GEF based application example




       © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                                Use a bot to test your GEF and GMF based applications




GEF based applications testability
    Delivering a product meaning ensure general good works and
    end user features non regressions between releases. How to
    achieve that ?

   Manual tests
        Time and resource consuming
        Error prone

   Automatic tests
        Difficult to instantiate editPart and simulate user actions
        Need to poll UISynchronizer to execute asynchronous runnables

                Why do not extend SWTBot to support GEF ?


             © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                         Use a bot to test your GEF and GMF based applications




Quick demo




      © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                                Use a bot to test your GEF and GMF based applications




Available API
   Create a node element
        editor.activateTool(String name)
         editor.mouseMoveLeftClick(int x, int y)

   Create an edge element
         editor.activateTool(String name)
         editor.mouseMoveLeftClick(String editPartName)
         editor.mouseMoveLeftClick(String editPartName)




             © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                                  Use a bot to test your GEF and GMF based applications




Available API
   Drag an element
        editor.mouseDrag(String label, int x, int y)

   Double-click on an element
        editor.mouseMoveDoubleClick(int x, int y)

   Direct edit on a element
        editor.mouseMoveLeftClick(String label)
        UIThreadRunnable.syncExec(new VoidResult() {
               public void run() {
                   part.performRequest(request);
               }
        });
        editor.directEditType(String text)



               © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                          Use a bot to test your GEF and GMF based applications




GMF based application demo




       © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                                Use a bot to test your GEF and GMF based applications




Could I use it to do more ?
   Generate UI and its tests with acceleo
        EEF is doing such a thing with SWT and JFace
        One could extend GMF generation to do the same

   Maintains documentation and tutorials up to date
        Write a SWTBot test for each tutorial
        Take a screenshot between each step




             © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                                Use a bot to test your GEF and GMF based applications




Project status and early adoption
   Project status
        First committed on a google code project
        Contributed since to SWTBot
        A new feature will be soon available on update site
        API will be redesign to use more matchers
        API will be enhanced (delete, zoom, modeling assistant)

   Early adoption
        Checkout the code from SWTBot repository
        Open bugs and feature requests
        API is provisional !




             © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
GEF Support in SWTBot
                                                                  Use a bot to test your GEF and GMF based applications




       Thanks for your attention !




 Further information :                                                              mariot.chauvin@obeo.fr

     http://www.obeo.fr
     http://www.eclipse.org/swtbot
     http://wiki.eclipse.org/SWTBot



               © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009

More Related Content

Similar to Test GEF Apps with SWTBot

Application Quality with Visual Studio 2010
Application Quality with Visual Studio 2010Application Quality with Visual Studio 2010
Application Quality with Visual Studio 2010Anna Russo
 
UFT- New features and comparison with QTP
UFT- New features and comparison with QTPUFT- New features and comparison with QTP
UFT- New features and comparison with QTPRita Singh
 
Functional Testing made easy with SWTBot for Developers and Testers
Functional Testing made easy with SWTBot for Developers and TestersFunctional Testing made easy with SWTBot for Developers and Testers
Functional Testing made easy with SWTBot for Developers and TestersAurélien Pupier
 
What's New with Perfecto? - Mid-Year Edition
What's New with Perfecto? - Mid-Year EditionWhat's New with Perfecto? - Mid-Year Edition
What's New with Perfecto? - Mid-Year EditionLizzy Guido (she/her)
 
Extending the Enterprise with MEF
Extending the Enterprise with MEFExtending the Enterprise with MEF
Extending the Enterprise with MEFBrian Ritchie
 
Flutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textFlutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textToma Velev
 
Ui Modeling In Action With PMF, e4(XWT) And EGF
Ui Modeling In Action With PMF, e4(XWT) And EGFUi Modeling In Action With PMF, e4(XWT) And EGF
Ui Modeling In Action With PMF, e4(XWT) And EGFBENOIT_LANGLOIS
 
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and TychoMickael Istria
 
XCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with XcodeXCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with XcodepCloudy
 
What's New with Perfecto? - May 2017
What's New with Perfecto? - May 2017What's New with Perfecto? - May 2017
What's New with Perfecto? - May 2017Lizzy Guido (she/her)
 
HTML5 based PivotViewer for Visualizing LInked Data
HTML5 based PivotViewer for Visualizing LInked Data HTML5 based PivotViewer for Visualizing LInked Data
HTML5 based PivotViewer for Visualizing LInked Data Kingsley Uyi Idehen
 
Appium tips & Inneractive integration
Appium tips & Inneractive integrationAppium tips & Inneractive integration
Appium tips & Inneractive integrationGil Sheps
 
Flutter technology Based on Web Development
Flutter technology Based on Web Development Flutter technology Based on Web Development
Flutter technology Based on Web Development divyawani2
 
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYury M
 
Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Mohamed Meligy
 
Mastering DevOps-Driven Data Integration with FME
Mastering DevOps-Driven Data Integration with FMEMastering DevOps-Driven Data Integration with FME
Mastering DevOps-Driven Data Integration with FMESafe Software
 

Similar to Test GEF Apps with SWTBot (20)

Application Quality with Visual Studio 2010
Application Quality with Visual Studio 2010Application Quality with Visual Studio 2010
Application Quality with Visual Studio 2010
 
UFT- New features and comparison with QTP
UFT- New features and comparison with QTPUFT- New features and comparison with QTP
UFT- New features and comparison with QTP
 
Functional Testing made easy with SWTBot for Developers and Testers
Functional Testing made easy with SWTBot for Developers and TestersFunctional Testing made easy with SWTBot for Developers and Testers
Functional Testing made easy with SWTBot for Developers and Testers
 
What's New with Perfecto? - Mid-Year Edition
What's New with Perfecto? - Mid-Year EditionWhat's New with Perfecto? - Mid-Year Edition
What's New with Perfecto? - Mid-Year Edition
 
Extending the Enterprise with MEF
Extending the Enterprise with MEFExtending the Enterprise with MEF
Extending the Enterprise with MEF
 
Swt qt ese2010
Swt qt ese2010Swt qt ese2010
Swt qt ese2010
 
Flutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textFlutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - text
 
Ui Modeling In Action With PMF, e4(XWT) And EGF
Ui Modeling In Action With PMF, e4(XWT) And EGFUi Modeling In Action With PMF, e4(XWT) And EGF
Ui Modeling In Action With PMF, e4(XWT) And EGF
 
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
 
XCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with XcodeXCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with Xcode
 
What's New with Perfecto? - May 2017
What's New with Perfecto? - May 2017What's New with Perfecto? - May 2017
What's New with Perfecto? - May 2017
 
Rajiv Profile
Rajiv ProfileRajiv Profile
Rajiv Profile
 
Mobile Application Development class 001
Mobile Application Development class 001Mobile Application Development class 001
Mobile Application Development class 001
 
HTML5 based PivotViewer for Visualizing LInked Data
HTML5 based PivotViewer for Visualizing LInked Data HTML5 based PivotViewer for Visualizing LInked Data
HTML5 based PivotViewer for Visualizing LInked Data
 
Appium tips & Inneractive integration
Appium tips & Inneractive integrationAppium tips & Inneractive integration
Appium tips & Inneractive integration
 
Flutter technology Based on Web Development
Flutter technology Based on Web Development Flutter technology Based on Web Development
Flutter technology Based on Web Development
 
WindowTester PRO
WindowTester PROWindowTester PRO
WindowTester PRO
 
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
 
Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)
 
Mastering DevOps-Driven Data Integration with FME
Mastering DevOps-Driven Data Integration with FMEMastering DevOps-Driven Data Integration with FME
Mastering DevOps-Driven Data Integration with FME
 

Recently uploaded

Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 

Recently uploaded (20)

Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 

Test GEF Apps with SWTBot

  • 1. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications Mariot Chauvin - mariot.chauvin@obeo.fr Obeo (France) 1
  • 2. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications SWTBot presentation  Tool for UI and functional testing  Usable for SWT and Eclipse based applications  Consistent API  Wrappers for each SWT widget  Finders to retrieve contributions based on conditions  Matchers to write conditions in a expressive way © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 3. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications SWTBot test example @Test public void canCreateANewJavaProject() throws Exception { bot.menu("File").menu("New").menu("Project...").click(); SWTBotShell shell = bot.shell("New Project"); shell.activate(); bot.tree().select("Java Project"); bot.button("Next >").click(); bot.textWithLabel("Project name:").setText("MyFirstProject"); bot.button("Finish").click(); } © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 4. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications GEF presentation  Framework for graphical editors with an MVC architecture  Lightweight layout and rendering 2D toolkit  MVC architecture agnostic of model representation  EditParts play the role of controller  Figures are the view instances  EditPolicies encapsulate the behavior © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 5. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications GEF based application example © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 6. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications GEF based applications testability Delivering a product meaning ensure general good works and end user features non regressions between releases. How to achieve that ?  Manual tests  Time and resource consuming  Error prone  Automatic tests  Difficult to instantiate editPart and simulate user actions  Need to poll UISynchronizer to execute asynchronous runnables Why do not extend SWTBot to support GEF ? © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 7. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications Quick demo © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 8. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications Available API  Create a node element  editor.activateTool(String name) editor.mouseMoveLeftClick(int x, int y)  Create an edge element editor.activateTool(String name) editor.mouseMoveLeftClick(String editPartName) editor.mouseMoveLeftClick(String editPartName) © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 9. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications Available API  Drag an element editor.mouseDrag(String label, int x, int y)  Double-click on an element editor.mouseMoveDoubleClick(int x, int y)  Direct edit on a element editor.mouseMoveLeftClick(String label) UIThreadRunnable.syncExec(new VoidResult() { public void run() { part.performRequest(request); } }); editor.directEditType(String text) © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 10. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications GMF based application demo © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 11. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications Could I use it to do more ?  Generate UI and its tests with acceleo  EEF is doing such a thing with SWT and JFace  One could extend GMF generation to do the same  Maintains documentation and tutorials up to date  Write a SWTBot test for each tutorial  Take a screenshot between each step © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 12. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications Project status and early adoption  Project status  First committed on a google code project  Contributed since to SWTBot  A new feature will be soon available on update site  API will be redesign to use more matchers  API will be enhanced (delete, zoom, modeling assistant)  Early adoption  Checkout the code from SWTBot repository  Open bugs and feature requests  API is provisional ! © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009
  • 13. GEF Support in SWTBot Use a bot to test your GEF and GMF based applications Thanks for your attention !  Further information : mariot.chauvin@obeo.fr  http://www.obeo.fr  http://www.eclipse.org/swtbot  http://wiki.eclipse.org/SWTBot © Copyright 2009 Obeo. made available under the EPL v1.0 | Oct. 25th, 2009