Skip to content

Commit

Permalink
add filter tag:Unit
Browse files Browse the repository at this point in the history
  • Loading branch information
somefunAgba committed Mar 23, 2021
1 parent 4e894b9 commit 059ce6a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
3 changes: 2 additions & 1 deletion azure-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ steps:
inputs:
#sourceFolder: root;
#sourceFolder: root/folderA; root/folderB
selectByFolder: 'tests'
selectByFolder: 'tests/units'
selectByTag: Unit
testResultsPDF: test-results/results.pdf
testResultsJUnit: test-results/results.xml
codeCoverageCobertura: code-coverage/coverage.xml
Expand Down
4 changes: 2 additions & 2 deletions tests/testAppUpdnModel.m → tests/units/testAppUpdnModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function addToPath(testCase)
[this_filepath,this_filename,~]= ...
fileparts(mfilename('fullpath')); %#ok<ASGLU>
%rootpath = this_filepath;
rootpath = strrep(this_filepath, [filesep 'tests'], '');
rootpath = strrep(this_filepath, [filesep 'tests' filesep 'units'], '');
addpath(genpath(rootpath));
if isfolder(fullfile(rootpath,'bin'))
rmpath(fullfile(rootpath,"bin"))
Expand All @@ -38,7 +38,7 @@ function launchApp(testCase)
end
end

methods (Test)
methods (Test, TestTags = {'Unit'})
function test_MVersion(testCase)
status = verLessThan('matlab', '9.8'); % 9.7 = R2019b
testCase.assertFalse(status,...
Expand Down
4 changes: 2 additions & 2 deletions tests/testScriptGetData.m → tests/units/testScriptGetData.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function addToPath(testCase)
[this_filepath,this_filename,~]= ...
fileparts(mfilename('fullpath')); %#ok<ASGLU>
%rootpath = this_filepath;
rootpath = strrep(this_filepath, [filesep 'tests'], '');
rootpath = strrep(this_filepath, [filesep 'tests' filesep 'units'], '');
addpath(genpath(rootpath));
if isfolder(fullfile(rootpath,'bin'))
rmpath(fullfile(rootpath,"bin"))
Expand All @@ -20,7 +20,7 @@ function addToPath(testCase)
end
end

methods(Test)
methods(Test, TestTags = {'Unit'})
% unit-test functions

function testViewCC1(testCase)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function addToPath(testCase)
[this_filepath,this_filename,~]= ...
fileparts(mfilename('fullpath')); %#ok<ASGLU>
%rootpath = this_filepath;
rootpath = strrep(this_filepath, [filesep 'tests'], '');
rootpath = strrep(this_filepath, [filesep 'tests' filesep 'units'], '');
addpath(genpath(rootpath));
if isfolder(fullfile(rootpath,'bin'))
rmpath(fullfile(rootpath,"bin"))
Expand All @@ -23,7 +23,7 @@ function addToPath(testCase)
end
end

methods(Test)
methods(Test, TestTags = {'Unit'})
% unit-test functions

function testQueryM1(testCase)
Expand Down
9 changes: 6 additions & 3 deletions tests/testScriptUpdData.m → tests/units/testScriptUpdData.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function addToPath(testCase)
[this_filepath,this_filename,~]= ...
fileparts(mfilename('fullpath')); %#ok<ASGLU>
%rootpath = this_filepath;
rootpath = strrep(this_filepath, [filesep 'tests'], '');
rootpath = strrep(this_filepath, [filesep 'tests' filesep 'units'], '');
addpath(genpath(rootpath));
if isfolder(fullfile(rootpath,'bin'))
rmpath(fullfile(rootpath,"bin"))
Expand All @@ -23,7 +23,7 @@ function addToPath(testCase)
end
end

methods(Test)
methods(Test, TestTags = {'Unit'})
% unit-test functions

function testUpdDat1(testCase)
Expand All @@ -36,7 +36,10 @@ function testUpdDat1(testCase)
% check that: no exception occurs
testCase.verifyNotEqual(status,0);
end

end

methods(Test)

function testUpdDat2(testCase)
%TESTUPDDAT2
% Re-Test if local-database can be
Expand Down

0 comments on commit 059ce6a

Please sign in to comment.