The invention discloses a method for monitoring the running state of a running entity under an
AUTOSAR CP framework, and the method comprises the steps: initializing a running entity monitoring module, setting a running entity number and a
test point number, initializing a to-be-recorded parameter
list, setting a
running time sequence expectation diagram, a single monitoring time length and the number of measurement times, and starting the running entity monitoring; respectively calling a
test point recording function at the beginning and the end of the monitored running entity through a C /
S interface of the RTE, recording a sequence relation of the running entity during running, and customizing a running numerical value of a to-be-tested parameter and a
timestamp of a
test point; according to a set monitoring time length, continuously monitoring an
operation time sequence of the operation entity; and after the monitoring time is over, comparing whether the actually measured
operation time sequence is consistent with the expected
time sequence, if so, not recording the current state of the operation entity, otherwise, recording the current
operation time sequence, and recording the parameter state and the
timestamp under each test point so as to check the reason for the deviation of the
time sequence.