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

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 and its associated utilities. The most important changes include the addition of new constants in CliConstants, modifications to the MSBuildHandler class to incorporate a new TerminalTestReporter, and the introduction of new methods for handling file paths.

Enhancements to dotnet-test command:

Updates to MSBuildHandler:

Path utility improvements:

Miscellaneous changes:

@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.

Copy link
Member

Choose a reason for hiding this comment

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

FYI @baronfel - yet another request for building set of projects in one shot.

I'm worried that we currently do not have better way for this other then 1 by 1 or creating a custom metaproj

Copy link
Member

Choose a reason for hiding this comment

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

Agreed @JanKrivanek - it does seem like we have a gap here.

For this specific problem, maybe create a custom slnf and use it to load the set of projects? It's a hack :-/

@mariam-abdulla mariam-abdulla enabled auto-merge (squash) January 24, 2025 10:21
@mariam-abdulla mariam-abdulla merged commit 3322748 into main Jan 24, 2025
36 of 38 checks passed
@mariam-abdulla mariam-abdulla deleted the dev/mabdullah/add-integration-tests-for-dotnet-test-run-functionality branch January 24, 2025 13:12
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.

5 participants