SIL Testing and Polyspace
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
Satishkumar Aruljothi
2016-8-8
Polyspace is not used for function testing. it is just a coverage tool.
you could use MATLAB simulink verification tools
Jay Abraham
2017-4-12
Note that Polyspace is a static code analysis tool. It is not a coverage analysis tool. See answer below for more information.
回答(3 个)
Lucas Lebert
2016-12-6
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.
0 个评论
Jay Abraham
2017-4-12
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.
0 个评论
Jay Abraham
2017-9-10
The Simulink Test tool is intended to help you perform SIL testing. You can learn more about the product at the links below.
Documentation explaining how to do SIL testing - https://www.mathworks.com/help/sltest/ug/silpil-verification-for-a-subsystem.html
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Test Model Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!