I can not see my tests in .NET Test Explorer Extension. I've already configured settings.json
{
"dotnet-test-explorer.testProjectPath": "**/*ComprasPrevidencia/ComprasPrevidencia.csproj",
"dotnet-test-explorer.autoWatch": true,
"dotnet-test-explorer.runInParallel": true
}
At terminal I search for avaible tests with success:
dotnet test -t -v=q
Os Testes a seguir estão disponíveis: Acumulacao AcumulacaoRisco Risco
My .csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="nunit" Version="3.12.0"/>
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0"/>
<PackageReference Include="Selenium.WebDriver" Version="3.141.0"/>
<PackageReference Include="Selenium.Support" Version="3.141.0"/>
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="85.0.4183.8700"/>
<PackageReference Include="ClosedXML_Excel" Version="1.0.0"/>
<PackageReference Include="ClosedXML" Version="0.95.3"/>
<PackageReference Include="SQL" Version="1.0.5075.31045"/>
<PackageReference Include="System.Data.SqlClient" Version="4.5.1" />
</ItemGroup>
</Project>
I believe I have found the problem + solution.
In class
There was a reference to a class
but no corresponding
using Acme;
Also
Needed
I think VS Code was not complaining about this, because these 2
.csproj
files were not part of.sln
Regardless, ALL tests were not being found because of this one broken test config. Once fixed, VS Code was able to find all the tests.