├── .vscode ├── launch.json └── tasks.json ├── LICENSE ├── README.md ├── chapter-01 └── README.md ├── chapter-02 ├── PowerApps canvas app coding standards and guidelines.pdf ├── PowerCalc_20230807220116.zip └── README.md ├── chapter-03 ├── README.md ├── REPL.zip.001 ├── REPL.zip.002 ├── sample01.fx ├── sample01.png ├── sample02.fx ├── sample02.png ├── sample03.fx ├── sample03.png ├── sample04.fx └── sample04.png ├── chapter-04 ├── PowerCalc_20230722214537.zip ├── PowerDocu PowerCalc_20230722214537.zip ├── README.md └── monitor_PowerCalc_20230722214537.xlsx ├── chapter-05 ├── Chapter5_1_0_0_1.zip ├── PowerAppTestSuiteResults.xlsx ├── README.md └── democontacts.xlsx ├── chapter-06 ├── Chapter5_1_0_0_1.zip └── README.md ├── chapter-07 ├── BasicGallery_1_0_0_2.zip ├── Chapter5_1_0_0_1.zip ├── Gallery Navigation.fx.yaml ├── README.md ├── config.dev.json ├── config.json ├── democontacts.xlsx └── testPlan.fx.yaml ├── chapter-08 ├── Calculator_1_0_0_2.zip ├── Chapter8_MDA_1_0_0_1.zip ├── README.md └── democontacts.xlsx ├── chapter-09 ├── Chapter9_1_0_0_1.zip ├── PCFcomponent_1_0_0_3.zip └── README.md ├── chapter-10 └── README.md ├── chapter-11 ├── AI Content.csv ├── AI Prompts.xlsx ├── PowerAppsTestEngine_chapter_11.zip ├── PowerParse_1_0_0_2.zip ├── README.md ├── extract-files_screenshot.png ├── open-terminal_screenshot.png ├── run-files_screenshot.png ├── test-plan-files.png └── testplans.zip └── chapter-12 └── README.md /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | // Use IntelliSense to find out which attributes exist for C# debugging 6 | // Use hover for the description of the existing attributes 7 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md 8 | "name": ".NET Core Launch (console)", 9 | "type": "coreclr", 10 | "request": "launch", 11 | "preLaunchTask": "build", 12 | // If you have changed target frameworks, make sure to update the program path. 13 | "program": "${workspaceFolder}/PowerApps-TestEngine-CC/bin/Debug/PowerAppsTestEngine/PowerAppsTestEngine.dll", 14 | "args": [], 15 | "cwd": "${workspaceFolder}/PowerApps-TestEngine-CC/src/PowerAppsTestEngine", 16 | // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console 17 | "console": "internalConsole", 18 | "stopAtEntry": false 19 | }, 20 | { 21 | "name": ".NET Core Attach", 22 | "type": "coreclr", 23 | "request": "attach" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "process", 8 | "args": [ 9 | "build", 10 | "${workspaceFolder}/PowerApps-TestEngine-CC/src/PowerAppsTestEngine/PowerAppsTestEngine.csproj", 11 | "/property:GenerateFullPaths=true", 12 | "/consoleloggerparameters:NoSummary" 13 | ], 14 | "problemMatcher": "$msCompile" 15 | }, 16 | { 17 | "label": "publish", 18 | "command": "dotnet", 19 | "type": "process", 20 | "args": [ 21 | "publish", 22 | "${workspaceFolder}/PowerApps-TestEngine-CC/src/PowerAppsTestEngine/PowerAppsTestEngine.csproj", 23 | "/property:GenerateFullPaths=true", 24 | "/consoleloggerparameters:NoSummary" 25 | ], 26 | "problemMatcher": "$msCompile" 27 | }, 28 | { 29 | "label": "watch", 30 | "command": "dotnet", 31 | "type": "process", 32 | "args": [ 33 | "watch", 34 | "run", 35 | "--project", 36 | "${workspaceFolder}/PowerApps-TestEngine-CC/src/PowerAppsTestEngine/PowerAppsTestEngine.csproj" 37 | ], 38 | "problemMatcher": "$msCompile" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Automate Testing for Power Apps 2 | 3 | Prioritized and end-to-end flows, or the critical path 4 | 5 | This is the code repository for [Automate Testing for Power Apps](https://www.packtpub.com/product/automate-testing-for-power-apps/9781803236551?utm_source=github&utm_medium=repository&utm_campaign=9781803236551), published by Packt. 6 | 7 | **A practical guide to applying low-code automation testing tools and techniques** 8 | 9 | > **Note:** This book is based on a preview version of the specified software. The software is subject to change, and some features or explanations provided in this book may vary in the final release of the software. 10 | 11 | ## What is this book about? 12 | 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. 13 | 14 | This book covers the following exciting features: 15 | * Explore the basics of automation testing and how it applies to Power Apps 16 | * Understand the basics of Power Fx and how to use it in app testing 17 | * Find out how to use Test Studio, Test Engine, and other tools for Canvas app testing 18 | * Discover advanced topics such as PCF components and model-driven app testing 19 | * Incorporate testing into your deployment processes 20 | * Employ best practices for using testing automation to enhance the quality of your apps 21 | 22 | If you feel this book is for you, get your [copy](https://www.amazon.com/dp/1803236558) today! 23 | 24 | https://www.packtpub.com/ 26 | 27 | ## Instructions and Navigations 28 | All of the code is organized into folders. For example, Chapter03. 29 | 30 | The code will look like the following: 31 | ``` 32 | IfError( Collect( Students, { Name: txtInputName.Text } ), 33 | Notify("Invalid data provided. Please try again") ) 34 | ``` 35 | 36 | **Following is what you need for this book:** 37 | 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. 38 | 39 | With the following software and hardware list you can run all code files present in the book (Chapter 1-12). 40 | ### Software and Hardware List 41 | | Chapter | Software required | OS required | 42 | | -------- | ------------------------------------ | ----------------------------------- | 43 | | 1-12 | Test Engine | Windows, Mac OS X, and Linux (Any) | 44 | | 1-12 | Power Apps Test Studio | Modern browsers | 45 | | 1-12 | Power Platform | Modern browsers | 46 | | 1-12 | SharePoint Online | Modern browsers | 47 | | 1-12 | Git | Windows, Mac OS X, and Linux (Any) | 48 | | 1-12 | Visual Code | Windows, Mac OS X, and Linux (Any) | 49 | 50 | ## Installation 51 | It is recommended to run within a Power Apps developer environment. 52 | 53 | Click [here](https://github.com/PacktPublishing/Automate-Testing-for-Power-Apps/archive/refs/heads/main.zip) for code examples used in the book. 54 | 55 | ### [Chapter 1 - Software Quality and Types of Testing](chapter-01/README.md) 56 | 57 | ### [Chapter 2 - Power Apps Studio Techniques and Automation Tools](chapter-02/README.md) 58 | 59 | ### [Chapter 3 - Power Fx overview and usage in testing](chapter-03/README.md) 60 | 61 | ### [Chapter 4 - Planning a Testing Phase in a Power Apps Project](chapter-04/README.md) 62 | 63 | ### [Chapter 5 - Introducing Test Studio – Canvas Apps Testing with a Sample Case Study](chapter-05/README.md) 64 | 65 | ### [Chapter 6 - Overview of Test Engine, evolution and comparison](chapter-06/README.md) 66 | 67 | ### [Chapter 7 - Working with Test Engine (practical example)](chapter-07/README.md) 68 | 69 | ### [Chapter 8 - Testing Canvas Apps with Power Automate Desktop](chapter-08/README.md) 70 | 71 | ### [Chapter 9 - PCF Testing with Test Studio and Test Engine](chapter-09/README.md) 72 | 73 | ### [Chapter 10 - ALM with Test Studio and Test Engine](chapter-10/README.md) 74 | 75 | ### [Chapter 11 - Mocks with Test Engine](chapter-11/README.md) 76 | 77 | ### [Chapter 12 - Telemetry and Power Apps](chapter-12/README.md) 78 | 79 | ## Issues 80 | Submit any [issue](https://github.com/PacktPublishing/Automate-Testing-for-Power-Apps/issues) for errors or feedback with the supported material. 81 | 82 | ## Citation 83 | If you find this work useful, please cite: 84 | 85 | ``` 86 | @book{CésarCarlos2023, 87 | title={Automate Testing for Power Apps: A practical guide to applying low-code automation testing tools and techniques}, 88 | author={Huerta, Carlos de and Calvo, César}, 89 | publisher={Packt Publishing}, 90 | year={2023}, 91 | language={English} 92 | } 93 | 94 | ``` 95 | 96 | 97 | ### Related products 98 | * Microsoft Power Apps Cookbook - Second Edition [[Packt]](https://www.packtpub.com/product/microsoft-power-apps-cookbook-second-edition/9781803238029?utm_source=github&utm_medium=repository&utm_campaign=9781803238029) [[Amazon]](https://www.amazon.com/dp/180323802X) 99 | 100 | * Extending Microsoft Power Apps with Power Apps Component Framework [[Packt]](https://www.packtpub.com/product/extending-microsoft-power-apps-with-power-apps-component-framework/9781800564916?utm_source=github&utm_medium=repository&utm_campaign=9781800564916) [[Amazon]](https://www.amazon.com/dp/1800564910) 101 | 102 | * Learn Microsoft PowerApps [[Packt]](https://www.packtpub.com/product/learn-microsoft-powerapps/9781789805826?utm_source=github&utm_medium=repository&utm_campaign=9781789805826) [[Amazon]](https://www.amazon.com/dp/1789805821) 103 | 104 | 105 | ## Get to Know the Authors 106 | **Carlos de Huerta** 107 | is a professional with over 20 years of experience in the ICT industry, where he has held various jobs from Business Architect to Advisor at Microsoft. He currently works there developing the technological strategy of the ecosystem of global partners and advisories. A telecommunications systems engineer from the Alcalá de Henares University, he acts as an ambassador in the community of architects, and is an IASA Spanish board member. He participates with universities in the dissemination and teaching of the impact of technology on companies and their culture. Involved in the adoption of roles and techniques in the training field, he has participated in the definition of Cloud profiles with the Ministry of Culture in Spain. 108 | 109 | **César Calvo** 110 | is a professional with more than 20 years of experience across the Microsoft technology stack, with a blend of expertise across Power Platform, Dynamics 365, Azure, and Microsoft 365. He is a Microsoft Certified Trainer since 2008, with over 20 active official certifications in Power Platform, Dynamics, Azure, and M365. Recognized as FastTrack Recognized Solution Architect - Power Apps in 2022, he has found the Microsoft Power Platform to be the perfect catalyst to create customer-centric solutions, specializing in the fusion code approach. César holds a degree in Psychology and a Computer Science BSc degree. 111 | -------------------------------------------------------------------------------- /chapter-01/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 1 Software Quality and Types of Testing 2 | ## Resources companion 3 | 4 | This folder contains resources presented in chapter 1 "Software Quality and Types of Testing". 5 | 6 | Material to build and check Expense Report App: 7 | - https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/expense-report-install 8 | - https://learn.microsoft.com/en-us/training/paths/expense-canvas-app-start-finish/ 9 | 10 | Extensions/ideas: 11 | - https://techcommunity.microsoft.com/t5/educator-developer-blog/transforming-expense-management-award-winning-expense-tracker/ba-p/3848917 12 | - https://techcommunity.microsoft.com/t5/educator-developer-blog/building-an-expense-report-application-with-microsoft-power-apps/ba-p/2817898 13 | - https://www.youtube.com/watch?v=1X8ihV_EGbE 14 | - https://www.youtube.com/watch?v=DOR28V5kCkw 15 | -------------------------------------------------------------------------------- /chapter-02/PowerApps canvas app coding standards and guidelines.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-02/PowerApps canvas app coding standards and guidelines.pdf -------------------------------------------------------------------------------- /chapter-02/PowerCalc_20230807220116.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-02/PowerCalc_20230807220116.zip -------------------------------------------------------------------------------- /chapter-02/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 2 Power Apps Studio Techniques and Automation Tools 2 | ## Resources companion 3 | 4 | This folder contains resources presented in chapter 2 "Power Apps Studio Techniques and Automation Tools". 5 | -------------------------------------------------------------------------------- /chapter-03/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 3 Power Fx overview and usage in testing 2 | ## Code companion 3 | 4 | This folder contains code and samples presented in chapter 3 "Power Fx overview and usage in testing". 5 | 6 | You can use any Pwoer Apps environment to test Power FX, but as Power Fx is an open source engine, you could test examples that does not connect to a Power Platform environment through host using the command line. There is examples of these hosts in the [Power Fx host samples](https://github.com/microsoft/power-fx-host-samples) 7 | 8 | The [Console REPL](https://github.com/microsoft/Power-Fx/tree/main/src/tools/Repl) will be used, from the latest version of [Power Fx](https://github.com/microsoft/Power-Fx), and a compiled version could be downloaded from this chapter repo. 9 | 10 | You can see an example fo the first sample 11 | Just download and extract the [compiled version of REPL](REPL.zip.001) (2 files 001 / 002) and copy and paste the files for each sample (files ending .fx) 12 | 13 | [sample01.fx](sample01.fx) 14 | ``` Power Fx 15 | Set( Velocity; 20 ) 16 | Set( Time; 5 ) 17 | Distance = Velocity * Time 18 | ``` 19 | 20 | _Note: In Power Fx, the usage of the semicolon (;) and comma (,) as function argument separators is influenced by the locale setting. English should use "," and other languages ";"_ 21 | 22 | ![first sample](sample01.png) 23 | -------------------------------------------------------------------------------- /chapter-03/REPL.zip.001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-03/REPL.zip.001 -------------------------------------------------------------------------------- /chapter-03/REPL.zip.002: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-03/REPL.zip.002 -------------------------------------------------------------------------------- /chapter-03/sample01.fx: -------------------------------------------------------------------------------- 1 | Set( Velocity; 20 ) 2 | Set( Time; 5 ) 3 | Distance = Velocity * Time -------------------------------------------------------------------------------- /chapter-03/sample01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-03/sample01.png -------------------------------------------------------------------------------- /chapter-03/sample02.fx: -------------------------------------------------------------------------------- 1 | Set( Students; Table( { Name: "Nick"; Age: 21; Points: 8 }; { Name: "Lisa"; Age: 24; Points: 9 }; { Name: "Sam"; Age: 19; Points: 7 }; { Name: "Emma"; Age: 25; Points: 10 } ) ) 2 | Set( MinScore; 8 ) 3 | "Score " & LookUp( Students; Points > MinScore ).Points -------------------------------------------------------------------------------- /chapter-03/sample02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-03/sample02.png -------------------------------------------------------------------------------- /chapter-03/sample03.fx: -------------------------------------------------------------------------------- 1 | Set( Score; 10 ) 2 | Set( FirstName; "Carlos" ) 3 | 4 | "Your best score is " & Score & ", " & FirstName 5 | $"Your best score is {Score}, {FirstName}" -------------------------------------------------------------------------------- /chapter-03/sample03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-03/sample03.png -------------------------------------------------------------------------------- /chapter-03/sample04.fx: -------------------------------------------------------------------------------- 1 | Set( Students; Table( { Name: "Judith"; Age: 15; Points: 8 }; { Name: "Eva"; Age: 47; Points: 9 }; { Name: "Enrique"; Age: 45; Points: 7 }; { Name: "Pilar"; Age: 52; Points: 10 } ) ) 2 | Collect( Students; { Name: "Ponciano"; Age: 80; Points: 9} ) 3 | Collect( Students; { Name: "Bruno"; Age: 17; Points: 10} ) 4 | Students 5 | Filter( Students; Age < 20 ) -------------------------------------------------------------------------------- /chapter-03/sample04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-03/sample04.png -------------------------------------------------------------------------------- /chapter-04/PowerCalc_20230722214537.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-04/PowerCalc_20230722214537.zip -------------------------------------------------------------------------------- /chapter-04/PowerDocu PowerCalc_20230722214537.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-04/PowerDocu PowerCalc_20230722214537.zip -------------------------------------------------------------------------------- /chapter-04/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 4 Planning a Testing Phase in a Power Apps Project 2 | ## Code companion 3 | 4 | This folder contains code and samples presented in chapter 4 "Planning a Testing Phase in a Power Apps Project". 5 | -------------------------------------------------------------------------------- /chapter-04/monitor_PowerCalc_20230722214537.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-04/monitor_PowerCalc_20230722214537.xlsx -------------------------------------------------------------------------------- /chapter-05/Chapter5_1_0_0_1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-05/Chapter5_1_0_0_1.zip -------------------------------------------------------------------------------- /chapter-05/PowerAppTestSuiteResults.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-05/PowerAppTestSuiteResults.xlsx -------------------------------------------------------------------------------- /chapter-05/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 5 Introducing Test Studio – Canvas Apps Testing with a Sample Case Study 2 | ## Code companion 3 | 4 | This folder contains code and samples presented in chapter 5 "Introducing Test Studio – Canvas Apps Testing with a Sample Case Study". 5 | -------------------------------------------------------------------------------- /chapter-05/democontacts.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-05/democontacts.xlsx -------------------------------------------------------------------------------- /chapter-06/Chapter5_1_0_0_1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-06/Chapter5_1_0_0_1.zip -------------------------------------------------------------------------------- /chapter-06/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 6 Overview of Test Engine, evolution and comparison 2 | ## Code companion 3 | 4 | This folder contains code and samples presented in chapter 6 "Overview of Test Engine, evolution and comparison. 5 | -------------------------------------------------------------------------------- /chapter-07/BasicGallery_1_0_0_2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-07/BasicGallery_1_0_0_2.zip -------------------------------------------------------------------------------- /chapter-07/Chapter5_1_0_0_1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-07/Chapter5_1_0_0_1.zip -------------------------------------------------------------------------------- /chapter-07/Gallery Navigation.fx.yaml: -------------------------------------------------------------------------------- 1 | testSuite: 2 | testSuiteName: Gallery Navigation 3 | testSuiteDescription: '' 4 | persona: User1 5 | appLogicalName: new_galleryappbase_835fc 6 | appId: '' 7 | onTestCaseStart: "" 8 | onTestCaseComplete: "" 9 | onTestSuiteComplete: "" 10 | networkRequestMocks: 11 | testCases: 12 | - testCaseName: Check Row5 and 3 (Email and Full Name) 13 | testCaseDescription: '' 14 | testSteps: | 15 | = 16 | Screenshot("gallerycontacts_loaded.png"); 17 | Select(Gallery1, 5, NextArrow1); 18 | Assert(Index(Gallery1.AllItems, 5).Subtitle1.Text = "gisela.schmidt@acme.com", "Email in row 5 does not correspomd"); 19 | Screenshot("gallerycontacts_contacts5.png"); 20 | Select(Gallery1, 3, NextArrow1); 21 | Assert(Index(Gallery1.AllItems, 3).Title1.Text = "Ramon Fernandez", "Full name in row 3 does not correspond"); 22 | Screenshot("gallerycontacts_contacts3.png"); 23 | 24 | testSettings: 25 | locale: "en-US" 26 | recordVideo: true 27 | headless: false 28 | browserConfigurations: 29 | - browser: Chromium 30 | environmentVariables: 31 | users: 32 | - personaName: User1 33 | emailKey: user1Email 34 | passwordKey: user1Password 35 | -------------------------------------------------------------------------------- /chapter-07/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 7 Working with Test Engine (practical example) 2 | ## Code companion 3 | 4 | This folder contains code and samples presented in chapter 7 "Working with Test Engine (practical example)". 5 | -------------------------------------------------------------------------------- /chapter-07/config.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "environmentId": "xxx", 3 | "tenantId": "xxx", 4 | "testPlanFile": "C:/PowerApps-TestEngine/samples/basicgallery/Gallery Navigation.fx.yaml", 5 | "outputDirectory": "C:/results/basicgallery", 6 | "logLevel": "", 7 | "domain": "", 8 | "queryParams": "" 9 | } 10 | -------------------------------------------------------------------------------- /chapter-07/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "environmentId": "", 3 | "tenantId": "", 4 | "testPlanFile": "", 5 | "outputDirectory": "", 6 | "logLevel": "", 7 | "domain": "", 8 | "queryParams": "" 9 | } 10 | -------------------------------------------------------------------------------- /chapter-07/democontacts.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-07/democontacts.xlsx -------------------------------------------------------------------------------- /chapter-07/testPlan.fx.yaml: -------------------------------------------------------------------------------- 1 | testSuite: 2 | testSuiteName: Basic Gallery 3 | testSuiteDescription: Verifies that you can interact with controls within a basic gallery 4 | persona: User1 5 | appLogicalName: new_galleryappbase_835fc 6 | 7 | testCases: 8 | - testCaseName: Check Row5 (Email) 9 | testCaseDescription: '' 10 | testSteps: | 11 | = Screenshot("basicgallery_loaded.png"); 12 | Select(Gallery1, 5, NextArrow1); 13 | Assert(Index(Gallery1.AllItems, 5).Title1.Text = "Gisela Schmidt", "Email in row 5 does not correspomd"); 14 | Screenshot("basicgallery_row5.png"); 15 | 16 | testSettings: 17 | locale: "en-US" 18 | recordVideo: true 19 | headless: false 20 | browserConfigurations: 21 | - browser: Chromium 22 | environmentVariables: 23 | users: 24 | - personaName: User1 25 | emailKey: user1Email 26 | passwordKey: user1Password 27 | -------------------------------------------------------------------------------- /chapter-08/Calculator_1_0_0_2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-08/Calculator_1_0_0_2.zip -------------------------------------------------------------------------------- /chapter-08/Chapter8_MDA_1_0_0_1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-08/Chapter8_MDA_1_0_0_1.zip -------------------------------------------------------------------------------- /chapter-08/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 8 Testing Canvas Apps with Power Automate Desktop 2 | ## Code companion 3 | 4 | This folder contains code and samples presented in chapter 8 "Testing Canvas Apps with Power Automate Desktop ". 5 | -------------------------------------------------------------------------------- /chapter-08/democontacts.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-08/democontacts.xlsx -------------------------------------------------------------------------------- /chapter-09/Chapter9_1_0_0_1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-09/Chapter9_1_0_0_1.zip -------------------------------------------------------------------------------- /chapter-09/PCFcomponent_1_0_0_3.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-09/PCFcomponent_1_0_0_3.zip -------------------------------------------------------------------------------- /chapter-09/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 9 PCF Testing with Test Studio and Test Engine 2 | ## Code companion 3 | 4 | This folder contains code and samples presented in chapter 9 "PCF Testing with Test Studio and Test Engine". 5 | -------------------------------------------------------------------------------- /chapter-10/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 10 ALM with Test Studio and Test Engine 2 | ## Code companion 3 | 4 | This folder contains code and samples presented in chapter 10 "ALM with Test Studio and Test Engine". 5 | -------------------------------------------------------------------------------- /chapter-11/AI Content.csv: -------------------------------------------------------------------------------- 1 | Title,Description 2 | "Generate an Email","1. What should be the subject line of the email? 3 | 2. What should be the body of the email?" 4 | "Generate a Quiz","A neutron star is the collapsed core of a massive supergiant star, which had a total mass of between 10 and 25 solar masses, possibly more if the star was especially metal-rich. Neutron stars are the smallest and densest stellar objects, excluding black holes and hypothetical white holes, quark stars, and strange stars. Neutron stars have a radius on the order of 10 kilometers (6.2 mi) and a mass of about 1.4 solar masses. They result from the supernova explosion of a massive star, combined with gravitational collapse, that compresses the core past white dwarf star density to that of atomic nuclei. 5 | 6 | Example: 7 | Q1. What is a neutron star? 8 | A. The collapsed core of a massive supergiant star 9 | B. The smallest and densest stellar object 10 | C. A white hole 11 | D. A quark star" 12 | "Classify Text","Headline 1: Donna Steffensen Is Cooking Up a New Kind of Perfection. The Internet's most beloved cooking guru has a buzzy new book and a fresh new perspective 13 | Category: Entertainment 14 | 15 | Headline 2: Major Retailer Announces Plans to Close Over 100 Stores 16 | Category:" 17 | "Key points from report","%23 Start of Report 18 | Revenue increased $7.5 billion or 16%. Commercial products and cloud services revenue increased $4.0 billion or 13%. O365 Commercial revenue grew 22% driven by seat growth of 17% and higher revenue per user. Office Consumer products and cloud services revenue increased $474 million or 10% driven by Consumer subscription revenue, on a strong prior year comparable that benefited from transactional strength in Japan. Gross margin increased $6.5 billion or 18% driven by the change in estimated useful lives of our server and network equipment. 19 | Our competitors range in size from diversified global companies with significant research and development resources to small, specialized firms whose narrower product lines may let them be more effective in deploying technical, marketing, and financial resources. Barriers to entry in many of our businesses are low and many of the areas in which we compete evolve rapidly with changing and disruptive technologies, shifting user needs, and frequent introductions of new products and services. Our ability to remain competitive depends on our success in making innovative products, devices, and services that appeal to businesses and consumers. 20 | %23 End of Report" 21 | -------------------------------------------------------------------------------- /chapter-11/AI Prompts.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-11/AI Prompts.xlsx -------------------------------------------------------------------------------- /chapter-11/PowerAppsTestEngine_chapter_11.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-11/PowerAppsTestEngine_chapter_11.zip -------------------------------------------------------------------------------- /chapter-11/PowerParse_1_0_0_2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-11/PowerParse_1_0_0_2.zip -------------------------------------------------------------------------------- /chapter-11/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 11 Mocks with Test Engine 2 | 3 | #### Why Utilize a Forked Version of Test Engine? 4 | 5 | The existing version of Test Engine, particularly in the Mock scenario, presents certain limitations. To address this, we introduced an experimental version aimed at comprehending the various mock strategies in play. As of October 2023, Test Engine awaits the integration of several key features and Power Platform integration. 6 | 7 | ## Code companion 8 | 9 | This folder contains code and samples presented in chapter 11 "Mocks with test Engine". For simplicity, the release from this fork [https://github.com/carloshm/PowerApps-TestEngine/](https://github.com/carloshm/PowerApps-TestEngine/tree/1.0.5-preview-mocks) is used, with changes presented in the chapter. 10 | 11 | 1.- [Test Engine fork for additional mock routing](PowerAppsTestEngine_chapter_11.zip) 12 | 13 | 2.- [Mock samples files](testplans.zip) 14 | 15 | 3.- [Sample Power Apps app for tests](PowerParse_1_0_0_2.zip) 16 | 17 | ### Setup Power Apps environment and files needed 18 | [Chapter 5](../chapter-05) guides you in the first step, and it describes how to provision a trial or developer tenant so you can deploy and test the examples. In a nutshell you will follow three steps: 19 | - Set up a trial or developer tenant to follow the instructions from that chapter 20 | - Deploy samples app called [Power Parse](PowerParse_1_0_0_2.zip) to your environment 21 | - Check Mock samples to be used with the Power Parse sample app 22 | 23 | ### Steps to use chapter 11 files 24 | Chapter 11 presents additional mock routing options not presented in the preview version of Test Engine. This fork available from the release of [Test Engine preview-mock](https://github.com/carloshm/PowerApps-TestEngine/tree/preview-mocks) is used in the examples. 25 | You can use the [zip file](PowerAppsTestEngine_chapter_11.zip) in a windows system. For Linux compile or run from [source code](https://github.com/carloshm/PowerApps-TestEngine/tree/1.0.5-preview-mocks). 26 | For windows: 27 | - Download and extract the zip file contents in a folder 28 | 29 | ![Alt text](extract-files_screenshot.png) 30 | - Set up the [config file](https://github.com/microsoft/PowerApps-TestEngine#2-set-up-the-config-file) with the data from your environment, using the [mock files samples](testplans.zip) 31 | 32 | ![Alt text](test-plan-files.png) 33 | - Open a PowerShell terminal from the file directory 34 | 35 | ![Alt text](open-terminal_screenshot.png) 36 | - Execute and confirm results 37 | 38 | ![Alt text](run-files_screenshot.png) 39 | -------------------------------------------------------------------------------- /chapter-11/extract-files_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-11/extract-files_screenshot.png -------------------------------------------------------------------------------- /chapter-11/open-terminal_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-11/open-terminal_screenshot.png -------------------------------------------------------------------------------- /chapter-11/run-files_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-11/run-files_screenshot.png -------------------------------------------------------------------------------- /chapter-11/test-plan-files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-11/test-plan-files.png -------------------------------------------------------------------------------- /chapter-11/testplans.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Automate-Testing-for-Power-Apps/5ae9b8f413671e2c7b9a3b62bbdeaf6ebc082c93/chapter-11/testplans.zip -------------------------------------------------------------------------------- /chapter-12/README.md: -------------------------------------------------------------------------------- 1 | # Chapter 12 Telemetry and Power Apps 2 | ## Code companion 3 | 4 | This folder contains code and samples presented in chapter 12 "Telemetry and Power Apps". 5 | --------------------------------------------------------------------------------