-
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
Tests suddenly failing to run in Azure DevOps pipeline - No suitable test runtime provider was found for any source in this run #4511
Comments
Hello. |
@JLRishe do you please have log of a successful run? |
The failure is on 17.6.0 vstest console, you can update it by using the TestPlatform installer task, and install Latest, which will choose 17.6.1. And then on your VSTest task you choose: Version installed by installer. |
@nohwnd Thank you! After making that change, my pipelines seem to be working. Hopefully @froeschel can chime in about how it goes for him, but it seems like the given solution is a good fix. |
If I try this approach i get an exception 'System.InvalidOperationException: The provided manager was not found in any slot.' My pipeline looks like this:
|
Thanks for confirming that.
This is a whole another issue, which happens after teshost fails to start up: The issue is described here, #4469 There should be additional errors before you see this message, are there? |
thanks. yes, there are: The first error in the log is: Testhost process for source(s) 'D:\a\1\s\test-appTests\bin\Release\net6.0\testhost.dll' exited with error: A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'. |
@froeschel Is your test project referencing Microsoft.NET.Test.SDK? If yes, which version? |
I used the VS functionality where you click on a method and say. Add unit tests. This creates a test project with following references.
so not 17.6.1.... |
Let me try with that to see if I can repro. |
Great, thanks for the help! I used the standard VS template for the project. ASP.NET core Web API, which creates this weather forecast sample app (just a single controller). |
Okay, I am seeing what you are seeing. A way to unblock yourself is to use a filter that is matching your test dlls naming. Typically you have something like this:
But your tests probably match this naming pattern.
|
@nohwnd thanks again! |
Hello, I'm now encountering a new error that seems to be a result of using the suggested workaround. Is there any ETA for when the original issue that caused these problems will be fixed?. Error:
Logs: |
@nohwnd Hello! Was the root cause of this issue resolved such that I can revert to not using the Test Platform Installer workaround? |
Yes, I believe so. If you are using windows-latest image it will be on 17.7.0 at least. |
@nohwnd Thank you. It seems to be working! |
Description
I have been using the Test Assemblies task in several different pipelines related to a single project. This has been working without issue for years.
Today, I've encountered an issue where this task fails with an error "No suitable test runtime provider was found for any source in this run".
At first I was able to get the build to succeed just by re-running it, but after a few hours since the first occurrence I'm finding that the failure occurs no matter how many times I run the build.
I have not recently changed anything about my project that would affect this. And the fact that the build step succeeded intermittently after the issue started occurring, and then stopped working altogether, suggests that this is likely the result of some new change being rolled out in Azure DevOps.
Do you know of any such change being rolled out, and if so, what is the best way to deal with this situation?
Steps to reproduce
I do not have steps that would be reproducible in general. I simply initiate the pipeline and it fails 50-80% of the time.
Expected behavior
The Test Assemblies task runs the tests.
Actual behavior
Error:
Diagnostic logs
Attached:
VSTest Log.txt
Environment
Azure DevOps
Agent: windows-latest
Test Assemblies task - Test platform version: Latest
The text was updated successfully, but these errors were encountered: