Automate Testing for Power Apps

Book description

Improve your Power Apps' quality and business value with efficient automation testing tools such as Test Studio and Test Engine

Key Features

  • Understand the basics of low-code testing automation and how it applies to Power Apps
  • Master the use of Test Studio and Test Engine for Canvas apps’ testing
  • Extend testing automation for PCF, ALM, Mocks, Telemetry, and model-driven apps
  • Purchase of the print or Kindle book includes a free PDF eBook

Book Description

Low-code testing helps build better applications, freeing developers from frustrating problems faced while enhancing app features. Automate Testing for Power Apps will help you use automation testing to build better Canvas apps.

You’ll start by understanding the fundamentals of automation testing, different approaches for low-code testing, and its application to Power Apps. Next, you’ll learn how to use Test Studio, Power Automate Desktop, and other tools to automate testing for your Canvas apps. You'll find out how to incorporate testing into your deployment processes for faster and more reliable releases.

Additionally, this book covers advanced topics such as PCF components testing and model-driven apps. You’ll discover the new open-source project, Power Apps Test Engine, that’ll provide you with a single automated testing platform for all Power Apps. You'll learn how to test these more complex components to ensure the highest quality and business value for your Power Apps.

By the end of this book, you'll have become a pro at using automation testing to build better Power Apps, reduce app release times, and increase the quality of your applications.

What you will learn

  • Explore the basics of automation testing and how it applies to Power Apps
  • Understand the basics of Power Fx and how to use it in app testing
  • Find out how to use Test Studio, Test Engine, and other tools for Canvas app testing
  • Discover advanced topics such as PCF components and model-driven app testing
  • Incorporate testing into your deployment processes
  • Employ best practices for using testing automation to enhance the quality of your apps

Who this book is for

Whether you are a citizen developer, pro Power App maker, or IT generalist interested in learning about testing automation to improve the business value and quality of your Power Apps, this book will help you to accomplish your goal. Working knowledge of Power Apps with a basic understanding of Power platform is required to get the most out of this book.

