• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
GEF Support in SWTBot - ESE 09
 

GEF Support in SWTBot - ESE 09

on

  • 2,542 views

 

Statistics

Views

Total Views
2,542
Views on SlideShare
2,507
Embed Views
35

Actions

Likes
1
Downloads
34
Comments
0

4 Embeds 35

http://www.eclipsecon.org 31
http://eclipsecon.org 2
http://www.slideshare.net 1
http://eclipsesummit.org 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    GEF Support in SWTBot - ESE 09 GEF Support in SWTBot - ESE 09 Presentation Transcript

    • 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