1. Test Driven Development with OSGi focuses on reducing deployment time through the use of OSGi and maven plugins to allow for faster iteration.
2. The eosgi-maven-plugin is demonstrated which allows defining OSGi container environments and running integration tests directly from maven.
3. The plugin supports configuring JVM options, system properties, timeouts and more to customize the container environment for running tests.
11. The Three Laws of TDD
1.You are not allowed to write any production code until you have
2.You are not allowed to write more of a unit test than is sufficient
3.You are not allowed to write more production code that is suffici
The Clean Coder (Chapter 5)
13. Blueprint / DS / creation from Acvtivator / ...
Test service
service.id=MyTest
service.testEngine=junit4
Test runner
JUnit4
TestEngine
14. I do not want to re-run all tests during
development
In development mode only tests with
@TestMethodInDevelopmentMode or
@TestClassInDevelopmentMode runs.
16. Test Code
Deploy / Run tests
Production code
What will run the tests on Jenkins?
17. Maven repository
Get the dist package
eosgi-maven-plugin:dist
- Unpack dist package
- Parse with velocity
- Add the dependencies
File system
18. Maven repository
Get the dist package
eosgi-maven-plugin:integration-test
- Unpack dist package
- Parse with velocity
- Add the dependencies
- with testrunner
- as symbolic links
Start the container
Collect test results
File system
25. Creating your own dist package
●
Look at the sample equinox package
●
Look at the .eosgi.dist.xml file
Look for the XSD in eosgi-maven-plugin sources and
read the documentation
●
●
Velocity variables
– .eosgi.dist.xml
●
●
bundleArtifacts:
List<DistributableBundleArtifact>
environment: EnvironmentConfiguration
– Parseable
files