SIL Testing and Polyspace

7 views (last 30 days)
vins
vins on 8 Feb 2016
Answered: Jay Abraham on 10 Sep 2017
Hi, I actually work as software tester and my job consist in verify the Embedded C code generated from a Simulink model using SIL approach. Basically I have a model, a plant, that is a test harness, and the SIL block. What I have to do is implement test cases to verify part of the code, this could be an entire function or part of it. Tests should cover function behaviour completely, if possible, so each path should be tested, like a normal unit test. At the moment the entire process takes me a lot of time, most of which is spent for settings, the test harness is not generated automatically for example. So I'd like to know, is it be possible to perform all this actions automatically? I mean, does exist a tool which takes a function, or an entire component, and generate all the test cases that are needed. I was looking at Simulink Design Verifier features, and it seems to be just the Tool, I'd like to have a confirm here anyway! However, the problem is my Matlab and Simulink licence does not include Simulink Design Verifier, so it would be nice to use something else, if possible. Talking about Tools, could Polyspace be an alternative to the SIL testing? I know the first one is used for static analysis, whilst with SIL approach we have dinamic analysis, on the other hand, int the following article http://www.mathworks.com/products/polyspace/static-analysis-notes/better-testing-with-static-analysis.html appear that the abstract interpretation technique Polyspace uses would give completeness to the test, in term of static and dinamic behaviour. Can someone help with this matter?
  2 Comments
Satishkumar Aruljothi
Satishkumar Aruljothi on 8 Aug 2016
Polyspace is not used for function testing. it is just a coverage tool.
you could use MATLAB simulink verification tools
Jay Abraham
Jay Abraham on 12 Apr 2017
Note that Polyspace is a static code analysis tool. It is not a coverage analysis tool. See answer below for more information.

Sign in to comment.

Answers (3)

Lucas Lebert
Lucas Lebert on 6 Dec 2016
The comment from Satiskumar is correct. The Code Prover detects runtime errors and the Bug Finder detects bugs in the code. The functionality of the code is not tested. For example Polyspace does not compare the expected output with the real output. If you want to generate test cases, you indeed need the Simulink Design Verifier.

Jay Abraham
Jay Abraham on 12 Apr 2017
You can certainly use the Simulink Design Verifier tool to automatically generate test inputs from your Simulink and Stateflow model. The Simulink Design Verifier tool generates test from test objectives that you can specify or it can automatically generate tests to satisfy coverage objectives for block execution, condition, decision, and MCDC. See this link in the documentation page for more information (you need a MathWorks account to access)
The Polyspace products are static code analysis tools. They analyze and verify C/C++ code to find bugs or to prove that the code is free of critical run-time errors. The Polyspace products do not perform testing activities on the code, however they can find dead code. Dead code would indicate untestable elements in your code. You can learn more about dead code at the link below.

Jay Abraham
Jay Abraham on 10 Sep 2017
The Simulink Test tool is intended to help you perform SIL testing. You can learn more about the product at the links below.

Categories

Find more on Test Model Components in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!