Skip to content

[Feature]: MDA Testing Patterns #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Grant-Archibald-MS opened this issue Mar 7, 2025 · 3 comments
Open

[Feature]: MDA Testing Patterns #561

Grant-Archibald-MS opened this issue Mar 7, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@Grant-Archibald-MS
Copy link
Contributor

Grant-Archibald-MS commented Mar 7, 2025

Is your feature request related to a problem? Please describe.

The current testing framework for Model Driven Applications generally requires browser automation which makes the process of creating automated testing of various components such as Create, Update, and Delete operations, Custom Toolbars, Web Resources with Xrm SDK, and Business Process Flows. This limitation hinders the ability to efficiently test and validate the functionality of applications, leading to potential issues in production.

Additionally, many organizations express the need for a shift-left testing strategy that allows for early detection of defects through unit, integration, and end-to-end (E2E) tests. However, the existing framework requires code-first developers to create automated tests, which can be a barrier for makers who may not have coding expertise.

Describe the solution you'd like

Test Case Generation

Provide a set of testing patterns and mini reference example that demonstrate automated tests using Test Engine that supports the following scenarios:

Security Related

  • Security Role Checks (Non privileged person, Security Roles Checks)

Monitoring

  • Health Check (For example open page and basic click checks)

App Interaction Patterns

  • Ability to test Create, Update, and Delete Operations.
  • Custom Toolbars.
  • Web Resources with Xrm SDK.
  • Web Resources that change the visibility and appearance of the form.

Async Process Testing

  • Interaction with Business Process Flow.
  • Trigger Power Automate Cloud Flows.
  • Update Dataverse for async business processes.

The patterns should also provide guidance for implementing a shift-left testing strategy by incorporating unit, integration, and E2E tests across the Application, Dataverse, and Power Automate Cloud flows. This will enable early detection of defects and improve the overall quality of the application.

The patterns should be designed to allow makers to create automated tests without needing code-first developers. This can be achieved by providing user-friendly tools and interfaces that simplify the test creation process, making it accessible to a wider range of users.

Test Automation Maturity

Aside from the test case creation the guidance and samples could also consider:

  • Test lifecycle: Example of how to:
    - Plan: Design for testability and operational health
    - Build: How to build MDA application to be testable
    - Test: Test case creation authoring
    - Deploy: How to make use of headless test execution and Power Pipeline integration
    - Monitor solution: The ability to have nightly builds and health checks
  • ALM lifecycle: How to operate business approval process across environments. This should include local execution, headless test automation and business level test review approval process with test results and changes

Describe alternatives you've considered

Playwright

Additional context?

No response

@Grant-Archibald-MS
Copy link
Contributor Author

Overall, this feature request is more at an EPIC level. ideally the patterns could be implemented as smaller user stories that illustrate each pattern with a working small sample application and as appropriate a Learning Playground example.

@Grant-Archibald-MS
Copy link
Contributor Author

Grant-Archibald-MS commented Apr 14, 2025

Some of the features here overlap with the [Feature]: Sample of Testing the Copilot Studio Kit

Feature Notes Reference
Health Check Example of how to open Entity List, Entity Record and Custom Page copilotstudiokit/RunTests.ps1
Create, Update, and Delete Operations Example of Power Fx to interact with Dataverse copilotstudiokit/agents-list.te.yaml
Custom Toolbar Make sue of Preview.PlaywrightAction("//css-selector", "click") copilotstudiokit/agents-details.te.yaml
Check visibility of controls Assert(custom_attribute.IsVisible) based on JavaScript in WebResources copilotstudiokit/agents-details.te.yaml
Power Fx Test Functions The ability to define user defined functions to simplify testing and allow parameters agents-details.te.yaml and testSettings.yaml
Async Process The Copilot Studio Kit makes use of Power Automate Cloud flows and Dataverse Plugins.
To test these features
ALM Working on deployment of Dev, Test and Production using Pipelines for Power Platform with extensions to execute Tests vis Azure DevOps pipeline Add Azure DevOps action to start pipeline execution of Test Engine tests to Configure Pre-Deployment Stage in Pipelines for Power Platform

@Grant-Archibald-MS
Copy link
Contributor Author

Features like [Feature]: Add Power Platform Tests as Resource Type will make the testing process easier as it will allow the tests to be included as part of the solution.

In the example of the Copilot Studio Kit future versions of the Kit shipped via App Source and GitHub releases could include a set of tests, test cases to be included in the solution and allow the following scenarios

  1. Run internally by the Power CAT Engineering prior to release
  2. Run by customers to verify that the features work in environments with different settings
  3. Used as part of issue triage process to isolate, replicate and verify resolution of issue
  4. Update progress to ensure no regression in functionality as new features are added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant