How we reached 0 technical debt in our Eclipse project

Similar documents
Testing Eclipse plug-ins: Tips & Tricks

Add some spice to your application! (using EMF Parsley in your UI)

Lesson learned from using EMF to build Desktop & Web Applications. Ludwigsburg, Oct

Eclipse Data Binding - Updating RCP Mail 2.0 Handout

e4 Project 0.9 Release Review

About Tom. CEO BestSolution Systemhaus GmbH. Eclipse Committer. Platform UI EMF. Projectlead: UFaceKit, Nebula. Member of the Architectual Council

RAP (The Rich Ajax Platform)

The New Generation of the Eclipse Platform. Budapesti Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Tanszék

Foundations of User Interface Programming Using the Eclipse Rich Client Platform

Eclipse Modeling Framework (EMF) Paweł Żalejko

The Next Generation of Eclipse: e4. Mike Milinkovich Executive Director Eclipse Foundation

Graphiti Release Review

Comparison and merge use-cases from practice with EMF Compare

The Eclipse Rich Ajax Platform

Target Management New and Noteworthy. Martin Oberhuber, Wind River

What is Wazaabi 2.0? Declarative UI framework. based on. live EMF model(s)

Eclipse technology in IFMS Interface Management System

Workbench and JFace Foundations. Part One, of a two part tutorial series

Getting the Most from Eclipse

Quick tour of the Test and Performance Tools Platform (TPTP) Valentina Popescu IBM Tivoli TPTP AG Lead

Semantic Web T LS Update

Kai Tödter Siemens Corporate Technology

Eclipse 4.0. Jochen Krause EclipseSource

WindowBuilder Graduation & Release Review

Simulate This! - The Eclipse Platform as an Integrated Computational Environment

Eclipse Platform Rise and Shine Javaland 2016

Goulwen Le Fur Obeo EclipseCon NA 2014

RobertaLab: Configuration, Architecture, Frameworks, Design

Rich Client GUI's with RCP & RAP

Regular Forum of Lreis. Speechmaker: Gao Ang

Model Driven Development with EMF and EclipseLink (experiences in MDD and generating user interfaces)

Papyrus: Advent of an Open Source IME at Eclipse (Redux)

Eclipse as a Web 2.0 Application Position Paper

Migration to E4. Eclipse Con France 2016

When Modeling meets Productivity. Sven Efftinge - itemis

Eclipse 4. Brian de Alwis. Abstract

CISC836: Models in Software Development: Methods, Techniques and Tools

From the RCP Book To Reality. Jean-Michel Lemieux IBM Rational, Ottawa, Canada

Tickling the shoulders of giants. An internal client for financial services based on Eclipse RCP

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

Expeditor Client for Desktop. Client Platform Overview

News in RSA-RTE 10.1 updated for sprint Mattias Mohlin, November 2017

Making Xbase Look Like Java

Planned Review Date: June 10, 2009 Communication Channel: eclipse.tools.emf Dave Steinberg and Ed Merks

Migration of Pogo7 Templates

Succeed with Eclipse: Large Scale 11/14/16

Overview. Principal Product Manager Oracle JDeveloper & Oracle ADF

Java Program Structure and Eclipse. Overview. Eclipse Projects and Project Structure. COMP 210: Object-Oriented Programming Lecture Notes 1

EMF Compare Galileo Simultaneous Release

OSGi on the Server. Martin Lippert (it-agile GmbH)

Introduction to Eclipse and Eclipse RCP

Beware: Testing RCP Applications in Tycho can cause Serious Harm to your Brain. OSGi p2

Leveraging the Model-View- Presenter Pattern in Rich Client Applications

Smart Client development with the Eclipse Rich Client Platform

Lessons learned from building Eclipse-based add-ons for commercial modeling tools

Advanced User Interface Programming Using the Eclipse Rich Client Platform

Eclipse 4 Eclipse Day Toulouse 24 mai 2012

EMFT 1.0 Release Review (OCL, Query, Transaction, and Validation)

Custom Code Rules Deep Dive

Module Road Map. 7. Version Control with Subversion Introduction Terminology

eclipse rich ajax platform (rap)

EMF Europa Simultaneous Release

Index. Bitwise operations, 131. Cloud, 88, 101

EMFT Mint (Incubation) 0.7 Ganymede Simultaneous Release Review

3 Continuous Integration 3. Automated system finding bugs is better than people

open source RCP Eclipse based Visualization analysis Python Workflow

The Galilean Moons of Eclipse

Acceleo Galileo Simultaneous Release

Towards A Common Build Infrastructure: Designing For Reusability

Wikileaking Eclipse Modeling - Spilling the beans on how industry uses EMF based tooling successfully! Ronan Barrett, Ericsson

Oracle Fusion Middleware 11g: Build Applications with ADF I

20. Eclipse and Framework Extension Languages

JSF Tools Reference Guide. Version: M5

BPS79- Sample Reports View

Developing Eclipse Rich-Client Applications Tutorial

JetBrains TeamCity Comparison

News in RSA-RTE 10.2 updated for sprint Mattias Mohlin, May 2018

Power Editing: Hoxie Ackerman. April 1, Building a Productive Editing Environment for Yourself

Keep on Swinging. Productivity layers on top of SWT. Karsten Schmidt SAP AG.

Test-driven development

Android Apps. with Eclipse. Apress. Onur Cinar

Eclipse, Java, Scientific Software, Etc.

Eclipse 4 Programming Model and Practices. Jin Mingjian

Patterns and Best Practices for Dynamic OSGi Applications

News in RSA-RTE 10.1 updated for sprint Mattias Mohlin, January 2018

