Create your BCPT scenarios with page scripting and AI
When you want to create a Business Central Performance Toolkit (BCPT) scenario it can always be hard for a developer and a functional consultant. This because the developer doesn’t know the functionality and sometimes for the functional consultant it is hard to describe the scenario and transfer it to the developer.
But then the Page Scripting tool is coming to the rescue!
With the Page Scripting tool a functional consultant can record the scenario which they want to do a performance test. And the developer can use that scenario to understand it and even create a BCPT scenario with the help of AI.
Starting the Page Scripting
Within BC24 the new page scripting it there and you can start it via:
How it works you can look up here:
Use page scripting tool for acceptance testing (preview) – Business Central | Microsoft Learn
When it is recorded you can export a .YAML file:
An example you can find here:
In this example I have created a vendor and created a purchase order and post it.
This file you can give to your developer and he can reply the scenario on is own environment.
Using AI
But wait… The developer can do more with it. So why not use Azure Open AI to generate an example BCPT scenario based on the YAML file?
Therefor you must first create a system prompt. I have created an example here:
PageScriptingBCPT/SystemPromptBCPT.txt at main ยท Bertverbeek4PS/PageScriptingBCPT (github.com)
If you insert the System Prompt into you Azure Open AI. And put your YAML file into the prompt you get already a nice result back:
And when you copy and paste it in VS Code you get already a kick-start on your BCPT scenario:
Leave a Reply