Java Reference
In-Depth Information
...
[junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 55.269 sec
...
[junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 54.686 sec
...
[junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 26.417 sec
No failures or errors! The Apache Felix Configuration Admin Service implementation
works the same on all three frameworks. This shouldn't be unexpected, because one
of the goals driving OSG i is reusable modules. Many framework bundles can be reused
on other frameworks. When you find you need a particular compendium service, and
your current framework doesn't provide it, look around in case you can reuse a bun-
dle from another site. You can even use Pax Exam to try different combinations of
compendium bundles.
Pax Exam makes integration testing as simple as unit testing, but like any good tool
you have to be careful not to overuse it. Each integration test has the overhead of start-
ing and stopping an OSG i container, so the overall test time can build up as you add
more and more tests. People are looking into reusing containers during testing, but
for some tests you need complete isolation. Although work is being done to reduce
the cost of each test, this cost will never be zero. In practice, this means you should
look carefully at your tests and try to get the most from each one.
Integration testing is normally considered the last phase of testing before starting
system or acceptance tests. You've tested each piece of functionality separately and
tested that the pieces work together. There's nothing else to test before verifying that
your application meets the customers' requirements—or is there?
7.3.5
Management testing
This topic contains an entire chapter (chapter 10) about how to manage OSG i appli-
cations, so it's clear that management is an important aspect. You should reflect that
by testing applications to make sure they can be successfully managed, upgraded, and
restarted before releasing them into production. Too often, we see bundles that work
perfectly until they're restarted or bundles that can't be upgraded without causing rip-
ples that affect the whole application.
What might management testing cover? Table 7.2 has some suggestions.
Table 7.2
Management testing ideas
Task
Involves
Install
Installing new bundles (or features) alongside existing used implementations
Uninstall
Uninstalling old bundles (or features) that may or may not have replacements
Upgrade
Upgrading one or more bundles with new functionality or bug fixes
Downgrade
Downgrading one or more bundles because of an unexpected regression
Graceful degradation
Seeing how long the application functions as elements are stopped or uninstalled
 
Search WWH ::




Custom Search