SlideShare una empresa de Scribd logo
1 de 59
OSGi Versioning and Testing Chris AniszczykEclipseSource http://aniszczyk.org Paul VanderLei Band XI International
Sample Application: Toast Telematics-On-A-STick Sample from upcoming bookequinoxosgi.org Example project in EclipseRTwiki.eclipse.org/Toast 2 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Toast Dependencies 3 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 EmergencyMonitor EmergencyServlet GPS Channel Airbag Log
get location EmergencyMonitor notify EmergencyServlet send HTTP GPS log Channel Log Toast: Emergency Scenario 4 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Airbag
Versioning: Overview Versioning Evolving API Tools Issues Summary 5 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Define Versioning “Software versioning is the process of assigning either unique version names or unique version numbers to unique states of computer software.” Versioning is relative though… 6 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Versioning: User Perspective 7 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Versioning is a marketing thing… User’s don’t really care about versions… Users just want to know if the version of the software they are running is current… e.g., Ubuntu Feisty Fawn – 7.04 Gutsy Gibbon – 7.10 Hardy Heron – 8.04
Versioning: Dev Perspective 8 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Version numbers are like dog tags* Primarily used in an event of emergency… *http://www.codinghorror.com/blog/archives/000793.html
OSGi Versions Dependencies are defined on the module and package level Import-Package Require-Bundle Ranges allow for flexibility Import-Package: org.easymock;version=[2.4.0,3.0.0) 9 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
OSGi Versioning Scheme major.minor.micro.qualifier major – An incompatible update; breaking API minor – A backward compatible update; API stable micro – A bug fix; no API changes qualifier – build date; lexigraphic Versions should encode compatibility* at the bundle and package level 10 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 *http://wiki.eclipse.org/Version_Numbering
Bundle Versions in Eclipse 11 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Notice how the version numbers don’t necessarily match the 3.6 release?
Evolving API: GPS 1.0 12 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Log4j… 17 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Commons Collections !@#$ 18 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 “Commons collections 3.0 is binary compatible with version 2.1 and 2.0 except for certain methods on one class . As the release was a major version, this is permitted, however it was unintentional and an error… the chosen solution is to provide a work around by releasing v2.1.1 and v3.1.” http://commons.apache.org/collections/compatibility.html
Developer Reaction… 19 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Contracts are Important Good fences make for good neighbors! Binary compatibility* is important 20 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Tools Binary compatibility is important Maintaining binary compatibility is complex Eclipse puts API on an altar… Since Eclipse 3.4, Eclipse uses tools to manage and evolve API… 21 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 *http://java.sun.com/docs/books/jls/second_edition/html/binaryComp.doc.html
PDE API Tools Assists developers in API maintenance by reporting API defects such as binary incompatibilities, incorrect bundle version numbers and API usage. Let’s see an example… 22 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
GPS Example using API Tools 23 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 We need height!
Version Scheme Compliance 24 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 ,[object Object],[object Object],[object Object],[object Object]
API Comparison 28 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 ,[object Object],[object Object]
API Usage Report 30 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 22 GPS API References
API Usage Report 31 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 API Reference Details
Issues Getting proper version ranges correct is difficult if there’s no consistent semantics e.g., log4j case Not all bundles are versioned properly in repositories Tooling doesn’t cover packages yet… 32 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Summary OSGi versions encode compatibility! Don’t treat bundle versions like a marketing number Scope your version ranges properly 33 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Testing: Overview Good Practices Sample Application Unit Testing System Testing Remaining Issues 34 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Good Practices: Testability Write your application as POJOs(plain-old-java-objects) No Service Trackers! Whiteboard Pattern is tricky Pay attention to dependencies Unit testing depends on getting this right 35 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Good Practices: Testing Use Junit Use mock objects (EasyMock, jMock...) Minimize delays No human interaction Do TDD 36 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 “…I think that developers who can’t cope with any level of TDD shouldn’t be coding at all…”
Unit Testing: Overview Terminology Unit under test (UUT) Test harness Test each POJO on its own (no OSGi) Mock each dependency 37 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
get location EmergencyMonitor notify EmergencyServlet send HTTP GPS log Channel Log Toast: Emergency Scenario 38 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Airbag
UUT test harness Unit Testing: Example 39 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 get location EmergencyMonitor notify EmergencyServlet send GPS MockGPS Channel MockChannel Airbag MockAirbag Log
Unit Testing: Test Case Project Keep the test case in a separate project But POJO is not visible Solution: 40 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 fragment bundle
Unit Testing: Test Case Project 41 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Dependencies Junit & EasyMock dependencyinterfaces
Unit Testing: Test Case Code 42 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 createUUT createmock GPS
Unit Testing: Test Case Code 43 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 createmock airbag
Unit Testing: Test Case Code 44 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 createmock channel
Unit Testing: Test Case Code 45 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 runthe test
Unit Testing: Running 46 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
System Testing: Overview Test as much of system as possible OSGi is present Test full system flow Test bundles coming and going 47 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
UUT get location EmergencyMonitor notify EmergencyServlet send HTTP GPS ? log Channel test harness Log MockLog System Testing: Example 48 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 deploy Airbag MockAirbag verify TestCase
System Testing: Test Case Project 49 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Normal Plug-in Project declares 3 components
System Testing: Test Harness 50 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 hook for testing
System Testing: Test Harness 51 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 hook for testing
System Testing:Competing Programming Models PDE Junit test infrastructure uses Equinoxextensions Declarative Services uses OSGi services 52 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 VS
System Testing:PDE Junit Test Infrastructure Junit instantiates the test case as usual setup() testEmergency() Problem: no way to obtain: bundle context mock airbag mock log 53 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
System Testing:Declarative Services Instantiates the test case as a component DS dependency injection setAirbag(<our mock airbag>) setLog(<our mock log>) startup() Problem: This instance is never used by Junit! 54 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
System Testing: Test Case Code 55 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 instances share these DS invokes these DS invokes these DS invokes these ready to run test case
System Testing: Test Case Code 56 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 wait until DS has activated normaltest stop GPS bundle start GPS bundle
System Testing:Launch Configuration 57 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Remaining Issues Still very tricky Not well-supported by PDE tooling Validation by logging is fragile 58 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
Availability Get the slides: tinyurl.com/osgiVT Get the code: wiki.eclipse.org/Toast Get the book: equinoxosgi.org 59 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Questions?
Sample Application:Emergency Scenario 60 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 EmergencyMonitor EmergencyServlet GPS Channel Airbag Log
OSGi Versioning and Testing Tools
OSGi Versioning and Testing Tools
OSGi Versioning and Testing Tools
OSGi Versioning and Testing Tools
OSGi Versioning and Testing Tools
OSGi Versioning and Testing Tools
OSGi Versioning and Testing Tools

Más contenido relacionado

La actualidad más candente

Tycho Tutorial EclipseCon 2013
Tycho Tutorial EclipseCon 2013Tycho Tutorial EclipseCon 2013
Tycho Tutorial EclipseCon 2013jsievers
 
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)jsievers
 
P2 Introduction
P2 IntroductionP2 Introduction
P2 Introductionirbull
 
Eclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricksEclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricksTomasz Zarna
 
15 EMF projects in 25 minutes
15 EMF projects in 25 minutes15 EMF projects in 25 minutes
15 EMF projects in 25 minutesCédric Brun
 
Tycho - Building plug-ins with Maven
Tycho - Building plug-ins with MavenTycho - Building plug-ins with Maven
Tycho - Building plug-ins with MavenPascal Rapicault
 
Google ART (Android RunTime)
Google ART (Android RunTime)Google ART (Android RunTime)
Google ART (Android RunTime)Niraj Solanke
 
Appcelerator: iOS 10, Titanium SDK & Hyperloop
Appcelerator: iOS 10, Titanium SDK & HyperloopAppcelerator: iOS 10, Titanium SDK & Hyperloop
Appcelerator: iOS 10, Titanium SDK & HyperloopHans Knoechel
 
What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !Cédric Brun
 
Composing Music in the Cloud
Composing Music in the CloudComposing Music in the Cloud
Composing Music in the CloudCodemotion
 
Android and OSGi Can They Work Together - BJ Hargrave & Neil Bartlett
Android and OSGi Can They Work Together - BJ Hargrave & Neil BartlettAndroid and OSGi Can They Work Together - BJ Hargrave & Neil Bartlett
Android and OSGi Can They Work Together - BJ Hargrave & Neil Bartlettmfrancis
 
Docker for Software Development
Docker for Software DevelopmentDocker for Software Development
Docker for Software Developmentinside-BigData.com
 
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to EclipseGEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to EclipseYoann Rodiere
 
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Embarcadero Technologies
 
Appcelerator Hyperloop: Overview, Architecture & Demo
Appcelerator Hyperloop: Overview, Architecture & DemoAppcelerator Hyperloop: Overview, Architecture & Demo
Appcelerator Hyperloop: Overview, Architecture & DemoHans Knoechel
 
Cross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React NativeCross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React NativeKorhan Bircan
 
How to Game a Geocoding API on Amazon and achieve High-Scores with FME
How to Game a Geocoding API on Amazon and achieve High-Scores with FMEHow to Game a Geocoding API on Amazon and achieve High-Scores with FME
How to Game a Geocoding API on Amazon and achieve High-Scores with FMESafe Software
 
Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework Embarcadero Technologies
 

La actualidad más candente (20)

Tycho Tutorial EclipseCon 2013
Tycho Tutorial EclipseCon 2013Tycho Tutorial EclipseCon 2013
Tycho Tutorial EclipseCon 2013
 
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)
 
P2 Introduction
P2 IntroductionP2 Introduction
P2 Introduction
 
Eclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricksEclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricks
 
15 EMF projects in 25 minutes
15 EMF projects in 25 minutes15 EMF projects in 25 minutes
15 EMF projects in 25 minutes
 
Maven 3 / Tycho
Maven 3 / TychoMaven 3 / Tycho
Maven 3 / Tycho
 
Tycho - Building plug-ins with Maven
Tycho - Building plug-ins with MavenTycho - Building plug-ins with Maven
Tycho - Building plug-ins with Maven
 
Google ART (Android RunTime)
Google ART (Android RunTime)Google ART (Android RunTime)
Google ART (Android RunTime)
 
Appcelerator: iOS 10, Titanium SDK & Hyperloop
Appcelerator: iOS 10, Titanium SDK & HyperloopAppcelerator: iOS 10, Titanium SDK & Hyperloop
Appcelerator: iOS 10, Titanium SDK & Hyperloop
 
What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !
 
Composing Music in the Cloud
Composing Music in the CloudComposing Music in the Cloud
Composing Music in the Cloud
 
Android and OSGi Can They Work Together - BJ Hargrave & Neil Bartlett
Android and OSGi Can They Work Together - BJ Hargrave & Neil BartlettAndroid and OSGi Can They Work Together - BJ Hargrave & Neil Bartlett
Android and OSGi Can They Work Together - BJ Hargrave & Neil Bartlett
 
Docker for Software Development
Docker for Software DevelopmentDocker for Software Development
Docker for Software Development
 
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to EclipseGEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
 
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
 
Compare framework
Compare frameworkCompare framework
Compare framework
 
Appcelerator Hyperloop: Overview, Architecture & Demo
Appcelerator Hyperloop: Overview, Architecture & DemoAppcelerator Hyperloop: Overview, Architecture & Demo
Appcelerator Hyperloop: Overview, Architecture & Demo
 
Cross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React NativeCross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React Native
 
How to Game a Geocoding API on Amazon and achieve High-Scores with FME
How to Game a Geocoding API on Amazon and achieve High-Scores with FMEHow to Game a Geocoding API on Amazon and achieve High-Scores with FME
How to Game a Geocoding API on Amazon and achieve High-Scores with FME
 
Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework
 

Destacado

Econ775PP1
Econ775PP1Econ775PP1
Econ775PP1liangtfm
 
Tallet Fem
Tallet FemTallet Fem
Tallet FemElise
 
Week12 Pre
Week12 PreWeek12 Pre
Week12 Pres1150188
 
Mid Term Unfront Analysis
Mid Term Unfront AnalysisMid Term Unfront Analysis
Mid Term Unfront Analysisevyyan
 
Final Presentation
Final PresentationFinal Presentation
Final Presentationevyyan
 
