Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5966

Changed unmarshalling integration test to use parametrized unit tests and a separate coverage test

    XMLWordPrintable

    Details

      Description

      I just published a pull request containing an improvement for the WillItUnmarshal Test.

      The famous WillItUnmarshall unit test now uses some parametrized test magic to make the integration tests for the configuration files more easy and avoids adding multiple lines of code for each new configuration file.

      Using this method, a new configuration file can be added by adding one single line of code and a new test instance for this file is created automagically.

      This also moves the test coverage mechanism for the old version to a separate class, testing the coverage of the WillItUnmarshall test without making assumptions on the test execution order as the current version does. This meta test also uses the parametrized test feature to provide a test instance for each file in the /etc directories checking the coverage for this file and providing a clean test failure if the file is not covered and allowing easy debugging of test failures.

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              fooker Dustin Frisch
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: