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

[FeatureRequest] Possibilty to run Unit or Integration Test using dotnet test #5164

Open
fseidl-bauradar opened this issue Jul 31, 2024 · 4 comments

Comments

@fseidl-bauradar
Copy link

Description

Would be nice if it would be possible to run all unit Tests inside a SolutionFolder, or separate Unit and Integration Tests in any way

Steps to reproduce

I have two Solution Folders

Test: Containing only UnitTests
IntegrationTest: Containing Test that require the solution to run during running Tests

Expected behavior

I would like a way to run only unit Tests and Integration Tests either by running the according Solution Folder or by any other instrument

Actual behavior

Currently it's not possible

Diagnostic logs

No logs so far

Environment

C# .Net 8.0

@fseidl-bauradar fseidl-bauradar changed the title [FeatureRequest] dotnet test [SolutionFolder] [FeatureRequest] Possibilty to run Unit or Integration Test using dotnet test Jul 31, 2024
@nohwnd
Copy link
Member

nohwnd commented Aug 5, 2024

I am not sure I get the request. Are you asking for a way to chose which projects to run based on a *UnitTests / *IntegrationTests naming convention?

@fseidl-bauradar
Copy link
Author

My basic Idea would be running tests inside a solution folder, but I am open for better ideas. The only important thing is a way to run unit test separated from test that need external components to run

@nohwnd
Copy link
Member

nohwnd commented Aug 5, 2024

Hmm I still don't think I understand, do you have some real examples of what is the desirable behavior and what is the current behavior?

@fseidl-bauradar
Copy link
Author

I have a WebAPI Backend that I often run Tests again to test a Layer that accessses the Backend, additionally I have UnitTests for the different Layers. (Repository,Service,WebAPI).
To execute the Layer Tests, the projekts need to rebuild, therefore the Backend must not be running.
To execute the Integration Tests running against the WebAPI and therefore against the whole system, I need to start the Backend.
During a pipeline and during development I want to run either the Unit Tests and when they finish successfully.
Start the Backend and run the Integration Integration Tests.
Hope this makes clear to you what I want and why I want this.

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

No branches or pull requests

2 participants