Welcome, early adopters! If you’re eager to try the current version of Power Platform Automated Testing, you’re in the right place. This module will help you get started with the necessary components to explore automated testing.
To get started, you’ll need the following components:
NOTEL These instructions apply to the inner ring using a build from source strategy. As these changes are included in the pac test run many of these steps are not required.
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 installation.
To install a GitHub client, you can follow these steps. You can also follow Download GitHub Desktop to download the application.
If you don’t already have Git installed, you can install it using winget
:
winget install --id Git.Git -e --source winget
Alternatively, you can use GitHub Desktop. Install it using winget
:
winget install --id GitHub.GitHubDesktop -e --source winget
Use Git command line or GitHub Desktop to clone the repository. For Git command line, open your terminal and run:
git clone https://github.com/microsoft/PowerApps-TestEngine.git
Verification: After cloning, navigate to the repository folder and list the contents to ensure the files are there:
cd PowerApps-TestEngine
PowerShell is typically pre-installed on Windows. For these instructions, we assume PowerShell Core. You can also follow instructions on Installing PowerShell for different operating systems.
PowerShell Core can be installed using winget
:
winget install --id Microsoft.PowerShell --source winget
Verification: Run the following command in PowerShell Core to check the version:
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.
Download and install the .NET 8.0 SDK using winget
:
winget install Microsoft.DotNet.SDK.8
Verification: Verify the installation by running:
dotnet --version
Close and reopen your terminal to ensure the new components are in the system path.
You can install the Power Platform CLI using the following commands in Microsoft Windows. You can also follow Install Microsoft Power Platform CLI for different operating systems and install types.
Install Power Platform Command Line Interface (CLI) using dotnet command line interface:
dotnet tool install --global Microsoft.PowerApps.CLI.Tool
Verification: Verify the installation by running:
pac -v
Close and reopen your terminal to ensure the new components are in the system path.
Have the prerequisites installed and verified? If so, let’s look 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 sample’s folder at the same level as RunTest.ps1
.
Create conig.json in samples\buttonclicker
folder
{
"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:
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
Copy your completed config.json file into the folder in samples\buttonclicker using README
Run the test:
pwsh -File RunTests.ps1
When the browser opens login to the deployed Power App
In this section, you learned how to set up the necessary components to run your first automated test using configuration for the sample settings and running a simple test by clicking a button in a Canvas App. By following these steps, you are now equipped to explore automated testing in Power Platform.