-
Notifications
You must be signed in to change notification settings - Fork 325
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
17.3.0 Fails in CI run #3939
Comments
VSTest2 task specifies a very wide dll matching pattern which includes many unexpected dlls. This includes all TestPlatform dlls, test framework dlls, and often dlls from local nuget package cache. Instead replace it with pattern that matches dlls from bin folder only, and matches the common test dll naming pattern such as: Product.Tests.dll Product.Test.dll ProductUnitTests.dll Product.Unit.Tests.dll But does not match *TestPlatform*.dll or MSTest.TestFramework.dll. This leads to more correct test runs, and faster test runs. Related microsoft/vstest#3939
A did a bit more investigation on this last week, there are 2 problems, both of which were mitigated before unde the .NET Framework runner (vstest.console.exe) we ship in Microsoft.TestPlatform package, and that is installed by TestPlatformInstaller (or shipped with VS). This is specific to the .NET Framework runner because the common determined framework was dependent on the target framework of the runner until 17.2. In 17.3 we don't determine a common framework.
Both cases can be solved by providing just the correct dlls that contain tests, which makes the run both more accurate and faster. I am working on a fix that would skip .NET Standard dlls, because no runtime provider will match them. The issue 2. cannot be solved, and IMHO it is correct to fail in that case, because in 17.2 it results in silently skipping over possible test assemblies. |
So this has been broken for 2 weeks now, can we get a comment from the team about getting a fix/revert deployed? Not sure if it should be the Visual Studio (as the deployment vessel) or Dev Ops (microsoft/azure-pipelines-tasks#16772) folk. Responsibility =/= fastest fix. |
@fowl There is 17.3.1 release in process, this is unlikely to hit VS users (at least we did not get any indication of the failure in 17.3.0 release cycle). This also can't be fully fixed because we no longer ignore all the .NET dlls that are specified whet there is at least 1 .NET Framerowk dll in the mix. Solution is to amend the filters in the pipeline to select the dlls that should actually be tested by using the filter that matches the naming convention. Hopefully the change for AzDO will be also accepted and make it the default. The default |
There is also |
I don't know if this is a similiar problem as described above. When changing from 17.2.0 to 17.3.0 we started to get this error:
The test project (PRI.Solvency.Web.UI.Tests.csproj) lists the application project (PRI.Solvency.Web.UI.csproj) as a dependency and that project in turn references We only inlcude test projects as test assemblies. The |
* Make default test pattern more narrow VSTest2 task specifies a very wide dll matching pattern which includes many unexpected dlls. This includes all TestPlatform dlls, test framework dlls, and often dlls from local nuget package cache. Instead replace it with pattern that matches dlls from bin folder only, and matches the common test dll naming pattern such as: Product.Tests.dll Product.Test.dll ProductUnitTests.dll Product.Unit.Tests.dll But does not match *TestPlatform*.dll or MSTest.TestFramework.dll. This leads to more correct test runs, and faster test runs. Related microsoft/vstest#3939 * Update versions * Update Tasks/VsTestV2/task.loc.json * Fix stars in loc pattern --------- Co-authored-by: triptijain2112 <92331194+triptijain2112@users.noreply.github.com> Co-authored-by: Vinayak <110326599+vinayakmsft@users.noreply.github.com>
* Record video for failing win32 integration tests. * Be more specific when selecting the test dll. microsoft/vstest#3939 --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Record video for failing win32 integration tests. * Be more specific when selecting the test dll. microsoft/vstest#3939 --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Record video for failing win32 integration tests. * Be more specific when selecting the test dll. microsoft/vstest#3939 --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
TestPlatform 17.3.0 was reported to fail in CI run by #3937 and #3938, the issue seems to b
The issue seems to be that after 17.3.0 introduced the ability to run multiple target frameworks at the same time, we are trying to run .NET Standard libraries which in 17.2.0 would have been excluded.
The workaround (and best practice) is to filter your test dlls down to what you actually want to run.
❌ The default VSTest task pattern is tests.dll, which includes all assemblies with test in name, potentially including resources, and some TestPlatform assemblies
✔️ Instead you should use a pattern specific to your test assembly naming convention. Typically
*Tests.dll
, or*.Tests.dll
name is used for a dll containing tests. In that case it is sufficient to simply pick that dll from the bin folder:✔️ You can also amend the original pattern to exclude more dlls, hopefully including only your desired test dll:
✔️ Set VSTEST_DISABLE_MULTI_TFM_RUN=1 to revert to the previous behavior (or close to previous).
The text was updated successfully, but these errors were encountered: