-
Notifications
You must be signed in to change notification settings - Fork 323
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 test on linux fails to find tests #4330
Comments
I've noticed that this same message is sometimes shown when test dependencies are missing (like Moq) is that expected? |
Hi @mjkkirschner, It would be good to have access to the project configuration to be able to tell for sure but from the logs it would seem to be an issue with NUnit.
As you can see, the testhost is starting the test execution, then NUnit says it found some tests an then says it's done invoking them but the test platform didn't receive any test result hence the message. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 10 days. |
Hi @Evangelink thanks for the reply, to reproduce the issue you can checkout this github action: the test assembly csproj: Please let me know if that was not what you meant by access to the project configuration. |
This was hopefully solved in the meantime, we don't have others reporting this problem. If not let me know. |
Reproduced on my project. @nohwnd, could you please reopen the issue?
windows-2022: tests are found;
|
@OsirisTerje do you know if this is a known issue in NUnit? Before I spend time investigating. |
I don't see it reproduce locally in WSL, would you able to provide logs from |
@varajan This is the same project, right? If not, do you have a repro project? |
It's my working project. Unfortunately, I cannot share it. It's running on AzureDevOps, filtering returned 'no tests found' when we've used 'ubuntu' machines and worked correctly when switched to 'windows'. Also, it worked on 'ubuntu' when changed version of nUnit from 4.1 to 3.14 |
@varajan Suggest you open a new issue in the NUnit repo, and create a small repro which you can upload to the NUnit.Issues repo. That way we can check if this is something related to NUnit. |
Description
Unclear if this is an Nunit or dotnet test issue, but starting here as Nunit seems to report the correct number of tests.
When running under linux - ubuntu 22.04 locally or on github hosted runner - the command:
dotnet test pathTotestBinary.dll
fails to run any tests. This binary references nunit3. The nunit framework, engine, and test adapter binaries are in the same directory as the test binary.Interestingly, in verbose mode, nunit test adapter / executer reports that it finds all the tests.
Also
-t
list mode shows all the tests.This same command works fine on windows.
dotnet 6.0.406 is installed locally.
output looks like:
Steps to reproduce
dotnet 6 / 7
nunit 3 adapter 4.2.1
nunit 13.3
Expected behavior
~2500 tests should be found
Actual behavior
dotnet test reports there are not tests in the assembly.
Diagnostic logs
dotnettestlog.zip
Environment
using parallels locally, but issue reproduces on github ubuntu runner.
The text was updated successfully, but these errors were encountered: