Events
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
[This article is prerelease documentation and is subject to change.]
Power Apps Test Engine is a component within the Power Platform CLI (PAC CLI) used for testing standalone canvas apps in Power Apps. You must Install Microsoft Power Platform CLI to use the Test Engine.
Important
Power Apps Test Engine has the following benefits:
Testing your app with Test Engine requires the following steps:
Test plans are defined using YAML format. You can author your own test plan or download recorded tests from Test Studio.
Create a yaml file using the test plan schema explained in Power Apps Test Engine YAML format (preview).
If you have tests that you have recorded in Test Studio, you can download them from Test Studio to reuse in Test Engine.
Use the Download suite button in Test Studio to download the test plan. Choose the test suite to download if you have multiple test suites.
Alternatively, use the Download button available under each test suite.
Make sure you update the config file and user configurations if you're using a different tenant or environment for this app.
Test Engine doesn't support multi-factor authentication. Use an account that requires only a username and password to sign in for your tests.
You can't store test credentials in test plan files. Store them in environment variables. The test plan file contains references to which environment variables are used for credentials. For example, the following YAML snippet indicates that the user1Email
and user1Password
environment variables are used:
environmentVariables:
users:
- personaName: User1
emailKey: user1Email
passwordKey: user1Password
View Users for more information.
Use the following PowerShell script to store the username and password in your environment variables.
$env:user1Email = "someone@example.com"
$env:user1Password = "fake password"
Use the PAC CLI pac test run command to run your test plan. You must provide:
When the tests complete, you can view the results of your test in the .trx
file located in the output directory. This folder contains any screenshots or videos captured by your tests when recordVideo
is set to true
in the test plan yaml.
The following are known limitations when working with Power Apps Test Engine.
Test engine currently supports the following browsers.
The following are some additional things to consider for your test plans.
The syntax of Power Fx can differ based on your system's language settings. Use the locale
property in the testSettings
section of the test plan file to specify the locale in which your Power Fx is written. (See locale
in testSettings). This is useful if you're working across regions that use different decimal or thousands separators. For example, ,
instead of .
for decimals and ;
instead of ,
.
See the following samples that have the locale
property specified as examples of its usage:
;
instead of ,
for separator - testPlanForRegionUsePeriodAsDecimalSeparator.fx.yaml,
instead of .
for separator - testPlanWithCommaForDecimal.fx.yaml.fx.yamlThe way that test plan files refer to the target app depends on whether or not the app is in a solution or not. We recommend using solutions whenever possible because they provide greater portability.
Test plan files for apps that are part of Solutions overview are portable across environments. For solution-based apps, the test plan refers to the target app with a logical name (the app LogicalName
property) which doesn't change if the app moves to a different environment.
If you move an app that is not part of a solution to a new environment, you'll need to manually update the test plan file to refer to the app. How to update a test plan file for a non-solution based app:
Power Apps Test Engine release notes
Power Apps Test Engine YAML format (preview)
Power Apps Test Engine Power Fx functions (preview)
Events
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreTraining
Module
Use Power Apps Test Studio to improve your canvas app - Training
Explore how to utilize Power Apps Test Studio for building automated tests, ensuring high-quality canvas apps.
Certification
Microsoft Certified: Power Platform Developer Associate - Certifications
Demonstrate how to simplify, automate, and transform business tasks and processes using Microsoft Power Platform Developer.
Documentation
Power Apps Test Engine YAML format (preview) - Power Apps
Describes the YAML format for test following the same guidelines as Power Fx.
Working with Test Studio - Power Apps
Describes how to use Test Studio with example for testing canvas apps.
Describes Test Studio with overview, terminology, best practices, and limitations.