-
Notifications
You must be signed in to change notification settings - Fork 479
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
Updates to SvgW3CTestRunner #1132
Conversation
- Fixes exception in pixel difference calculations due to image size difference - Added difference percentage calculations from Svg.UnitTests - Added a test-run dialog to quickly calculation tests in a selected tab - Added buttons to access the search and test-run dialogs
private static readonly int ImageWidth = 64; | ||
private static readonly int ImageHeight = 64; | ||
|
||
public static float PercentageDifference(this Image img1, Image img2, byte threshold = 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this is copied over from ImageComparisonTest
. I wonder if it makes sense to move this into a common component to avoid the duplication (and potential bugs if the code is changed in ne place only).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense as the shared parts are increasing. What name will you suggest for the shared code?
- Svg.Tests.Common
- Svg.Tests.Shared
- Svg.Tests.Core
- etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Common
sounds fine, but I have no strong feelings here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will look into it - I will be leaving for church service, and they also requested some IT services from me so will not be available for at least 8 hours.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrbean-bremen After looking into it, we should consider the shared library as separate PR.
Currently, the Svg.Benchmark
project references the Svg.UnitTests
project just to access an extension method, and I think the shared library should extend there too.
As a separate PR, we will give it a better review.
<ItemGroup>
<ProjectReference Include="..\..\Source\Svg.csproj" />
<ProjectReference Include="..\Svg.UnitTests\Svg.UnitTests.csproj" />
</ItemGroup>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, agreed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, if there is no remaining issue on this PR, can I proceed with the merge?
@@ -0,0 +1,223 @@ | |||
using System; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not going to review the GUI code, instead I just ran it and checked the outcome.
I think this is very helpful - both the separate runner (which also shows that some of the tests marked as "passing" are not really working), and the display of the difference in the original TestRunner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After testing with the #945 PR, I have decided to improve it.
- it is now modeless, and can be minimized.
- you can double-click or click a button to view the rendered images in the main TestRunner.
- you copy the selected file name or path to a clipboard.
Pending
- export the results so what we can compare the percentage, exception changes in each PR.
We will need to recreate the passing-failing
lists after completing the PR merges and start work on the Issues.
- it is modeless - exports the tests run - added positive and negative groups to indicate changes from PR to PR - added revisit group: a suggestions of test result to evaluate (whether passing or failing) - double-click or click a button to view the result in main TestRunner
….md Samples Source Svg.Custom Tests doc docfx.json index.md license.txt Updates to SvgW3CTestRunner - Fixes exception in pixel difference calculations due to image size difference - Added difference percentage calculations from Svg.UnitTests - Added a test-run dialog to quickly calculation tests in a selected tab - Added buttons to access the search and test-run dialogs CONTRIBUTING.md Generators README.md Samples Source Svg.Custom Tests doc docfx.json index.md license.txt Improvements to the tests-run dialog - it is modeless - exports the tests run - added positive and negative groups to indicate changes from PR to PR - added revisit group: a suggestions of test result to evaluate (whether passing or failing) - double-click or click a button to view the result in main TestRunner
Description
Exception:
Type of change
How Has This Been Tested?