Compare and Merge Requirement Sets Using Comparison Tool
This example shows you how to use the Comparison tool to analyze the comparison results for different types of properties by publishing a comparison report. It also shows you how to merge the requirement sets and save the result in a target file.
Compare Requirement Sets
The example uses two requirement sets. The
crs_req_func_spec_02 files contain the original and changed requirements sets, respectively.
To compare the two requirements sets, in the current folder pane of MATLAB®, select the two files. Right-click either file and select Compare Selected Files/Folders. Alternatively, use the
visdiff function to compare the two sets by typing this command in the MATLAB command prompt.
Understand the Results
By default, the tool highlights the changed requirements. The tool differentiates between different types of changes using colors. To change the colors, on the Environment tab on the MATLAB® toolstrip, click Preferences, and then click
The view in the Comparison tool consists of two main parts.
The top pane displays the requirement sets in a hierarchical manner.
The bottom pane contains a name-value table with the names and values of specific properties or key parameters of the selected requirement.
Use the arrow button in the table to move the table to its corresponding requirement in the hierarchy.
When you click a modified requirement on either side, the name-value columns show modification details such as the username of the person who modified the requirement, the date on which they modified it, and the revision number.
When you click a custom attribute in a requirement set, you can view the changes to the attribute. For example, the requirement set
crs_req_func_spec_02was modified with the
Customization Required? attribute set to
When you click the Description parameter in the requirements tree, you can view the original and changed description of the selected requirement.
Stepping Through Differences
Use the Next and Previous navigation buttons on the Navigate tab of the toolstrip to navigate between groups of changes in the requirement sets. If the item you select on the left has a match, the tool selects it on the right. Use the Swap Sides button to swap the view. Linked Scrolling is enabled by default so that you can scroll through the requirement sets on both sides at the same time. If you clear the Linked Scrolling parameter, you can scroll through requirement sets on the left pane or the right pane independently.
To control highlighting in requirement sets, on the Highlight tab, select or clear Always Highlight. If you select Always Highlight, the tool shows the corresponding requirements in the Requirements Editor app each time you select an entry in the comparison tree.
You can click the Highlight Now button to highlight a selected requirement at any time in Requirements Editor. For example, if you select requirement number
#67 (Maximum Throttle Value) from the
The Show Only Changed option on the Filter tab is always enabled by default. Clear this option to view both changed and unchanged requirements.
You can publish the comparison results in a comparison report. The report shows only the changes. You can publish the report in HTML, Word, or PDF formats. To publish the report, on the Comparison tab, click Publish and select the format. For more information, see Publish and Save Printable Report of Comparison Results. Alternatively, you can publish the report using the
You can merge the changes from two requirements sets by clicking the Merge Mode button on the toolstrip of the Comparison tool.
You can navigate between the changes and the panes to select a value by using the radio buttons. By default, the right pane is selected. You can override this selection.
The merge creates a third file, Target, which can contain changes from either the
crs_req_func_spec_01 or the
crs_req_func_spec_02 file. You can exit Merge Mode by either accepting or rejecting the changes.
To save the merge results to a local folder, complete these steps.
Click Save Result to save the merged file.The Input File Name dialog box appears.
Specify a name for the result file with .slreqx or .slmx (for link set files) extension in the dialog and click OK. This action saves the results to the local folder.
To discard merge mode and return to Comparison tab, click Return to Comparison.
You can merge the attributes only after you have merged the corresponding attribute registry.
The Comparison tool does not compare requirement or link attributes that you define or add via stereotypes and profiles.
You cannot merge the Combobox attribute registries.