Wiki

Clone wiki

TraceabilityV2 / Integration / UnitTesting

Home

Project Integration

#Unit Testing

There are two aspect to unit testing when it comes to implementing traceability into a project: verify trace implementation, and trace regression testing.

##Verify Trace Implementation A very important aspect of tracing code is that the trace class needs to fully wrap every aspect of the corresponding base class.

If a method or property is removed, or its signature is changed, then the trace code will fail to compile. Which makes sense since inheritance requires the signatures to match.

However, if new properties or methods are added, then the trace class will still compile with no issue. This also makes sense since inheritance does not require every method or property to be overridden. This does create a problem where someone is able to update the base class, and not update the trace class.

The Verify class is used to create unit tests that will compare the base class with its corresponding trace class. Now, if someone updates a base class, the unit tests will verify that the two classes still match.

Note: A SkipMap may be used with the Verify unit tests. Doing so will indicate that the unit tests should ignore certain methods or properties when checking correspondence.

For more information, see Verify

##Trace Regression Testing

Updated