CN116610580A - Vehicle cloud interaction interface testing method and device, electronic equipment and storage medium - Google Patents

Vehicle cloud interaction interface testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116610580A
CN116610580A CN202310606959.9A CN202310606959A CN116610580A CN 116610580 A CN116610580 A CN 116610580A CN 202310606959 A CN202310606959 A CN 202310606959A CN 116610580 A CN116610580 A CN 116610580A
Authority
CN
China
Prior art keywords
data
interface
cloud
vehicle
uploading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310606959.9A
Other languages
Chinese (zh)
Inventor
穆鹏成
黄灿
胡吉翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Selis Phoenix Intelligent Innovation Technology Co ltd
Original Assignee
Chengdu Seres Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Seres Technology Co Ltd filed Critical Chengdu Seres Technology Co Ltd
Priority to CN202310606959.9A priority Critical patent/CN116610580A/en
Publication of CN116610580A publication Critical patent/CN116610580A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of intelligent automobiles, and provides a vehicle cloud interaction interface testing method, a device, electronic equipment and a storage medium. The method comprises the following steps: acquiring vehicle-end simulation data, and constructing uploading test interface data based on the vehicle-end simulation data; calling and executing a first external script, and uploading the uploading test interface data to a vehicle cloud interaction interface corresponding to the data uploading interface address; if an interface return value returned by the vehicle cloud interaction interface is received, a second external script is called and executed, and a cloud data acquisition request is initiated to the vehicle cloud interaction interface, wherein the cloud data acquisition request comprises a cloud data acquisition interface address; and receiving cloud data returned by the vehicle cloud interaction interface, and checking the cloud data and the uploading test interface data to finish the test of the vehicle cloud interaction interface. The application can systematically and comprehensively evaluate the quality of the vehicle-to-cloud interaction interface between the vehicle end and the OTA cloud platform, and is beneficial to ensuring the success rate and the efficiency of the later OTA upgrading.

Description

Vehicle cloud interaction interface testing method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of intelligent automobiles, in particular to a vehicle cloud interaction interface testing method and device, electronic equipment and a storage medium.
Background
OTA (Over-the-Air), also known as Over-the-Air technology, refers to technology that remotely manages firmware, data and applications on the component terminals of an automobile through a mobile communication network (2G/3G/4G or Wifi). The implementation of the OTA technology mainly comprises three steps: firstly, uploading updated software to an OTA cloud platform; secondly, the OTA cloud platform transmits the updated software to a vehicle end in a wireless transmission mode; thirdly, the vehicle end uses the updated software to update the original software.
In the whole OTA architecture, operations such as data interaction and the like are needed to be carried out between a vehicle end and an OTA cloud platform through a vehicle-to-cloud interaction interface so as to mutually cooperate to finish updating of updating software. The quality of the cloud interaction interface is one of the key factors for ensuring whether the whole OTA upgrading process can be successfully completed. Therefore, testing the quality of the cloud interaction interface is particularly important.
At present, testing for a cloud interaction interface is generally that a tester directly uses a testing tool (such as postman) to make an interface request and then makes assertion verification on an interface return value. The process only tests the interface access stage, but does not complete the test of data interaction between the vehicle end and the OTA cloud platform, the obtained test result is single and one-sided, and the quality of the Che Yun interaction interface cannot be systematically and comprehensively evaluated, so that the vehicle cloud interaction interface with quality problems cannot be timely known and debugged easily, and the success rate and the efficiency of the later OTA upgrading are affected.
Disclosure of Invention
In view of the above, the embodiments of the present application provide a vehicle-cloud interaction interface testing method, apparatus, electronic device, and storage medium, so as to solve the problems in the prior art that in the testing of a vehicle-cloud interaction interface, only the interface access stage is tested, the testing result is single and one-sided, the quality of the Che Yun interaction interface cannot be systematically and comprehensively evaluated, and the vehicle-cloud interaction interface with quality problems cannot be easily known and debugged in time, thereby influencing the success rate and efficiency of the later OTA upgrade.
In a first aspect of the embodiment of the present application, a vehicle cloud interaction interface testing method is provided, including:
acquiring vehicle-end simulation data, constructing uploading test interface data based on the vehicle-end simulation data, wherein the uploading test interface data comprises a data uploading interface address and a cloud data acquiring interface address;
calling and executing a first external script, and uploading the uploading test interface data to a vehicle cloud interaction interface corresponding to the data uploading interface address;
if an interface return value returned by the vehicle cloud interaction interface is received, a second external script is called and executed, and a cloud data acquisition request is initiated to the vehicle cloud interaction interface, wherein the cloud data acquisition request comprises a cloud data acquisition interface address;
and receiving cloud data returned by the vehicle cloud interaction interface, checking the cloud data and uploading test interface data to obtain a checking result, and completing the test of the vehicle cloud interaction interface.
In a second aspect of the embodiment of the present application, there is provided a vehicle cloud interaction interface testing device, including:
the system comprises an acquisition module, a cloud data acquisition module and a test interface module, wherein the acquisition module is configured to acquire vehicle-end simulation data, and construct uploading test interface data based on the vehicle-end simulation data, and the uploading test interface data comprises a data uploading interface address and a cloud data acquisition interface address;
the first calling module is configured to call and execute a first external script, and upload the data of the uploading test interface to the vehicle cloud interaction interface corresponding to the address of the data uploading interface;
the second calling module is configured to call and execute a second external script if an interface return value returned by the vehicle cloud interaction interface is received, and initiate a cloud data acquisition request to the vehicle cloud interaction interface, wherein the cloud data acquisition request comprises a cloud data acquisition interface address;
the receiving module is configured to receive cloud data returned by the vehicle cloud interaction interface, and check the cloud data and the uploaded test interface data to obtain a check result, so that the test on the vehicle cloud interaction interface is completed.
In a third aspect of the embodiments of the present application, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
In a fourth aspect of the embodiments of the present application, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above method.
Compared with the prior art, the embodiment of the application has the beneficial effects that: the method comprises the steps of obtaining vehicle-end simulation data, and constructing uploading test interface data based on the vehicle-end simulation data, wherein the uploading test interface data comprises a data uploading interface address and a cloud data obtaining interface address; calling and executing a first external script, and uploading the uploading test interface data to a vehicle cloud interaction interface corresponding to the data uploading interface address; if an interface return value returned by the vehicle cloud interaction interface is received, a second external script is called and executed, and a cloud data acquisition request is initiated to the vehicle cloud interaction interface, wherein the cloud data acquisition request comprises a cloud data acquisition interface address; cloud data returned by the cloud interaction interface is received, the cloud data and the uploading test interface data are checked to obtain a check result, the interface access between the vehicle end and the OTA cloud platform and the test of the complete stage of data interaction are completed, the quality of the Che Yun interaction interface can be systematically and comprehensively evaluated, the cloud interaction interface with quality problems can be timely known and debugged, and accordingly the success rate and the efficiency of the later OTA upgrading are guaranteed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a framework structure of a vehicle cloud interaction interface testing system according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a testing method for a vehicle cloud interaction interface according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a vehicle cloud interaction interface testing device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The following describes in detail a vehicle cloud interaction interface testing method and device according to an embodiment of the application with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a framework structure of a vehicle cloud interaction interface testing system according to an embodiment of the present application. The vehicle cloud interaction interface testing system mainly comprises: the simulation system 101, the testing device 102, the first external calling device 103, the second external calling device 104, the OTA cloud platform 105 and the network 106.
The Simulation system 101 may be a Simulation system of a Simulation Setup by CNAoe (CAN open environment, a bus development environment designed for development of automobile buses by Vector corporation of germany).
The Test device 102 may be a Test Module automated Test Module of CANoe.
The first external calling device 103, which is internally provided with an instant messaging protocol for realizing the MQTT (Message Queuing Telemetry Transport, message queue telemetry transmission) developed by IBM, is possibly an important component of the Internet of things. ) A first python script (i.e., a first external script) of related functions.
The second external calling device 104 has a second python script (i.e., a second external script) built in for implementing http request related functions.
The OTA cloud platform 105 includes a vehicle cloud interaction interface 1051 and a cloud database internal interface 1052. The vehicle-cloud interaction interface 1051 is an application interface for data interaction between the vehicle end and the OTA cloud platform. The cloud database internal interface 1052 is an interface that the system database of the OTA cloud platform interacts with the outside or other application interfaces inside the platform.
The network 106 may be a wired network using coaxial cable, twisted pair wire, and optical fiber, or may be a wireless network capable of implementing interconnection of various communication devices without wiring, for example, bluetooth (Bluetooth), near field communication (Near Field Communication, NFC), infrared (Infrared), etc., which are not limited in this embodiment of the present application.
In the embodiment of the present application, the test device 102 may acquire vehicle-end simulation data from the simulation system 101, and construct uploading test interface data based on the vehicle-end simulation data, where the uploading test interface data includes a data uploading interface address and a cloud data acquiring interface address; then, the first external script is called and executed by communicating with the first external calling device 103, and the uploaded test interface data is uploaded to the vehicle cloud interaction interface 1051 in the OTA cloud platform 105 corresponding to the data uploading interface address; if an interface return value returned by the vehicle cloud interaction interface 1051 is received, calling and executing a second external script by communicating with the second external calling device 104, and initiating a cloud data acquisition request to the vehicle cloud interaction interface 1051, wherein the cloud data acquisition request comprises a cloud data acquisition interface address; the cloud data is acquired and returned to the testing device 102 through interaction between the vehicle cloud interaction interface 1051 and the cloud database internal interface 1052; when the testing device 102 receives cloud data returned by the vehicle cloud interaction interface 1051, the cloud data and the uploaded test interface data are checked to obtain a checking result, and testing of the vehicle cloud interaction interface is completed. Through the method, on one hand, the test for the interface access stage can be completed, and on the other hand, the test for the data interaction between the vehicle end and the OTA cloud platform can also be completed, so that the quality of the Che Yun interaction interface can be systematically and comprehensively evaluated, the vehicle cloud interaction interface with quality problems can be timely known and debugged, and the success rate and the efficiency of the later OTA upgrading can be guaranteed.
It should be noted that, specific types, numbers and combinations of the simulation system 101, the testing device 102, the first external calling device 103, the second external calling device 104, the OTA cloud platform 105 and the network 106 may be adjusted according to actual requirements of an application scenario, which is not limited in the embodiment of the present application.
For example, in an embodiment, the simulation system 101, the test device 102, the first external calling device 103, and the second external calling device 104 may be integrated into a first interface test device, and the first interface test device may be installed on a vehicle end (i.e., a vehicle terminal).
In another embodiment, the simulation system 101 may be disposed on the vehicle side, and the test device 102, the first external calling device 103, and the second external calling device 104 may be integrated into a second interface test device. The second interface testing device may be externally located at the vehicle end.
Fig. 2 is a schematic flow chart of a testing method for a vehicle cloud interaction interface according to an embodiment of the present application. The vehicle cloud interaction interface testing method of fig. 2 may be performed by the testing device 102 of fig. 1. As shown in fig. 2, the vehicle cloud interaction interface testing method includes:
step S201, vehicle-end simulation data are obtained, uploading test interface data are constructed based on the vehicle-end simulation data, and the uploading test interface data comprise a data uploading interface address and a cloud data obtaining interface address.
The vehicle-end Simulation data can be a series of Simulation data generated by a Simulation Setup Simulation system of CNAoe after realizing communication connection with each monitoring point position (each sensor point position on the real vehicle) of the real vehicle through the Internet of vehicles and collecting the monitoring data on each monitoring point position of the real vehicle. The series of simulation data includes various vehicle signals, vehicle communication network environment information, and the like.
Uploading test interface data refers to data uploaded to the OTA cloud platform 105 by the simulated vehicle end.
The data upload interface address refers to the address of the vehicle cloud interaction interface 1051.
The cloud data obtaining interface address refers to an address of an internal interface 1052 of the cloud database.
Step S202, a first external script is called and executed, and uploading test interface data to a vehicle cloud interaction interface corresponding to a data uploading interface address.
In an embodiment, the test device 102 may call and execute the first external script built in the first external call device 103, and upload the upload test interface data configured by the first external script to the vehicle cloud interaction interface 1051 of the OTA cloud platform 105 according to the data upload interface address.
Step 203, if an interface return value returned by the vehicle cloud interaction interface is received, a second external script is called and executed, and a cloud data acquisition request is initiated to the vehicle cloud interaction interface, wherein the cloud data acquisition request comprises a cloud data acquisition interface address.
The interface return value refers to response information returned by the vehicle cloud interaction interface 1051 when receiving the uploaded test interface data uploaded by the test device 102.
In an embodiment, when receiving the interface return value returned by the vehicle cloud interaction interface 1051 and determining that the interface access to the vehicle cloud interaction interface 1051 is normal according to the interface return value, the testing device 102 may enter a test of a next stage, and initiate a cloud data acquisition request to the vehicle cloud interaction interface 1051 by calling and executing a second external script built in the second external calling device 104.
In another embodiment, the testing device 102 may also enter the next stage of testing when it is determined that the interface access for the cloud interaction interface 1051 is abnormal according to the interface return value.
Step S204, cloud data returned by the vehicle cloud interaction interface is received, the cloud data and the uploaded test interface data are checked, a check result is obtained, and the test for the vehicle cloud interaction interface is completed.
Cloud data, which is generally data corresponding to vehicle-side simulation data, is stored in a system database of the OTA cloud platform 105.
In practical application, for different vehicle ends, a series of Simulation data corresponding to the vehicle end generated by a Simulation system of the Simulation of the station Setup of the CNAoe can be adopted. In an embodiment, the vehicle end may upload its simulation data to the OTA cloud platform 105 through the vehicle-cloud interaction interface, and after receiving the simulation data, the OTA cloud platform 105 stores the simulation data in the system database, and establishes a corresponding relationship between the vehicle end and the simulation data. Next, if the OTA cloud platform 105 receives a cloud data acquisition request initiated by the vehicle end, the simulation data corresponding to the vehicle end can be retrieved from the system database, and the simulation data is returned to the vehicle end through the vehicle cloud interaction interface.
In an embodiment, when the test device 102 receives the cloud data returned by the vehicle cloud interaction interface, consistency check can be performed on the cloud data and the uploaded test interface data to determine whether the cloud data and the uploaded test interface data are completely consistent.
According to the technical scheme provided by the embodiment of the application, the interface quality test of the vehicle-cloud interaction interface between the vehicle end and the OTA cloud platform in the whole stage can be realized, the accuracy of the vehicle-cloud interaction interface (comprising whether the interface access stage is normal or not and whether the interface return data is normal or not) can be systematically and comprehensively evaluated, the vehicle-cloud interaction interface with quality problems can be timely known and debugged, the probability of error occurrence of the vehicle-end data in the whole OTA flow is greatly reduced, and the success rate and the efficiency of the later OTA upgrading are ensured. The uploading test interface data is constructed by adopting the vehicle-end simulation data and used for testing, so that the uploading test interface data is guaranteed to be the data closest to the real vehicle environment, and the possibility that the OTA later-stage functional test encounters data type mismatch is greatly reduced.
In some embodiments, in the step S201, the vehicle-end simulation data is generated by the simulation system by:
acquiring real vehicle signals and communication network environment information;
creating an analog simulation file according to the real vehicle signals and the communication network environment information;
generating a simulation network topological graph according to the simulation file;
and generating vehicle-end simulation data according to the simulation network topological graph.
Real vehicle signals, including various sensor signals of the real vehicle. Such as a speed sensor signal, a generator status signal, an engine status signal, etc.
The communication network environment information generally refers to a network environment between the vehicle end and the OTA cloud platform, and comprises information such as bandwidth, network speed, network delay and the like.
In one embodiment, the real vehicle signal and the communication network environment information may be extracted from a real vehicle network communication matrix table provided by a manufacturer of the whole vehicle. The real vehicle network communication matrix table can be in the form of an Excel table and comprises message information, signal information and a receiving-transmitting relationship. The message information mainly comprises a message name, a vehicle type, a message identifier, a message type (according to CAN message functions and application scenes, the message type CAN be divided into four types of application messages, network management, diagnosis and development), a message sending type (such as periodic type, event type and periodic event type), message repeated sending times, message length and the like. The signal information mainly includes signal names, signal descriptions (Chinese description of the signal, such as meaning or explanation thereof), signal value tables/truth tables, units of signal values, arrangement form of signals in a message, starting byte sequence numbers of signals in a message data field, data types of signals, and the like. The transceiving relation mainly illustrates a message, a sender and a receiver of a signal.
In one embodiment, a Simulation system of the formulation Setup in CANoe may be used to generate a series of vehicle-side Simulation data based on the real vehicle signal and the communication network environment information. The specific steps are as follows: first, a CANoe simulation project can be created first, and a simulation file (i.e. DBC (Database Can) database file) can be created in the CANoe according to the real vehicle network communication matrix table. The analog simulation file is a file for describing data communication between CAN network nodes, and contains protocol data in CAN bus protocol and represented specific meaning thereof. In short, the simulation file mainly comprises information of which messages are sent out from which nodes and received by which nodes on the CAN network, which signals are carried on the messages.
As an example, the step of creating the simulated simulation file may include: firstly, creating a data table and a signal table; then, the numerical table and the signal table are associated; then, creating a message frame, wherein the content such as clear frame ID, frame type, frame length, transmitting node, transmitting period and the like is required to be defined in the message frame; then, the network node is created again, and the contents such as node names, node addresses and the like are defined.
And then, the created simulation file is imported into CANoe simulation engineering to generate a simulation network topological graph. Wherein the simulated network topology comprises network topology areas between CAN nodes and related nodes connected by the network. For example, the topology area of the network between CAN node 01 and CAN node 02, and the associated nodes (e.g., CAN generators, interactive generators, playback, databases, CAN channels, etc.) connected by the network between CAN node 01 and CAN node 02.
Further, the generated simulation network topology graph CAN be modified according to actual test requirements, such as adding and/or modifying simulation nodes (CAN nodes) and the like. And adding related system variables and simulation control panels according to actual test requirements. And adding a CAPL code into the simulation node to realize the signal logic of the simulation node and complete the simulation of the vehicle bus signal, thereby obtaining a series of vehicle-end simulation data.
In some embodiments, in the step S201, the uploading test interface data is constructed based on the vehicle-end simulation data, including:
acquiring an automatic test case, and configuring a data uploading interface address and cloud data for the automatic test case to acquire an interface address;
and constructing uploading test interface data according to the automatic test case and the vehicle-end simulation data.
Automated test cases, which generally refer to descriptions of test tasks performed on a particular software product, embody test schemes, methods, techniques, and strategies. The main contents of the method comprise case numbers, test targets, test environments, input data, test steps, expected results, actual results and the like, and form a document.
By executing an automated test case, a program path may be tested or verified to meet a particular need.
Corresponding automatic test cases can be written according to different scenes, conditions or event streams passing through products, and corresponding data uploading interface addresses and cloud data acquisition interface addresses are configured for each automatic test case. The written automated test cases may be stored in the test equipment 102.
When the condition for triggering the automated test is met (for example, the testing device 102 receives an operation button for clicking the automated test by a user), the testing device 102 invokes a corresponding automated test case, and extracts corresponding simulation data from the vehicle-end simulation data according to the test target and the input data of the automated test case. And then, the simulation data are packaged into a report message (namely, uploading test interface data) according to a message protocol.
In some embodiments, the step S202 specifically includes:
calling a first function, uploading an interface address and uploading test interface data by the incoming data;
after the communication connection is successfully established based on the data uploading interface address and the vehicle cloud interaction interface, extracting the topic information in the data uploading interface address, and subscribing topic contents corresponding to the topic information;
constructing an uploading information structure body according to the subject content and uploading test interface data;
and uploading the uploading information structure body to a vehicle cloud interaction interface corresponding to the data uploading interface address.
The first function may be the main function (callback function) of python paho-mqtt.
In an embodiment, the test device 102 executes the first external script through the system call function sysExecCmd by calling the first external script built in the first external calling device 103, and uploads the interface address and the main program of two parameters of the test interface data through the main function inlet; then, establishing MQTT connection between the testing device 102 and the vehicle cloud interaction interface according to the data uploading interface address; extracting topic information in the data uploading interface address, and subscribing the topic according to the topic information; and then constructing an MQTT release message structure body (namely an uploading information structure body) according to the subscribed subject matter and uploading test interface data. The uploading information structure body comprises a fixed header (existing in all MQTT data packets and representing the data packet type and the packet type identification of the data packets), a variable header (existing in part of the MQTT data packets, the data type determining whether the variable header exists and the specific content thereof) and a message body (existing in part of the MQTT data packets and representing the specific content received by a receiver). The message body contains CONNECT, SUBSCRIBE, SUBACK, UNSUBSCRIBE four types of messages. The CONNECT, message body content is mainly: the ID of the recipient (e.g., the vehicle end), the topic of the subscription, the message, the user name and the password. SUBSCRIBE, the message body content is a series of topics to SUBSCRIBE to and QoS. The content of the message body is that the server (such as an OTA cloud platform) confirms and replies to the subject and QoS applied by SUBSCRIBE. UNSUBSCRIBE, the message body content is the subject matter to be subscribed to.
After the uploaded information structure body is constructed, the test device 102 calls an MQTT message issuing function to upload the uploaded information structure body to the OTA cloud platform; and receiving a message of subscribing the theme returned by the OTA cloud platform. Then, judging whether the information uploading structure body is consistent with the received message of subscribing the theme returned by the OTA cloud platform, if so, indicating that the data uploading is successful, and returning a script main function to 0; if no data is received or the data is inconsistent, indicating that the data uploading interface fails, returning the script main function to '1'.
In some embodiments, in step S203, a second external script is invoked and executed, and a cloud data acquisition request is initiated to the vehicle cloud interaction interface, including:
calling a second function, and acquiring an interface address by the incoming cloud data;
acquiring a login authentication code for a user to login to an OTA cloud platform;
and generating a cloud data acquisition request based on the login authentication code, and sending the cloud data acquisition request to the vehicle cloud interaction interface.
The second function may be the master function of a third party library of requests written in the python language.
In order to ensure that the uploaded data can enter a system database of the OTA cloud platform, the testing device 102 can wait for 3 seconds and then execute a second external script by calling a second external script built in the second external calling device 104 and a system calling function sysExeccmd, and the interface address is acquired by transmitting cloud data through a main function inlet; then, processing login authentication of a user logging in an OTA cloud platform, obtaining a token authentication code and adding an http request header; according to the cloud data acquisition interface address and the http request header, a cloud data acquisition request (http-get request) is initiated to the OTA cloud platform, namely the cloud data acquisition request is sent to the vehicle cloud interaction interface. And then, receiving cloud data returned by the vehicle cloud interaction interface.
In some embodiments, in the step S204, the cloud data is obtained by the vehicle-cloud interaction interface through the following steps:
acquiring an interface address according to cloud data, and determining an internal interface of a cloud database;
sending a cloud data acquisition request to an internal interface of a cloud database;
and receiving cloud data returned by an internal interface of the cloud database.
When the cloud interaction interface receives a cloud data acquisition request, the cloud interaction interface can determine the internal interface of the cloud database corresponding to the cloud data acquisition interface address according to the cloud data acquisition interface address in the cloud data acquisition request. Typically, one cloud data acquisition interface address corresponds to one cloud database internal interface. Then, the cloud interaction interface can send a cloud data acquisition request to the cloud database internal interface, wherein the cloud data acquisition request comprises a vehicle-end unique identification code, and the cloud database internal interface can find corresponding cloud data through the vehicle-end unique identification code and return the cloud data to the cloud interaction interface. The cloud interaction interface returns the cloud data to the testing device 102.
In some embodiments, in the step S204, the checking the cloud data and the uploading test interface data to obtain a checking result, and completing the test on the vehicle cloud interaction interface includes:
acquiring a test report template, wherein the test report template comprises data filling details and data filling requirements;
and generating an interface test report and outputting the report based on the interface return value, the verification result, the data filling detail and the data filling requirement, so as to finish the test of the vehicle cloud interaction interface.
The data filling details comprise test targets, interface names, interface IDs, interface return values, verification results and the like.
The data filling requirements mainly refer to filling requirements of various contents in the data filling details, for example, the filling requirements of the test targets can be Chinese description, the filling requirements of the interface names can be Chinese or English description, the filling requirements of the interface IDs can be appointed character types as numbers and the like.
After receiving cloud data returned by the vehicle cloud interaction interface, the testing device 102 acquires a testing report template, fills corresponding content in the testing report template according to the interface return value, the verification result, the data filling detail and the data filling requirement, and generates and outputs an interface testing report.
According to the technical scheme provided by the embodiment of the application, the python script (the first external script and the second external script) is called in the process of realizing the automatic test case by using the CAPL code, so that the interface can be more conveniently and rapidly accessed and acquired, and the efficiency of the test can be improved. The CANoe test device organizes and executes the automatic test cases to form a detailed test report and outputs the test report, so that the time for independently writing the test report after the test is completed can be reduced.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 3 is a schematic diagram of a vehicle cloud interaction interface testing device provided by an embodiment of the application. As shown in fig. 3, the vehicle cloud interaction interface testing device includes:
the acquisition module 301 is configured to acquire vehicle-end simulation data, and construct uploading test interface data based on the vehicle-end simulation data, where the uploading test interface data includes a data uploading interface address and a cloud data acquisition interface address;
the first calling module 302 is configured to call and execute a first external script, and upload the data of the uploading test interface to the vehicle cloud interaction interface corresponding to the data uploading interface address;
the second calling module 303 is configured to call and execute a second external script if an interface return value returned by the vehicle cloud interaction interface is received, and initiate a cloud data acquisition request to the vehicle cloud interaction interface, where the cloud data acquisition request includes a cloud data acquisition interface address;
the receiving module 304 is configured to receive cloud data returned by the vehicle cloud interaction interface, and verify the cloud data with the uploaded test interface data to obtain a verification result, thereby completing the test on the vehicle cloud interaction interface.
According to the technical scheme provided by the embodiment of the application, the interface quality test of the vehicle-cloud interaction interface between the vehicle end and the OTA cloud platform in the whole stage can be realized, the accuracy of the vehicle-cloud interaction interface (comprising whether the interface access stage is normal or not and whether the interface return data is normal or not) can be systematically and comprehensively evaluated, the vehicle-cloud interaction interface with quality problems can be timely known and debugged, the probability of error occurrence of the vehicle-end data in the whole OTA flow is greatly reduced, and the success rate and the efficiency of the later OTA upgrading are ensured. The uploading test interface data is constructed by adopting the vehicle-end simulation data and used for testing, so that the uploading test interface data is guaranteed to be the data closest to the real vehicle environment, and the possibility that the OTA later-stage functional test encounters data type mismatch is greatly reduced.
In some embodiments, the vehicle-side simulation data is generated by a simulation system by:
acquiring real vehicle signals and communication network environment information;
creating an analog simulation file according to the real vehicle signals and the communication network environment information;
generating a simulation network topological graph according to the simulation file;
and generating vehicle-end simulation data according to the simulation network topological graph.
In some embodiments, the acquiring module 301 includes:
the acquisition unit is configured to acquire an automatic test case, and to configure a data uploading interface address and a cloud data acquisition interface address for the automatic test case;
the construction unit is configured to construct uploading test interface data according to the automatic test case and the vehicle-end simulation data.
In some embodiments, the first calling module 302 includes:
the first calling unit is configured to call a first function, upload an interface address of incoming data and upload test interface data;
the extraction unit is configured to extract the topic information in the data uploading interface address and subscribe the topic content corresponding to the topic information after the communication connection is successfully established based on the data uploading interface address and the vehicle cloud interaction interface;
a message construction unit configured to construct an uploaded information structure according to the subject content and the uploaded test interface data;
and the uploading unit is configured to upload the uploading information structure body to the vehicle cloud interaction interface corresponding to the data uploading interface address.
In some embodiments, the second invoking module 303 includes:
the first calling unit is configured to call a second function, and the input cloud data obtains an interface address;
the authentication code acquisition unit is configured to acquire a login authentication code for a user to login to the OTA cloud platform;
the sending unit is configured to generate a cloud data acquisition request based on the login authentication code and send the cloud data acquisition request to the vehicle cloud interaction interface.
In some embodiments, the cloud data is obtained by the vehicle cloud interaction interface through the following steps:
acquiring an interface address according to cloud data, and determining an internal interface of a cloud database;
sending a cloud data acquisition request to an internal interface of a cloud database;
and receiving cloud data returned by an internal interface of the cloud database.
In some embodiments, the receiving module 304 includes:
a template acquisition unit configured to acquire a test report template including a data filling specification and a data filling requirement;
the report generating unit is configured to generate and output an interface test report based on the interface return value, the verification result, the data filling detail and the data filling requirement, and complete the test of the vehicle cloud interaction interface.
According to the technical scheme provided by the embodiment of the application, the python script (the first external script and the second external script) is called in the process of realizing the automatic test case by using the CAPL code, so that the interface can be more conveniently and rapidly accessed and acquired, and the efficiency of the test can be improved. The CANoe test device organizes and executes the automatic test cases to form a detailed test report and outputs the test report, so that the time for independently writing the test report after the test is completed can be reduced.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Fig. 4 is a schematic diagram of an electronic device 4 according to an embodiment of the present application. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: a processor 401, a memory 402 and a computer program 403 stored in the memory 402 and executable on the processor 401. The steps of the various method embodiments described above are implemented by processor 401 when executing computer program 403. Alternatively, the processor 401, when executing the computer program 403, performs the functions of the modules/units in the above-described apparatus embodiments.
The electronic device 4 may be a desktop computer, a notebook computer, a palm computer, a cloud server, or the like. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. It will be appreciated by those skilled in the art that fig. 4 is merely an example of the electronic device 4 and is not limiting of the electronic device 4 and may include more or fewer components than shown, or different components.
The processor 401 may be a central processing unit (Central Processing Unit, CPU) or other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like.
The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or a memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the electronic device 4. Memory 402 may also include both internal storage units and external storage devices of electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, and the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. The computer program may comprise computer program code, which may be in source code form, object code form, executable file or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the content of the computer readable medium can be appropriately increased or decreased according to the requirements of the jurisdiction's jurisdiction and the patent practice, for example, in some jurisdictions, the computer readable medium does not include electrical carrier signals and telecommunication signals according to the jurisdiction and the patent practice.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. The vehicle cloud interaction interface testing method is characterized by comprising the following steps of:
acquiring vehicle-end simulation data, and constructing uploading test interface data based on the vehicle-end simulation data, wherein the uploading test interface data comprises a data uploading interface address and a cloud data acquisition interface address;
calling and executing a first external script, and uploading the uploading test interface data to a vehicle cloud interaction interface corresponding to the data uploading interface address;
if an interface return value returned by the vehicle cloud interaction interface is received, a second external script is called and executed, and a cloud data acquisition request is initiated to the vehicle cloud interaction interface, wherein the cloud data acquisition request comprises the cloud data acquisition interface address;
and receiving cloud data returned by the vehicle cloud interaction interface, and checking the cloud data and the uploading test interface data to obtain a checking result, thereby completing the test of the vehicle cloud interaction interface.
2. The method of claim 1, wherein the vehicle-side simulation data is generated by a simulation system by:
acquiring real vehicle signals and communication network environment information;
creating an analog simulation file according to the real vehicle signals and the communication network environment information;
generating a simulation network topological graph according to the simulation file;
and generating vehicle-end simulation data according to the simulation network topological graph.
3. The method of claim 1, wherein constructing upload test interface data based on the vehicle-side simulation data comprises:
acquiring an automatic test case, and configuring an interface address for data uploading and cloud data acquisition of the automatic test case;
and constructing uploading test interface data according to the automatic test case and the vehicle-end simulation data.
4. The method of claim 1, wherein invoking and executing a first external script to upload the upload test interface data to a vehicle cloud interface corresponding to the data upload interface address comprises:
calling a first function, and uploading the data uploading interface address and uploading test interface data;
after the communication connection is successfully established based on the data uploading interface address and the vehicle cloud interaction interface, extracting the topic information in the data uploading interface address, and subscribing topic contents corresponding to the topic information;
constructing an uploading information structure body according to the subject content and the uploading test interface data;
and uploading the uploading information structure body to a vehicle cloud interaction interface corresponding to the data uploading interface address.
5. The method of claim 1, wherein invoking and executing a second external script initiates a cloud data acquisition request to the vehicle cloud interaction interface, comprising:
calling a second function, and transmitting the second function into the cloud data to acquire an interface address;
acquiring a login authentication code for a user to login to an OTA cloud platform;
generating a cloud data acquisition request based on the login authentication code, and sending the cloud data acquisition request to the vehicle cloud interaction interface.
6. The method of claim 1, wherein the cloud data is obtained by the vehicle cloud interaction interface through the following steps:
acquiring an interface address according to the cloud data, and determining an internal interface of a cloud database;
sending the cloud data acquisition request to an internal interface of the cloud database;
and receiving cloud data returned by the internal interface of the cloud database.
7. The method of claim 1, wherein verifying the cloud data and the uploaded test interface data to obtain a verification result, and completing the test for the vehicle cloud interaction interface, comprises:
acquiring a test report template, wherein the test report template comprises data filling details and data filling requirements;
and generating an interface test report and outputting the interface test report based on the interface return value, the verification result, the data filling detail and the data filling requirement, so as to finish the test of the vehicle cloud interaction interface.
8. The vehicle cloud interaction interface testing device is characterized by comprising:
the system comprises an acquisition module, a data processing module and a data processing module, wherein the acquisition module is configured to acquire vehicle-end simulation data and construct uploading test interface data based on the vehicle-end simulation data, and the uploading test interface data comprises a data uploading interface address and a cloud data acquisition interface address;
the first calling module is configured to call and execute a first external script, and upload the uploading test interface data to a vehicle cloud interaction interface corresponding to the data uploading interface address;
the second calling module is configured to call and execute a second external script if an interface return value returned by the vehicle cloud interaction interface is received, and initiate a cloud data acquisition request to the vehicle cloud interaction interface, wherein the cloud data acquisition request comprises the cloud data acquisition interface address;
the receiving module is configured to receive cloud data returned by the vehicle cloud interaction interface, check the cloud data with the uploading test interface data to obtain a check result, and complete the test of the vehicle cloud interaction interface.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 7.
CN202310606959.9A 2023-05-26 2023-05-26 Vehicle cloud interaction interface testing method and device, electronic equipment and storage medium Pending CN116610580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310606959.9A CN116610580A (en) 2023-05-26 2023-05-26 Vehicle cloud interaction interface testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310606959.9A CN116610580A (en) 2023-05-26 2023-05-26 Vehicle cloud interaction interface testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116610580A true CN116610580A (en) 2023-08-18

