unige-powerapps-taf
v1.0.9
Published
UNIGE Test automation Framework for Microsoft Power Platform Model-Driven applications and Power Pages. Powered by TypeScript and playwright. Adapted from D365-UI-Test publish by Florian Kroenert.
Downloads
4
Readme
What's this?
unige-powerapps-taf is a node module provided as a test automation framwork (taf) for easing tests of Microsoft PowerApps((r)) within Playwright. It allows UI testing in Microsoft Power Apps (Model-driven apps and Power Pages). You can write your tests in plain Javascript or in TypeScript. Various functions are implemented and can be used for executing the tests.
Microsoft Power Apps, Dynamics 365 and Power Pages provide web applications using various global JS objects (i.e. Xrm, executionContext, ...), which allow interacting with the system. unige-powerapps-taf tries to use these JS objects (such as Xrm.Navigation) as much as possible; As this API is not expected to change unexpectedly, it guaranties fast and stable results without localization issues.
How to install?
Install this project using npm to get started:
npm install unige-powerapps-taf
Afterwards you can import it in your code by:
import { XrmUiTest } from "unige-powerapps-taf";
Use Playwright testing framework within Microsoft Visual Studio Code for creating a test suite.
You might want to create your own settings.txt file with credentials used to connect to Microsoft Power Apps applications, or just enter your credentials inline.
Demo program
A demo can be found at spec/xrm-ui-test.spec.ts
to give you a better idea of how to use this test automation framework.
Continuous Integration
unige-powerapps-taf is cross platform. You can run it on Windows, Linux, Mac and of course also on Azure or any other CI platform.
See the predefined yaml pipeline definition for Azure DevOps available in the documentation: tutorials/10_DevOps.html
.
Current Features
- Open and log in to Power Apps or D365. Two factors authentication is also supported via one-time password (otp).
- Open an App
- Open Form (in Create, or Update mode)
- Set values for all CRM field types
- Get values of all CRM field types
- Get visibility and readonly state for controls
- Get subgrid record count, refresh subgrid, open n-th record of subgrid
- Click ribbon Buttons
- Download files
- Runs on Windows, Linux, Mac (also on DevOps)
What's the difference with EasyRepro?
While EasyRepro simulates user inputs to interact with forms, it may not be the optimal solution when involving lookups, localization, or label renaming.
As Microsoft Power Apps, Dynamics 365 and Power Pages generates web applications using extensively various global JS objects (such as Xrm.Navigation, executionContext, ...), unige-powerapps-taf tries to use these JS objects as much as possible, as this API is not expected to change unexpectedly. This approach ensures stability, fast results, and avoids localization-related issues.