Testing Eclipse plugins: from unit to end to end testing

Subscribers:
24,000
Published on ● Video Link: https://www.youtube.com/watch?v=V2jZA0QTNts



Duration: 31:11
1,861 views
7


by Lorenzo Bettini , Vincenzo Caselli & Francesco Guidieri

In this talk we want to share some tips and tricks on how to test Eclipse plug-ins at several stages during the development. In particular, we will show how to do without a running workbench (i.e., “Plug-in tests”) and without functional testing frameworks (e.g., SWTBot) as much as possible, relying only on plain JUnit tests.
Indeed, many important parts of the components of an Eclipse plug-in can be tested with a plain JUnit test. Note that we are not talking only about core, non UI, parts: even those parts that need SWT or Jface (e.g., label and content providers, tree and table viewers) can be almost entirely tested without an Eclipse workbench (for most tests, you don’t even need a Display). With that respect, we will show some testing utility classes that can be reused in your projects. We will also show some examples of mocking to make tests cleaner and to be able to test even corner case situations. Using plain JUnit tests as much as possible has the huge advantage of making your software much easier and much faster to test (we’re talking about seconds instead of several minutes).
Then we will also show when to write “Plug-in tests”, in order to test the features that actually need a running workbench; in this case, we will follow a programmatic approach and we will then switch to a functional testing framework (e.g., SWTBot) when we really need to test the actions that a user would perform on our Eclipse plug-ins. Finally, we will also write (end-to-end) tests on a fully provisioned product (being that a custom Eclipse product or a standard Eclipse installation with our plug-ins installed).
The talk will use simple examples and all the techniques and source code will be easily reusable in other Eclipse projects. Maven/Tycho will also be used to show the execution of tests in a CI system. All the presented techniques have been successfully used to test all the aspects of our Eclipse project EMF Parsley.




Other Videos By Eclipse Foundation


2017-07-11Squaring the Capella circle: Open Source Agile Traditional, by Joao Barata &Philippe DUL
2017-07-11EMF Models getting XXL? An overview of available solutions, by Benoit VIAUD & Jonathan Lasalle
2017-07-11SW360 - The Component Management Hub, by Johannes Kristan
2017-07-11OSGi (Equinox) at the UK's Biggest Science Project, by Matthew Gerring
2017-07-11Patching the gap in collaborating on models, Abel Hegedus & Olivier Constant
2017-07-11My Minecraft Smart Home: Prototyping the Internet of Uncanny Things, by Sascha Wolter
2017-07-11Document Generation with M2Doc, by Laurent Delaigue
2017-07-11Code Coverage in Practice, by Evgeny Mandrikov
2017-07-11Getting started with Jubula - an UI test automation framework, by Markus Tiede
2017-07-11The new era of ALM in Airbus with Tuleap, by Nicolas FANJEAU & Alain BERNARD
2017-07-11Testing Eclipse plugins: from unit to end to end testing
2017-07-11Visual Studio Team Services can help Eclipse developers? You're kidding me! by François Bouteruche
2017-07-11Learnings from Excel, by Holger Schill & Sebastian Zarnekow
2017-07-11The EMF Parsley DSL: an extensive use case of Xtext/Xbase powerful mechanisms
2017-07-11Introduction to expression languages in Xtext, by Karsten Thoms
2017-07-11EcoreTools Next: Executable DSL made (more) accessible, by Cedric Brun
2017-07-11Formalizing Financial Protocols with Xtext, by Denis Ignatovich
2017-07-11Deep dive into Xtext scoping - local and global scopes explained, by H. Schill & S. Zarnekow
2017-07-11Debugging DSLs with Xtext's new Tracing API, by Christian Schneider & Miro Spoenemann
2017-07-11How EASE unleashes the scientific power of Airbus' engineers in Eclipse, by Alain Bernard
2017-07-11Ignite talks, session 2