While the sample include testPlan.fx.yaml
as an example, you can also create this file by simply interacting with the application. The Power Apps Test Engine provides a record mode that allows you to generate test plans based on your interactions with the app.
NOTE: The recording feature is currently under development and improvement. This feature will continue to change and improve in future updates.
Follow these steps to record your first test:
Open the RunTests.ps1
Script:
\samples\buttonclicker\
directory.RunTests.ps1
script in a text editor like Visual Studio Code.Modify the Script to Enable Recording:
PowerAppsTestEngine.dll
using the dotnet
command.-r True
to the end of this line to enable recording mode. The modified line should look something like this:dotnet PowerAppsTestEngine.dll -u "storagestate" -p "canvas" -a "none" -i "$currentDirectory\testPlan.fx.yaml" -t $tenantId -e $environmentId -r True
Run the Script:
RunTests.ps1
.\samples\buttonclicker\
directory.pwsh -File RunTests.ps1
Interact with the Application:
Finish Recording:
Locate the Recorded Test File:
TestOutput
folder.recorded.te.yaml
file in this folder. This file contains the recorded test steps based on your interactions with the application.By following these steps, you can easily create a test plan by interacting with your Power App, making it simpler to automate your testing process.
In this section, you learned how to record your first test using the Power Apps Test Engine. By enabling recording mode in the RunTests.ps1
script and interacting with your Power App, you can generate a test plan based on your actions. This makes it easier to automate your testing process and ensure your application works as expected.