Family

ID=87683305

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310606959.9A Pending CN116610580A (en) 2023-05-26 2023-05-26 Vehicle cloud interaction interface testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116610580A (en)

Similar Documents

Publication Publication Date Title
CN112988485B (en) Simulation test method and device for electric power Internet of things equipment
CN111694757B (en) Application program testing method and device, electronic equipment and computer readable storage medium
CN111177112A (en) Database blocking method and device based on operation and maintenance management system and electronic equipment
CN110046091B (en) Automatic test method and device
CN113360301B (en) Message transmission system and method
CN109783357A (en) The method and device of test application program, computer equipment, storage medium
CN115542875A (en) Vehicle detection method based on SOA service and related equipment
CN113342503B (en) Real-time progress feedback method, device, equipment and storage medium
CN110764983A (en) Test method, device, medium and electronic equipment
CN114363225A (en) MTQQ protocol-based device debugging mode, system and storage medium
CN109308257A (en) Test assignment executes method, apparatus, electronic equipment and computer storage medium
CN116700907B (en) Service call demand document storage method, device, electronic equipment and readable medium
CN116610580A (en) Vehicle cloud interaction interface testing method and device, electronic equipment and storage medium
CN111404897A (en) Message distribution method and device, storage medium and electronic equipment
CN110913406B (en) Access configuration method and device of RCS test server
CN115396501B (en) Information processing method and device, electronic equipment and readable storage medium
CN114050909B (en) Exercise method, system and electronic equipment for simulating mail
CN115174245A (en) Test method and system based on DoIP protocol detection
CN112948195A (en) Interface testing method and device, electronic equipment and storage medium
CN115695233B (en) Link testing device, method, electronic equipment and computer program product
CN112671822B (en) Service request processing method, device, storage medium, server and system
CN111786842A (en) Data processing method and hardware-in-the-loop test system
CN116828522A (en) Test method, test device, electronic equipment and computer readable storage medium
CN118034243A (en) Automatic test method and device for real vehicle
CN117609344A (en) Data processing method, device, system, apparatus, medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240117

Address after: No. 13 Xingxiang Road, Zengjia Town, High tech Zone, Shapingba District, Chongqing, 400039

Applicant after: Chongqing Selis Phoenix Intelligent Innovation Technology Co.,Ltd.

Address before: 610095 No. 2901, floor 29, unit 1, building 1, No. 151, Tianfu Second Street, high tech Zone, China (Sichuan) pilot Free Trade Zone, Chengdu, Sichuan Province

Applicant before: Chengdu Thalys Technology Co.,Ltd.