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

Code Coverage for DownloadFile Review 1St #12486

Open
wants to merge 80 commits into
base: main
Choose a base branch
from

Conversation

paul1956
Copy link
Contributor

@paul1956 paul1956 commented Nov 14, 2024

Replace corrupt PR12221

Proposed changes

  • Code Coverage for DownloadFile

Customer Impact

  • This adds code coverage for DownloadFile which will be required to replace obsolete WebClient.

Regression?

  • No

Risk

-None

Test environment(s)

Microsoft Reviewers: Open in CodeFlow

@paul1956 paul1956 requested a review from a team as a code owner November 14, 2024 19:22
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 95.90604% with 122 lines in your changes missing coverage. Please review.

Project coverage is 76.38594%. Comparing base (776484e) to head (bbd01fe).

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #12486         +/-   ##
===================================================
+ Coverage   76.18249%   76.38594%   +0.20345%     
===================================================
  Files           3194        3199          +5     
  Lines         640365      643320       +2955     
  Branches       47239       47413        +174     
===================================================
+ Hits          487846      491406       +3560     
+ Misses        148983      148373        -610     
- Partials        3536        3541          +5     
Flag Coverage Δ
Debug 76.38594% <95.90604%> (+0.20345%) ⬆️
integration 18.14956% <0.00000%> (-0.01368%) ⬇️
production 50.36905% <84.84848%> (+0.25147%) ⬆️
test 97.01646% <96.02986%> (-0.00351%) ⬇️
unit 47.78819% <84.84848%> (+0.24849%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@paul1956
Copy link
Contributor Author

paul1956 commented Jan 8, 2025

I would suggest factoring out the following files into a standalone PR: SingleInstanceHelpers.vb WindowsFormsApplicationBase.vb Network.DownloadFile.vb Interaction.vb ClipboardProxy.vb SingleInstanceHelpersTests.vb TestUtilitiesTests.vb PathSeparatorTestData.vb VbFileCleanupTestBase.vb

They contain only cleanup changes and are ready to be merged while we discuss HTTPListener use within the team.

@Tanya-Solyanik #12730 is all the cleanup

@Tanya-Solyanik Tanya-Solyanik added the 📭 waiting-author-feedback The team requires more information from the author label Jan 8, 2025
@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label Jan 9, 2025
The server will now write issues as text to a public property ServerFault. The tests can then verify that there were no protocal issues except here expected.
Fix error in Progress Progress Dialog Labels
Use Enum to define testing file sizes
Get FileSize and URL from WebListner to allow 1 source of truth
This will also allow easier testing with real file server
Allow skipping of tests that need server to support Unauthorized Access based on user reedentials.
Make logic for file Upload detection not dependant on file name to support other Servers in testing.
Add support for real File Server Testing
@paul1956
Copy link
Contributor Author

@Tanya-Solyanik @KlausLoeffelmann
I updated the logic to have a text (json) file that contains all the server information. If someone had a real server, they could update the text file and use a local (or public) server to do testing. This also allows me to test with servers I have access to without modifying any code, I am finding many issues with tests that I am fixing. I am currently testing all the changes with multiple servers; all the tests pass with WebListener on Windows 11 and they pass on GitHub. There is probable a way to use an internal server and not expose username and password in the repo and remove WebListener.

Of note: the file location is odd compared to where the other tests find json files.

Path.Combine(My.Application.Info.DirectoryPath, "System\Windows\TestUtilities\TestData", "ServerConfiguration.JSON")
Path.Combine(My.Application.Info.DirectoryPath, "ServerConfiguration.JSON")

Visual Studio is picking the location, so I don't know how to fix.

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.

2 participants