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

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.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Benjamin Reed July 16, 2013 at 2:23 PM

tests passed, merged to master

Benjamin Reed July 16, 2013 at 11:36 AM

I've merged the code to the pull-requests branch, if it goes green in Bamboo I'll go ahead and merge it.

Seth Leger July 16, 2013 at 10:51 AM

I've reviewed the code and this looks like a good improvement. It probably also helps us compiling on Java7 where the test execution order can change (presumably due to differences in introspection). I support merging to master.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

PagerDuty

Created July 15, 2013 at 3:23 PM
Updated January 27, 2017 at 4:21 PM
Resolved July 16, 2013 at 2:23 PM

Flag notifications