17
1 © 2015 The MathWorks, Inc.

© 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

1© 2015 The MathWorks, Inc.

Page 2: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

2© 2015 The MathWorks, Inc.

New approach of Test Management

with Simulink Test

Sang-Ho Yoon

Senior Application Engineer

Page 3: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

3

MathWorks V&V Product Portfolio

Product Capabilities

Simulink Test Author, execute, and manage simulation-based tests for

models and generated code

Simulink Verification & Validation Trace to requirements, check model standards, perform

coverage analysis

Simulink Design Verifier Identify design errors, automatically generate test

vectors, verify designs against requirements

Report Generator Design and generate reports from MATLAB applications

Polyspace Bug Finder Find software bugs and check compliance to MISRA

Polyspace Code Prover Prove the absence of run-time errors in software

Simulink Code Inspector Automate source code reviews for safety standards

Simulink Real-Time Build, run, and test real-time applications

Page 4: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

4

Simulink Test

Capabilities to test simulation outputs throughout the project lifecycle

Concept Create Test Modify FinalizeIterate

Reuse

Do legacy subsystem models work in new application?

The model worked last week… does it still?

Another engineer modified the algorithm…still working ok?

Does the generated code performance match the model?

Does subsystem/system meet the design requirements?

Page 5: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

6

1. Test Harnesses 2. Test Sequence Block 3. Test Manager

•Synchronized,

simulatable test

environment

• Inputs and assessments

based on logical,

temporal conditions

•Author, execute,

manage test cases

•Review, export, report

Product Overview

Main Model

Test Harness

Component

under test

Page 6: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

7© 2015 The MathWorks, Inc.

Applying Simulink Test

Case Study : Seat Belt Reminder

Page 7: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

8

Design Seat Belt Reminder

Inputs Outputs

Key Position

Seat Belt StatusSeat Belt

Reminder

Warning Lamp

Vehicle Speed

Embedded Controller

Page 8: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

9

SBR Algorithm Model

Functional Requirements

Page 9: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

10

Conceptual Test with Dashboard

Page 10: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

11

Simulink TestTool for authoring, managing, and executing simulation-based tests

1. Test Harnesses

Synchronized testing environment

Enables unit testing without

requiring new model

Component or system

Configure, build, simulate

Supports SIL, or PIL

Supports direct “adhoc” testingMain Model

Test Harness

Component under testExercise Analyze

Page 11: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

12

Model Coverage ReportSimulink Verification and Validation

Coverage metrics identifies untested portions of your

model

Page 12: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

13

Improving Test Suite for Coverage

Need to create test inputs and assessments

Test cases need to be designed with the combination of

multiple inputs including temporal or logic-based

scenarios

* Simulink Design Verifier

supports test generation. But

expected outputs still need to

be analyzed.

Page 13: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

14

Simulink TestTool for authoring, managing, and executing simulation-based tests

2. Test Sequence Block

MATLAB Action Language

Steps are temporal or logic-based

Create complex test inputs and

assessments

Trouble shooting aids

“Formerly referred to as the reactive

testing block”

Test Sequence/Assessment Block

Page 14: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

15

Simulink TestTool for authoring, managing, and executing simulation-based tests

3. Test Manager

Create Test Cases

Group into Suites and Test Files

Execute individual or batch

View summary and detailed results

Archive, export, report

Page 15: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

16

Test Case Templates

Input

1. Simulation Test

2. Baseline Test

3. Equivalence Test

Expected

Outputs

File

Assessment CriteriaInput

Input

Input

Output

Output

Output

Output

Assessment Criteria

Assessment Criteria

Page 16: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

17

Test Manager Demo

1. Simulation TestPass/Fail assessments

with blocks (Assertion)

2. Baseline TestRegression test for float-to

fixed-point conversion of

low-pass filter

3. Equivalence TestComparison between

Normal and Software-In-

the-Loop tests

Page 17: © 2015 The MathWorks, Inc.€¦ · Improving Test Suite for Coverage Need to create test inputs and assessments Test cases need to be designed with the combination of multiple inputs

18

Q&A