Table of contents

  1. Automate Testing for Power Apps
  2. Contributors
  3. About the authors
  4. About the reviewer
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Conventions used
    6. Get in touch
    7. Share your thoughts
    8. Download a free PDF copy of this book
  6. Part 1:Tools for Power Apps Automated Testing
  7. Chapter 1: Software Quality and Types of Testing
    1. Technical requirements
    2. The need for testing for awesomeness and quality
      1. Testing as a quality driver
      2. Software development life cycle
      3. Testing as an awesomeness driver
      4. Application Lifecycle Management (ALM)in low-code apps
    3. Testing foundations
      1. Activities and roles
      2. The mindset of a tester
      3. Types of testing
    4. How should I apply the theory?
      1. Power Platform Maturity Model
      2. The Power Platform Center of Excellence toolkit
      3. The Expense Report app
    5. Summary
  8. Chapter 2: Power Apps Studio Techniques and Automation Tools
    1. Technical requirements
    2. Debugging in Power Apps testing – from why to how
      1. Understanding your code
      2. Development environment
      3. Process and data analysis
    3. Collaborative notes, comments, and documentation in your apps
      1. Debugging together
      2. Code comments
      3. Collaborative notes and user mentions
    4. Improving and validating your app
      1. Solution checker and App checker
      2. Power Apps Review Tool
    5. Exploring the Power Apps testing automation tools matrix
    6. Summary
  9. Chapter 3: Power Fx Overview and Usage in Testing
    1. Technical requirements
    2. From spreadsheet to Power Fx
      1. Power Fx principles
      2. Power Fx architecture
    3. What is YAML and why is it important?
      1. YAML definition
      2. Understanding YAML rules
    4. Exploring the top test functions in Power Fx
      1. Simulating user interactions
      2. The true-or-false test
      3. A peek behind the curtain
    5. Natural language to Power Fx
      1. AI and Power Platform
      2. Your Copilot
    6. Summary
  10. Chapter 4: Planning Testing in a Power Apps Project
    1. Technical requirements
    2. Planning based on your organization’s maturity
      1. Example 1 – testing during the early stages of software development
      2. Example 2 – integrating automated testing
      3. Example 3 – ALM evolution – performance and usage
      4. Example 4 – UAT and business insights
      5. Example 5 – full automation and regular quality checks
    3. Running a low-code developer example
      1. What do you need to consider when planning testing activities?
      2. Testing and documentation in the calculator app
    4. How test planning benefits your users
    5. Summary
  11. Part 2:Tools for Power Apps Automated Testing
  12. Chapter 5: Introducing Test Studio – Canvas Apps Testing with a Sample Case Study
    1. Technical requirements
    2. Test Studio terminology
      1. Best practices
      2. Limitations
    3. Preparing the environment for Test Studio
      1. Signing up for the Power Apps Developer Plan
      2. Power Platform trial environment
    4. Our first example with Test Studio
      1. Creating the app
      2. Accessing Test Studio
      3. The Test Studio interface
      4. Creating a test suite
      5. Creating a test case
      6. Recording a test case
      7. Adding test steps with Power Fx
      8. Playing back tests
      9. Setting up tests
    5. Processing and saving test results
      1. Saving results to an Excel file
    6. Summary
  13. Chapter 6: Overview of Test Engine, Evolution, and Comparison
    1. Technical requirements
    2. Getting to know Test Engine
      1. Power Fx test authoring
      2. YAML format
      3. Harnessing Test Studio’s recorded tests with Test Engine
      4. Playwright
      5. Evolution of Test Engine
    3. Understanding the benefits of Test Engine
      1. Connector mocking
      2. Screenshot function and video recording
      3. Comparison with Test Studio and Playwright
    4. Knowing the limitations of Test Engine
    5. Prerequisites and build process of Test Engine
      1. Installing the prerequisites to compile Test Engine
      2. Creating the executable
    6. Summary
  14. Chapter 7: Working with Test Engine
    1. Technical requirements
    2. Importing a sample solution
      1. Checking the YAML file
    3. Running tests and accessing results
      1. Inspecting test run results and recordings
    4. Creating test plans with YAML
    5. Downloading and reusing recorded tests from Test Studio
    6. Appendix – using PAC CLI to execute tests defined in a Test Plan file
      1. Add the directory containing the pac.exe file to the system’s PATH environment variable
      2. Running automated tests for a Power Apps app with PAC CLI
    7. Summary
  15. Chapter 8: Testing Power Apps with Power Automate Desktop
    1. Technical requirements
    2. PAD and business processes testing
      1. UI automation with PAD
    3. Key considerations while using PAD as a testing tool
      1. Best practices
    4. Benefits of UI testing with PAD
    5. A step-by-step guide to creating a desktop flow for testing a model-driven app and a canvas app
      1. Creating a simple model-driven app
      2. Creating a PAD flow to test a model-driven app and a canvas app
      3. Downloading PAD from the Microsoft Store
      4. Installing browser extensions
      5. Creating our first PAD flow
      6. Using the Recorder component
      7. Testing the contact creation process
      8. Generating a random name for the contact name
      9. Testing a canvas app
    6. Summary
  16. Part 3:Extending Power Apps Automated Testing
  17. Chapter 9: PCF and Canvas Component Testing
    1. Technical requirements
    2. Exploring Canvas components and their application in a practical example
      1. Creating a UserCard component
      2. Utilizing the UserCard component
    3. Testing canvas components with Test Engine
      1. Updating the testing environment
      2. Creating a test suite
      3. Running the test suite
      4. Reviewing the test results
    4. Exploring PCF components and how to use them
      1. Using PCF components in canvas apps
    5. Testing PCF components with Test Engine
      1. Running the test suite
      2. Checking the results
    6. Summary
  18. Chapter 10: ALM with Test Studio and Test Engine
    1. Technical requirements
      1. Creating a GitHub account
      2. Creating an Azure DevOps environment
    2. Exploring key concepts of test automation within Azure DevOps pipelines
      1. Azure Pipelines
      2. Test automation in Azure DevOps
      3. The PowerAppsTestAutomation project on GitHub
    3. Automating tests built in Test Studio with Azure Pipelines
      1. Forking a repository
      2. Forking the PowerAppsTestAutomation project
      3. Creating a TestURLs.json file
      4. Automating tests built in Test Studio with Azure Pipelines using the classic editor
      5. Automating tests built in Test Studio with Azure Pipelines using YAML
    4. Evolution of Power Apps test automation pipelines with PAC CLI and Test Engine
    5. Summary
  19. Chapter 11: Mocks with Test Engine
    1. Technical requirements
      1. Why utilize a forked version of Test Engine?
      2. Importing a solution
      3. Configuring dependencies
      4. Power Platform Admin configuration
    2. Getting to know mock testing in Test Engine
      1. HTTP request and response concepts
      2. Starting with mock testing
      3. Why mock testing?
      4. Mock testing in Test Engine
      5. Network mock files
      6. Using advanced mocking scenarios in the forked Test Engine
    3. Testing mock scenarios with a Power Parse app
      1. Mocking a SharePoint Service from Microsoft 365
      2. Mocking Dataverse in your Power Apps
      3. Mocking a Power Apps connector
    4. Summary
  20. Chapter 12: Telemetry and Power Apps
    1. Technical requirements
    2. Power Apps analytics
      1. Monitor
    3. Dataverse analytics
    4. Application Insights in Power Apps
    5. Querying data in your analytics
      1. Introduction to KQL for Application Insights
      2. Testing data
    6. Summary
  21. Index
    1. Why subscribe?
  22. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share your thoughts
    3. Download a free PDF copy of this book

Product information

  • Title: Automate Testing for Power Apps
  • Author(s): César Calvo, Carlos de Huerta
  • Release date: October 2023
  • Publisher(s): Packt Publishing
  • ISBN: 9781803236551