Announcement Announcement Module
No announcement yet.
Best practices for testing Spring DM apps Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Best practices for testing Spring DM apps

    What kind of tests should one develop for Spring DM OSGi apps, and what's the best way to organize them?

    Unit and integration tests for the internals of a single bundle are easy enough with standard Spring testing techniques.

    There seems to be support for in-OSGi-container testing of individual bundles via the Bundle Creator test classes.

    1. Any serious Spring DM app, however, will consist of lots of bundles working together. How can we test those interactions? Is it possible to point the bundle creator test classes at the manifest of a PAR, or a plan, and have it pick up all the required pieces?

    2. Whichever approach to testing you take, you're going to wind up with a bunch of dependencies on test packages like JUnit, Spring Test, H2 or Hypersonic database drivers, etc. What's the best way to express these dependencies in your project structures? If you're using Maven, you can set them up as test scope dependencies in the pom. What if you don't use Maven? Is it reasonable to express them with Import-Package in the bundle manifest, with optional resolution?

    3. What other considerations should we be thinking about when testing Spring DM apps?