Welcome, early adopters! If you’re eager to try the current version of Power Platform Automated Testing, you’re in the right place. This guide will help you get started with the necessary components and provide you with two paths to explore automated testing.
There is also a work in progress Learning module to help you get started.
To get started, you’ll need the following components:
This can seem daunting but the following steps will help you with this process assuming you are using Microsoft Windows as your local operating system.
These install steps use winget for install.
To install a GitHub client you can follow these steps. You can also follow Download GitHub Desktop to download the application
winget
:winget install --id Git.Git -e --source winget
winget
:winget install --id GitHub.GitHubDesktop -e --source winget
git clone https://github.com/microsoft/PowerApps-TestEngine.git
cd PowerApps-TestEngine
PowerShell is typically pre-installed on Windows. But for these instructions we assume PowerShell Core is assumed. You can also follow instructions on Installing for different operating systems.
winget
:winget install --id Microsoft.PowerShell --source winget
pwsh --version
You can install the .Net 8.0 SDK using the following commands in Microsoft Windows. You can also follow Download .NET 8.0 for different operating systems and install steps.
winget
:winget install Microsoft.DotNet.SDK.8
dotnet --version
You can install the .Net 8.0 SDK using the following commands in Microsoft Windows. We can also follow Install Microsoft Power Platform CLI for different operating systems and install types.
dotnet tool install --global Microsoft.PowerApps.CLI.Tool
pac -v
winget install -e --id Microsoft.AzureCLI
az -version
az login --allow-no-subscriptions
Have the prerequisites installed and verified? If so lets looks at some samples to get started. For each sample reference the README.md for more information.
Each of the samples will need a config.json file in the folder using the following format. This file should be placed in each samples folder as the same level as RunTest.ps1
{
"tenantId": "a222222-1111-2222-3333-444455556666",
"environmentId": "12345678-1111-2222-3333-444455556666",
"customPage": "admin_initialsetuppage_d45cf",
"user1Email": "test@contoso.onmicrosoft.com",
"runInstall": true,
"installPlaywright": true
}
To complete this file
Open https://make.powerapps.com
Navigate to the Environment you want to test
On the command bar, select Settings (gear)
Select session details
Copy the Environment Id and Tenant Id to the config.json file you have created
Update user1Email to your test user email address.
Note: Some samples will not require the customPage setting
Samples are currently in the integration
branch as changes are reviewed and updated they will move to main and the Power Platform pac test run
command. To use this branch
git checkout integration
For those looking for a straightforward example, you can start with a simple scenario like clicking a button in a Canvas App. This example will help you understand the basics of automated testing in the Power Platform.
Import the ButtonClicker_*.zip file from the cloned repository using Import solutions
Copy you completed config.json file into the folder
Run the test
pwsh -File RunTests.ps1
For a more comprehensive example, you can explore the CoE Starter Kit Setup and Upgrade wizard. This low-code solution offers a broader scope for testing and provides a deeper understanding of automated testing in the Power Platform.
Install the CoE Kit using Get started with setup
Copy you completed config.json file into the folder
Run the test
pwsh -File RunTests.ps1
To Optionally record a new test based on your input and Dataverse and Connector calls you can
pwsh -File Record.ps1
When in record model wait until the Playwright Inspector appears
Interact with the application
Select continue in the Playwright Inspector to complete the session
The test results will indicate where to look at the recorded test results