-
Notifications
You must be signed in to change notification settings - Fork 6
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
OSOE-111: Detect visual errors (visual verification testing) in the UI Testing Toolbox #166
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updating reference image
Piedone
requested changes
Jun 2, 2022
Lombiq.Tests.UI/Extensions/ResponsivenessUITestContextExtensions.cs
Outdated
Show resolved
Hide resolved
In any case, please check how the number of allocations can be reduced here, because there's both a stream and an array here.
________________________________
From: Horváth József ***@***.***>
Sent: Friday, June 3, 2022 10:15:45 AM
To: Lombiq/UI-Testing-Toolbox ***@***.***>
Cc: Zoltán Lehóczky ***@***.***>; Comment ***@***.***>
Subject: Re: [Lombiq/UI-Testing-Toolbox] OSOE-111: Detect visual errors (visual verification testing) in the UI Testing Toolbox (PR #166)
@dministro commented on this pull request.
________________________________
In Lombiq.Tests.UI/Extensions/ReliabilityUITestContextExtensions.cs<#166 (comment)>:
+ using var elementImage = context.TakeElementScreenshot(element);
+ using var elementImageStream = new MemoryStream();
+
+ elementImage.Save(elementImageStream, ImageFormat.Bmp);
+ var elementImageRaw = elementImageStream.ToArray();
+ return ComputeSha256Hash(elementImageRaw);
+ }
+
+ private static string ComputeSha256Hash(byte[] raw)
+ {
+ using var sha256Hash = SHA256.Create();
+
+ return string.Concat(
+ sha256Hash.ComputeHash(raw)
+ .Select(item => item.ToString("x2", CultureInfo.InvariantCulture)));
elementImageStream.GetHashCode() is not enough to check the equality. (here <https://docs.microsoft.com/en-us/dotnet/api/system.object.gethashcode?view=net-6.0#:~:text=Two%20objects%20that%20are%20equal%20return%20hash%20codes%20that%20are%20equal.%20However%2C%20the%20reverse%20is%20not%20true%3A%20equal%20hash%20codes%20do%20not%20imply%20object%20equality%2C%20because%20different%20(unequal)%20objects%20can%20have%20identical%20hash%20codes.> you can read more)
If I remember good (in FW3.5) the GetHashCode(...) didn't generated position sensitive hash.
—
Reply to this email directly, view it on GitHub<#166 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAPCSR5FEBOKT6Z67YP5AXLVNG5LDANCNFSM5W2YC26Q>.
You are receiving this because you commented.Message ID: ***@***.***>
|
removing unnecessary allocation(shahash) readmes comments
more sophisticated failure dump handling
adding load reference images from resource
Piedone
reviewed
Jun 9, 2022
Lombiq.Tests.UI/Exceptions/VisualVerificationReferenceImageCreatedException.cs
Outdated
Show resolved
Hide resolved
Lombiq.Tests.UI/Exceptions/VisualVerificationReferenceImageCreatedException.cs
Outdated
Show resolved
Hide resolved
Lombiq.Tests.UI/Exceptions/VisualVerificationReferenceImageCreatedException.cs
Outdated
Show resolved
Hide resolved
Lombiq.Tests.UI/Extensions/VisualVerificationUITestContextExtensions.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Zoltán Lehóczky <[email protected]>
adding edge and firefox to VerifyNavbar and VerifyHomePage adding a super simple test
Co-authored-by: Zoltán Lehóczky <[email protected]>
…nsions.cs Co-authored-by: Zoltán Lehóczky <[email protected]>
…nsions.cs Co-authored-by: Zoltán Lehóczky <[email protected]>
…nsions.cs Co-authored-by: Zoltán Lehóczky <[email protected]>
Co-authored-by: Zoltán Lehóczky <[email protected]>
removing edge and firefox annotations
Piedone
requested changes
Jun 29, 2022
Lombiq.Tests.UI/Extensions/ScreenshotUITestContextExtensions.cs
Outdated
Show resolved
Hide resolved
Lombiq.Tests.UI/Extensions/VisualVerificationUITestContextExtensions.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Zoltán Lehóczky <[email protected]>
Co-authored-by: Zoltán Lehóczky <[email protected]>
DRY chromium common config
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes GH-85
OSOE-111