Measuring method and device for code coverage rate of driving program

The invention discloses a measuring method and device for code coverage rate of a driving program, and relates to the technical field of software test. The method comprises the following steps: (1) compiling a source code of a to-be-tested driving program to acquire a middle code; adding tabs on bas...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: LIU HUQIU, BAI JIAJU, HU SHIMIN
Format: Patent
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention discloses a measuring method and device for code coverage rate of a driving program, and relates to the technical field of software test. The method comprises the following steps: (1) compiling a source code of a to-be-tested driving program to acquire a middle code; adding tabs on basic blocks in the middle code; inserting transfer functions in the basic blocks in the middle code; (2) compiling the middle code inserted the transfer functions to generate a loadable destination file; (3) loading the destination file to operate the to-be-tested driving program; acquiring the tabs of the basic blocks operating at present through the transfer functions; recording the acquired tabs in a journal file; (4) confirming the code coverage rate of the to-be-tested driving program according to the tabs of the basic blocks in the journal file. According to the invention, the code coverage rate of the driving program can be measured accurately and efficiently under the condition that normal operation of an operating system is not influenced; modification of the source code manually by a programmer is not required; the workload is greatly reduced.