Thanks for landing here!
Microsoft has developed a series of automated tests that allow developers to test various features of the standard application before releasing new functionality in production.
NAV Developers can extended Microsoft’s work to include testing of their work.
- To test the standard application, the developer needs to install the Test Toolkit as delivered with each build by Microsoft. The Test Toolkit can be found in the ‘TestToolkit’ folder of the build.
Contents of the TestToolkit folder:
- CALTestRunner.fob – contains objects to support the application testing, including tables (e.g. CAL Test Suite, CAL Test Line, CAL Test Codeunit); codeunits (e.g. CAL Test Runner), and pages (e.g. CAL Test Tool).
- CALTestLibraries.fob – contains libraries used in the actual tests, such as the “Assert” codeunit or the “Library – Random” codeunit
- CALTestCodeunits.fob – the actual tests Microsoft designed to test different sections of the standard application
2. To run standard tests, run Page 130401 “CAL Test Tool”.
3. Develop your own tests:
- create a test suite (create record in table 130400 “CAL TestSuite”)
- create groups, test codeunits and individual tests. You can generate them via a codeunit like below:
For test codeunits increase “Level” and the “Line Type” to Codeunit, for individual tests increase again “Level” and change the “Line Type” to Function.
4. Create a test codeunit and give it the ID you specified in the previous step.
Change the codeunit subtype to Test to make it testable codeunit.
5. To create individual tests, create a function and change FunctionType to Test:
Depending on the code you’re testing you might need to specify your UI Handlers in HandlerFunctions property.
Please visit msdn for so much more info.
Thank you for reading, sharing, following, commenting …
Original post here.