The Eclipse Rich Client Platform

Tools for mobile Linux Release Review Dec 2009

A little History Domain Specific Languages Examples Tools Benefits A more theoretical View Programming and Modeling The LWES Project Bonus: Best

Spring and OSGi. Martin Lippert akquinet agile GmbH Bernd Kolb Gerd Wütherich

Web Application development results in the need for integrated tools

Eclipse Plug-ins. Third Edition

EGit/Gerrit Hands-on training #1: Installation and Configuration

The Eclipse Parallel Tools Platform Project

Continuous Testing in Eclipse. David Saff, Michael D. Ernst MIT CSAIL etx 2004, Barcelona, Spain

UIMA Tools Guide and Reference

Efficient Test Automation on an Agile Project

Single Sourceing for Eclipse 4.x and 3.x

Comparing graphical DSL editors

Plan. Language engineering and Domain Specific Languages. Language designer defines syntax. How to define language

Web Applica+on Development. Budapes( Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Tanszék

Transcription:

How we reached 0 technical debt in our Eclipse project Lorenzo Bettini Dip. DISIA, University of Firenze, Italy Vincenzo Caselli, Francesco Guidieri RCP-Vision, Firenze, Italy EclipseCon Europe, 2016

Our Eclipse Project: EMF Parsley EMF Parsley: Quickly develop applications based on EMF models Completely and easily customizable Based on declarative customizations Provides a DSL for easy configuration Supports EMF persistences, XMI, CDO, etc. Supports RAP

EMF Parsley Provides reusable and customizable Jface/SWT components Tree Form Dialog Editor Combination of them Project wizard to get started

Under the hood Delegates to EMF.Edit by default Customizations based on Dependency Injection (Google Guice), NOT on extension points Declarative customizations (polymorphic dispatch), NOT on instanceof cascades Xtext/Xbase DSL Rich IDE tooling Complete interoperability with Java Code Generation oriented (NOT reflective => Debuggable!)

Very quick demo For a wider presentation on Parsley, see tomorrow talk Six good reasons to spice up your projects with EMF Parsley Silchersaal - Thursday, October 27, 2016-13:00 to 13:35

Testing the DSL Xtext provides a nice framework for testing an Xtext DSL With plain JUnit for the compiler part With Plug-in JUnit tests for UI stuff like content-assist See my EclipseCon Europe 2015 talk Testing Xtext Languages Chapter 7, of my Xtext book, 2nd edition

In the beginning... We were testing almost everything with SWTBot OK but Took a lot of time For writing a test case For executing a test case

Improve testing approach Split core and UI, We already did that as much as we could but Most of Parsley important parts are based on the UI Try to avoid SWTBot and programmatically check things with a Plug-in JUnit test? Probably save some time when running tests It s not SWTBot, it s the time you need to start Eclipse during tests! But even worse to write tests!

Example: create form controls We have a FormControlFactory that Given an EMF object and one of its features Creates a form control based on feature A checkbox for a boolean feature A text for a string feature, etc. Setups EMF databinding If you change the control s value, the EMF model is updated And viceversa

You don t need a running Eclipse! In order to test EMF databinding you need a Jface control a model a Display a (databinding) Realm

A JUnit Display rule Creates a Display and a Shell to be used as parent With some additional utility methods e.g., to flush pending events in case of async ops Inspired by http://www.codeaffine.com/2014/02/25/a-junit-rule-to-ea se-swt-test-setup/

And a Realm You need a databinding Realm for testing databinding See the Eclipse Wiki

Some utility methods To run something in the UI thread

Asserting SWT widgets

Now we can write JUnit tests We use Xtend to make them More readable Easier to write Less verbose See also Write cool scalable enterprise application tests with Xtend & embedded DSLs, by Boris Brodski, EclipseCon Europe 2014 (PQD)

Example

Run it as a JUnit test For each Parsley core UI class We have a JUnit test That covers 100% that class Easy to write Amazingly fast to run! Just an excerpt

Example: create and test trees Given an EObject We create a tree representation With a content provider With specific labels and images With a label provider When the model changes the tree must be updated How we test that? Create a string representation of the tree Compare the expected representation

Test the tree viewer

Mock! We use mocking (Mockito) For listeners For events Mouse events Drag and Drop events

EMF Parsley testing framework We also release the testing framework we use JUnit rules Utility classes Base classes Still under development Use it at your own risk ;-)

Functional Tests Then we have a bunch of SWTBot tests for the functional parts Simulate what the users would do with our views/trees/dialogs, etc. Simulate what the developers would do with a Parsley project Create a new project with a wizard with a template Import an example project set Will everything compile in the workbench?

CDO Tests For most important tests We have a version that uses CDO for EMF resources With an in-memory database

Continuous Integration Maven/Tycho Hudson (Eclipse HIPP) Gerrit for code review Hudson/Gerrit triggers Nightly builds All Tests in several Eclipse versions (Indigo, Kepler,, Neon) Jacoco Findbugs Sonarqube

From testing to code quality Tests gave us a safety net for Experimenting with new features Refactoring to reach code quality standards

Sonarqube results ~95% code coverage 0 code duplication 0 dependency cycles 0 Technical Debt

Sonarqube results

Sonarqube results

Took some time to get there

TODO We re currently not testing the RAP version of Parsley We re working on using Selenium for that But it does not work out of the box Manual tests show that RAP single sourcing works great!

Links Homepage www.eclipse.org/emf-parsley Documentation https://www.eclipse.org/emf-parsley/documentation.html Forum https://www.eclipse.org/forums/index.php/f/263/ Bugzilla https://bugs.eclipse.org/bugs/buglist.cgi?product=emf.parsley