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

Refactor integraton tests for dotnet test #46333

Merged

Conversation

mariam-abdulla
Copy link
Member

@mariam-abdulla mariam-abdulla commented Jan 27, 2025

This pull request includes several changes aimed at improving file handling, updating project configurations, and enhancing test utilities. The most important changes include the addition of new utility methods, renaming and refactoring classes, and updating project files to use a dynamic target framework.

File Handling Improvements:

  • Added FindFileInParentDirectories method in PathUtility.cs to locate files in parent directories.

Code Refactoring:

  • Renamed msbuildExitCode to msBuildExitCode for consistency in MSBuildHandler.cs.
  • Renamed parameter projectFilePath to filePath in BuildOrRestoreProjectOrSolution method in MSBuildHandler.cs.

Test Utilities Enhancements:

  • Added ReadMSTestVersionFromProps and UpdateProjectFileWithMSTestVersion methods in TestAsset.cs to handle MSTest version updates.
  • Introduced DotnetVersionHelper and RegexPatternHelper classes in Utilities to assist with version management and regex pattern generation. [1] [2]

Project Configuration Updates:

  • Updated various .csproj files to use $(CurrentTargetFramework) instead of hardcoded target frameworks. [1] [2] [3] [4] [5]
  • Removed global.json file from the MultiTestProjectSolutionWithDiscoveredTests directory.

Class Renaming:

  • Renamed Constants to TestingConstants in TestingConstants.cs to better reflect its purpose.

Relates to #45927

@mariam-abdulla mariam-abdulla requested a review from a team as a code owner January 27, 2025 15:10
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-dotnet test untriaged Request triage from a team member labels Jan 27, 2025
@mariam-abdulla mariam-abdulla removed the untriaged Request triage from a team member label Jan 27, 2025
@mariam-abdulla mariam-abdulla enabled auto-merge (squash) January 28, 2025 18:26
@mariam-abdulla mariam-abdulla merged commit 5f48143 into main Jan 28, 2025
36 of 38 checks passed
@mariam-abdulla mariam-abdulla deleted the dev/mabdullah/follow-up-on-dotnet-test-integration-tests branch January 28, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants