SIL Testing and Polyspace

3 vues (au cours des 30 derniers jours)
vins
vins le 8 Fév 2016
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 commentaires
Satishkumar Aruljothi
Satishkumar Aruljothi le 8 Août 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 le 12 Avr 2017
Note that Polyspace is a static code analysis tool. It is not a coverage analysis tool. See answer below for more information.

Connectez-vous pour commenter.

Réponses (3)

Lucas Lebert
Lucas Lebert le 6 Déc 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 le 12 Avr 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 le 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.

Catégories

En savoir plus sur Test Model Components dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by