Requirements Toolbox - is there a way to programmatically get coverage of requirements?

5 views (last 30 days)
Greetings!
I use MATLAB R2022b.
It is necessary to obtain programmatically (i.e., simply by running a script) results of the coverage of requirements and their validation, which are presented in the Requirements Editor (see Fig. 1).
I tried to generate a report programmatically, but its structure leaves much to be desired and it is not as visual as what is presented in the GUI of Requirements Toolbox itself.
I would be glad if you could suggest me a way to get one of the following results:
  1. Obtaining directly the desired indicators as in Figure 1 while maintaining interactivity in a separate HTML file (Preferred).
  2. Integration of results of requirements coverage and results of MATLAB Code Coverage Report (Preferred).
  3. Obtaining the numerical values that are used to display the results from Figure 1 simply in the form of a matrix.
  4. Changing the structure of the Requirement Toolbox's automatically generated report.
  5. Getting the result I need from points 1-4 in a newer version of MATLAB.
Regarding option 3, I would like to add that I have already tried to programmatically generate Traceability Matrix, but it was not successful. Manual matrix generation is not a solution for me (it is also accompanied by strange results - Fig. 2).
figure 1
figure 2
  1 Comment
Alex Howard
Alex Howard on 17 Jan 2024
Hi @ZAKOVYIKA, it sounds like you have several requests for accessing requirements implementation and verification data.
It sounds like you want to programmatically access the requirements implementation and verification status. You can do that by using the getVerificationStatus and getImplementationStatus functions. To get this information in the form of a matrix, you could try exporting this information to Microsoft® Excel® using the struct2table function, then use one of the approaches described in Write Data to Excel Spreadsheets.
It sounds like you might already be aware of this feature, but I do want to mention that to view the implementation status and verification status in an HTML report format, you can generate a report from the requirement sets. For more information, see Report Requirements Information. In the Report Generation Options dialog box, select Implementation Status and Verification Status. Unfortunately, you can only change the report by using the options in the Report Generation Options dialog box.
As far as I'm aware, your other requests are not possible at this time. The only option to bring the verification status and implementation status to a newer version of MATLAB is to using the getVerificationStatus and getImplementationStatus functions to store the information as MATLAB variables, save the variables in a MAT file and load the MAT file in a newer version of MATLAB.
I hope this helps and I'm sorry that I wasn't able to provide more information to solve your requests.

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Report Generator in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!