Uploaded image for project: 'infrautils'
  1. infrautils
  2. INFRAUTILS-12

New integration test utilities

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Medium Medium
    • None
    • Nitrogen
    • General
    • None
    • Operating System: All
      Platform: All

      As-is currently, it takes too much copy/paste-ing, of both POM XML as well as Java code, to correctly create Pax Exam Integration Tests which in Karaf in ODL.

      Caveat emptor: ITs should ONLY be written if what you need test coverage for cannot be done with a "Component Test", see https://wiki-archive.opendaylight.org/view/BestPractices/Component_Tests; but sometimes they are useful...

      The org.opendaylight.controller.config.it.base.AbstractConfigTestBase is a previous attempt at something similar (and there may be others that I'm not aware of?), but it has limitations (incl. its use of CSS, and only 1 feature; also no base POM), so I'll propose a new one in infrautils.

      It will attempt to enforce a much cleaner classpath than most of our current ITs have; it's just wrong to have an entire Karaf and the features themselves on the test's CP; all that is loaded dynamically, that's the whole point of Pax Exam; only the IT itself, a small API surface of what you want to test, but not impls, and some Pax utils should be on the CP...

      If I can, I may even make the new one able to automatically support running the same IT under both Karaf 3 as well as Karaf 4, that would be cool.

      It may have other built-in goodies in the future; e.g. something to deal with PITA of referencing utility classes from tests, such as something like say the infrautils LogRule or Google Truth, etc. (Due to the Pax Exam classloading, that's a real PITA.)

      I'm also missing a utility to be able to easily test Karaf CLI commands; I'll probably eventually add that as part of this as well.

            Unassigned Unassigned
            vorburger Michael Vorburger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: