.NET Core Test ExplorerFeatures
PrerequisitesNew in 0.7.8
UsageOpen a .NET Core test project, or set SettingsThe settings are available via Settings examples
Glob pattern that points to path of .NET Core test project(s). A common pattern is Given the folder structure
the glob pattern "+(testProjectOne|testProjectTwo)" or "**/*Tests.csproj" should add both of the test projects.
If true, starts dotnet watch test after test discovery is completed
Additional arguments that are added to the dotnet test command. These can for instance be used to collect code coverage data ( Stopping the current test runner(s)Press the stop button in the top menu. This also works as a reset of sorts so if the extension has managed to end up in a weird state where it thinks a test is running even though it is not or that the debugger is running even though it is not the stop button can solve these types of issues as well. LoggingText from the dotnet test output as well as debug info is written to the Output/Test explorer terminal window. To view the log you can access it simply by clicking the view log icon. Debugging (alpha)To debug a test, right click the test and choose to Debug test. The option to run and debug test that appear in the code lens are provided by the omnisharp plugin and has nothing to do with this extension. The debugger might get stuck before loading your test assembly code. If this happens you can continue the debug process (F5) and it should load the rest of the assemblies and stop and the desired breakpoint. Keyboard shortcuts
Known issuesGo to test does not work with multiple workspacesThis is because of limitations in the omnisharp extensions. We can only navigate to symbols which are in the currently selected workspace. Test result is not shown in CodeLens / treeTry and change the setting dotnet-test-explorer.pathForResultFile to point to a folder you have access right too. CodeLens functionality also requires the C# extension) No tree view or color-coded explorer for NUnit / MSTestThis requires you to run dotnet SDK version 2.2.104 or higher. xUnit projects assembly name needs to match the test class namespaceSee #201 DisplayName attribute not working for xUnitSee #56 Project discovery with UNC Paths doesn't workSee #179 Telemetry dataBy default, anonymous telemetry data collection is turned on to understand user behavior to improve this extension. To disable it, update the settings.json as below:
Change LogSee Change Log here IssuesIf you find any bug or have any suggestion/feature request, please submit the issues to the GitHub Repo. ❤️ ContributorsThanks to all the contributors! Special thanks to Stefan Forsberg (@stefanforsberg) for maintaining the project and implementing so many cool features! Also thanks to Janaka Abeywardhana (@janaka) for maintaining the project! |