Open sandboxFocusImprove this doc

Testing aspects

Three complementary strategies are available for testing aspects. Snapshot testing should provide sufficient coverage for most scenarios.

Article Description
Snapshot testing of aspects Snapshot testing. Verifies that aspects transform code or report errors and warnings as expected by comparing actual output against stored baseline files. The transformed code isn't executed.
Testing the aspect's run-time behavior Run-time testing. Verifies the run-time behavior of aspects. Apply an aspect to test target code and execute the transformed code in a unit test. Use xUnit or any other testing framework.
Testing compile-time helper code Compile-time unit testing. Traditional unit tests of the compile-time helper logic used by aspects. The aspects themselves aren't executed.
Debugging aspects This article describes how to debug the compile-time logic of aspects and templates.
Configuring the external diff tool This article explains how to configure the external diff tool used when aspect tests fail.