dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.38k stars 971 forks source link

Missing unit tests coverage of public methods in Design namespace #10773

Open SimonZhao888 opened 8 months ago

SimonZhao888 commented 8 months ago

We are in the process of adding unit tests for all public methods to improve the test coverage of code. Here is a list categorized by namespace.

System.Windows.Forms.Design

ricardobossan commented 8 months ago

There's also this previous list of controls, that were added on #10453 :

image

Tanya-Solyanik commented 8 months ago

@SimonZhao888 - could you please use this bug only for public classes from System.Windows.Forms.Design namespace - https://github.com/dotnet/winforms/tree/main/src/System.Windows.Forms.Design/src? And then add help-wanted label. We will use this bug to track tests added by contributors.

sharwell commented 8 months ago

Also remember the goal here isn't to increase code coverage. The goal is to identify user/developer scenarios which people are depending on today, and add tests that make it unlikely we would break those users in the future. Every added test should be written from the perspective of what someone using WinForms will try to do, and validate they will get the expected result.

The difference is subtle for public APIs, but for internal APIs that aren't always obvious to invoke, it becomes important to try and write tests targeting those features against public APIs where possible. Tests that exercise behavior using public APIs better reflect user behavior and the tests are much easier to understand if a failure ever shows up.

ghost commented 8 months ago

This issue is now marked as "help wanted", and we’re looking for a community volunteer to work on this issue. If we receive no interest in 180 days, we will close the issue. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!