testing autosar software with quickcheck
TRANSCRIPT
![Page 1: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/1.jpg)
Testing AUTOSAR software with QuickCheck
Thomas Arts, John Hughes, Hans Svensson, Ulf Norell
![Page 2: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/2.jpg)
Is the software in different ECUs compatible?
Electronic Control Unit(ECU)
FirstOrderSupplier(Tier 1)
CarMaker(OEM)
Software
SecondOrderSupplier(Tier 2)
specification ?
Is the software in different ECUs compliant with
specification ?
![Page 3: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/3.jpg)
Volvo's acceptance testing project
3000 pages of pdf specifications
©
E2E
CRC
![Page 4: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/4.jpg)
Testing AUTOSAR
What is difficult in writing test cases?
• Everything is configurable. Thousands of parameters can be specified
• AUTOSAR is modular. Tests are designed against a specification, but there is no specification for combinations of modules
• Complex scenario's... hard to think of all of them• Some implementation freedom must be allowed
©
![Page 5: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/5.jpg)
Configurations are vendor specific
Systemtemplate Configuration
tool
XMLConfig
Code generation
toollib.h
A test is:A configuration and a set of API calls with their expected results.
©
![Page 6: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/6.jpg)
Highly configurable
©
![Page 7: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/7.jpg)
Properties vs. Test Cases
8 times less code to maintainmany more tests
Module TTCNlines of code
TTCN#test cases
QuickChecklines of code
QuickChecktime to generate 100 different tests
CanIf 16930 65 1978 24 sec
CanSM 6751 17 1255 10 sec
CanNm 12318 58 1716 47 sec
CanTp 21984 105 2062 20 sec
cluster 57983 245 7011 33 sec
![Page 8: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/8.jpg)
The Problem of Scale
02000400060008000
100001200014000160001800020000
CAN DEM FlexRay COM
ImplementationSpecification
considerably less work to create complete model
©
![Page 9: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/9.jpg)
Efficiency
Model-based testing is effective
©
![Page 10: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/10.jpg)
Finding issues
During development of models we kept issue tracker:
– 227 issues for version 4.0.2 of the models– classification (slightly subjective):
- filed 20 Bugzilla's (via Volvo) some other issues already found by concurrent implementation activity or considered, implementation freedom or not important.
©
classification # issuesspec defect 180vendor defectmodel defect
![Page 11: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/11.jpg)
Typical error found
Property: highest priority message should be send first
©
Sample
send priority 1
send priority 2
send priority 3
tx_confirm
sending 1
sending 31 sent
queued
Cause: failure to mask a bit off an extended CAN-identifier
![Page 12: Testing AUTOSAR software with QuickCheck](https://reader030.vdocument.in/reader030/viewer/2022012707/61a815f30fa9a14b97002cc9/html5/thumbnails/12.jpg)
Deliverables
Jan 6 – Jan 31 (2014)
Confirmed errors in production code– Com: over 20– Can: over 30, mostly in CanSM and CanTp– Lin: 5 errors, Requesting a schedule cannot be tested
due to incompatibility.
In some cases, model more precise than vendors want to be.