SysTest framework

SysTest framework is the unit test framework in Microsoft Dynamics 365 for Finance and Operations. SysTest framework was available in the earlier version as well, and it provides developers with the ability to write unit test code for the business logic. The following improvements have been made to SysTest framework in D365FO:

  • Integration with the Visual Studio Test Explorer to discover, schedule, execute test cases, and analyze test results.
  • Automatic data rollback for SysTest tests, and the use of SQL savepoint transaction.
  • Capturing exceptions properly (for asserts), regardless of the transaction scope.
  • Ability to integrate an automated test with version control and build processes.
  • Simplified scope of testing when using the extension programming model, as your business logic is separated.
  • Ability to discover the existing tests for an object in your project; discovery uses cross-reference data and displays the result in the test explorer.
The automated testing integration with build is of utmost importance, especially in large enterprise engagements.

The next screenshot shows a sample test class with two test methods that are related to business logic in Finance and Operations:

As shown, the right-hand side shows the test class and test scripts. To create a test class, you simply add a class object, extend the SysTestCase class, and add test cases by creating a method and decorating it with [SysTestMethodAttribute]To the left, you can see Visual Studio Test Explorer, which discovers the test cases automatically. You can select one test case to run, or run them all.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.30.211