You are on page 1of 18

DO Qualification Kit

Simulink® Code Inspector™


Test Cases, Procedures, and Results

R2015a, March 2015


How to Contact MathWorks
Latest news: www.mathworks.com
Sales and services: www.mathworks.com/sales_and_services
User community: www.mathworks.com/matlabcentral
Technical support: www.mathworks.com/support/contact_us
Phone: 508-647-7000
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA 01760-2098
DO Qualification Kit: Simulink® Code Inspector™ Test Cases, Procedures, and Results
© COPYRIGHT 2012–2015 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied only under
the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written
consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through the
federal government of the United States. By accepting delivery of the Program or Documentation, the government hereby agrees
that this software or documentation qualifies as commercial computer software or commercial computer software documentation
as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and
conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern the use, modification,
reproduction, release, performance, display, and disclosure of the Program and Documentation by the federal government (or
other entity acquiring for or through the federal government)and shall supersede any conflicting contractual terms or conditions.
If this License fails to meet the government’s needs or is inconsistent in any respect with federal procurement law, the
government agrees to return the Program and Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a
list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective
holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for more
information.
Revision History
March 2012 New for Version 1.6 (Applies to Release 2012a)
September 2012 Revised for Version 2.0 (Applies to Release 2012b)
March 2013 Revised for Version 2.1 (Applies to Release 2013a)
September 2013 Revised for Version 2.2 (Applies to Release 2013b)
March 2014 Revised for Version 2.3 (Applies to Release 2014a)
October 2014 Revised for Version 2.4 (Applies to Release 2014b)
March 2015 Revised for Version 2.5 (Applies to Release 2015a)
Contents
1 Introduction ...................................................................................................................................... 1-1
2 Test Cases and Procedures ............................................................................................................... 2-1
3 Traceability Between Operational Requirements and Test Cases and Procedures ........................... 3-1
3.1 Code Inspection Report ........................................................................................................... 3-2
4 Executing Test Cases and Procedures .............................................................................................. 4-1
5 Test Results ...................................................................................................................................... 5-1
5.1 Code Inspection Report ........................................................................................................... 5-2
5.2 Reviewing Test Results ........................................................................................................... 5-4

v
vi
1 Introduction

This document comprises test cases, procedures, and results (Reference DO-330 Sections 10.3.3
and 10.3.4) for the following capability of the Simulink® Code Inspector™ verification tool:

 Code Inspection Report

This document is intended for use in the DO-330 tool qualification process for TQL-4 tools.

See also the DO Qualification Kit User's Guide, R2015a.


1-2
2 Test Cases and Procedures

Requirements-based test cases and procedures have been developed from the “Code Inspector
Report Operational Requirements” section in the following document:

Simulink Code Inspector Tool Operational Requirements

To access the tool operational requirements document, on the MATLAB® command line, type
qualkitdo to open the Artifacts Explorer. The document is in Simulink Code Inspector >
r2015a.

The test cases exercise the code inspection report capability, and reside in the Simulink® test
models and corresponding C code files identified in “Code Inspection Report”.

The test procedure applies each code inspection report capability to a subset of the preceding test
cases, and resides in a MATLAB file and corresponding report generator file identified in “Code
Inspection Report”.

The test cases and test procedures, which test the code inspection report capability, comprise the
Tool Qualification Data (Reference DO-330 Sections 10.3.3 and 10.3.4).

The applicant will:

 Review the test cases and procedures for applicability to the project under consideration.
 Configure the test cases and procedures in a configuration management system.
2-2
3 Traceability Between Operational
Requirements and Test Cases
and Procedures
3.1 Code Inspection Report
The test cases and procedures cover the Tool Operational Requirements for the Simulink® Code
Inspector™ code inspection report, as shown in the traceability matrix at:

matlabroot/toolbox/qualkits/do/slci/r2015a/qualkitdoSlciRunTests
.xlsx

3-2
4 Executing Test Cases and
Procedures

The applicant will execute the test cases and procedures for the Simulink® Code Inspector™
code inspection report capability in the installed environment.

Note:

 To run the test cases and procedures, copy the


matlabroot/toolbox/qualkits/do/slci folder and subfolders to a location
where you have write access, and then run the test cases and procedures from there.

 Before you execute the MATLAB file launching the test procedure, start a new MATLAB®
session.

 Before you execute the test procedure, set the Java™ heap size for your MATLAB session
