diff --git a/src/commands/testExplorerCommands.ts b/src/commands/testExplorerCommands.ts index f106d83c..ecd47c47 100644 --- a/src/commands/testExplorerCommands.ts +++ b/src/commands/testExplorerCommands.ts @@ -101,7 +101,10 @@ export async function refreshProject(classpathUri: Uri): Promise { }); await Promise.all(loadPromises); } else { - // URI doesn't match any known test project – skip to avoid unnecessary full refresh + // Bootstrap: first-time enable tests on an empty Test Explorer. + if (testController?.items.size === 0) { + await refreshExplorer(); + } return; } await showTestItemsInCurrentFile();