diff --git a/CHANGELOG.md b/CHANGELOG.md index 2671a4f..ecbba92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [0.3.18] - 12 October 2023 +- Extension version bump to 0.3.18 +- *Test Task* version bump to "0.3.4" +- *Test Task* logic change to fix false negative test case + ## [0.3.17] - 12 October 2023 - Extension version bump to 0.3.17 - Updated support links in readme diff --git a/tasks/test/index.js b/tasks/test/index.js index 3f1fd5b..daa062b 100644 --- a/tasks/test/index.js +++ b/tasks/test/index.js @@ -141,7 +141,8 @@ function createTestCase(suite, output, globalFailure) { const testRunRegex = /\s*\d\d:\d\d (\+\d+)?(\s+\-\d+)?:\s*(.*)/; let match = testRunRegex.exec(output); if (match) { - var title = match[3]; + var tSplits = match[3].split(': '); + var title = tSplits[tSplits.length - 1]; var successes = Number(match[1]); var failures = match[2] ? -Number(match[2]) : suite.failed; var newCase = { @@ -170,6 +171,10 @@ function createTestCase(suite, output, globalFailure) { newCase.isSuccess = true; hasNewCase = true; } + else { + newCase.isSuccess = true; + hasNewCase = true; + } if (hasNewCase) { if (suite.cases.length > 0) { suite.cases[suite.cases.length - 1].ended = newCase.started; diff --git a/tasks/test/index.ts b/tasks/test/index.ts index 07482ec..452eea8 100644 --- a/tasks/test/index.ts +++ b/tasks/test/index.ts @@ -172,7 +172,8 @@ function createTestCase(suite: any, output: string, globalFailure: number) { const testRunRegex = /\s*\d\d:\d\d (\+\d+)?(\s+\-\d+)?:\s*(.*)/; let match = testRunRegex.exec(output); if (match) { - var title = match[3]; + var tSplits = match[3].split(': '); + var title = tSplits[tSplits.length - 1]; var successes = Number(match[1]); var failures = match[2] ? -Number(match[2]) : suite.failed; @@ -203,6 +204,9 @@ function createTestCase(suite: any, output: string, globalFailure: number) { // everything is 0 meaning it's a new case newCase.isSuccess = true; hasNewCase = true; + } else { + newCase.isSuccess = true; + hasNewCase = true; } if (hasNewCase) { diff --git a/tasks/test/task.json b/tasks/test/task.json index 9eadaa0..fdf2c27 100644 --- a/tasks/test/task.json +++ b/tasks/test/task.json @@ -9,7 +9,7 @@ "version": { "Major": 0, "Minor": 3, - "Patch": 3 + "Patch": 4 }, "instanceNameFormat": "Flutter Test", "inputs": [ diff --git a/vss-extension.json b/vss-extension.json index a078e5c..9349ae9 100644 --- a/vss-extension.json +++ b/vss-extension.json @@ -1,7 +1,7 @@ { "manifestVersion": 1, "id": "flutter", - "version": "0.3.17", + "version": "0.3.18", "name": "Flutter Tasks", "description": "Flutter extension for Azure DevOps. Install, build, analyze, command and env tasks for easier Flutter DevOps.", "publisher": "hey24sheep",