to at least 512 MB. To check the Java heap size, open the MATLAB Preferences dialog
box and select General > Java Heap Memory. If the Java Heap Size value is less than
512 MB, change it to 512 MB, click OK, and restart MATLAB. (If the maximum available
heap size value is less than 512 MB, select the maximum value.) This may help you avoid
java.lang.OutOfMemoryError messages.

 To execute the RPT file used by the test procedure, you must have MATLAB ® Report
Generator™ and Simulink® Report Generator™ licenses.

Execute the Simulink Code Inspector test procedure:

1. Create the report. At the MATLAB® command line, enter the following command:

qualkitdoSlciRunTests

2. After the report generation is complete, review the test report results. For more
information, see “Test Results”.
4-2
5 Test Results
5.1 Code Inspection Report
Executing the following test procedures generates the following test result files. The test result
file provides the Tool Verification Results in a Simulink® Report Generator report.

Code Inspection Report  Test Summary


Test Test Result
Procedure
qualkitdoSlci outputs/
RunTests.m
qualkitdoSLCIQualificationReport_Model Interface.html
qualkitdoSlci
RunTests.rpt qualkitdoSlciQualificationReport_Block Behavior Discontinuities.html
qualkitdoSlciQualificationReport_Block Behavior Discrete.html
qualkitdoSlciQualificationReport_Block Behavior LogicBitOps.html
qualkitdoSlciQualificationReport_Block Behavior Lookup.html
qualkitdoSlciQualificationReport_Block Behavior MathOperations 1.html
qualkitdoSlciQualificationReport_Block Behavior MathOperations 2.html
qualkitdoSlciQualificationReport_Block Behavior MathOperations 3.html
qualkitdoSlciQualificationReport_Block Behavior PortsSubsystem 1.html
qualkitdoSlciQualificationReport_Block Behavior PortsSubsystem 2.html
qualkitdoSlciQualificationReport_Block Behavior PortsSubsystem 3.html
qualkitdoSlciQualificationReport_Block Behavior SignalAttributes.html
qualkitdoSlciQualificationReport_Block Behavior SignalRouting.html
qualkitdoSlciQualificationReport_Block Behavior Sinks.html
qualkitdoSlciQualificationReport_Block Behavior Sources.html
qualkitdoSlciQualificationReport_Block Behavior UserDefinedFcn.html

qualkitdoSLCIQualificationReport_Stateflow Behavior 1.html


qualkitdoSLCIQualificationReport_Stateflow Behavior 2.html
qualkitdoSLCIQualificationReport_Stateflow Behavior 3.html

qualkitdoSlciQualificationReport_MATLAB Fcn Block Behavior.html

qualkitdoSlciQualificationReport_Block Connectivity.html

qualkitdoSlciQualificationReport_Data and File Packaging.html

qualkitdoSlciQualificationReport_Local Variables.html

qualkitdoSlciQualificationReport_Complex Models 1.html


qualkitdoSlciQualificationReport_Complex Models 2.html

qualkitdoSlciQualificationReport_Traceability.html
qualkitdoSlciQualificationReport_Configuration Parameters.html

qualkitdoSlciQualificationReport_Model and Code Compatibility.html

5-2
The applicant will:

 Review the test results.


 Configure the test results in a configuration management system.

5-3
5.2 Reviewing Test Results
Each test case contains the test results for a Simulink Code Inspector capability. For each test
case, compare the expected results to the actual results:

1. From the working folder, open a test result HTML file in a web browser. For example, open
outputs/qualkitdoSlciQualificationReport_Block Behavior
Discrete.html.

2. Navigate to the test cases. For each test case, you see:

 A table that summarizes the test case.

 A Code Inspection Details and Configuration section, which provides information on


the Simulink Code Inspector configuration settings used and a link to the code
inspection report HTML file for the test case.

3. For each test case, review the code inspection report.

4. Compare the actual results of the test case with the expected results listed in the test case
summary table. Additionally, compare the actual result details with the expected result
details.

In the expected result details, the listed blocks and code lines represent the minimum
failures that should be listed in the actual results. Additional blocks or code lines might not
pass code inspection due to the inability of Simulink Code Inspector to isolate the failure to
a specific block or line of code.

The test passes if the actual result matches the expected result.

5. Confirm that all the test cases pass. To comply with DO-330, Section 10.3.4, verify that all
the test cases pass.

5-4

You might also like