Google uses Test-Driven Development extensively, but when Google’s newly formed Cloud Tools for Eclipse team set out to write a new Eclipse plug-in to support the Google Cloud Platform, we ran into a numerous areas where the RCP framework was not very testable. This talk explores multiple hacks we used to test things that were never designed to be tested:
- Separating Eclipse dependent and non-Eclipse dependent code
- Mocking Eclipse classes with Mockito
- Dependency injection
- Internal APIs
- Creating projects in setUp methods
- Headless tests
Open source examples from Github will be provided.