NAV 2017 – How To Start With Application Testing In 5 Easy Steps

Standard

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.

  1. 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.

E.g.

1

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:

2

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.

3

5. To create individual tests, create a function and change FunctionType to Test:

4

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.

Happy testing!

Thank you for reading, sharing, following, commenting …

Original post here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s