-
Notifications
You must be signed in to change notification settings - Fork 4
Add Code Coverage, Model Coverage and Test results report for HTML #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 32 commits
bbe4f04
23fb6fe
37f012d
ee47882
d4d42ef
96a460f
cbd10d1
49e3d35
be5c5f1
85404b2
e2f32c6
0bc1740
a833549
7496fec
ca6b302
43164de
ea297fd
3a34844
e37654c
4801d62
5d74df5
22417b6
c419f4d
86ebb68
8c818ae
1cb230d
6e5af4c
c5c33c8
bd4374a
ebb919a
0b92f14
f83bccd
67b8685
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: 1.13$(Rev:.r) | ||
name: 1.14$(Rev:.r) | ||
|
||
trigger: | ||
- master | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,9 @@ jobs: | |
displayName: Run MATLAB tests producing artifacts | ||
inputs: | ||
testResultsJUnit: test-results/matlab/results.xml | ||
testResultsHTML: test-results/matlab/resultsHTML | ||
codeCoverageCobertura: code-coverage/coverage.xml | ||
codeCoverageHTML: code-coverage/coverageHTML | ||
sourceFolder: src | ||
- task: MathWorks.matlab-azure-devops-extension-dev.RunMATLABTests.RunMATLABTests@${{ version }} | ||
displayName: Run MATLAB tests filter by folder | ||
|
@@ -225,10 +227,22 @@ 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 | ||
test -f test-results/matlab/resultsHTML/*.html | ||
displayName: Verify HTML test results folder and HTML file was created | ||
condition: not(eq(${{ version }}, '0')) | ||
- bash: | | ||
set -e | ||
grep -q add code-coverage/coverage.xml | ||
displayName: Verify code coverage file was created | ||
- bash: | | ||
set -e | ||
test -d code-coverage/coverageHTML | ||
test -f code-coverage/coverageHTML/*.html | ||
displayName: Verify HTML code coverage folder and HTML file was created | ||
condition: not(eq(${{ version }}, '0')) | ||
- bash: | | ||
set -e | ||
grep -q simpleTest test-results/matlab/selectbyfolder.xml | ||
|
@@ -273,7 +287,7 @@ jobs: | |
sourceFolder: src | ||
- bash: | | ||
set -e | ||
grep -q "TestRunner.withTextOutput('OutputDetail', 3)" console.log | ||
grep -q "('OutputDetail', 3)" console.log | ||
Comment on lines
-276
to
+290
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this due to a change to genscript? |
||
rm console.log | ||
displayName: Verify tests ran with detailed display level for event details | ||
- task: MathWorks.matlab-azure-devops-extension-dev.RunMATLABTests.RunMATLABTests@${{ version }} | ||
|
@@ -283,7 +297,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: | | ||
|
@@ -346,6 +360,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') | ||
|
@@ -354,6 +369,12 @@ 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 | ||
test -f test-results/matlab/modelcoverageHTML/*.html | ||
displayName: Verify HTML Model coverage folder and HTML file was created | ||
condition: not(eq(${{ version }}, '0')) | ||
- bash: | | ||
set -e | ||
test -f test-results/matlab/stmResult.mldatx | ||
|
@@ -364,7 +385,6 @@ 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: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 ", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems potentially misleading if this is the folder-based html report, since when I see report I'd probably expect a file rather than a directory. |
||
"defaultValue": "", | ||
"groupName": "testArtifacts", | ||
"required": false, | ||
"helpMarkDown": "Path to write the test results in HTML format." | ||
}, | ||
{ | ||
"name": "testResultsJUnit", | ||
"type": "string", | ||
|
@@ -129,6 +138,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", | ||
|
@@ -138,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)." | ||
taguptamw marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
}, | ||
{ | ||
"name": "startupOptions", | ||
"type": "string", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as GHA, this is just the folder-based HTML?