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

Dotnet CLI #1402

Closed
helio-autocom opened this issue Dec 13, 2024 · 9 comments
Closed

Dotnet CLI #1402

helio-autocom opened this issue Dec 13, 2024 · 9 comments
Labels

Comments

@helio-autocom
Copy link

I would like to discover all the tests, using the command below it returns all the tests, but only the names... how to get the qualified name type namespace/class/name

dotnet run --project .\mytests.csproj --list-tests

@thomhurst
Copy link
Owner

This is currently a limitation of the Microsoft testing platform and not possible yet

@helio-autocom
Copy link
Author

Do you know of any other way I could do discovery and get all the information from each test?

@thomhurst
Copy link
Owner

What's your use case? All your tests are available in an After(TestDiscovery) hook - You can interrogate all the information of them there.

@Shaka-Rule
Copy link

Rider did not discorver all my tests. This command
dotnet run --project .\mytests.csproj --list-tests
does list all of them. any way to make rider discorver them?
Also, is it possible to run a single test through dotnet cli?

@helio-autocom
Copy link
Author

Qual é seu caso de uso? Todos os seus testes estão disponíveis em um hook After(TestDiscovery) - Você pode interrogar todas as informações deles lá.

I'm creating a vscode extension... so I would like to discover all the tests...

@helio-autocom
Copy link
Author

O Rider não descobriu todos os meus testes. Este comando dotnet run --project .\mytests.csproj --list-tests lista todos eles. Existe alguma maneira de fazer o Rider descobri-los? Além disso, é possível executar um único teste por meio do dotnet cli?

Enable Testing Platform support, https://thomhurst.github.io/TUnit/docs/tutorial-basics/running-your-tests

@thomhurst
Copy link
Owner

Might wanna upvote this issue: microsoft/testfx#3221

@Shaka-Rule
Copy link

Shaka-Rule commented Dec 16, 2024

O Rider não descobriu todos os meus testes. Este comando dotnet run --project .\mytests.csproj --list-tests lista todos eles. Existe alguma maneira de fazer o Rider descobri-los? Além disso, é possível executar um único teste por meio do dotnet cli?

Enable Testing Platform support, https://thomhurst.github.io/TUnit/docs/tutorial-basics/running-your-tests

Thanks, but it's already enabled. It works for other tests in the same project. But it doesnt discover new tests for a while. I've restarted rider a couple times, now it discovered them fine. Really annoying. Had the same problem with the first tests as well

** edit: Totally my bad.. I didnt realise rider was showing me a subset of the test, sort of like a profile or a playlist like in VS. All tests show up without problem in the 'explorer' tab.

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants