How to run testmanger from python script.
古いコメントを表示
I am trying to run testmanger and collect all the result into python to generate excel file and report in python. but for some reason i can not run testmanger in python.
I am trying to join matlab instace. so Simulink and testmanger is already opened. if i run
sltest.testmanager.run
in matlab command line then i can run the test file. so would like to do same thing using python and the extract the result of all the testcases in python and do further processing.
Please help me to solve the issue and i am also open for new suggestions.
Thank you very much in advanced.
my python code is looking like this,
import matlab.engine
# Connect running matlab session
future = matlab.engine.connect_matlab(background=True)
eng = future.result(30)
with eng:
results = eng.get_failed_results() # calling matlab function
print(results)
my matlab function
function [results] = get_failed_results()
%% run testmanger and collect result of all the testcases
resultTestFile = sltest.testmanager.run
testFileResultArray = getTestFileResults(resultTestFile);
%% Get the test suite results
testSuiteResultArray = getTestSuiteResults(testFileResultArray);
%% Get the test case results
testCaseResultArray = getTestCaseResults(testSuiteResultArray);
testCaseResultArray
end
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Call Python from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!