Introduction
Testing is an important part of Power Apps development. Whenever we create a new feature or modify an existing Canvas app, we need to check whether everything is working correctly.
Performing these tests manually every time can take a lot of effort.
To make testing easier, Microsoft provides Power Apps Test Studio, which helps developers create and run automated test cases for Canvas applications.
In this article, we will learn how to use Test Studio with a simple example.
What Is Power Apps Test Studio?
Power Apps Test Studio is a low-code testing tool that allows developers to record user interactions, create test cases, and validate application functionality.
For example, if we have an Employee Registration app, we can create automated tests to check whether:
- Users can enter employee details.
- Mandatory fields are validated.
- The Submit button works correctly.
- Employee records are saved successfully.
Let's understand how to create these tests step by step.
Step 1: Open Your Canvas App
- Open Power Apps.
- Navigate to Apps.
- Select your Canvas application.
- Open the app in Edit mode.
Make sure you have creator or co-owner permissions for the application.
Step 2: Open Test Studio
- Open your Canvas app in Power Apps Studio.
- Navigate to the Advanced tools option.
- Select Test Studio.


Test Studio will open, where you can create and manage your test suites and test cases.
Step 3: Create a Test Suite
A test suite is used to group related test cases.
- Open Test Studio.
- Create a new test suite.
- Enter the test suite name.
Example:
Employee Registration Test Suite
This suite will contain all test cases related to employee registration.

Step 4: Create a Test Case
A test case contains a series of steps used to test a particular functionality.
- Select your test suite.
- Create a new test case.
- Enter the test case name.
Example:
Verify Employee Registration

This test case will check whether an employee can be registered successfully.
Step 5: Record User Actions

Test Studio provides a recorder that helps capture user interactions and generate test expressions.
For example, perform the following actions:
- Open the Employee Registration screen.
- Enter the employee name.
- Enter the employee email.
- Select the department.
- Click the Submit button.
The recorder generates test steps based on the recorded interactions.
You can review and modify these expressions if required.
Step 6: Run the Test Case
After creating the test steps and assertions:
- Select the test case.
- Run the test.
- Wait for the test execution to complete.
- Review the execution results.

If all the steps and assertions work correctly, the test passes. If any assertion fails, review the failed step and fix the issue.
Step 8: Run the Complete Test Suite
Once you have created multiple test cases, you can run the entire test suite.
For example:
Employee Registration Test Suite
- Test Case 1: Verify employee registration.
- Test Case 2: Verify mandatory field validation.
- Test Case 3: Verify email validation.
- Test Case 4: Verify duplicate employee validation.
Test cases execute sequentially, and the app state is maintained between test cases.
Playing Tests in a Browser
In Power Apps Test Studio, you can use the Copy play link feature to run your automated test cases directly in a browser without opening Test Studio.
This feature is useful when you want to integrate Power Apps testing into a Continuous Integration and Continuous Deployment (CI/CD) pipeline, such as Azure DevOps.
How to Play Tests in a Browser
Follow these steps:
- Open your Canvas App in Power Apps.
- Navigate to Test Studio.
- Select the required Test Suite or Test Case from the right pane.
- Click Copy play link.

- If you have unpublished test changes, Power Apps prompts you to publish them.
- Select Publish to make the latest test changes available.

3.Copy the generated play link.

4.Open a separate browser window and paste the URL.
5.Press Enter to execute the test.
6.View the test playback and verify the results.
Best Practices
- Create separate test cases for different functionalities.
- Keep test steps simple and easy to understand.
- Use assertions to validate expected results.
- Group related test cases into test suites.
- Automate repetitive and important business scenarios.
- Perform manual testing along with automated testing.
Conclusion
Power Apps Test Studio makes Canvas app testing easier by allowing developers to create, record, and execute automated test cases.
By following these simple steps, developers can reduce repetitive manual testing, identify issues earlier, and improve the overall quality of their applications.
Start with a small test case, run it successfully, and gradually build automated test suites for your complete application.
Join the conversation! Your thoughts help the community grow.