Tuesday, January 17, 2012

Test target in unit tests

When you set the SysTestTargetAttribute in a unit test case class, you should take care in assuring the validity of the attribute. There are no warnings or errors if you point to an element that does not exist.

If you run unit tests with code coverage, your test will be unresponsive for longer than expected. This is because the code coverage is calculated against the entire AOT if the element from SysTestTargetAttribute doesn't exist.

Click here, for the MSDN section on AX 2012 unit tests.