Testing UI is usually tricky and is generally done only on the final application as validation tests.
Nevertheless a pure Eclipse 4 UI plugin (that can easily be mixed with other legacy Eclipse 3 plugins), provides POJOs that do not depend on any Eclipse RCP stack. In these conditions it is possible to mix different UI POJOs in a simple way so as to test their interactions (as integration tests).
This talk is about pure E4 UI testing. It will remind you the basic principles of the E4 runtime and architecture regarding the application model and the contribution with fragments, and it will introduce the E4 tester tooling to help you in your test management.
This talk will show how:
- To write your tests using the JUnit 5 framework
- To instantiate your POJO parts and combine them together in a single test case
- To simulate a selection to check if your parts display the right information
- To launch a handler and check the result
- To check the content of any widget in your UI using a simple API.
- To include these tests in your build process with maven tycho
E4 Tester is a project delivered by OPCoach on GitHub, under EPL license, with the appropriate P2 repository to make it easy to use in your development.