Skip to content
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

Add visual tree verification baseline #1130

Merged
merged 12 commits into from
Oct 2, 2019
Merged

Conversation

kaiguo
Copy link
Contributor

@kaiguo kaiguo commented Aug 5, 2019

Added tests to verify controls' visual trees and captured current content as the baseline.

Failed visual tree test will generate a new master file and it'll be included in HelixTestFailureDumps.html (use to be crashdumps.html) in the artifacts drop folder. HelixTestFailureDumps.html now contains screenshots, crash dumps, and new visual tree master files when they are available (screenshot below).

20190920160423

@kaiguo kaiguo requested review from licanhua and jevansaks August 5, 2019 23:05
@kaiguo kaiguo requested a review from a team as a code owner August 5, 2019 23:05
@kaiguo kaiguo force-pushed the user/kaiguo/visual-tree-test branch 2 times, most recently from 65a2d25 to c0684f2 Compare August 6, 2019 01:57
@StephenLPeters
Copy link
Contributor

What criteria was used to determine which controls would get masters?

@kaiguo
Copy link
Contributor Author

kaiguo commented Aug 6, 2019

What criteria was used to determine which controls would get masters?

We brought in a lot of templates from OS repo for rounded corner and shadow changes, but the code and tests of those controls are still in OS, that means we have 0 test coverage for them in MUX. So I'm targeting those controls first.

I've also randomly added some other controls with complicated visuals or might be impacted by rounded corners. But I think ideally we should have master file for every control in our repo @jevansaks ?

Copy link
Member

@jevansaks jevansaks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

@kaiguo kaiguo force-pushed the user/kaiguo/visual-tree-test branch from 71da6c1 to de96da1 Compare August 12, 2019 06:09
@kaiguo kaiguo force-pushed the user/kaiguo/visual-tree-test branch from 7a34931 to 0a3ed15 Compare September 20, 2019 23:00
@kaiguo
Copy link
Contributor Author

kaiguo commented Sep 20, 2019

This is ready to be re-reviewed now. Latest changes in the PR description @jevansaks @kmahone.

@@ -0,0 +1,149 @@
[Windows.UI.Xaml.Controls.Grid]
Padding=0,0,0,0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a script to copy the masters out of the pipeline? Or what is the procedure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current procedure is you'd have to open that HelixTestFailureDumps.html file and click on the links to download. I guess I'll write another script to download and replace the old masters to make it easier/faster.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a script in tools folder : )

@@ -142,10 +142,23 @@ private static void WalkThroughTree(DependencyObject node, Visitor visitor)
public class DefaultFilter : IFilter
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we be able to use this helper in the release tests too? I think that would help unlock a class of testing there too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in TestAppUtils so we should be able to use it in the C# version NuGet test.

@kmahone
Copy link
Member

kmahone commented Sep 23, 2019

Param(

Re-name this to something that doesn't refer only to dumps.

Something like CreateLinksToHelixFiles or something like that.


Refers to: build/Helix/CreateHelixTestFailureDumps.ps1:1 in 0584c50. [](commit_id = 0584c50, deletion_comment = False)

@kmahone
Copy link
Member

kmahone commented Sep 23, 2019

[string]$AccessToken = $env:SYSTEM_ACCESSTOKEN,

Is this script working?

If I go to the build:
https://dev.azure.com/ms/microsoft-ui-xaml/_build/results?buildId=37541

and look at the html file, it is empty.


Refers to: build/Helix/CreateHelixTestFailureDumps.ps1:2 in 0584c50. [](commit_id = 0584c50, deletion_comment = False)

@kaiguo
Copy link
Contributor Author

kaiguo commented Sep 23, 2019

[string]$AccessToken = $env:SYSTEM_ACCESSTOKEN,

Is this script working?

If I go to the build:
https://dev.azure.com/ms/microsoft-ui-xaml/_build/results?buildId=37541

and look at the html file, it is empty.

If it's a successful run then there won't be anything. This one had some actual failures, https://dev.azure.com/ms/microsoft-ui-xaml/_build/results?buildId=37518.

We probably shouldn't create the html file at all if the run is successful, I'll update.

@kaiguo kaiguo dismissed jevansaks’s stale review September 25, 2019 21:59

reset to unblock

@kaiguo kaiguo force-pushed the user/kaiguo/visual-tree-test branch from d1e7c06 to c226e7b Compare October 1, 2019 22:32
@kaiguo kaiguo merged commit 44575e6 into master Oct 2, 2019
@kaiguo kaiguo deleted the user/kaiguo/visual-tree-test branch October 2, 2019 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants