Skip to content

[Feature]: Visual Difference Assert #568

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 14, 2025 · 1 comment
Open

[Feature]: Visual Difference Assert #568

Grant-Archibald-MS opened this issue Mar 14, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@Grant-Archibald-MS
Copy link
Contributor

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

Currently, Test Engine lacks the capability to verify visual design elements of a solution comprehensively. While it is possible to test individual properties, there is a significant need for a more efficient method that allows for visual multi-model tests. This limitation hinders the ability to ensure that the visual aspects of the application meet the desired standards and expectations.

Describe the solution you'd like

Propose the introduction of a Visual Image Compare feature in the Power Apps Test Engine. This feature should include the following capabilities:

  1. Control Name or Locator: The ability to use a control name or locator to find the specific element that needs to be tested. This will streamline the process of identifying and targeting the visual elements within the application.

  2. Reference Image: The option to specify a reference image against which the visual elements can be compared. This will serve as a baseline for the visual comparison, ensuring consistency and accuracy in the visual design.

  3. Comparison Types: The feature should support various comparison types, including Pixel, Edge Detection, Color, and Structure. This flexibility will allow for comprehensive visual testing, catering to different aspects of the visual design.

  4. Tolerance for Difference: The ability to set a tolerance for differences as a percentage. This will provide a margin for acceptable variations, ensuring that minor discrepancies do not result in false negatives.

Example Usage

Here is an example of how the Visual Image Compare feature could be used within the Power Fx namespace:

Preview.ImageCompare(Tab1, "reference.png", [{Compare: "Edge"}, {Compare: "Color"}], 10);

In this example, the ImageCompare function is used to compare the visual elements of Tab1 against a reference image named "reference.png". The comparison types specified are Edge Detection and Color, with a tolerance of 10%.

Describe alternatives you've considered

No response

Additional context?

To provide a clearer understanding of the proposed feature, I have included a screenshot of the current visual design elements and a reference image for comparison. Additionally, I have attached a document outlining the detailed requirements and expected outcomes of the Visual Image Compare feature.

Related to [Feature]: Sample of Testing the Copilot Studio Kit

For example theming of chat control

Image

Filters

To help deal with differences and false positives consider the following

Edge Detection with Polygon matching modes

Image

Blur

Image

Colormap

Image

@Grant-Archibald-MS Grant-Archibald-MS added the enhancement New feature or request label Mar 14, 2025
@Grant-Archibald-MS Grant-Archibald-MS changed the title [Feature]: Visual Diffrence Assert [Feature]: Visual Difference Assert Mar 14, 2025
@Grant-Archibald-MS
Copy link
Contributor Author

Included as part pf #560

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