forked from space-physics/iri2016
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestAll.m
More file actions
23 lines (16 loc) · 723 Bytes
/
TestAll.m
File metadata and controls
23 lines (16 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
% this script is run on Azure (or locall)
import matlab.unittest.TestRunner;
import matlab.unittest.Verbosity;
import matlab.unittest.plugins.CodeCoveragePlugin;
import matlab.unittest.plugins.XMLPlugin;
import matlab.unittest.plugins.codecoverage.CoberturaFormat;
name = "iri2016";
suite = testsuite(name);
mkdir('code-coverage');
mkdir('test-results');
runner = TestRunner.withTextOutput('OutputDetail', Verbosity.Detailed);
runner.addPlugin(XMLPlugin.producingJUnitFormat('test-results/results.xml'));
runner.addPlugin(CodeCoveragePlugin.forPackage(name, 'Producing', CoberturaFormat('code-coverage/coverage.xml')));
results = runner.run(suite);
assert(~isempty(results), "no tests found")
assertSuccess(results)