report results of tests run with testmanager works from testmanager only
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Tobias Huth
il 20 Ago 2019
Commentato: Tobias Huth
il 11 Dic 2019
Hello everybody,
I've just installed simulink test and started to try things. Matlab and Simulink are 2019a.
I've authored tests in the testmanager, ran them and created a report from within the testmanager. This works like a charm.
When I try to repeat the steps described above via commands, which is:
>> test_cases = sltest.testmanager.load('BE_inject_testcases.mldatx');
>> test_results = sltest.testmanager.run()
test_results =
ResultSet with properties:
Name: 'Results: 2019-Aug-20 07:53:31'
NumPassed: 2
NumFailed: 0
NumDisabled: 0
NumIncomplete: 0
NumTotal: 2
NumTestCaseResults: 0
NumTestSuiteResults: 0
NumTestFileResults: 1
Outcome: Passed
StartTime: 20-Aug-2019 07:53:31
StopTime: 20-Aug-2019 07:53:37
Duration: 6 sec
CoverageResults: [1×2 cvdata]
Release: ''
alternatively:
test_results = sltest.testmanager.importResults('test_results_1.mldatx');
If I now call the report:
sltest.testmanager.report(test_results,'test_report.pdf','Author','author','Title','Titel','IncludeCoverageResult',true)
I get the following error:
Error using sltest.internal.TestResultReportBase/flatAndFilterReportData
No failed results selected.
Error in sltest.internal.TestResultReportBase/setReportGenerationEnviroment
Error in sltest.internal.TestResultReportBase/createReport
Error in stm.internal.report.createReport>processingArgs (line 140)
report.createReport();
Error in stm.internal.report.createReport (line 3)
processingArgs(inArgs)
Error in stm.internal.apiDetail.reportWrapper
Error in sltest.internal.report
Error in sltest.testmanager.report (line 73)
sltest.internal.report(resultObj, filePath, varargin{:});
Does someone know, what could be the cause of this behaviour?
Please not, that I do not have a report generator license.
Greetings from the sunny south of Germany,
Tobias
0 Commenti
Risposta accettata
Nick Mazzilli
il 10 Dic 2019
This should fix your issue
sltest.testmanager.report(test_results,'test_report.pdf','Author','author','Title','Titel','IncludeCoverageResult',true,'IncludeTestResults',0)
Più risposte (1)
Jalaj Gambhir
il 29 Ago 2019
Hi,
It is stated in the MathWorks documentation that the report is only generated if the model has failed for at least one test case. This is mentioned here.
Vedere anche
Categorie
Scopri di più su Test Scripts in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!