diff --git a/src/commonRunTestsHandler.ts b/src/commonRunTestsHandler.ts index f7c30b0..3e25e1e 100644 --- a/src/commonRunTestsHandler.ts +++ b/src/commonRunTestsHandler.ts @@ -114,7 +114,18 @@ export async function commonRunTestsHandler(controller: vscode.TestController, r // enqueue everything up front so user sees immediately which tests will run mapTestClasses.forEach((test) => { + let methodTarget = ""; + if (request.include?.length === 1) { + const idParts = request.include[0].id.split(":"); + if (idParts.length === 5) { + methodTarget = request.include[0].id; + } + } test.children.forEach((methodTest) => { + if (methodTarget && methodTarget !== methodTest.id) { + // User specified a single test method to run, so skip all others + return; + } run.enqueued(methodTest); }); }); @@ -253,7 +264,7 @@ export async function commonRunTestsHandler(controller: vscode.TestController, r if (request.include?.length === 1) { const idParts = request.include[0].id.split(":"); if (idParts.length === 5) { - testSpec = `${username}:${idParts[3]}:${idParts[4]}`; + testSpec = `${username}\\${idParts[3].split(".").slice(0, -1).join("\\")}:${idParts[3]}:${idParts[4]}`; } } diff --git a/src/debugTracker.ts b/src/debugTracker.ts index 1b90707..4a73f26 100644 --- a/src/debugTracker.ts +++ b/src/debugTracker.ts @@ -132,9 +132,9 @@ export class DebugTracker implements vscode.DebugAdapterTracker { const assertFailedMatch = line.match(/^(Assert\w+):(.*) \(failed\) <<====/); if (assertFailedMatch) { //const macroName = assertFailedMatch[1]; - const message = assertFailedMatch[2]; + const failedMessage = assertFailedMatch[2]; //console.log(`Class ${this.className}, Test-method ${this.testMethodName}, macroName ${macroName}, outcome 'failed', message=${message}`); - this.failureMessages.push({ message: message }); + this.failureMessages.push({ message: failedMessage }); } else { const assertSkippedMatch = line.match(/^ (Test\w+):(.*) \(skipped\)$/); if (assertSkippedMatch) {