From bbe4f04870c70dcdf0205182a19ab81a7a4cc96b Mon Sep 17 00:00:00 2001
From: tagupta
Date: Thu, 11 Sep 2025 09:56:24 +0530
Subject: [PATCH 01/39] build
---
tasks/run-matlab-tests/v1/main.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/tasks/run-matlab-tests/v1/main.ts b/tasks/run-matlab-tests/v1/main.ts
index ed0bdb0f..3075db5a 100644
--- a/tasks/run-matlab-tests/v1/main.ts
+++ b/tasks/run-matlab-tests/v1/main.ts
@@ -33,3 +33,4 @@ async function run() {
}
run();
+//this is a comment
\ No newline at end of file
From 23fb6fe62e1b2e5eff3d3f1de827708a2873bede Mon Sep 17 00:00:00 2001
From: tagupta
Date: Thu, 11 Sep 2025 10:02:22 +0530
Subject: [PATCH 02/39] remove comment
---
tasks/run-matlab-tests/v1/main.ts | 1 -
1 file changed, 1 deletion(-)
diff --git a/tasks/run-matlab-tests/v1/main.ts b/tasks/run-matlab-tests/v1/main.ts
index 3075db5a..ed0bdb0f 100644
--- a/tasks/run-matlab-tests/v1/main.ts
+++ b/tasks/run-matlab-tests/v1/main.ts
@@ -33,4 +33,3 @@ async function run() {
}
run();
-//this is a comment
\ No newline at end of file
From 37f012dd87e63a491d4c46064aee3b6798ab94eb Mon Sep 17 00:00:00 2001
From: tagupta
Date: Thu, 11 Sep 2025 12:10:10 +0530
Subject: [PATCH 03/39] html code coverage
---
build-test-publish.pipeline.yml | 2 +-
tasks/run-matlab-tests/v1/main.ts | 1 +
tasks/run-matlab-tests/v1/scriptgen.ts | 2 ++
tasks/run-matlab-tests/v1/task.json | 9 +++++++++
tasks/run-matlab-tests/v1/test/scriptgen.test.ts | 8 ++++++--
5 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/build-test-publish.pipeline.yml b/build-test-publish.pipeline.yml
index a33ff971..f6cb0c23 100644
--- a/build-test-publish.pipeline.yml
+++ b/build-test-publish.pipeline.yml
@@ -1,4 +1,4 @@
-name: 1.13$(Rev:.r)
+name: 1.14$(Rev:.r)
trigger:
- master
diff --git a/tasks/run-matlab-tests/v1/main.ts b/tasks/run-matlab-tests/v1/main.ts
index ed0bdb0f..51b4ebb9 100644
--- a/tasks/run-matlab-tests/v1/main.ts
+++ b/tasks/run-matlab-tests/v1/main.ts
@@ -11,6 +11,7 @@ async function run() {
const options: scriptgen.IRunTestsOptions = {
JUnitTestResults: taskLib.getInput("testResultsJUnit"),
CoberturaCodeCoverage: taskLib.getInput("codeCoverageCobertura"),
+ HTMLCodeCoverage: taskLib.getInput("codeCoverageHTML"),
SourceFolder: taskLib.getInput("sourceFolder"),
SelectByFolder: taskLib.getInput("selectByFolder"),
SelectByTag: taskLib.getInput("selectByTag"),
diff --git a/tasks/run-matlab-tests/v1/scriptgen.ts b/tasks/run-matlab-tests/v1/scriptgen.ts
index 68d6e3c8..43a055d8 100644
--- a/tasks/run-matlab-tests/v1/scriptgen.ts
+++ b/tasks/run-matlab-tests/v1/scriptgen.ts
@@ -5,6 +5,7 @@ import * as path from "path";
export interface IRunTestsOptions {
JUnitTestResults?: string;
CoberturaCodeCoverage?: string;
+ HTMLCodeCoverage?: string;
SourceFolder?: string;
PDFTestReport?: string;
SimulinkTestResults?: string;
@@ -22,6 +23,7 @@ export function generateCommand(options: IRunTestsOptions): string {
`testScript = genscript('Test',` +
`'JUnitTestResults','${options.JUnitTestResults || ""}',` +
`'CoberturaCodeCoverage','${options.CoberturaCodeCoverage || ""}',` +
+ `'HTMLCodeCoverage','${options.HTMLCodeCoverage || ""}',` +
`'SourceFolder','${options.SourceFolder || ""}',` +
`'PDFTestReport','${options.PDFTestReport || ""}',` +
`'SimulinkTestResults','${options.SimulinkTestResults || ""}',` +
diff --git a/tasks/run-matlab-tests/v1/task.json b/tasks/run-matlab-tests/v1/task.json
index ef9cc098..5418562e 100644
--- a/tasks/run-matlab-tests/v1/task.json
+++ b/tasks/run-matlab-tests/v1/task.json
@@ -129,6 +129,15 @@
"groupName": "coverageArtifacts",
"helpMarkDown": "Path to write the code coverage results in Cobertura XML format."
},
+ {
+ "name": "codeCoverageHTML",
+ "type": "string",
+ "label": "HTML code coverage",
+ "defaultValue": "",
+ "required": false,
+ "groupName": "coverageArtifacts",
+ "helpMarkDown": "Path to write the code coverage results in HTML format."
+ },
{
"name": "modelCoverageCobertura",
"type": "string",
diff --git a/tasks/run-matlab-tests/v1/test/scriptgen.test.ts b/tasks/run-matlab-tests/v1/test/scriptgen.test.ts
index d89e4921..0d715cf5 100644
--- a/tasks/run-matlab-tests/v1/test/scriptgen.test.ts
+++ b/tasks/run-matlab-tests/v1/test/scriptgen.test.ts
@@ -9,6 +9,7 @@ export default function suite() {
const options: scriptgen.IRunTestsOptions = {
JUnitTestResults: "",
CoberturaCodeCoverage: "",
+ HTMLCodeCoverage: "",
SourceFolder: "",
PDFTestReport: "",
SimulinkTestResults: "",
@@ -26,6 +27,7 @@ export default function suite() {
assert(actual.includes("genscript('Test'"));
assert(actual.includes("'JUnitTestResults',''"));
assert(actual.includes("'CoberturaCodeCoverage',''"));
+ assert(actual.includes("'HTMLCodeCoverage',''"));
assert(actual.includes("'SourceFolder',''"));
assert(actual.includes("'PDFTestReport',''"));
assert(actual.includes("'SimulinkTestResults',''"));
@@ -37,7 +39,7 @@ export default function suite() {
assert(actual.includes("'OutputDetail',''"));
assert(actual.includes("'LoggingLevel',''"));
- const expected = `genscript('Test', 'JUnitTestResults','', 'CoberturaCodeCoverage','',
+ const expected = `genscript('Test', 'JUnitTestResults','', 'CoberturaCodeCoverage','','HTMLCodeCoverage','',
'SourceFolder','', 'PDFTestReport','', 'SimulinkTestResults','',
'CoberturaModelCoverage','', 'SelectByTag','', 'SelectByFolder','',
'Strict',false, 'UseParallel',false, 'OutputDetail','', 'LoggingLevel','')`
@@ -49,6 +51,7 @@ export default function suite() {
const options: scriptgen.IRunTestsOptions = {
JUnitTestResults: "test-results/results.xml",
CoberturaCodeCoverage: "code-coverage/coverage.xml",
+ HTMLCodeCoverage: "code-coverage/coverage.html",
SourceFolder: "source",
PDFTestReport: "test-results/pdf-results.pdf",
SimulinkTestResults: "test-results/simulinkTest.mldatx",
@@ -66,6 +69,7 @@ export default function suite() {
assert(actual.includes("genscript('Test'"));
assert(actual.includes("'JUnitTestResults','test-results/results.xml'"));
assert(actual.includes("'CoberturaCodeCoverage','code-coverage/coverage.xml'"));
+ assert(actual.includes("'HTMLCodeCoverage','code-coverage/coverage.html'"));
assert(actual.includes("'SourceFolder','source'"));
assert(actual.includes("'PDFTestReport','test-results/pdf-results.pdf'"));
assert(actual.includes("'SimulinkTestResults','test-results/simulinkTest.mldatx'"));
@@ -78,7 +82,7 @@ export default function suite() {
assert(actual.includes("'LoggingLevel','Detailed'"));
const expected = `genscript('Test', 'JUnitTestResults','test-results/results.xml',
- 'CoberturaCodeCoverage','code-coverage/coverage.xml', 'SourceFolder','source',
+ 'CoberturaCodeCoverage','code-coverage/coverage.xml','HTMLCodeCoverage','code-coverage/coverage.html', 'SourceFolder','source',
'PDFTestReport','test-results/pdf-results.pdf', 'SimulinkTestResults','test-results/simulinkTest.mldatx',
'CoberturaModelCoverage','test-results/modelcoverage.xml', 'SelectByTag','FeatureA',
'SelectByFolder','test/tools;test/toolbox', 'Strict',true, 'UseParallel',true, 'OutputDetail','Detailed',
From ee478823e7b09ecc1a56721ee9f5ca49ca1edf71 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Thu, 11 Sep 2025 17:42:58 +0530
Subject: [PATCH 04/39] html model coverage and html test report
---
tasks/run-matlab-tests/v1/main.ts | 2 ++
tasks/run-matlab-tests/v1/scriptgen.ts | 4 ++++
tasks/run-matlab-tests/v1/task.json | 18 ++++++++++++++++++
.../run-matlab-tests/v1/test/scriptgen.test.ts | 16 ++++++++++++----
4 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/tasks/run-matlab-tests/v1/main.ts b/tasks/run-matlab-tests/v1/main.ts
index 51b4ebb9..6e94c0eb 100644
--- a/tasks/run-matlab-tests/v1/main.ts
+++ b/tasks/run-matlab-tests/v1/main.ts
@@ -16,8 +16,10 @@ async function run() {
SelectByFolder: taskLib.getInput("selectByFolder"),
SelectByTag: taskLib.getInput("selectByTag"),
CoberturaModelCoverage: taskLib.getInput("modelCoverageCobertura"),
+ HTMLModelCoverage: taskLib.getInput("modelCoverageHTML"),
SimulinkTestResults: taskLib.getInput("testResultsSimulinkTest"),
PDFTestReport: taskLib.getInput("testResultsPDF"),
+ HTMLTestReport: taskLib.getInput("testResultsHTML"),
Strict: taskLib.getBoolInput("strict"),
UseParallel: taskLib.getBoolInput("useParallel"),
OutputDetail: taskLib.getInput("outputDetail"),
diff --git a/tasks/run-matlab-tests/v1/scriptgen.ts b/tasks/run-matlab-tests/v1/scriptgen.ts
index 43a055d8..76249d94 100644
--- a/tasks/run-matlab-tests/v1/scriptgen.ts
+++ b/tasks/run-matlab-tests/v1/scriptgen.ts
@@ -8,8 +8,10 @@ export interface IRunTestsOptions {
HTMLCodeCoverage?: string;
SourceFolder?: string;
PDFTestReport?: string;
+ HTMLTestReport?: string;
SimulinkTestResults?: string;
CoberturaModelCoverage?: string;
+ HTMLModelCoverage?: string;
SelectByTag?: string;
SelectByFolder?: string;
Strict?: boolean;
@@ -26,8 +28,10 @@ export function generateCommand(options: IRunTestsOptions): string {
`'HTMLCodeCoverage','${options.HTMLCodeCoverage || ""}',` +
`'SourceFolder','${options.SourceFolder || ""}',` +
`'PDFTestReport','${options.PDFTestReport || ""}',` +
+ `'HTMLTestReport','${options.HTMLTestReport || ""}',` +
`'SimulinkTestResults','${options.SimulinkTestResults || ""}',` +
`'CoberturaModelCoverage','${options.CoberturaModelCoverage || ""}',` +
+ `'HTMLModelCoverage','${options.HTMLModelCoverage || ""}',` +
`'SelectByTag','${options.SelectByTag || ""}',` +
`'SelectByFolder','${options.SelectByFolder || ""}',` +
`'Strict',${options.Strict || false},` +
diff --git a/tasks/run-matlab-tests/v1/task.json b/tasks/run-matlab-tests/v1/task.json
index 5418562e..cc3a2bc3 100644
--- a/tasks/run-matlab-tests/v1/task.json
+++ b/tasks/run-matlab-tests/v1/task.json
@@ -102,6 +102,15 @@
"required": false,
"helpMarkDown": "Path to write the test results in PDF format (requires MATLAB R2020b or later on macOS platforms)."
},
+ {
+ "name": "testResultsHTML",
+ "type": "string",
+ "label": "HTML test report ",
+ "defaultValue": "",
+ "groupName": "testArtifacts",
+ "required": false,
+ "helpMarkDown": "Path to write the test results in HTML format (requires MATLAB R2020b or later on macOS platforms)."
+ },
{
"name": "testResultsJUnit",
"type": "string",
@@ -147,6 +156,15 @@
"required": false,
"helpMarkDown": "Path to write the model coverage report in Cobertura XML format (requires Simulink Coverage and is supported in MATLAB R2018b or later)."
},
+ {
+ "name": "modelCoverageHTML",
+ "type": "string",
+ "label": "HTML model coverage",
+ "defaultValue": "",
+ "groupName": "coverageArtifacts",
+ "required": false,
+ "helpMarkDown": "Path to write the model coverage report in HTML format (requires Simulink Coverage and is supported in MATLAB R2018b or later)."
+ },
{
"name": "startupOptions",
"type": "string",
diff --git a/tasks/run-matlab-tests/v1/test/scriptgen.test.ts b/tasks/run-matlab-tests/v1/test/scriptgen.test.ts
index 0d715cf5..6ba3c7bb 100644
--- a/tasks/run-matlab-tests/v1/test/scriptgen.test.ts
+++ b/tasks/run-matlab-tests/v1/test/scriptgen.test.ts
@@ -12,8 +12,10 @@ export default function suite() {
HTMLCodeCoverage: "",
SourceFolder: "",
PDFTestReport: "",
+ HTMLTestReport: "",
SimulinkTestResults: "",
CoberturaModelCoverage: "",
+ HTMLModelCoverage: "",
SelectByTag: "",
SelectByFolder: "",
Strict: false,
@@ -30,8 +32,10 @@ export default function suite() {
assert(actual.includes("'HTMLCodeCoverage',''"));
assert(actual.includes("'SourceFolder',''"));
assert(actual.includes("'PDFTestReport',''"));
+ assert(actual.includes("'HTMLTestReport',''"));
assert(actual.includes("'SimulinkTestResults',''"));
assert(actual.includes("'CoberturaModelCoverage',''"));
+ assert(actual.includes("'HTMLModelCoverage',''"));
assert(actual.includes("'SelectByTag',''"));
assert(actual.includes("'SelectByFolder',''"));
assert(actual.includes("'Strict',false"));
@@ -40,8 +44,8 @@ export default function suite() {
assert(actual.includes("'LoggingLevel',''"));
const expected = `genscript('Test', 'JUnitTestResults','', 'CoberturaCodeCoverage','','HTMLCodeCoverage','',
- 'SourceFolder','', 'PDFTestReport','', 'SimulinkTestResults','',
- 'CoberturaModelCoverage','', 'SelectByTag','', 'SelectByFolder','',
+ 'SourceFolder','', 'PDFTestReport','', 'HTMLTestReport','', 'SimulinkTestResults','',
+ 'CoberturaModelCoverage','', 'HTMLModelCoverage','', 'SelectByTag','', 'SelectByFolder','',
'Strict',false, 'UseParallel',false, 'OutputDetail','', 'LoggingLevel','')`
.replace(/\s+/g, "");
assert(actual.replace(/\s+/g, "").includes(expected));
@@ -54,8 +58,10 @@ export default function suite() {
HTMLCodeCoverage: "code-coverage/coverage.html",
SourceFolder: "source",
PDFTestReport: "test-results/pdf-results.pdf",
+ HTMLTestReport: "test-results/html-results.html",
SimulinkTestResults: "test-results/simulinkTest.mldatx",
CoberturaModelCoverage: "test-results/modelcoverage.xml",
+ HTMLModelCoverage: "test-results/modelcoverage.html",
SelectByTag: "FeatureA",
SelectByFolder: "test/tools;test/toolbox",
Strict: true,
@@ -72,8 +78,10 @@ export default function suite() {
assert(actual.includes("'HTMLCodeCoverage','code-coverage/coverage.html'"));
assert(actual.includes("'SourceFolder','source'"));
assert(actual.includes("'PDFTestReport','test-results/pdf-results.pdf'"));
+ assert(actual.includes("'HTMLTestReport','test-results/html-results.html'"));
assert(actual.includes("'SimulinkTestResults','test-results/simulinkTest.mldatx'"));
assert(actual.includes("'CoberturaModelCoverage','test-results/modelcoverage.xml'"));
+ assert(actual.includes("'HTMLModelCoverage','test-results/modelcoverage.html'"));
assert(actual.includes("'SelectByTag','FeatureA'"));
assert(actual.includes("'SelectByFolder','test/tools;test/toolbox'"));
assert(actual.includes("'Strict',true"));
@@ -83,8 +91,8 @@ export default function suite() {
const expected = `genscript('Test', 'JUnitTestResults','test-results/results.xml',
'CoberturaCodeCoverage','code-coverage/coverage.xml','HTMLCodeCoverage','code-coverage/coverage.html', 'SourceFolder','source',
- 'PDFTestReport','test-results/pdf-results.pdf', 'SimulinkTestResults','test-results/simulinkTest.mldatx',
- 'CoberturaModelCoverage','test-results/modelcoverage.xml', 'SelectByTag','FeatureA',
+ 'PDFTestReport','test-results/pdf-results.pdf', 'HTMLTestReport','test-results/html-results.html', 'SimulinkTestResults','test-results/simulinkTest.mldatx',
+ 'CoberturaModelCoverage','test-results/modelcoverage.xml', 'HTMLModelCoverage','test-results/modelcoverage.html', 'SelectByTag','FeatureA',
'SelectByFolder','test/tools;test/toolbox', 'Strict',true, 'UseParallel',true, 'OutputDetail','Detailed',
'LoggingLevel','Detailed' )`
.replace(/\s+/g, "");
From d4d42ef813325d59141507c3b3b745fa361d65a8 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Fri, 12 Sep 2025 09:30:58 +0530
Subject: [PATCH 05/39] update task.json
---
tasks/run-matlab-tests/v1/task.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tasks/run-matlab-tests/v1/task.json b/tasks/run-matlab-tests/v1/task.json
index cc3a2bc3..5b4abd6e 100644
--- a/tasks/run-matlab-tests/v1/task.json
+++ b/tasks/run-matlab-tests/v1/task.json
@@ -109,7 +109,7 @@
"defaultValue": "",
"groupName": "testArtifacts",
"required": false,
- "helpMarkDown": "Path to write the test results in HTML format (requires MATLAB R2020b or later on macOS platforms)."
+ "helpMarkDown": "Path to write the test results in HTML format."
},
{
"name": "testResultsJUnit",
From 96a460fbd00d8f3b705761249cacd3448fc042fc Mon Sep 17 00:00:00 2001
From: tagupta
Date: Fri, 12 Sep 2025 11:47:07 +0530
Subject: [PATCH 06/39] test code coverage html in template.yml
---
integ-test-promote-template.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index cf50b902..18c8f8bb 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -210,6 +210,7 @@ jobs:
inputs:
testResultsJUnit: test-results/matlab/results.xml
codeCoverageCobertura: code-coverage/coverage.xml
+ codeCoverageHTML: code-coverage/coverage.html
sourceFolder: src
- task: MathWorks.matlab-azure-devops-extension-dev.RunMATLABTests.RunMATLABTests@${{ version }}
displayName: Run MATLAB tests filter by folder
@@ -228,6 +229,7 @@ jobs:
- bash: |
set -e
grep -q add code-coverage/coverage.xml
+ grep -q add code-coverage/coverage.html
displayName: Verify code coverage file was created
- bash: |
set -e
From cbd10d15f45ae6b8fb4e51ad382fb6be225456ff Mon Sep 17 00:00:00 2001
From: tagupta
Date: Fri, 12 Sep 2025 11:55:51 +0530
Subject: [PATCH 07/39] test commit
---
integ-test-promote-template.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 18c8f8bb..4e93363a 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -229,7 +229,7 @@ jobs:
- bash: |
set -e
grep -q add code-coverage/coverage.xml
- grep -q add code-coverage/coverage.html
+ grep -q add code-coverage/coverag.html
displayName: Verify code coverage file was created
- bash: |
set -e
From 49e3d35f61647ec7f3aa2f0b43ab86faee437ad7 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Fri, 12 Sep 2025 12:25:47 +0530
Subject: [PATCH 08/39] add folder for code cov html
---
integ-test-promote-template.yml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 4e93363a..08d860c5 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -210,7 +210,7 @@ jobs:
inputs:
testResultsJUnit: test-results/matlab/results.xml
codeCoverageCobertura: code-coverage/coverage.xml
- codeCoverageHTML: code-coverage/coverage.html
+ codeCoverageHTML: code-coverage/coverageHTML
sourceFolder: src
- task: MathWorks.matlab-azure-devops-extension-dev.RunMATLABTests.RunMATLABTests@${{ version }}
displayName: Run MATLAB tests filter by folder
@@ -229,8 +229,11 @@ jobs:
- bash: |
set -e
grep -q add code-coverage/coverage.xml
- grep -q add code-coverage/coverag.html
displayName: Verify code coverage file was created
+ - bash: |
+ set -e
+ grep -q add code-coverage/coverageHTML
+ displayName: Verify code coverage folder was created
- bash: |
set -e
grep -q simpleTest test-results/matlab/selectbyfolder.xml
From be5c5f144163bad3b076a932a578a7b3b4945d00 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Fri, 12 Sep 2025 12:55:19 +0530
Subject: [PATCH 09/39] fix cod cov html
---
integ-test-promote-template.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 08d860c5..383090a7 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -232,7 +232,7 @@ jobs:
displayName: Verify code coverage file was created
- bash: |
set -e
- grep -q add code-coverage/coverageHTML
+ test -d code-coverage/coverageHTML
displayName: Verify code coverage folder was created
- bash: |
set -e
From 85404b20225a8c35f6948ab66d514384fca246e9 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Fri, 12 Sep 2025 15:27:20 +0530
Subject: [PATCH 10/39] fix code coverage html
---
integ-test-promote-template.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 383090a7..b6bbb6af 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -210,8 +210,13 @@ jobs:
inputs:
testResultsJUnit: test-results/matlab/results.xml
codeCoverageCobertura: code-coverage/coverage.xml
+ sourceFolder: src
+ - task: MathWorks.matlab-azure-devops-extension-dev.RunMATLABTests.RunMATLABTests@${{ version }}
+ displayName: Run MATLAB tests producing artifacts
+ inputs:
codeCoverageHTML: code-coverage/coverageHTML
sourceFolder: src
+ condition: not(eq(${{ version }}, '0'))
- task: MathWorks.matlab-azure-devops-extension-dev.RunMATLABTests.RunMATLABTests@${{ version }}
displayName: Run MATLAB tests filter by folder
inputs:
From e2f32c641515953c5cb652d0d556196bec1ba56e Mon Sep 17 00:00:00 2001
From: tagupta
Date: Fri, 12 Sep 2025 15:48:14 +0530
Subject: [PATCH 11/39] update code coverage html
---
integ-test-promote-template.yml | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index b6bbb6af..48085308 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -210,13 +210,8 @@ jobs:
inputs:
testResultsJUnit: test-results/matlab/results.xml
codeCoverageCobertura: code-coverage/coverage.xml
- sourceFolder: src
- - task: MathWorks.matlab-azure-devops-extension-dev.RunMATLABTests.RunMATLABTests@${{ version }}
- displayName: Run MATLAB tests producing artifacts
- inputs:
codeCoverageHTML: code-coverage/coverageHTML
sourceFolder: src
- condition: not(eq(${{ version }}, '0'))
- task: MathWorks.matlab-azure-devops-extension-dev.RunMATLABTests.RunMATLABTests@${{ version }}
displayName: Run MATLAB tests filter by folder
inputs:
@@ -239,6 +234,7 @@ jobs:
set -e
test -d code-coverage/coverageHTML
displayName: Verify code coverage folder was created
+ condition: not(eq(${{ version }}, '0'))
- bash: |
set -e
grep -q simpleTest test-results/matlab/selectbyfolder.xml
From 0bc174044e99a9459dbfd1ec109229064db2b526 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Tue, 7 Oct 2025 10:24:53 +0530
Subject: [PATCH 12/39] comment added
---
tasks/run-matlab-tests/v1/main.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/tasks/run-matlab-tests/v1/main.ts b/tasks/run-matlab-tests/v1/main.ts
index 6e94c0eb..56488f86 100644
--- a/tasks/run-matlab-tests/v1/main.ts
+++ b/tasks/run-matlab-tests/v1/main.ts
@@ -36,3 +36,4 @@ async function run() {
}
run();
+//this is a comment
\ No newline at end of file
From a833549b2163efba5c86655a85ac2bddd7d7877e Mon Sep 17 00:00:00 2001
From: tagupta
Date: Tue, 7 Oct 2025 10:47:37 +0530
Subject: [PATCH 13/39] remove comment
---
tasks/run-matlab-tests/v1/main.ts | 1 -
1 file changed, 1 deletion(-)
diff --git a/tasks/run-matlab-tests/v1/main.ts b/tasks/run-matlab-tests/v1/main.ts
index 56488f86..6e94c0eb 100644
--- a/tasks/run-matlab-tests/v1/main.ts
+++ b/tasks/run-matlab-tests/v1/main.ts
@@ -36,4 +36,3 @@ async function run() {
}
run();
-//this is a comment
\ No newline at end of file
From 7496fec2b8ca57af7e1e89d6e8f856921c0152b9 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Tue, 7 Oct 2025 11:52:01 +0530
Subject: [PATCH 14/39] test results html
---
integ-test-promote-template.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 48085308..6a5e4423 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -209,6 +209,7 @@ jobs:
displayName: Run MATLAB tests producing artifacts
inputs:
testResultsJUnit: test-results/matlab/results.xml
+ testResultHTML: test-results/matlab/resultsHTML
codeCoverageCobertura: code-coverage/coverage.xml
codeCoverageHTML: code-coverage/coverageHTML
sourceFolder: src
@@ -226,6 +227,10 @@ jobs:
set -e
grep -q FirstTest test-results/matlab/results.xml
displayName: Verify test results file was created
+ - bash: |
+ set -e
+ test -d test-results/matlab/resultsHTML
+ displayName: Verify test results folder was created
- bash: |
set -e
grep -q add code-coverage/coverage.xml
From ca6b30207b68b2a1edd8c1b1472eb343fa9e1648 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Tue, 7 Oct 2025 12:15:34 +0530
Subject: [PATCH 15/39] skip version 0
---
integ-test-promote-template.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 6a5e4423..c1c8a28c 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -231,6 +231,7 @@ jobs:
set -e
test -d test-results/matlab/resultsHTML
displayName: Verify test results folder was created
+ condition: not(eq(${{ version }}, '0'))
- bash: |
set -e
grep -q add code-coverage/coverage.xml
From 43164dedfb4ba70d6de0a17acf47870013fa770a Mon Sep 17 00:00:00 2001
From: tagupta
Date: Tue, 7 Oct 2025 12:54:34 +0530
Subject: [PATCH 16/39] fix test results html
---
integ-test-promote-template.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index c1c8a28c..ef61a4d9 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -209,7 +209,7 @@ jobs:
displayName: Run MATLAB tests producing artifacts
inputs:
testResultsJUnit: test-results/matlab/results.xml
- testResultHTML: test-results/matlab/resultsHTML
+ testResultsHTML: test-results/matlab/resultsHTML
codeCoverageCobertura: code-coverage/coverage.xml
codeCoverageHTML: code-coverage/coverageHTML
sourceFolder: src
From ea297fdf7fdef3deba4179c95866255729b55b92 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Tue, 7 Oct 2025 14:54:17 +0530
Subject: [PATCH 17/39] remove TestRunner.withTextOutput
---
integ-test-promote-template.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index ef61a4d9..d0083143 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -285,7 +285,7 @@ jobs:
sourceFolder: src
- bash: |
set -e
- grep -q "TestRunner.withTextOutput('OutputDetail', 3)" console.log
+ grep -q "('OutputDetail', 3)" console.log
rm console.log
displayName: Verify tests ran with detailed display level for event details
- task: MathWorks.matlab-azure-devops-extension-dev.RunMATLABTests.RunMATLABTests@${{ version }}
@@ -295,7 +295,7 @@ jobs:
sourceFolder: src
- bash: |
set -e
- grep -q "TestRunner.withTextOutput('LoggingLevel', 3)" console.log
+ grep -q "('LoggingLevel', 3)" console.log
rm console.log
displayName: Verify tests ran with detailed verbosity level for logged diagnostics
- bash: |
From 3a3484468075b5c29e38471d788be29701c5d213 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Tue, 7 Oct 2025 16:07:35 +0530
Subject: [PATCH 18/39] model coverage HTML
---
integ-test-promote-template.yml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index d0083143..9eda6635 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -358,6 +358,7 @@ jobs:
inputs:
selectByFolder: "simtests"
modelCoverageCobertura: test-results/matlab/modelcoverage.xml
+ modelCoverageHTML: test-results/matlab/modelcoverageHTML
testResultsSimulinkTest: test-results/matlab/stmResult.mldatx
testResultsPDF: test-results/matlab/results.pdf
condition: eq(variables['Agent.OS'], 'Linux')
@@ -366,6 +367,11 @@ jobs:
grep -q new_temp_model test-results/matlab/modelcoverage.xml
displayName: Verify Model coverage was created
condition: eq(variables['Agent.OS'], 'Linux')
+ - bash: |
+ set -e
+ test -d test-results/matlab/modelcoverageHTML
+ displayName: Verify HTML Model coverage was created
+ condition: eq(variables['Agent.OS'], 'Linux')
- bash: |
set -e
test -f test-results/matlab/stmResult.mldatx
From e37654c65ff97f7335892f5db218527f8c5be580 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Tue, 7 Oct 2025 16:45:32 +0530
Subject: [PATCH 19/39] add condition in model coverage HTML
---
integ-test-promote-template.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 9eda6635..a8018b08 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -371,7 +371,7 @@ jobs:
set -e
test -d test-results/matlab/modelcoverageHTML
displayName: Verify HTML Model coverage was created
- condition: eq(variables['Agent.OS'], 'Linux')
+ condition: not(eq(${{ version }}, '0'))
- bash: |
set -e
test -f test-results/matlab/stmResult.mldatx
From 4801d62e1860809c59aec39d0c9b2134fa016c45 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Tue, 7 Oct 2025 17:33:06 +0530
Subject: [PATCH 20/39] upload artifacts
---
integ-test-promote-template.yml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index a8018b08..79a47997 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -382,6 +382,28 @@ jobs:
test -f test-results/matlab/results.pdf
displayName: Verify PDF report was created
condition: eq(variables['Agent.OS'], 'Linux')
+ - task: PublishPipelineArtifact@1
+ displayName: Upload MATLAB test and coverage artifacts
+ inputs:
+ targetPath: '$(System.DefaultWorkingDirectory)/test-results/matlab'
+ artifact: 'matlab-test-results-v${{ version }}'
+ publishLocation: 'pipeline'
+
+ - task: PublishPipelineArtifact@1
+ displayName: Upload MATLAB code coverage artifacts
+ inputs:
+ targetPath: '$(System.DefaultWorkingDirectory)/code-coverage'
+ artifact: 'matlab-code-coverage-v${{ version }}'
+ publishLocation: 'pipeline'
+
+ - task: PublishPipelineArtifact@1
+ displayName: Upload MATLAB model coverage artifacts
+ condition: eq(variables['Agent.OS'], 'Linux')
+ inputs:
+ targetPath: '$(System.DefaultWorkingDirectory)/test-results/matlab/modelcoverageHTML'
+ artifact: 'matlab-model-coverage-v${{ version }}'
+ publishLocation: 'pipeline'
+
- job: test_run_build_v${{ version }}
strategy:
From 5d74df54aba15dbbe1b727e6d9ceba9b9ecfa744 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Tue, 7 Oct 2025 18:04:38 +0530
Subject: [PATCH 21/39] verify html file creation and remove upload artifact
---
integ-test-promote-template.yml | 24 +++---------------------
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 79a47997..90f3b763 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -230,6 +230,7 @@ jobs:
- bash: |
set -e
test -d test-results/matlab/resultsHTML
+ test -f test-results/matlab/resultsHTML/*.html
displayName: Verify test results folder was created
condition: not(eq(${{ version }}, '0'))
- bash: |
@@ -239,6 +240,7 @@ jobs:
- bash: |
set -e
test -d code-coverage/coverageHTML
+ test -f code-coverage/coverageHTML/*.html
displayName: Verify code coverage folder was created
condition: not(eq(${{ version }}, '0'))
- bash: |
@@ -370,6 +372,7 @@ jobs:
- bash: |
set -e
test -d test-results/matlab/modelcoverageHTML
+ test -f test-results/matlab/modelCoverageHTML/*.html
displayName: Verify HTML Model coverage was created
condition: not(eq(${{ version }}, '0'))
- bash: |
@@ -382,27 +385,6 @@ jobs:
test -f test-results/matlab/results.pdf
displayName: Verify PDF report was created
condition: eq(variables['Agent.OS'], 'Linux')
- - task: PublishPipelineArtifact@1
- displayName: Upload MATLAB test and coverage artifacts
- inputs:
- targetPath: '$(System.DefaultWorkingDirectory)/test-results/matlab'
- artifact: 'matlab-test-results-v${{ version }}'
- publishLocation: 'pipeline'
-
- - task: PublishPipelineArtifact@1
- displayName: Upload MATLAB code coverage artifacts
- inputs:
- targetPath: '$(System.DefaultWorkingDirectory)/code-coverage'
- artifact: 'matlab-code-coverage-v${{ version }}'
- publishLocation: 'pipeline'
-
- - task: PublishPipelineArtifact@1
- displayName: Upload MATLAB model coverage artifacts
- condition: eq(variables['Agent.OS'], 'Linux')
- inputs:
- targetPath: '$(System.DefaultWorkingDirectory)/test-results/matlab/modelcoverageHTML'
- artifact: 'matlab-model-coverage-v${{ version }}'
- publishLocation: 'pipeline'
- job: test_run_build_v${{ version }}
From 22417b64d299d4962e60ba2ea45c10a67e144236 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 8 Oct 2025 11:19:13 +0530
Subject: [PATCH 22/39] remove file verification in model coverage and upload
artifacts
---
integ-test-promote-template.yml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 90f3b763..3acc9c6a 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -372,7 +372,6 @@ jobs:
- bash: |
set -e
test -d test-results/matlab/modelcoverageHTML
- test -f test-results/matlab/modelCoverageHTML/*.html
displayName: Verify HTML Model coverage was created
condition: not(eq(${{ version }}, '0'))
- bash: |
@@ -386,7 +385,12 @@ jobs:
displayName: Verify PDF report was created
condition: eq(variables['Agent.OS'], 'Linux')
-
+ - task: PublishPipelineArtifact@1
+ displayName: Upload MATLAB Test Results (PDF, XML, HTML)
+ inputs:
+ targetPath: 'test-results/matlab'
+ artifact: 'matlab-test-artifacts'
+ condition: always()
- job: test_run_build_v${{ version }}
strategy:
matrix:
From c419f4d0d2f5a19445eec4e9c4c66616b54faf14 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 8 Oct 2025 12:15:02 +0530
Subject: [PATCH 23/39] fix upload results
---
integ-test-promote-template.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 3acc9c6a..646726c6 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -389,7 +389,7 @@ jobs:
displayName: Upload MATLAB Test Results (PDF, XML, HTML)
inputs:
targetPath: 'test-results/matlab'
- artifact: 'matlab-test-artifacts'
+ artifact: 'matlab-test-artifacts-$(Agent.OS)'
condition: always()
- job: test_run_build_v${{ version }}
strategy:
From 86ebb6891e6ec0bd4543c29034ba880568e3babf Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 8 Oct 2025 14:18:01 +0530
Subject: [PATCH 24/39] fix artifacts
---
integ-test-promote-template.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 646726c6..d5112cc5 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -388,8 +388,8 @@ jobs:
- task: PublishPipelineArtifact@1
displayName: Upload MATLAB Test Results (PDF, XML, HTML)
inputs:
- targetPath: 'test-results/matlab'
- artifact: 'matlab-test-artifacts-$(Agent.OS)'
+ targetPath: 'test-results/matlab/modelCoverageHTML'
+ artifact: 'matlab-test-artifacts-$(Agent.OS)-$(System.JobAttempt)'
condition: always()
- job: test_run_build_v${{ version }}
strategy:
From 8c818ae0fbe4e4b762172e25df875fab6a3837a8 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 8 Oct 2025 14:19:41 +0530
Subject: [PATCH 25/39] artifacts
---
integ-test-promote-template.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index d5112cc5..2d7cea2f 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -388,7 +388,7 @@ jobs:
- task: PublishPipelineArtifact@1
displayName: Upload MATLAB Test Results (PDF, XML, HTML)
inputs:
- targetPath: 'test-results/matlab/modelCoverageHTML'
+ targetPath: 'test-results/matlab/modelcoverageHTML'
artifact: 'matlab-test-artifacts-$(Agent.OS)-$(System.JobAttempt)'
condition: always()
- job: test_run_build_v${{ version }}
From 1cb230de3f119333b2cd21f571903d775e913be2 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 8 Oct 2025 15:35:17 +0530
Subject: [PATCH 26/39] model coverage html verification
---
integ-test-promote-template.yml | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 2d7cea2f..8920dcca 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -384,12 +384,28 @@ jobs:
test -f test-results/matlab/results.pdf
displayName: Verify PDF report was created
condition: eq(variables['Agent.OS'], 'Linux')
-
+ - bash: |
+ set -e
+ echo "Final test-results/matlab contents:"
+ ls -R test-results/matlab
+ displayName: List all MATLAB test artifacts
+ condition: eq(variables['Agent.OS'], 'Linux')
+ - bash: |
+ set -e
+ if [ -d test-results/matlab/modelCoverageHTML ]; then
+ echo "Contents of modelCoverageHTML:"
+ ls -R test-results/matlab/modelCoverageHTML
+ else
+ echo "modelCoverageHTML folder does not exist!"
+ exit 1
+ fi
+ displayName: List contents of modelCoverageHTML
+ condition: eq(variables['Agent.OS'], 'Linux')
- task: PublishPipelineArtifact@1
displayName: Upload MATLAB Test Results (PDF, XML, HTML)
inputs:
targetPath: 'test-results/matlab/modelcoverageHTML'
- artifact: 'matlab-test-artifacts-$(Agent.OS)-$(System.JobAttempt)'
+ artifact: 'test-results/matlab/modelcoverageHTML'
condition: always()
- job: test_run_build_v${{ version }}
strategy:
From 6e5af4cfbd512a413c604076122613cd7f99421d Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 8 Oct 2025 16:02:48 +0530
Subject: [PATCH 27/39] final fix model coverage
---
integ-test-promote-template.yml | 25 ++-----------------------
1 file changed, 2 insertions(+), 23 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 8920dcca..802856a3 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -372,6 +372,7 @@ jobs:
- bash: |
set -e
test -d test-results/matlab/modelcoverageHTML
+ test -f test-results/matlab/modelcoverageHTML/*.html
displayName: Verify HTML Model coverage was created
condition: not(eq(${{ version }}, '0'))
- bash: |
@@ -384,29 +385,7 @@ jobs:
test -f test-results/matlab/results.pdf
displayName: Verify PDF report was created
condition: eq(variables['Agent.OS'], 'Linux')
- - bash: |
- set -e
- echo "Final test-results/matlab contents:"
- ls -R test-results/matlab
- displayName: List all MATLAB test artifacts
- condition: eq(variables['Agent.OS'], 'Linux')
- - bash: |
- set -e
- if [ -d test-results/matlab/modelCoverageHTML ]; then
- echo "Contents of modelCoverageHTML:"
- ls -R test-results/matlab/modelCoverageHTML
- else
- echo "modelCoverageHTML folder does not exist!"
- exit 1
- fi
- displayName: List contents of modelCoverageHTML
- condition: eq(variables['Agent.OS'], 'Linux')
- - task: PublishPipelineArtifact@1
- displayName: Upload MATLAB Test Results (PDF, XML, HTML)
- inputs:
- targetPath: 'test-results/matlab/modelcoverageHTML'
- artifact: 'test-results/matlab/modelcoverageHTML'
- condition: always()
+
- job: test_run_build_v${{ version }}
strategy:
matrix:
From c5c33c87f570d412c0217f4928f32b155adcd3e2 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 8 Oct 2025 21:49:02 +0530
Subject: [PATCH 28/39] remove model coverage file verification
---
integ-test-promote-template.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 802856a3..7fe292a6 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -372,7 +372,6 @@ jobs:
- bash: |
set -e
test -d test-results/matlab/modelcoverageHTML
- test -f test-results/matlab/modelcoverageHTML/*.html
displayName: Verify HTML Model coverage was created
condition: not(eq(${{ version }}, '0'))
- bash: |
From bd4374a8e5a76ffbe430614e34d47e7ef6244f7e Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 8 Oct 2025 22:21:43 +0530
Subject: [PATCH 29/39] ls the files
---
integ-test-promote-template.yml | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 7fe292a6..74248163 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -384,7 +384,23 @@ jobs:
test -f test-results/matlab/results.pdf
displayName: Verify PDF report was created
condition: eq(variables['Agent.OS'], 'Linux')
-
+ - bash: |
+ set -e
+ echo "Final test-results/matlab contents:"
+ ls -R test-results/matlab
+ displayName: List all MATLAB test artifacts
+ condition: eq(variables['Agent.OS'], 'Linux')
+ - bash: |
+ set -e
+ if [ -d test-results/matlab/modelcoverageHTML ]; then
+ echo "Contents of modelcoverageHTML:"
+ ls -R test-results/matlab/modelcoverageHTML
+ else
+ echo "modelcoverageHTML folder does not exist!"
+ exit 1
+ fi
+ displayName: List contents of modelcoverageHTML
+ condition: eq(variables['Agent.OS'], 'Linux')
- job: test_run_build_v${{ version }}
strategy:
matrix:
From ebb919a165bb6b1caca692d476c4cdc423024316 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Thu, 9 Oct 2025 11:59:55 +0530
Subject: [PATCH 30/39] add model cov verif
---
integ-test-promote-template.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 74248163..0be8e42f 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -372,6 +372,7 @@ jobs:
- bash: |
set -e
test -d test-results/matlab/modelcoverageHTML
+ test -f test-results/matlab/modelcoverageHTML/*.html
displayName: Verify HTML Model coverage was created
condition: not(eq(${{ version }}, '0'))
- bash: |
From 0b92f14aea059a351d322952b6c494d1dde98baf Mon Sep 17 00:00:00 2001
From: tagupta
Date: Thu, 9 Oct 2025 12:29:46 +0530
Subject: [PATCH 31/39] remove ls
---
integ-test-promote-template.yml | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 0be8e42f..d9336d24 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -385,23 +385,6 @@ jobs:
test -f test-results/matlab/results.pdf
displayName: Verify PDF report was created
condition: eq(variables['Agent.OS'], 'Linux')
- - bash: |
- set -e
- echo "Final test-results/matlab contents:"
- ls -R test-results/matlab
- displayName: List all MATLAB test artifacts
- condition: eq(variables['Agent.OS'], 'Linux')
- - bash: |
- set -e
- if [ -d test-results/matlab/modelcoverageHTML ]; then
- echo "Contents of modelcoverageHTML:"
- ls -R test-results/matlab/modelcoverageHTML
- else
- echo "modelcoverageHTML folder does not exist!"
- exit 1
- fi
- displayName: List contents of modelcoverageHTML
- condition: eq(variables['Agent.OS'], 'Linux')
- job: test_run_build_v${{ version }}
strategy:
matrix:
From f83bccd716dc7fe6bdce1c92458c3f4c9aab530b Mon Sep 17 00:00:00 2001
From: tagupta
Date: Thu, 9 Oct 2025 13:38:56 +0530
Subject: [PATCH 32/39] refactoring
---
integ-test-promote-template.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index d9336d24..f354f6a8 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -231,7 +231,7 @@ jobs:
set -e
test -d test-results/matlab/resultsHTML
test -f test-results/matlab/resultsHTML/*.html
- displayName: Verify test results folder was created
+ displayName: Verify HTML test results folder and HTML file was created
condition: not(eq(${{ version }}, '0'))
- bash: |
set -e
@@ -241,7 +241,7 @@ jobs:
set -e
test -d code-coverage/coverageHTML
test -f code-coverage/coverageHTML/*.html
- displayName: Verify code coverage folder was created
+ displayName: Verify HTML code coverage folder and HTML file was created
condition: not(eq(${{ version }}, '0'))
- bash: |
set -e
@@ -373,7 +373,7 @@ jobs:
set -e
test -d test-results/matlab/modelcoverageHTML
test -f test-results/matlab/modelcoverageHTML/*.html
- displayName: Verify HTML Model coverage was created
+ displayName: Verify HTML Model coverage folder and HTML file was created
condition: not(eq(${{ version }}, '0'))
- bash: |
set -e
From 67b8685989c2c991c399922aaa7998d85ebac959 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Fri, 10 Oct 2025 11:50:02 +0530
Subject: [PATCH 33/39] change report to results
---
tasks/run-matlab-tests/v1/task.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tasks/run-matlab-tests/v1/task.json b/tasks/run-matlab-tests/v1/task.json
index 5b4abd6e..eff41f78 100644
--- a/tasks/run-matlab-tests/v1/task.json
+++ b/tasks/run-matlab-tests/v1/task.json
@@ -163,7 +163,7 @@
"defaultValue": "",
"groupName": "coverageArtifacts",
"required": false,
- "helpMarkDown": "Path to write the model coverage report in HTML format (requires Simulink Coverage and is supported in MATLAB R2018b or later)."
+ "helpMarkDown": "Path to write the model coverage results in HTML format (requires Simulink Coverage and is supported in MATLAB R2018b or later)."
},
{
"name": "startupOptions",
From 69081cbd5819358236172dadc84ae8401009618b Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 22 Oct 2025 14:52:44 +0530
Subject: [PATCH 34/39] fix namings
---
integ-test-promote-template.yml | 1 +
tasks/run-matlab-tests/v1/task.json | 8 ++++----
.../run-matlab-tests/v1/test/scriptgen.test.ts | 18 +++++++++---------
3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index f354f6a8..1b104e8c 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -385,6 +385,7 @@ jobs:
test -f test-results/matlab/results.pdf
displayName: Verify PDF report was created
condition: eq(variables['Agent.OS'], 'Linux')
+
- job: test_run_build_v${{ version }}
strategy:
matrix:
diff --git a/tasks/run-matlab-tests/v1/task.json b/tasks/run-matlab-tests/v1/task.json
index eff41f78..1f6e1879 100644
--- a/tasks/run-matlab-tests/v1/task.json
+++ b/tasks/run-matlab-tests/v1/task.json
@@ -105,11 +105,11 @@
{
"name": "testResultsHTML",
"type": "string",
- "label": "HTML test report ",
+ "label": "HTML test report",
"defaultValue": "",
"groupName": "testArtifacts",
"required": false,
- "helpMarkDown": "Path to write the test results in HTML format."
+ "helpMarkDown": "Folder path to write the test results in HTML format."
},
{
"name": "testResultsJUnit",
@@ -145,7 +145,7 @@
"defaultValue": "",
"required": false,
"groupName": "coverageArtifacts",
- "helpMarkDown": "Path to write the code coverage results in HTML format."
+ "helpMarkDown": "Folder path to write the code coverage results in HTML format."
},
{
"name": "modelCoverageCobertura",
@@ -163,7 +163,7 @@
"defaultValue": "",
"groupName": "coverageArtifacts",
"required": false,
- "helpMarkDown": "Path to write the model coverage results in HTML format (requires Simulink Coverage and is supported in MATLAB R2018b or later)."
+ "helpMarkDown": "Folder path to write the model coverage results in HTML format (requires Simulink Coverage and is supported in MATLAB R2018b or later)."
},
{
"name": "startupOptions",
diff --git a/tasks/run-matlab-tests/v1/test/scriptgen.test.ts b/tasks/run-matlab-tests/v1/test/scriptgen.test.ts
index 6ba3c7bb..1323108b 100644
--- a/tasks/run-matlab-tests/v1/test/scriptgen.test.ts
+++ b/tasks/run-matlab-tests/v1/test/scriptgen.test.ts
@@ -55,13 +55,13 @@ export default function suite() {
const options: scriptgen.IRunTestsOptions = {
JUnitTestResults: "test-results/results.xml",
CoberturaCodeCoverage: "code-coverage/coverage.xml",
- HTMLCodeCoverage: "code-coverage/coverage.html",
+ HTMLCodeCoverage: "code-coverage/coverageHTML",
SourceFolder: "source",
PDFTestReport: "test-results/pdf-results.pdf",
- HTMLTestReport: "test-results/html-results.html",
+ HTMLTestReport: "test-results/html-resultsHTML",
SimulinkTestResults: "test-results/simulinkTest.mldatx",
CoberturaModelCoverage: "test-results/modelcoverage.xml",
- HTMLModelCoverage: "test-results/modelcoverage.html",
+ HTMLModelCoverage: "test-results/modelcoverageHTML",
SelectByTag: "FeatureA",
SelectByFolder: "test/tools;test/toolbox",
Strict: true,
@@ -75,13 +75,13 @@ export default function suite() {
assert(actual.includes("genscript('Test'"));
assert(actual.includes("'JUnitTestResults','test-results/results.xml'"));
assert(actual.includes("'CoberturaCodeCoverage','code-coverage/coverage.xml'"));
- assert(actual.includes("'HTMLCodeCoverage','code-coverage/coverage.html'"));
+ assert(actual.includes("'HTMLCodeCoverage','code-coverage/coverageHTML'"));
assert(actual.includes("'SourceFolder','source'"));
assert(actual.includes("'PDFTestReport','test-results/pdf-results.pdf'"));
- assert(actual.includes("'HTMLTestReport','test-results/html-results.html'"));
+ assert(actual.includes("'HTMLTestReport','test-results/html-resultsHTML'"));
assert(actual.includes("'SimulinkTestResults','test-results/simulinkTest.mldatx'"));
assert(actual.includes("'CoberturaModelCoverage','test-results/modelcoverage.xml'"));
- assert(actual.includes("'HTMLModelCoverage','test-results/modelcoverage.html'"));
+ assert(actual.includes("'HTMLModelCoverage','test-results/modelcoverageHTML'"));
assert(actual.includes("'SelectByTag','FeatureA'"));
assert(actual.includes("'SelectByFolder','test/tools;test/toolbox'"));
assert(actual.includes("'Strict',true"));
@@ -90,9 +90,9 @@ export default function suite() {
assert(actual.includes("'LoggingLevel','Detailed'"));
const expected = `genscript('Test', 'JUnitTestResults','test-results/results.xml',
- 'CoberturaCodeCoverage','code-coverage/coverage.xml','HTMLCodeCoverage','code-coverage/coverage.html', 'SourceFolder','source',
- 'PDFTestReport','test-results/pdf-results.pdf', 'HTMLTestReport','test-results/html-results.html', 'SimulinkTestResults','test-results/simulinkTest.mldatx',
- 'CoberturaModelCoverage','test-results/modelcoverage.xml', 'HTMLModelCoverage','test-results/modelcoverage.html', 'SelectByTag','FeatureA',
+ 'CoberturaCodeCoverage','code-coverage/coverage.xml','HTMLCodeCoverage','code-coverage/coverageHTML', 'SourceFolder','source',
+ 'PDFTestReport','test-results/pdf-results.pdf', 'HTMLTestReport','test-results/html-resultsHTML', 'SimulinkTestResults','test-results/simulinkTest.mldatx',
+ 'CoberturaModelCoverage','test-results/modelcoverage.xml', 'HTMLModelCoverage','test-results/modelcoverageHTML', 'SelectByTag','FeatureA',
'SelectByFolder','test/tools;test/toolbox', 'Strict',true, 'UseParallel',true, 'OutputDetail','Detailed',
'LoggingLevel','Detailed' )`
.replace(/\s+/g, "");
From 771fdeb7c76f9d3c19c9486f0204b8ed3f972d9e Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 22 Oct 2025 15:49:03 +0530
Subject: [PATCH 35/39] remove tab space
---
integ-test-promote-template.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/integ-test-promote-template.yml b/integ-test-promote-template.yml
index 1b104e8c..474a8501 100644
--- a/integ-test-promote-template.yml
+++ b/integ-test-promote-template.yml
@@ -385,7 +385,7 @@ jobs:
test -f test-results/matlab/results.pdf
displayName: Verify PDF report was created
condition: eq(variables['Agent.OS'], 'Linux')
-
+
- job: test_run_build_v${{ version }}
strategy:
matrix:
From 2b786efaf7a02db9a91e3c06d1bfc2b31b2c2651 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 22 Oct 2025 15:52:08 +0530
Subject: [PATCH 36/39] Fix path namings
---
tasks/run-matlab-tests/v1/task.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tasks/run-matlab-tests/v1/task.json b/tasks/run-matlab-tests/v1/task.json
index 1f6e1879..f7f1e70a 100644
--- a/tasks/run-matlab-tests/v1/task.json
+++ b/tasks/run-matlab-tests/v1/task.json
@@ -100,7 +100,7 @@
"defaultValue": "",
"groupName": "testArtifacts",
"required": false,
- "helpMarkDown": "Path to write the test results in PDF format (requires MATLAB R2020b or later on macOS platforms)."
+ "helpMarkDown": "File path to write the test results in PDF format (requires MATLAB R2020b or later on macOS platforms)."
},
{
"name": "testResultsHTML",
@@ -118,7 +118,7 @@
"defaultValue": "",
"groupName": "testArtifacts",
"required": false,
- "helpMarkDown": "Path to write the test results in JUnit-style XML format."
+ "helpMarkDown": "File path to write the test results in JUnit-style XML format."
},
{
"name": "testResultsSimulinkTest",
@@ -136,7 +136,7 @@
"defaultValue": "",
"required": false,
"groupName": "coverageArtifacts",
- "helpMarkDown": "Path to write the code coverage results in Cobertura XML format."
+ "helpMarkDown": "File path to write the code coverage results in Cobertura XML format."
},
{
"name": "codeCoverageHTML",
@@ -154,7 +154,7 @@
"defaultValue": "",
"groupName": "coverageArtifacts",
"required": false,
- "helpMarkDown": "Path to write the model coverage report in Cobertura XML format (requires Simulink Coverage and is supported in MATLAB R2018b or later)."
+ "helpMarkDown": "File path to write the model coverage report in Cobertura XML format (requires Simulink Coverage and is supported in MATLAB R2018b or later)."
},
{
"name": "modelCoverageHTML",
From 24cb6d49ee872d857d1fdadfd224e764f4e3ee70 Mon Sep 17 00:00:00 2001
From: tagupta
Date: Wed, 22 Oct 2025 15:59:51 +0530
Subject: [PATCH 37/39] add File path
---
tasks/run-matlab-tests/v1/task.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tasks/run-matlab-tests/v1/task.json b/tasks/run-matlab-tests/v1/task.json
index f7f1e70a..f6316ca3 100644
--- a/tasks/run-matlab-tests/v1/task.json
+++ b/tasks/run-matlab-tests/v1/task.json
@@ -127,7 +127,7 @@
"defaultValue": "",
"groupName": "testArtifacts",
"required": false,
- "helpMarkDown": "Path to export Simulink Test Manager results in MLDATX format (requires Simulink Test and is supported in MATLAB R2019a or later)."
+ "helpMarkDown": "File path to export Simulink Test Manager results in MLDATX format (requires Simulink Test and is supported in MATLAB R2019a or later)."
},
{
"name": "codeCoverageCobertura",
From a75a7e9e9b33956fb050359a7ba0a0b91165d364 Mon Sep 17 00:00:00 2001
From: Kapil Gupta <111856426+mw-kapilg@users.noreply.github.com>
Date: Thu, 23 Oct 2025 00:13:44 +0530
Subject: [PATCH 38/39] Add table entries for HTML test and coverage artifacts
---
overview.md | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/overview.md b/overview.md
index 44ea4f32..2e32222d 100644
--- a/overview.md
+++ b/overview.md
@@ -233,11 +233,14 @@ Input | Description
`useParallel` | (Optional) Option to run tests in parallel, specified as `false` or `true`. By default, the value is `false` and tests run in serial. If the test runner configuration is suited for parallelization, you can specify a value of `true` to run tests in parallel. This input requires a Parallel Computing Toolbox license.
**Example:** `useParallel: true`
`outputDetail` | (Optional) Amount of event detail displayed for the test run, specified as `none`, `terse`, `concise`, `detailed`, or `verbose`. By default, the task displays failing and logged events at the `detailed` level and test run progress at the `concise` level.
**Example:** `outputDetail: verbose`
`loggingLevel` | (Optional) Maximum verbosity level for logged diagnostics included for the test run, specified as `none`, `terse`, `concise`, `detailed`, or `verbose`. By default, the task includes diagnostics logged at the `terse` level.
**Example:** `loggingLevel: detailed`
-`testResultsPDF` | (Optional) Location to write the test results in PDF format, specified as a path relative to the project root folder. On macOS platforms, this input is supported in MATLAB R2020b and later.
**Example:** `testResultsPDF: test-results/results.pdf`
-`testResultsJUnit` | (Optional) Location to write the test results in JUnit-style XML format, specified as a path relative to the project root folder.
**Example:** `testResultsJUnit: test-results/results.xml`
-`testResultsSimulinkTest` | (Optional) Location to export Simulink Test Manager results in MLDATX format, specified as a path relative to the project root folder. This input requires a Simulink Test license and is supported in MATLAB R2019a and later.
**Example:** `testResultsSimulinkTest: test-results/results.mldatx`
-`codeCoverageCobertura` | (Optional) Location to write the code coverage results in Cobertura XML format, specified as a path relative to the project root folder.
**Example:** `codeCoverageCobertura: code-coverage/coverage.xml`
-`modelCoverageCobertura` | (Optional) Location to write the model coverage results in Cobertura XML format, specified as a path relative to the project root folder. This input requires a Simulink Coverage™ license and is supported in MATLAB R2018b and later.
**Example:** `modelCoverageCobertura: model-coverage/coverage.xml`
+`testResultsHTML` | (Optional) Location to write the test results in HTML format, specified as a folder path relative to the project root folder.
**Example:** `testResultsHTML: test-results`
+`testResultsPDF` | (Optional) Location to write the test results in PDF format, specified as a file path relative to the project root folder. On macOS platforms, this input is supported in MATLAB R2020b and later.
**Example:** `testResultsPDF: test-results/results.pdf`
+`testResultsJUnit` | (Optional) Location to write the test results in JUnit-style XML format, specified as a file path relative to the project root folder.
**Example:** `testResultsJUnit: test-results/results.xml`
+`testResultsSimulinkTest` | (Optional) Location to export Simulink Test Manager results in MLDATX format, specified as a file path relative to the project root folder. This input requires a Simulink Test license and is supported in MATLAB R2019a and later.
**Example:** `testResultsSimulinkTest: test-results/results.mldatx`
+`codeCoverageHTML` | (Optional) Location to write the code coverage results in HTML format, specified as a folder path relative to the project root folder.
**Example:** `codeCoverageHTML: code-coverage`
+`codeCoverageCobertura` | (Optional) Location to write the code coverage results in Cobertura XML format, specified as a file path relative to the project root folder.
**Example:** `codeCoverageCobertura: code-coverage/coverage.xml`
+`modelCoverageHTML` | (Optional) Location to write the model coverage results in HTML format, specified as a folder path relative to the project root folder. This input requires a Simulink Coverage™ license and is supported in MATLAB R2018b and later.
**Example:** `modelCoverageHTML: model-coverage`
+`modelCoverageCobertura` | (Optional) Location to write the model coverage results in Cobertura XML format, specified as a file path relative to the project root folder. This input requires a Simulink Coverage™ license and is supported in MATLAB R2018b and later.
**Example:** `modelCoverageCobertura: model-coverage/coverage.xml`
`startupOptions` | (Optional) MATLAB startup options, specified as a list of options separated by spaces. For more information about startup options, see [Commonly Used Startup Options](https://www.mathworks.com/help/matlab/matlab_env/commonly-used-startup-options.html).
Using this input to specify the `-batch` or `-r` option is not supported.
**Example:** `startupOptions: -nojvm`
**Example:** `startupOptions: -nojvm -logfile output.log`
>**Note:** To customize the pretest state of the system, you can specify startup code that automatically executes before your tests run. For information on how to specify startup or shutdown files in a MATLAB project, see [Automate Startup and Shutdown Tasks](https://www.mathworks.com/help/matlab/matlab_prog/automate-startup-and-shutdown-tasks.html). If your pipeline does not use a MATLAB project, specify the commands you want executed at startup in a `startup.m` file instead, and save the file to the root of your repository. See [`startup`](https://www.mathworks.com/help/matlab/ref/startup.html) for more information.
From 0e0e974ae5852a05c142e90f754807ea23553ce7 Mon Sep 17 00:00:00 2001
From: Kapil Gupta <111856426+mw-kapilg@users.noreply.github.com>
Date: Thu, 23 Oct 2025 00:27:19 +0530
Subject: [PATCH 39/39] Remove extra trademark symbol
---
overview.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/overview.md b/overview.md
index 2e32222d..7ddeb020 100644
--- a/overview.md
+++ b/overview.md
@@ -240,7 +240,7 @@ Input | Description
`codeCoverageHTML` | (Optional) Location to write the code coverage results in HTML format, specified as a folder path relative to the project root folder.
**Example:** `codeCoverageHTML: code-coverage`
`codeCoverageCobertura` | (Optional) Location to write the code coverage results in Cobertura XML format, specified as a file path relative to the project root folder.
**Example:** `codeCoverageCobertura: code-coverage/coverage.xml`
`modelCoverageHTML` | (Optional) Location to write the model coverage results in HTML format, specified as a folder path relative to the project root folder. This input requires a Simulink Coverage™ license and is supported in MATLAB R2018b and later.
**Example:** `modelCoverageHTML: model-coverage`
-`modelCoverageCobertura` | (Optional) Location to write the model coverage results in Cobertura XML format, specified as a file path relative to the project root folder. This input requires a Simulink Coverage™ license and is supported in MATLAB R2018b and later.
**Example:** `modelCoverageCobertura: model-coverage/coverage.xml`
+`modelCoverageCobertura` | (Optional) Location to write the model coverage results in Cobertura XML format, specified as a file path relative to the project root folder. This input requires a Simulink Coverage license and is supported in MATLAB R2018b and later.
**Example:** `modelCoverageCobertura: model-coverage/coverage.xml`
`startupOptions` | (Optional) MATLAB startup options, specified as a list of options separated by spaces. For more information about startup options, see [Commonly Used Startup Options](https://www.mathworks.com/help/matlab/matlab_env/commonly-used-startup-options.html).
Using this input to specify the `-batch` or `-r` option is not supported.
**Example:** `startupOptions: -nojvm`
**Example:** `startupOptions: -nojvm -logfile output.log`
>**Note:** To customize the pretest state of the system, you can specify startup code that automatically executes before your tests run. For information on how to specify startup or shutdown files in a MATLAB project, see [Automate Startup and Shutdown Tasks](https://www.mathworks.com/help/matlab/matlab_prog/automate-startup-and-shutdown-tasks.html). If your pipeline does not use a MATLAB project, specify the commands you want executed at startup in a `startup.m` file instead, and save the file to the root of your repository. See [`startup`](https://www.mathworks.com/help/matlab/ref/startup.html) for more information.