OSGi Testing

前端 未结 13 1059
执念已碎
执念已碎 2021-02-04 05:25

Currently, I am working on a new version control system as part of a final year project at University. The idea is to make it highly adaptable and pluggable.

We\'re usin

相关标签:
13条回答
  • 2021-02-04 06:16

    More recently, you should have a look at Pax Exam: http://team.ops4j.org/wiki/display/paxexam/Pax+Exam

    This is the current effort at OPS4J related to testing.

    0 讨论(0)
  • 2021-02-04 06:17

    If you need to test GUI components I've found SWTBot gets the job done.

    0 讨论(0)
  • 2021-02-04 06:19

    Spring Dynamic Modules has excellent support for testing OSGi bundles.

    0 讨论(0)
  • 2021-02-04 06:19

    During the last couple of years Tycho - a new Maven based build system for OSGi - has become rather popular among the Eclipse Foundation. This framework also includes method to use Maven Surefire to test OSGi bundles in separate testbeds...

    0 讨论(0)
  • 2021-02-04 06:22

    I think we met the same issue and we made our own solution. There are different parts of the solution:

    • A junit4runner that catches all OSGi services that has a special property defined. It runs these caught services with JUnit4 engine. JUnit annotations should be placed into interfaces that the services implement.
    • A maven plugin that starts an OSGi framework (a custom framework can be created as maven dependency) and runs the unit tests inside the integration-test maven lifecycle.
    • A deployer OSGi bundle. If this is dropped into your OSGi container a simple always-on-top window will be opened where you can drop your project folders (from total commander or from eclipse). This will then redeploy that bundle.

    With the tools you can do TDD and have the written tests always run inside the maven integration-phase as well. It is recommended to use eclipse with m2e and maven-bundle-plugin as in this case the target/classes/META-INF/MANIFEST.MF is regenerated as soon as you save a class in your source so you can drag the project and drop to the deployer window. The OSGi bundles you develop do not have to have any special feature (like being an eclipse plugin or something).

    The whole solution is OpenSource. You can find a tutorial at http://cookbook.everit.org

    0 讨论(0)
  • 2021-02-04 06:23

    The ProSyst Test Execution Environment is a useful test tool for OSGi bundles. It also supports JUnit tests as one of the possible test models.

    0 讨论(0)
提交回复
热议问题