-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Description
I am a member of the WPF team, and we have recently encountered an issue with two of our DRTs (Test) failing in the WPF. These tests were passing successfully in .NET 8 preview 2, but they started failing after upgrading to .NET 8 preview 3.
The specific area of concern is that we haven't made any changes in the codebase or functionality in area for which these tests belong.
We would greatly appreciate assistance in understanding and resolving this issue. Our goal is to identify the root cause of the test failures in the DRTs and we think that it could be related to runtime.
As part of our investigation, we performed an experiment by replacing the latest WPF binaries in .NET 8-preview2 and running our tests. Both tests passed successfully. We then proceeded to replace the Runtime binaries from .NET 8-preview2 in preview 5, and in this case too both tests passed. These results led us to suspect that the changes causing the failures might have been introduced in the runtime after the preview 2 release.
If we run the exe directly, we can see the test runs properly (without any failure) which shows that there is no problem in out test code. Apart from this we haven't made any changes in the test infrastructure, so it could not be the reason of test failure as the test was passing earlier (before preview3). So this eliminates our test and our infrastructure code.
Tests:
DRT Window Scroll:
In this DRT, we focus on validating the behavior of the ScrollViewer control within the context of a Page's style.
The test scenario involves the following application structure:
Window -> Page -> ScrollViewer -> Rectangle (figure)
To accomplish this, we attach an event handler (OnLoaded) to the Page. When the Page is loaded, this event handler triggers multiple tests to verify the behavior of the content presenter and the visibility of the scroll bar. These tests are conducted with different content sizes, ensuring comprehensive coverage.
DRT Window Functionality:
We aim to validate different functionalities and behaviors of the Window control and test that setting visibility is async.
In this test, we have verified the size and visibility of content in various situation where we changed the size, position and state of the window (Normal, minimized, maximized).
Reproduction Steps
rchauhan18/DrtTests (github.com)
- Clone the repo
- Move to the folder RuntimeTest/DrtTests
- Run command '.\Build.cmd'
- Move to the test folder 'cd .\publish\Debug\x86\Test'
- Run the test
.\RunDrts.cmd /name=[NAME]
[NAME] : drtwindowscroll or drtwindowfunctionality
Expected behavior
Actual behavior
DRT Window Scroll
The test is failing when we are checking the child of Page after loading. The error is 'Specified index is out of range or child is null'. This might have happened due to the onloaded function is called before the page is completely loaded.

DRT Window Functionality
The test is failing because the order of event firing is wrong. The OnContentRendered is called before OnActivation.
Regression?
Yes
Known Workarounds
If we change runtime version to .NET 8.0-preview2, the test will pass.
Configuration
.NET version 8.0-preview3
OS: Win11 22H2
Other information
No response