Week11.Pre
Week11.PreWeek11.Pre
Week11.Pres1150188
 
Np Project Deliverable
Np Project DeliverableNp Project Deliverable
Np Project Deliverableevyyan
 
Mid Term Unfront Analysis
Mid Term Unfront AnalysisMid Term Unfront Analysis
Mid Term Unfront Analysisevyyan
 

Destacado (16)

Cronologia Tdt
Cronologia TdtCronologia Tdt
Cronologia Tdt
 
Econ775PP1
Econ775PP1Econ775PP1
Econ775PP1
 
Week5
Week5Week5
Week5
 
Tallet Fem
Tallet FemTallet Fem
Tallet Fem
 
Week12 Pre
Week12 PreWeek12 Pre
Week12 Pre
 
Mid Term Unfront Analysis
Mid Term Unfront AnalysisMid Term Unfront Analysis
Mid Term Unfront Analysis
 
Week7
Week7Week7
Week7
 
Week9.Pre
Week9.PreWeek9.Pre
Week9.Pre
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
Week6
Week6Week6
Week6
 
Week11.Pre
Week11.PreWeek11.Pre
Week11.Pre
 
Bambas
BambasBambas
Bambas
 
Bambas
BambasBambas
Bambas
 
Np Project Deliverable
Np Project DeliverableNp Project Deliverable
Np Project Deliverable
 
Week10
Week10Week10
Week10
 
Mid Term Unfront Analysis
Mid Term Unfront AnalysisMid Term Unfront Analysis
Mid Term Unfront Analysis
 

Similar a OSGi Versioning and Testing Tools

OSGi Versioning & Testing
OSGi Versioning & TestingOSGi Versioning & Testing
OSGi Versioning & TestingChris Aniszczyk
 
EclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL TutorialEclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL TutorialEric Cloninger
 
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platformjavagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platformTonny Madsen
 
OSGi, Eclipse and API Tooling
OSGi, Eclipse and API ToolingOSGi, Eclipse and API Tooling
OSGi, Eclipse and API ToolingChris Aniszczyk
 
Create Cross-Platform Native Mobile Apps in Flex with ELIPS Studio
Create Cross-Platform Native Mobile Apps in Flex with ELIPS StudioCreate Cross-Platform Native Mobile Apps in Flex with ELIPS Studio
Create Cross-Platform Native Mobile Apps in Flex with ELIPS StudioGuilhem Ensuque
 
Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)Pascal Rapicault
 
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraftstackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with UnikraftNETWAYS
 
Virgo RT from Eclipse Summit Europe 2010
Virgo RT from Eclipse Summit Europe 2010Virgo RT from Eclipse Summit Europe 2010
Virgo RT from Eclipse Summit Europe 2010Christopher Frost
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?Niklas Heidloff
 
The OSGi Complete - Pavlin Dobrev
The OSGi Complete - Pavlin DobrevThe OSGi Complete - Pavlin Dobrev
The OSGi Complete - Pavlin Dobrevmfrancis
 
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiEclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiRafik HARABI
 
Demo: The First Virtualized Phone
Demo: The First Virtualized PhoneDemo: The First Virtualized Phone
Demo: The First Virtualized PhoneOpen Kernel Labs
 
Angular11 exciting new features and updates
Angular11 exciting new features and updatesAngular11 exciting new features and updates
Angular11 exciting new features and updatesShelly Megan
 

Similar a OSGi Versioning and Testing Tools (20)

OSGi Versioning & Testing
OSGi Versioning & TestingOSGi Versioning & Testing
OSGi Versioning & Testing
 
2010 06 22 omg - obeo
2010 06 22   omg - obeo2010 06 22   omg - obeo
2010 06 22 omg - obeo
 
EclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL TutorialEclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL Tutorial
 
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platformjavagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platform
 
Eclipse Way
Eclipse WayEclipse Way
Eclipse Way
 
OSGi, Eclipse and API Tooling
OSGi, Eclipse and API ToolingOSGi, Eclipse and API Tooling
OSGi, Eclipse and API Tooling
 
Create Cross-Platform Native Mobile Apps in Flex with ELIPS Studio
Create Cross-Platform Native Mobile Apps in Flex with ELIPS StudioCreate Cross-Platform Native Mobile Apps in Flex with ELIPS Studio
Create Cross-Platform Native Mobile Apps in Flex with ELIPS Studio
 
Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)
 
Eclipse
EclipseEclipse
Eclipse
 
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraftstackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
 
Discovering the p2 API
Discovering the p2 APIDiscovering the p2 API
Discovering the p2 API
 
Angular 2 kickstart
Angular 2 kickstartAngular 2 kickstart
Angular 2 kickstart
 
Virgo RT from Eclipse Summit Europe 2010
Virgo RT from Eclipse Summit Europe 2010Virgo RT from Eclipse Summit Europe 2010
Virgo RT from Eclipse Summit Europe 2010
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?
 
The OSGi Complete - Pavlin Dobrev
The OSGi Complete - Pavlin DobrevThe OSGi Complete - Pavlin Dobrev
The OSGi Complete - Pavlin Dobrev
 
Appium solution
Appium solutionAppium solution
Appium solution
 
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiEclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
 
Appium.pptx
Appium.pptxAppium.pptx
Appium.pptx
 
Demo: The First Virtualized Phone
Demo: The First Virtualized PhoneDemo: The First Virtualized Phone
Demo: The First Virtualized Phone
 
Angular11 exciting new features and updates
Angular11 exciting new features and updatesAngular11 exciting new features and updates
Angular11 exciting new features and updates
 

Último

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

