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

Add integration tests for dotnet test #46045

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

Conversation

mariam-abdulla
Copy link
Member

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

This pull request includes several changes to the dotnet-test command to improve error handling and output reporting. The most important changes involve replacing VSTestTrace.SafeWriteTrace with _output.WriteMessage for better integration with the TerminalTestReporter, modifying method signatures to include the new reporter, and refactoring utility methods for improved readability and maintainability.

Error Handling and Output Reporting:

Method Signature Modifications:

Code Refactoring:

Cleanup:

@mariam-abdulla mariam-abdulla requested a review from a team as a code owner January 16, 2025 09:09
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-DotNet Test untriaged Request triage from a team member labels Jan 16, 2025
Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as-is as it's getting to hard to reiew properly without having the associated feature at hand. Let's make sure this is merged asap and let's ensure tests are added with feature work.

eng/Versions.props Outdated Show resolved Hide resolved
Co-authored-by: Amaury Levé <[email protected]>
}
else
{
bool allowBinLog = IsBinaryLoggerEnabled(_args, out string binLogFileName);
isBuiltOrRestored = BuildOrRestoreProject(solutionOrProjectFilePath, projectCollection, [CliConstants.RestoreCommand], allowBinLog, binLogFileName);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to find a way to write a single binlog file when restoring and building for the test project case.
Because it's not working as the solution case (passing both restore and build command when building).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should work for single project, just like with sln. And for multiple projects you should be able to filter and build a metaproject with just those projects or something.

@JanKrivanek what is the easiest and most efficient way for us to build and restore a subset of projects from a solution?

e.g. all projects that contain *UnitTests.csproj in the name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-DotNet Test untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants