top of page
Blue Background

Resources - BLOG

User Acceptance Testing in Business Central Made Easy

  • Writer: John Ellis
    John Ellis
  • Sep 19, 2024
  • 3 min read

Updated: Sep 1

User Acceptance Testing (UAT) is a critical phase in the implementation of Microsoft Dynamics 365 Business Central.


This process ensures that the system meets the business requirements and functions as expected in real-world scenarios. UAT involves end users testing various business processes to validate that the system performs correctly after any changes or updates.


One of the latest features enhancing this process is “Page Scripting,” which allows users to record their actions within the application. This innovative tool captures events such as opening pages, entering data, and selecting actions, providing immediate feedback on whether the tests pass or fail.

 

(Testing of the new “Page Scripting” feature for this blog article was conducted in Version 24.4.22295.22393.)


Steps to User Acceptance Testing in Business Central


How to Open Page Scripting


Click the “Settings” button found in the top right-hand corner of Business Central, to access Page Scripting:

Settings menu in Dynamics 365 Business Central with options like Personalize and Design. 'Page scripting (Preview)' is circled in red, highlighting tools for User Acceptance Testing in Business Central.
Interface for Page Scripting preview; laptop with AI icon. Text describes recording scripts in Business Central. Buttons: Start new, Open.

Testing


Upon clicking the “Start new” button, click the red dot to begin recording:


Software window showing page scripting in preview mode. A red record button is active, with "Recording" text and no steps recorded.

Once you have concluded your testing, click the “Stop” button.


As a simple example, we tested opening and closing the “Sales Quote” screen:


Page Scripting interface with playback controls. Text details actions: invoking, focusing, and closing a "Sales Quote" page.

To replay these steps and determine if testing was successful, click the “Play” button:


Page Scripting window shows a completed script with green checks. Actions include invoking and closing "Sales Quote" and focusing on "Customer Name."

Like a macro, clicking the “Play” button replays your actions.  In clicking Play, the Sales Quote will reopen and reclose.

 

Using the other “VCR” buttons at the top of the pane, you may rewind and fast forward.


How to Save


Click the ellipsis button at the top of Page Scripting, to save the test as a “YAML” file:


Page scripting window shows recording options. File open dialog below displays Recording.yml selected. Text highlights actions on sales quotes.

After saving, you may later reopen the test by clicking the “Open” button seen when first accessing Page Scripting.

 

YAML is a data interchange file, and more information may be found at yaml.org.



Analyzing Your Tests


When you click the ellipsis button to the right of any of the steps that you conducted, you may choose Run to here:


Page Scripting interface showing a completed script, with buttons and a dropdown menu open. "Run to here" is circled in red.

Doing so allows you to troubleshoot the results of your UAT.



Microsoft's Guidelines


Microsoft provides the following published best practices and examples, in the use of Page Scripting:


  • Start recording from a well-known place, like the Role Center, because playback always starts from current page.

  • When you select a value in a grid, filter it so that the desired value is the first one.

  • Create new entities to use in a test, whenever possible.  For example, create a new customer to use in the new Sales Order test.

  • Avoid dependencies on data that might not be available during playback.

  • Break down recording to small parts for easier maintenance, for example:

    • Recording 1: setup user.

    • Recording 2: create customer.

    • Recording 3: create Sales Order.

    • Recording 4: post Sales Order.



Security


To record, your user account must have the “PAGESCRIPTING – REC” permission set or equivalent permissions.

 

To play a recording, your user account must have the “PAGESCRIPTING – PLAY” permission set or equivalent permissions.



Sharing Test Results


When clicking the “Share” button, you’ll make a copy of the Business Central environment and the results of your testing. 


This makes it easy for your administrator, consultant, or project manager to review results.

 

The following is an example of such a URL:



Conclusion


User Acceptance Testing is indispensable for the successful deployment and ongoing optimization of Microsoft Dynamics 365 Business Central.


The introduction of Page Scripting significantly enhances the UAT process by offering a straightforward and efficient way to validate business processes.


By enabling end users to record and replay their actions, this feature ensures that any issues are identified and addressed promptly, leading to a more reliable and user-friendly system.


Embracing UAT and leveraging tools like Page Scripting can greatly contribute to the overall success and user satisfaction of Business Central implementations.


Reach out with any questions or schedule a free consultation.


bottom of page