OSGi Versioning and Testing Tools

  • 1. OSGi Versioning and Testing Chris AniszczykEclipseSource http://aniszczyk.org Paul VanderLei Band XI International
  • 2. Sample Application: Toast Telematics-On-A-STick Sample from upcoming bookequinoxosgi.org Example project in EclipseRTwiki.eclipse.org/Toast 2 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 3. Toast Dependencies 3 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 EmergencyMonitor EmergencyServlet GPS Channel Airbag Log
  • 4. get location EmergencyMonitor notify EmergencyServlet send HTTP GPS log Channel Log Toast: Emergency Scenario 4 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Airbag
  • 5. Versioning: Overview Versioning Evolving API Tools Issues Summary 5 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 6. Define Versioning “Software versioning is the process of assigning either unique version names or unique version numbers to unique states of computer software.” Versioning is relative though… 6 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 7. Versioning: User Perspective 7 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Versioning is a marketing thing… User’s don’t really care about versions… Users just want to know if the version of the software they are running is current… e.g., Ubuntu Feisty Fawn – 7.04 Gutsy Gibbon – 7.10 Hardy Heron – 8.04
  • 8. Versioning: Dev Perspective 8 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Version numbers are like dog tags* Primarily used in an event of emergency… *http://www.codinghorror.com/blog/archives/000793.html
  • 9. OSGi Versions Dependencies are defined on the module and package level Import-Package Require-Bundle Ranges allow for flexibility Import-Package: org.easymock;version=[2.4.0,3.0.0) 9 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 10. OSGi Versioning Scheme major.minor.micro.qualifier major – An incompatible update; breaking API minor – A backward compatible update; API stable micro – A bug fix; no API changes qualifier – build date; lexigraphic Versions should encode compatibility* at the bundle and package level 10 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 *http://wiki.eclipse.org/Version_Numbering
  • 11. Bundle Versions in Eclipse 11 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Notice how the version numbers don’t necessarily match the 3.6 release?
  • 12.
  • 13. Log4j… 17 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 14. Commons Collections !@#$ 18 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 “Commons collections 3.0 is binary compatible with version 2.1 and 2.0 except for certain methods on one class . As the release was a major version, this is permitted, however it was unintentional and an error… the chosen solution is to provide a work around by releasing v2.1.1 and v3.1.” http://commons.apache.org/collections/compatibility.html
  • 15. Developer Reaction… 19 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 16. Contracts are Important Good fences make for good neighbors! Binary compatibility* is important 20 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 17. Tools Binary compatibility is important Maintaining binary compatibility is complex Eclipse puts API on an altar… Since Eclipse 3.4, Eclipse uses tools to manage and evolve API… 21 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 *http://java.sun.com/docs/books/jls/second_edition/html/binaryComp.doc.html
  • 18. PDE API Tools Assists developers in API maintenance by reporting API defects such as binary incompatibilities, incorrect bundle version numbers and API usage. Let’s see an example… 22 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 19. GPS Example using API Tools 23 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 We need height!
  • 20.
  • 21.
  • 22. API Usage Report 30 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 22 GPS API References
  • 23. API Usage Report 31 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 API Reference Details
  • 24. Issues Getting proper version ranges correct is difficult if there’s no consistent semantics e.g., log4j case Not all bundles are versioned properly in repositories Tooling doesn’t cover packages yet… 32 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 25. Summary OSGi versions encode compatibility! Don’t treat bundle versions like a marketing number Scope your version ranges properly 33 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 26. Testing: Overview Good Practices Sample Application Unit Testing System Testing Remaining Issues 34 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 27. Good Practices: Testability Write your application as POJOs(plain-old-java-objects) No Service Trackers! Whiteboard Pattern is tricky Pay attention to dependencies Unit testing depends on getting this right 35 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 28. Good Practices: Testing Use Junit Use mock objects (EasyMock, jMock...) Minimize delays No human interaction Do TDD 36 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 “…I think that developers who can’t cope with any level of TDD shouldn’t be coding at all…”
  • 29. Unit Testing: Overview Terminology Unit under test (UUT) Test harness Test each POJO on its own (no OSGi) Mock each dependency 37 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 30. get location EmergencyMonitor notify EmergencyServlet send HTTP GPS log Channel Log Toast: Emergency Scenario 38 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Airbag
  • 31. UUT test harness Unit Testing: Example 39 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 get location EmergencyMonitor notify EmergencyServlet send GPS MockGPS Channel MockChannel Airbag MockAirbag Log
  • 32. Unit Testing: Test Case Project Keep the test case in a separate project But POJO is not visible Solution: 40 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 fragment bundle
  • 33. Unit Testing: Test Case Project 41 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Dependencies Junit & EasyMock dependencyinterfaces
  • 34. Unit Testing: Test Case Code 42 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 createUUT createmock GPS
  • 35. Unit Testing: Test Case Code 43 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 createmock airbag
  • 36. Unit Testing: Test Case Code 44 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 createmock channel
  • 37. Unit Testing: Test Case Code 45 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 runthe test
  • 38. Unit Testing: Running 46 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 39. System Testing: Overview Test as much of system as possible OSGi is present Test full system flow Test bundles coming and going 47 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 40. UUT get location EmergencyMonitor notify EmergencyServlet send HTTP GPS ? log Channel test harness Log MockLog System Testing: Example 48 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 deploy Airbag MockAirbag verify TestCase
  • 41. System Testing: Test Case Project 49 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Normal Plug-in Project declares 3 components
  • 42. System Testing: Test Harness 50 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 hook for testing
  • 43. System Testing: Test Harness 51 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 hook for testing
  • 44. System Testing:Competing Programming Models PDE Junit test infrastructure uses Equinoxextensions Declarative Services uses OSGi services 52 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 VS
  • 45. System Testing:PDE Junit Test Infrastructure Junit instantiates the test case as usual setup() testEmergency() Problem: no way to obtain: bundle context mock airbag mock log 53 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 46. System Testing:Declarative Services Instantiates the test case as a component DS dependency injection setAirbag(<our mock airbag>) setLog(<our mock log>) startup() Problem: This instance is never used by Junit! 54 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 47. System Testing: Test Case Code 55 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 instances share these DS invokes these DS invokes these DS invokes these ready to run test case
  • 48. System Testing: Test Case Code 56 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 wait until DS has activated normaltest stop GPS bundle start GPS bundle
  • 49. System Testing:Launch Configuration 57 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 50. Remaining Issues Still very tricky Not well-supported by PDE tooling Validation by logging is fragile 58 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0
  • 51. Availability Get the slides: tinyurl.com/osgiVT Get the code: wiki.eclipse.org/Toast Get the book: equinoxosgi.org 59 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 Questions?
  • 52. Sample Application:Emergency Scenario 60 OSGi Versioning and Testing | © Copyright 2009 EclipseSource & Band XI International; made available under EPL v1.0 EmergencyMonitor EmergencyServlet GPS Channel Airbag Log