CN117041111A - Vehicle cloud function test method and device, electronic equipment and storage medium - Google Patents

Vehicle cloud function test method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117041111A
CN117041111A CN202310923564.1A CN202310923564A CN117041111A CN 117041111 A CN117041111 A CN 117041111A CN 202310923564 A CN202310923564 A CN 202310923564A CN 117041111 A CN117041111 A CN 117041111A
Authority
CN
China
Prior art keywords
vehicle
test
interface
cloud function
function test
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
CN202310923564.1A
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.)
Zero Beam Technology Co ltd
Original Assignee
Zero Beam 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 Zero Beam Technology Co ltd filed Critical Zero Beam Technology Co ltd
Priority to CN202310923564.1A priority Critical patent/CN117041111A/en
Publication of CN117041111A publication Critical patent/CN117041111A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The application provides a vehicle cloud function test method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a vehicle cloud function test configuration file, generating a vehicle cloud function test code according to the vehicle cloud function test configuration file, and determining a test interface, an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code; the cloud function test code of the running vehicle sends a network request to the vehicle, a test interface is called according to an interface address through a service code in the vehicle to carry out service test, a test result is obtained, and the test result is sent to the first electronic equipment; and generating feedback information according to the test result and the response type, and sending the feedback information to the vehicle so that the vehicle generates a test log and sends the test log to the first electronic equipment. The method has the advantages of simplifying script development work, improving scene coverage, reducing configuration complexity of a test environment, decoupling test and cloud, and solving the problems of low test efficiency, high cost and small scene coverage of vehicle cloud functions.

Description

Vehicle cloud function test method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of testing technologies, and in particular, to a vehicle cloud function testing method, device, electronic apparatus, and storage medium.
Background
With the update of vehicle functions and the development and maturity of vehicle networking technologies, a vehicle-cloud integrated architecture is generated. The vehicle cloud integrated architecture performs high abstraction, fusion and mutual coordination on the vehicle cloud capability. Further, vehicle cloud functions for interaction based on the vehicle cloud abstract service are more and more, and corresponding vehicle cloud interaction interfaces and vehicle cloud interaction logic are more and more complex. In order to ensure normal use of the vehicle cloud function of the vehicle, the vehicle cloud function needs to be tested before the vehicle cloud function is put into use. Taking the vehicle cloud interface interaction anomaly test as an example, the existing test vehicle cloud function method is to build test services in the cloud, test the built services according to a specified test mode, and has the problems of low vehicle cloud function test efficiency, high cost and small scene coverage.
Disclosure of Invention
The application provides a vehicle cloud function testing method, device, electronic equipment and storage medium, and aims to solve the problems of low vehicle cloud function testing efficiency, high cost and insufficient scene coverage in the prior art when a cloud is used for testing business construction and a specified testing mode is used for testing.
In order to solve the above technical problem, in a first aspect, an embodiment of the present application provides a vehicle cloud function testing method, which is applied to a first electronic device, and the method includes: acquiring a vehicle cloud function test configuration file, wherein the vehicle cloud function test configuration file comprises related data in a vehicle cloud function test process; generating a vehicle cloud function test code according to the vehicle cloud function test configuration file, wherein the vehicle cloud function test code is a code for testing a vehicle cloud interaction function under a target abnormal scene; determining a test interface, an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code; running a cloud function test code, enabling the cloud function test code to call a communication interface between the first electronic device and the vehicle, sending a network request to the vehicle, enabling the vehicle to respond to the network request, calling the test interface according to an interface address through a service code in the vehicle to conduct service test to obtain a test result, and sending the test result to the first electronic device, wherein the network request comprises the interface address; generating feedback information according to the test result and the response type, and sending the feedback information to the vehicle, so that the vehicle responds to the feedback information to generate a test log, and sending the test log to the first electronic equipment, wherein the test log is a log related to the state of the vehicle; and receiving a test log sent by the vehicle.
In the implementation mode, a first electronic device generates a vehicle cloud function test code for testing a vehicle cloud interaction function in a target abnormal scene according to a vehicle cloud function test configuration file by acquiring the vehicle cloud function test configuration file comprising relevant data in a vehicle cloud function test process, determines a test interface, an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code, operates the vehicle cloud function test code, sends a network request to a vehicle, invokes the test interface according to the interface address through a service code in the vehicle to conduct service test to obtain a test result, generates feedback information according to the test result and the response type, and sends the feedback information to the vehicle so that the vehicle responds to the feedback information to generate a test log, and sends the test log to the first electronic device, wherein the test log is a log related to the state of the vehicle. Therefore, in the vehicle cloud function test process, according to the acquired vehicle cloud function test configuration file, a test script is automatically written to generate a vehicle cloud function test code, and the test service does not need to be built in the cloud in advance, so that development work of the test script is simplified, the test efficiency of the vehicle cloud function is improved, and the cost is reduced; furthermore, the vehicle cloud function testing method provided by the implementation mode of the application can simulate the interface interaction abnormal scene, reduce the complexity of the test environment configuration and further improve the test efficiency of the vehicle cloud function. And moreover, the vehicle cloud function test is performed based on the vehicle cloud function test configuration file, so that more scenes can be covered, and the problems of low vehicle cloud function test efficiency, high cost and small scene coverage are solved. Finally, through the received test logs sent by the vehicle, the corresponding relevant states of the vehicle in an abnormal scene can be effectively detected, whether the vehicle is abnormal or accords with the expected robustness is judged, and the vehicle cloud function of the vehicle is tested efficiently and at low cost.
In one possible implementation of the first aspect, generating a vehicle cloud function test code according to a vehicle cloud function test configuration file includes: generating an initial vehicle cloud function test code corresponding to the target abnormal scene according to the vehicle cloud function test configuration file; and receiving adjustment operation of a user on the initial vehicle cloud function test code, and responding to the adjustment operation to generate the vehicle cloud function test code.
In the implementation mode, the initial vehicle cloud function test code corresponding to the target abnormal scene is generated through the vehicle cloud function test configuration file, so that development work of a test script is simplified; meanwhile, staff can perfect and optimize the initial cloud function test codes as required, so that the integrity and flexibility of the test script are improved, and the test efficiency is improved.
In one possible implementation of the first aspect, the running the cloud function test code, so that the cloud function test code invokes a communication interface between the first electronic device and the vehicle, sends a network request to the vehicle, includes: transmitting a network request to a domain controller of the vehicle through a local ethernet of the vehicle; or the network request is sent to a vehicle-cloud integrated interface management platform corresponding to the vehicle, and the vehicle-cloud integrated interface management platform is sent to a domain controller of the vehicle.
In the implementation manner of the present application, the domain controller that sends the network request to the vehicle may send through two paths: the vehicle cloud testing capability is realized by sending the vehicle cloud testing capability through the local Ethernet of the vehicle; or the test information is firstly sent to a vehicle-cloud integrated interface management platform corresponding to the vehicle and then sent by the vehicle-cloud integrated interface management platform, so that the online vehicle-cloud testing capability can be realized.
In one possible implementation manner of the first aspect, determining, according to the cloud function test code, a test interface, and an interface address and a response type corresponding to the test interface includes: generating a simulation test interface according to the vehicle cloud function test code; detecting the state of the simulation test interface through the local Ethernet of the vehicle; and under the condition that the state of the simulation test interface meets the first preset state, determining the test interface, and an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code.
In the implementation mode of the application, the simulation test interface is generated according to the vehicle cloud function test code, the state of the simulation test interface is further determined, and the test interface, the interface address and the response type corresponding to the test interface are determined according to the vehicle cloud function test code under the condition that the state of the simulation test interface meets the first preset state, so that the simulation of the test interface is realized, the state of the simulation test interface can meet the test requirement, the complexity of the configuration of the test environment is reduced, and the test efficiency of the vehicle cloud function is further improved.
In one possible implementation manner of the first aspect, before determining, according to the cloud function test code, the test interface, and the interface address and the response type corresponding to the test interface, the method further includes: generating a corresponding cloud address configuration file according to preset cloud address configuration information; pushing the cloud address configuration file into a preset position through a serial port or a secure shell protocol, and restarting the test environment.
In the implementation mode of the application, a corresponding cloud address configuration file is generated according to preset cloud address configuration information so as to reconfigure a vehicle to be tested; pushing the cloud address profile into a preset location and restarting the test environment to ensure that the cloud address profile is valid in the vehicle.
In one possible implementation of the first aspect described above, the response types include positive response, negative response, and no response. Therefore, various response types can be tested, and the whole coverage of the interaction anomaly test of the vehicle cloud interface is realized.
In a possible implementation of the first aspect, the method further includes: and sending the test log to the second electronic equipment of the user. Therefore, the test logs can be stored and checked, the subsequent analysis of the test logs is facilitated, and the robustness expectation of the vehicle is further obtained.
In a second aspect, an embodiment of the present application provides a vehicle cloud function testing apparatus, configured to execute the vehicle cloud function testing method of the first aspect, including: the first processing module is used for acquiring a vehicle cloud function test configuration file, wherein the vehicle cloud function test configuration file comprises related data in a vehicle cloud function test process; the second processing module is used for generating vehicle cloud function test codes according to the vehicle cloud function test configuration file, wherein the vehicle cloud function test codes are codes for testing vehicle cloud interaction functions under a target abnormal scene; the third processing module is used for determining a test interface, an interface address corresponding to the test interface and a response type according to the vehicle cloud function test code; the fourth processing module is used for running the cloud function test code, enabling the cloud function test code to call a communication interface between the first electronic device and the vehicle, sending a network request to the vehicle, enabling the vehicle to respond to the network request, calling the test interface according to an interface address through a service code in the vehicle to conduct service test, obtaining a test result, and sending the test result to the first electronic device, wherein the network request comprises the interface address; the fifth processing module is used for generating feedback information according to the test result and the response type, and sending the feedback information to the vehicle so that the vehicle responds to the feedback information to generate a test log, and sending the test log to the first electronic equipment, wherein the test log is a log related to the state of the vehicle; and the sixth processing module is used for receiving the test log sent by the vehicle.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory for storing a computer program, the computer program comprising program instructions; and a processor, configured to execute program instructions to cause the electronic device to execute the vehicle cloud function testing method provided in the first aspect and/or any one of the possible implementation manners of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium storing a computer program comprising program instructions that are executed by an electronic device to cause performance of the vehicle cloud function test method provided by the first aspect and/or any one of the possible implementations of the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program/instruction, which when executed by a processor implements the vehicle cloud function testing method provided by the first aspect and/or any one of the possible implementation manners of the first aspect.
It will be appreciated that the advantages of the second to fifth aspects may also be referred to in the description of the first aspect, and will not be repeated here.
The application has the beneficial effects that: in the vehicle cloud function test process, test services do not need to be built in the cloud in advance, and cost is reduced; according to the acquired cloud function test configuration file, automatically writing a test script to generate a cloud function test code, so that development work of the test script is simplified, and the test efficiency of the cloud function is improved; the interface interaction abnormal scene can be simulated, the complexity of the test environment configuration is reduced, the test efficiency of the vehicle cloud function is further improved, the vehicle cloud function is tested based on the vehicle cloud function test configuration file, more scenes can be covered, and the problems of low test efficiency, high cost and small scene coverage of the vehicle cloud function are solved. Finally, through the received test logs sent by the vehicle, the corresponding relevant states of the vehicle in an abnormal scene can be effectively detected, whether the vehicle is abnormal or accords with the expected robustness is judged, and the vehicle cloud function of the vehicle is tested efficiently and at low cost.
Drawings
In order to more clearly illustrate the technical solution of the present application, the following description will briefly explain the drawings used in the description of the embodiments.
FIG. 1 is a flow diagram illustrating a vehicle cloud function test method, according to some implementations of the application;
FIG. 2 is a flow diagram illustrating another vehicle cloud function test method, according to some implementations of the application;
FIG. 3 is a schematic diagram illustrating the generation of a scenario script from a vehicle cloud functional test profile, according to some implementations of the application;
FIG. 4 is a flow diagram illustrating another vehicle cloud function test method, according to some implementations of the application;
FIG. 5 is a flow diagram illustrating another vehicle cloud function test method, according to some implementations of the application;
FIG. 6 is a schematic diagram illustrating a vehicle cloud function test method, according to some implementations of the application;
FIG. 7 is a schematic diagram illustrating a configuration of an electronic device and a vehicle, according to some implementations of the application;
FIG. 8 is a schematic diagram illustrating another electronic device and vehicle configuration, according to some implementations of the application;
FIG. 9 is a schematic diagram illustrating a configuration of a vehicle cloud functional testing apparatus, according to some implementations of the application;
fig. 10 is a schematic diagram illustrating a hardware architecture of an electronic device, according to some implementations of the application.
Detailed Description
The technical scheme of the application will be described in further detail with reference to the accompanying drawings.
As described above, in order to ensure normal use of the vehicle cloud function of the vehicle, the vehicle cloud function needs to be tested before the vehicle cloud function of the vehicle is put into use. However, in the existing method for testing the cloud function of the vehicle, test service construction is performed on the cloud, and tests are performed according to the constructed service and a specified test mode, so that the problems of low testing efficiency, high cost and small scene coverage of the cloud function exist.
Taking the vehicle cloud interface interaction anomaly test as an example, because test services are built in the cloud in advance, a real vehicle or Hardware in-Loop (HIL) rack is difficult to realize sufficient vehicle cloud interface interaction anomaly test, and blocking and anomaly simulation are difficult to perform on any part in an interaction flow. And because the development period of the cloud server is different from that of the test module of the vehicle, when the overall function test of the vehicle cloud is seriously dependent on the software logic of the test service built by the cloud, the vehicle is difficult to be completely matched with the cloud system. Therefore, the vehicle-end testing efficiency is reduced, the risk of vehicle software in time is increased, and the cost on cloud server resources is increased. Further, because the interaction logic of the vehicle cloud functions is complex, different vehicle cloud functions correspond to different test interfaces. The existing test service aims at the software test of a single interface, and cannot fully cover all scenes of the vehicle cloud function test.
Based on the method, the application provides a vehicle cloud function test method, which can acquire the configuration file related to the communication description content of the vehicle cloud function test and generate codes of the test vehicle cloud interaction function under the target abnormal scene according to the configuration file, thereby simplifying the development work of the test script; according to the cloud function test codes, the test interfaces, interface addresses and response types corresponding to the test interfaces are determined, and network requests for carrying out cloud function test are sent to the vehicle, so that the cloud interface interaction anomaly simulation is realized, the complexity of test environment configuration is reduced, further, the test service does not need to rely on cloud system cooperation, the cloud interface interaction anomaly test efficiency is improved, and the cost is reduced.
Next, with reference to fig. 1 to 5, the implementation process and advantages of the vehicle cloud function test method of the present application will be described in detail.
Referring to fig. 1, a vehicle cloud function test method applied to an electronic device (as an example of a first electronic device) includes the following steps:
s100: acquiring a vehicle cloud function test configuration file, wherein the vehicle cloud function test configuration file comprises related data in a vehicle cloud function test process.
S200: and generating a vehicle cloud function test code according to the vehicle cloud function test configuration file, wherein the vehicle cloud function test code is a code for testing the vehicle cloud interaction function under the target abnormal scene.
S300: and determining a test interface, an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code.
S400: and running the cloud function test code, enabling the cloud function test code to call a communication interface between the first electronic device and the vehicle, sending a network request to the vehicle, enabling the vehicle to respond to the network request, calling the test interface according to an interface address through a service code in the vehicle to conduct service test, obtaining a test result, and sending the test result to the first electronic device. Wherein the network request includes an interface address.
S500: and generating feedback information according to the test result and the response type, and sending the feedback information to the vehicle, so that the vehicle responds to the feedback information to generate a test log and sends the test log to the first electronic equipment. The test log is a log related to the state of the vehicle.
S600: and receiving a test log sent by the vehicle.
According to the vehicle cloud function testing method, in the vehicle cloud function testing process, the test script is automatically written according to the acquired vehicle cloud function testing configuration file to generate the vehicle cloud function testing code, and the test service does not need to be built in the cloud in advance, so that development work of the test script is simplified, testing efficiency of the vehicle cloud function is improved, and cost is reduced; furthermore, the vehicle cloud function testing method provided by the implementation mode of the application can simulate the interface interaction abnormal scene, reduce the complexity of the test environment configuration and further improve the test efficiency of the vehicle cloud function. And moreover, the vehicle cloud function test is performed based on the vehicle cloud function test configuration file, so that more scenes can be covered, and the problems of low vehicle cloud function test efficiency, high cost and small scene coverage are solved. Finally, through the received test logs sent by the vehicle, the corresponding relevant states of the vehicle in an abnormal scene can be effectively detected, whether the vehicle is abnormal or accords with the expected robustness is judged, and the vehicle cloud function of the vehicle is tested efficiently and at low cost.
S100-S600 are further described below:
in step S100, the vehicle cloud function test configuration file is formed by sorting and writing file contents related to communication description contents according to the requirement of the vehicle cloud interface interaction anomaly test by a user, and submitted to the electronic device.
The vehicle cloud function test configuration file can comprise information such as related data, data types, interface types, related protocols, descriptions of abnormal scenes and the like in the vehicle cloud function test process. And the user configures a vehicle cloud function test configuration file according to the vehicle cloud interface interaction abnormal test requirement and submits the configuration file to the electronic equipment.
In S200, the electronic device automatically generates a vehicle cloud function test code according to the vehicle cloud function test configuration file acquired in S100, where the vehicle cloud function test code is a code for testing interaction abnormality of the vehicle cloud interface, and the vehicle cloud function test code can implement testing of the interaction function of the vehicle cloud interface in an abnormal scenario.
In the existing vehicle cloud interface interaction anomaly test, the test requirement is usually required to be converted into a test case in a manual mode; when the test cases are compiled, related data, interfaces and the like and the test cases cannot be flexibly and alternately compiled, so that the compiling efficiency of the interface abnormal test cases is low.
The electronic equipment automatically generates the vehicle cloud function test codes according to the acquired vehicle cloud function test configuration files, realizes automatic writing of test scripts and generation of the vehicle cloud function test codes, thereby simplifying development work of the test scripts, ensuring that related data, interfaces and test cases are not limited by configuration test environments, flexibly arranging, and improving scene coverage.
However, the code of the test vehicle cloud interface interaction abnormality generated according to the acquired vehicle cloud function test configuration file sometimes needs to be optimized and finely adjusted by a test engineer to be more complete and feasible. Therefore, in one implementation of the present application, as shown in fig. 2, in step S200, a vehicle cloud function test code is generated according to a vehicle cloud function test configuration file, and the specific steps include:
s210, generating an initial vehicle cloud function test code of the target abnormal scene according to the vehicle cloud function test configuration file.
S220, receiving adjustment operation of a user on the initial vehicle cloud function test code, and generating the vehicle cloud function test code.
In step S210, after the electronic device obtains the cloud function test configuration file submitted by the user, the electronic device may automatically generate an initial cloud function test code (also referred to as a scene script template, a script template, etc. of the cloud interface interaction anomaly test, hereinafter referred to as a scene script) of the target anomaly scene according to the content such as related data, interfaces, related protocols, scenes, etc. in the file. The method for automatically generating the test script according to the configuration file has mature and wide application in other tests, and is not particularly limited.
Further, as shown in fig. 3, in step 220, after generating the scenario script of the target abnormal scenario of the Che Yun interface interaction abnormal test, the user may modify (i.e. fine tune) the operation parameters, related data, etc. in the scenario script according to the actual test requirement, and then generate the modified scenario script (i.e. the cloud function test code). Of course, the electronic device can also directly generate the scene script according to the vehicle cloud function test configuration file for testing the vehicle cloud function.
It can be understood that, in this implementation manner, the vehicle cloud function test is described by taking the vehicle cloud interface interaction anomaly test as an example, so that the vehicle cloud function test code in this implementation manner is the vehicle cloud interface interaction anomaly test code.
The vehicle cloud interface interaction abnormality test code generated by the electronic equipment comprises a test interface for performing vehicle cloud interface interaction abnormality test, an interface address corresponding to the test interface and relevant information of response types of all interface addresses required to be tested. The interface address corresponding to the test interface is a URL interface address.
It will be appreciated that the vehicle cloud interface interaction anomaly test code may include test scripts, may be packaged in the form of an Application (APP), or may be in other forms, as just an example. The following describes a vehicle cloud interface interaction anomaly test code in the form of a script, that is, the electronic device generates a scene script according to a vehicle cloud function test configuration file submitted by a user. The electronic equipment can generate only one scene script according to the current test requirement and a cloud function test configuration file submitted by a user to perform the current test; the user can also provide a plurality of cloud function test configuration files to cover as many different scenes as possible, the electronic device generates a plurality of different scene scripts according to the cloud function test configuration files submitted by the user, so that before the subsequent test, the cloud function test configuration files are not required to be submitted again to generate the scene scripts, only one scene script meeting the current test requirement is required to be selected from the different scene scripts generated by the previous electronic device, and is used after being properly regulated or directly used, namely, the steps S100-S200 are required to be executed when the cloud function test method is used for the first time, and before the subsequent test is carried out, the steps S100-S200 can be selected to be skipped or re-executed according to actual needs, so that the preset or customized cloud interaction abnormal scene is automatically called.
Or, the description information about a plurality of abnormal scenes can be added in the same vehicle cloud function test configuration file, so that the electronic device can generate scene scripts corresponding to the plurality of abnormal scenes through one vehicle cloud function test configuration file, and in the subsequent process of executing the vehicle cloud interaction function test, the plurality of scene scripts are executed according to a preset mode. For example, the execution order of the plurality of scenario scripts is determined in order of execution or in a certain priority order. In the process, the electronic equipment can ensure that each scene script is executed at least once, the scene scripts modified for the same resource can not collide, mutually isolated environments can be provided for different abnormal scripts, and running is guaranteed not to be interfered or influenced.
In step S300, because the cloud interface interaction anomaly test code generated by the electronic device includes the test interface, the interface address corresponding to the test interface, and the relevant information of the response type of each interface address required to be tested, before the test is formally started, the test interface, the interface address corresponding to the test interface, and the response type of each interface address required to be tested are determined and prepared according to the above information, so that the test interface, the interface address corresponding to the test interface, and the response type of each interface address required to be tested can meet the test requirement.
In one implementation of the present application, the response type may be various response types in practical applications, including: positive response, negative response and no response, thereby simulating various responses which occur in practice and improving the coverage of the test.
Specifically, the response types corresponding to the test interfaces are different, and the corresponding generated feedback information is also different, for example, a positive response can be that the server has successfully processed the request, and information of successfully processing the request or information of unsuccessfully processing the request is fed back; the negative response may be a request being denied by the server or a web page being unavailable to the server; the no-response may occur over time, etc. when the server waits for a request.
As shown in fig. 4, in an implementation manner of the present application, for the step S300, according to the cloud function test code, a test interface, and an interface address and a response type corresponding to the test interface are determined, including the following steps:
s311, generating a simulation test interface according to the vehicle cloud function test codes.
S312, detecting the state of the simulation test interface through the local Ethernet of the vehicle.
S313, under the condition that the state of the simulation test interface meets the first preset state, determining the test interface, an interface address corresponding to the test interface and a response type according to the vehicle cloud function test code.
When the real interface is used for carrying out the vehicle cloud interface interaction anomaly test, the real cloud end is correspondingly required to be used, and when the real cloud end is used for carrying out the test, the time risk and the cost on cloud server resources are increased. However, if the simulation test interface is used for testing, the problems are avoided, and the simulation test interface is used for testing, so that the test environment is simpler and more convenient to build, cloud server resources are not needed, and the cost is saved.
In an implementation of the application, the test interface is not a real interface, but a simulation test interface is generated by the electronic device for testing in a simulation mode. Specifically, after the electronic device starts the corresponding scene script, analyzing the configuration information in the scene script, generating corresponding common interfaces of the internet of vehicles such as hypertext transfer protocol (Hypertext Transfer Protocol, HTTP)/message queue telemetry transfer protocol (Message Queuing Telemetry Transport, MQTT) and the like according to interface information in the configuration information, and configuring the common interfaces as simulated test interfaces according to corresponding configurations to corresponding response types. In order to ensure the high efficiency of the subsequent test, the simulation test interface needs to be verified before the test starts, so as to ensure that the interactive communication between the electronic device and the tested piece (i.e. the tested vehicle) can be smoothly performed.
Before the test starts, the simulation test interface is verified, and the state of the simulation test interface can be checked through the Ethernet environment of the tested piece, so that whether the state of the simulation test interface meets the first preset state is determined. The first preset state is a state of a simulation test interface preset for meeting test requirements.
It is understood that the first preset state does not necessarily refer to a normal operation state, but may be a specific abnormal operation state or other states. If the state of the simulation test interface is abnormal and does not meet the first preset state, analyzing the cause of the abnormality and correspondingly adjusting the cause to enable the state of the simulation test interface to be restored to the first preset state. After confirming the state of the simulation test interface, the electronic device determines the interface address corresponding to the test interface (i.e. the simulation test interface) and the response type of the interface address according to the information in the started scene script, so that the corresponding URL and the response type of the URL can be dynamically generated in the test, and then the simulation test interface is abnormal when the scene script is executed.
As shown in fig. 5, in one implementation manner of the present application, for the step S300, before determining the test interface, and the interface address and the response type corresponding to the test interface according to the cloud function test code, the following steps may be further included:
S321, generating a corresponding cloud address configuration file according to preset cloud address configuration information.
S322, pushing the cloud address configuration file into a preset position through a serial port or a secure shell protocol, and restarting the test environment.
Before the vehicle cloud function test is performed, the vehicle needs to be subjected to system configuration again according to preset cloud address configuration information. And the electronic equipment automatically generates a corresponding cloud address configuration file according to the preset cloud address configuration information.
The electronic equipment can completely realize the interactive anomaly test of the vehicle cloud interface by simulating part of the real cloud function, and in the implementation mode of the application, the preset cloud address configuration information is the URL configuration of a virtual cloud and is not the URL configuration of a real cloud, and it can be understood that the preset cloud address configuration information corresponds to the virtual cloud and is not the real cloud.
After the cloud address configuration file is generated, the electronic device pushes the cloud address configuration file to a corresponding preset position in a system of the vehicle in a serial port or secure shell protocol (namely SSH) mode, and the test environment is restarted, so that the vehicle starts a new system configuration to test, and reconfiguration of the test environment can be achieved.
Steps S311 to S312 and steps S321 to S322 are all preparation tasks for testing in the cloud function, including reconfiguration of the testing environment and simulation of the interface. Therefore, in one implementation manner of the present application, according to the cloud function test code, the test interface, the interface address corresponding to the test interface, and the response type of the interface address are determined, and the method may further include steps S311 to S312 and steps S321 to S322.
It should be understood that, when steps S311 to S312 and steps S321 to S322 are to be executed in practice, the execution order of steps S311 to S312 and steps S321 to S322 is not limited, and steps S311 to S312 and steps S321 to S322 may be executed simultaneously, or steps S311 to S312 or steps S321 to S322 may be executed before. Since steps S311 to S312 and steps S321 to S322 do not affect each other and are all preparation works for the vehicle cloud interface interaction anomaly test, the execution sequence of steps S311 to S312 and steps S321 to S322 does not affect the test itself. In the case that the step S300 includes the steps S311 to S312 and the steps S321 to S322 at the same time, whether the step S300 is completed or not is determined to be completed, that is, the step S300 is completed only if the steps S311 to S312 and the steps S321 to S322 are completed, and the subsequent steps can be prepared to be executed.
Through the steps S100 to S300, the writing of the scene script and the establishment of the testing environment are completed, that is, the preparation work of the vehicle cloud interface interaction abnormality test is completed, and the subsequent steps prepare to start the vehicle cloud interface interaction abnormality test.
In steps S400-S500, when the electronic device executes the scenario script, the electronic device starts a program for simulating the interface abnormality, so as to implement the test of the vehicle cloud interface abnormality. For example, the electronic device runs the started scene script line by line, so that the vehicle cloud function test code calls a communication interface between the electronic device and the vehicle, a network request is sent to the vehicle, the vehicle responds to the network request, the vehicle calls the test interface according to an interface address through a service code in the vehicle to conduct service test, a test result is obtained, and the test result is sent to the electronic device. And the electronic equipment generates feedback information according to the test result and the response type, and sends the feedback information to the vehicle, so that the vehicle responds to the feedback information to generate a test log, and sends the test log to the electronic equipment. The electronic device then receives the test log sent by the vehicle and performs other interactive tests. Specific test contents of the vehicle cloud interface interaction anomaly test are not described herein. It should be appreciated that the interaction between the electronic device and the test vehicle is through a simulated test interface generated by the electronic device. During the test, the electronic device dynamically collects an execution log (as an example of a test log) according to the test execution condition, and stores the collected log, so that the user can view and locate the problem.
In one implementation manner of the present application, for step S400, a vehicle cloud function test code is executed, so that the vehicle cloud function test code invokes a communication interface between a first electronic device and a vehicle, and sends a network request to the vehicle, including:
A. the network request is sent to the domain controller of the vehicle via the local ethernet of the vehicle.
According to the method, a simulation test interface of the electronic equipment is connected into a vehicle-mounted Ethernet of a piece to be tested, and local business closed-loop test is carried out, so that off-line vehicle cloud function test is realized.
B. And sending the network request to a vehicle-cloud integrated interface management platform corresponding to the vehicle, and sending the network request to a domain controller of the vehicle by the vehicle-cloud integrated interface management platform.
The method is that an HTTP protocol is used for accessing the vehicle-cloud integrated interface management platform, and the vehicle-cloud integrated interface management platform is used for sending the vehicle-cloud integrated interface management platform to a domain controller of a vehicle, so that online vehicle-cloud function test is realized.
The conversion of the two communication modes is realized only by modifying the configuration file, and scene script logic does not need to be changed.
In one implementation manner of the application, the vehicle cloud function testing method further comprises the following steps: and sending the test log to the second electronic equipment. When the task operation is completed, the first electronic equipment stops the abnormal scene simulation, and collects related abnormal information and operation state feedback to a corresponding management platform of the second electronic equipment so as to store and record the result of the test, so that the test result is stored and managed, and a user can conveniently check and process the test result.
It can be understood that the second electronic device may be the first electronic device, that is, the first electronic device may include a corresponding management platform, so as to store and manage the test result; the second electronic device may also be other electronic devices other than the first electronic device, including, for example, a vehicle-mounted computer, a mobile phone, a tablet computer, a notebook computer, a palm computer, and other devices, which include a corresponding management platform to store and manage the test result.
In one implementation manner of the application, the first electronic device can run single or multiple scene scripts simultaneously according to configuration, and finally, all the scene scripts are guaranteed to be executed at least once, and the scene scripts modified to the same resource do not collide; the method can provide mutually isolated environments for different abnormal scripts, and ensure that the abnormal scripts do not interfere or influence each other during operation.
In one implementation manner of the present application, as shown in fig. 6, the vehicle cloud function testing method includes the steps of:
first, a computer (namely a first electronic device) generates a scene script according to a vehicle cloud function test configuration file and runs the scene script.
In a second step, the computer invokes a vehicle cloud interface (as an example of a communication interface between the first electronic device and the vehicle) using the scenario script and sends a network request to the vehicle.
And thirdly, the vehicle receives the network request, and according to the network request, a preset vehicle service code on the vehicle calls an interface (namely a test interface) corresponding to the URL interface address according to call logic to test.
And fourthly, generating feedback information according to the response type by a scene script running on the computer, and sending the feedback information to the vehicle, and monitoring the relevant state of the vehicle at the moment to judge whether the vehicle meets the requirement of abnormality/robustness.
Referring to fig. 7, fig. 7 shows a schematic structural diagram of a vehicle cloud function test electronic device 100 (as an example of a first electronic device) and a vehicle 200 provided in one implementation of the present application.
As a test device, the electronic device 100 may include, for example, a mobile phone, a tablet computer, a notebook computer, a palm computer, and other electronic devices, which can implement a local virtual cloud capability, where the electronic device 100 includes: a receiving module (not shown), a scenario script module (not shown), a vehicle cloud abstraction interface module 110, a script scheduling management module 120, a software localization preprocessing module 130, a log module 140, and the like, wherein the receiving module and the scenario script module are not shown.
And the receiving module is used for receiving the cloud function test configuration file submitted by the user. The vehicle cloud function test configuration file may include information such as related data, data types, interface types, related protocols, descriptions of abnormal scenes, and the like in the vehicle cloud function test process.
The scene script module has the capability of automatically generating a test script according to the configuration information, and can automatically generate an initial script template corresponding to the target abnormal scene according to the cloud function test configuration file submitted by the user. For example, scenario script 1, scenario script 2 … …, scenario script N in fig. 5.
The vehicle cloud abstract interface module 110 has a script interface generation capability, can perform interface simulation according to the configured interface information to generate a simulation test interface, and also has a vehicle cloud abstract interface management capability, checks the state of the simulation test interface through the ethernet environment of the vehicle 200, and can dynamically generate a corresponding uniform resource locator system (Uniform Resource Locator, URL) and a response type of the URL according to a test request.
The script scheduling management module 120 has the capability of script scheduling operation, and can start corresponding scene scripts according to user selection and analyze relevant configuration; the script scheduling management module 120 runs the abnormal scene scripts line by line after the test is started, and dynamically collects abnormal information and running states according to the execution conditions.
The software localization preprocessing module 130 has software localization preprocessing capability, and can generate a corresponding configuration file according to URL configuration provided by a user, push a corresponding position of software in a serial port/Secure Shell (SSH) manner, and restart the test environment, so as to reconfigure the vehicle 200.
The log module 140 has log management capability, and can store and manage the logs collected by the script scheduling management module so as to facilitate the subsequent user to check and locate the problems.
The vehicle 200, as a part to be measured, includes: the vehicle cloud integrated interface management platform 210, the vehicle networking module 220, and the vehicle domain controller 230.
The cloud integrated interface management platform 210 is configured to manage the cloud integrated interface and related documents.
The vehicle networking module 220 is a module for performing communication management and communication control, and includes operation control, display control, screening control, transceiving control, save control, and import/export control for a controller area network bus (Controller Area Network, CAN), a low-cost serial communication protocol (Local Interconnect Network, LIN) based on a universal asynchronous receiver/Transmitter (UART)/serial communication interface (Serial Communications Interface, SCI), and an Ethernet (ETH) message.
The vehicle domain controller 230 is a controller that integrates a plurality of conventional electronic control units (Electronic Control Unit, ECU) having similar functions into one controller with strong computing power and resources, and is called a domain controller, and a domain refers to a functional domain. The controller needs to contain the functions of a plurality of conventional ECUs, each corresponding to one or more applications in the domain controller, and the underlying drives of the control actuators are uniformly managed by the domain controller. The vehicle domain controller 230 includes a vehicle cloud interaction configuration 231 and an ethernet module 232 of the vehicle domain controller 230.
The vehicle cloud interaction configuration 231, which includes configuration information for implementing vehicle cloud interaction, is stored in a designated location in the vehicle domain controller 230.
An ethernet module 232, coupled to the ETH, for transmitting and receiving ethernet data.
The vehicle cloud integrated interface management platform 210 is in communication connection with the vehicle networking module 220, and the vehicle networking module 220 is in communication connection with the vehicle domain controller 230.
Referring to fig. 8, fig. 8 is a schematic structural diagram of another vehicle cloud function test electronic device 100 and a vehicle 200 provided in one implementation of the present application. In addition to the vehicle cloud integrated interface management platform 210 being a part of the vehicle 200 architecture as shown in fig. 7, the vehicle cloud integrated interface management platform 210 may also be as shown in fig. 8 as a device independent of the vehicle 200 accessing the vehicle 200 through a communication connection with the vehicle networking module 220.
The electronic device 100 may access the vehicle 200 through the ethernet module 232, or access the vehicle 200 through the cloud unified interface platform 210, so as to implement a communication connection between the electronic device 100 and the vehicle 200.
It is to be understood that the electronic device 100 and the vehicle 200 include, but are not limited to, the above-described modules and functions, other modules and functions not shown in the figures, and those skilled in the art may also set corresponding modules as needed to implement the functions corresponding to the modules.
The vehicle cloud function test method provided by the implementation manner of the present application is further described below with reference to fig. 7.
The user configures related data, data types, interface types, related protocols, descriptions of abnormal scenes and the like according to the interaction abnormal test requirement of the vehicle cloud interface to form a vehicle cloud function test configuration file, and submits the vehicle cloud function test configuration file to a receiving module of the electronic equipment 100 for receiving; or, when the electronic device 100 receives the command of the vehicle cloud function interaction test, the script scheduling management module 120 obtains the vehicle cloud function test configuration file configured in advance, so as to be used for generating a subsequent vehicle cloud function test code.
And the scene script module automatically generates codes of abnormal interaction of the cloud interface of the test vehicle according to the vehicle cloud function test configuration file acquired by the receiving module. Specifically, after the receiving module obtains the vehicle cloud function test configuration file submitted by the user, the scene script module can automatically generate an initial script template of the target abnormal scene according to the content of related data, interfaces, related protocols, scenes and the like in the file.
After the scene script module generates the scene script, a user can modify operation parameters, related data and the like in the scene script according to actual test requirements, and then a vehicle cloud function test code is generated. Of course, the scene script module can also directly generate the vehicle cloud function test code according to the vehicle cloud function test configuration file for testing the vehicle cloud function.
The vehicle cloud interface interaction abnormality test code generated by the scene script module comprises a test interface for performing vehicle cloud interface interaction abnormality test, an interface address corresponding to the test interface and relevant information of response types of all interface addresses required to be tested. The interface address corresponding to the test interface is a URL interface address.
When the script scheduling management module 120 starts the corresponding scenario script, it parses the configuration information therein and notifies Che Yun the abstract interface module 110 of the configured interface information, so as to ensure the high efficiency of the subsequent test, and therefore, it is also necessary to verify the simulation test interface before the test starts, so as to ensure that the interactive communication between the electronic device 100 and the vehicle 200 can be performed smoothly.
The software localization preprocessing module 130 automatically generates a corresponding cloud address configuration file according to preset cloud address configuration information. After the cloud address configuration file is generated, the software localization preprocessing module 130 pushes the cloud address configuration file to a corresponding preset position in the vehicle 200 software through a serial port or based on a secure shell protocol (i.e., SSH), such as the position of the vehicle cloud interaction configuration 231 in fig. 5, and restarts the test environment, so that the vehicle 200 enables a new system configuration to perform a test, thereby implementing reconfiguration of the test environment.
When the script scheduling management module 120 is executing the scene script, the Che Yun abstract interface module 110 simulates the interface exception to realize the test of the vehicle cloud interface exception. Interaction between the electronic device 100 and the vehicle 200 is through a simulation test interface generated by the vehicle cloud abstraction interface module 110. During the test, the script scheduling management module 120 dynamically collects the execution log (i.e. test log) according to the test execution condition, and transmits the collected test log to the log module 140 for storage, so that the user can view and locate the problem.
When the task is completed, the Che Yun abstract interface module 110 stops the abnormal scene simulation, and the script scheduling management module 120 collects related abnormal information and running state feedback to the corresponding management platform of the second electronic device to store and record the log of the current test, thereby storing and managing the test log.
The script scheduling management module 120 can run single or multiple scene scripts at the same time according to the configuration, so that all the scene scripts are finally guaranteed to be executed at least once, and the scene scripts modified to the same resource cannot collide; the method can provide mutually isolated environments for different abnormal scripts, and ensure that the abnormal scripts do not interfere or influence each other during operation.
In one implementation of the application, the cloud function test configuration file is obtained, and the cloud function test configuration file comprises relevant data in the cloud function test process; generating a vehicle cloud function test code according to the vehicle cloud function test configuration file, wherein the vehicle cloud function test code is a code for testing a vehicle cloud interaction function under a target abnormal scene; determining a test interface, an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code; and running a cloud function test code, sending a network request to the vehicle, calling a test interface according to an interface address through a service code in the vehicle to perform service test, obtaining a test result, generating feedback information according to the test result and a response type, and sending the feedback information to the vehicle, so that the vehicle responds to the feedback information to generate a test log, and sending the test log to the first electronic equipment, wherein the test log is a log related to the state of the vehicle. Therefore, in the vehicle cloud function test process, test services do not need to be built in the cloud in advance, and the cost is reduced; according to the acquired vehicle cloud function test configuration file, automatically writing a test script to generate a vehicle cloud function test code, so that development work of the test script is simplified, and the test efficiency of the vehicle cloud function is improved; the application constructs a testing method with cloud interface virtual capability, abnormal response injection capability and scene script management and scheduling capability, which consists of basic functions such as vehicle cloud abstract interface management, abnormal simulation script management and scheduling, script interface generation and the like. Therefore, the interaction anomaly simulation of the vehicle cloud interface is realized, the complexity of the configuration of the test environment is reduced, the test service which needs to be matched with the cloud system in the past is decoupled from the cloud, the test service does not need to be matched with the cloud system, the test work can be developed more flexibly, and the test efficiency of the vehicle cloud function is improved and the cost is reduced. Finally, through the received test logs sent by the vehicle, the corresponding relevant states of the vehicle in an abnormal scene can be effectively detected, whether the vehicle is abnormal or accords with the expected robustness is judged, and the vehicle cloud function of the vehicle is tested efficiently and at low cost.
In the implementation manner of the present application, the receiving module, the scenario script module, the cloud abstract interface module 110, the script scheduling management module 120, the software localization preprocessing module 130, the log module 140 in the electronic device 100 are mutually matched with the cloud integrated interface management platform 210, the vehicle networking module 220 and the vehicle domain controller 230 in the vehicle 200, so as to implement the cloud function testing method provided in the implementation manner of the present application, and the specific implementation manner refers to the specific implementation contents of the steps S100-S400, and detailed descriptions thereof are omitted herein.
In another implementation manner of the present application, as shown in fig. 9, a vehicle cloud function testing apparatus 700 is provided, and a first processing module 710 is configured to obtain a vehicle cloud function testing configuration file, where the vehicle cloud function testing configuration file includes relevant data in a vehicle cloud function testing process.
The second processing module 720 is configured to generate a vehicle cloud function test code according to the vehicle cloud function test configuration file, where the vehicle cloud function test code is a code for testing a vehicle cloud interaction function under the abnormal target scene.
And the third processing module 730 is configured to determine a test interface, and an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code.
The fourth processing module 740 is configured to run the cloud function test code, so that the cloud function test code invokes a communication interface between the first electronic device and the vehicle, and send a network request to the vehicle, so that the vehicle responds to the network request, invokes the test interface according to the interface address through a service code in the vehicle to perform a service test, obtain a test result, and sends the test result to the first electronic device, where the network request includes the interface address.
And the fifth processing module 750 is configured to generate feedback information according to the test result and the response type, and send the feedback information to the vehicle, so that the vehicle generates a test log in response to the feedback information, and sends the test log to the first electronic device, where the test log is a log related to the state of the vehicle.
And a sixth processing module 760, configured to receive the test log sent by the vehicle.
Acquiring a vehicle cloud function test configuration file through a receiving module in the first processing module 710, wherein the vehicle cloud function test configuration file comprises related data in a vehicle cloud function test process; the scene script module in the second processing module 720 generates a vehicle cloud function test code according to the vehicle cloud function test configuration file, wherein the vehicle cloud function test code is a code for testing the vehicle cloud interaction function under the abnormal scene of the target, so that automatic writing of the test script is realized, and development work of the test script is simplified; the vehicle cloud abstract interface module 110 in the third processing module 730 determines a test interface, and an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code; the script scheduling management module 120 in the fourth processing module 740 runs the vehicle cloud function test code, so that the vehicle cloud function test code calls a communication interface between the first electronic device and the vehicle, a network request is sent to the vehicle, the vehicle responds to the network request, a service test is carried out by calling the test interface according to an interface address through a service code in the vehicle, a test result is obtained, and the test result is sent to the first electronic device; the fifth processing module 750 generates feedback information according to the test result and the response type, and sends the feedback information to the vehicle, so that the vehicle responds to the feedback information to generate a test log, and sends the test log to the first electronic device, wherein the test log is a log related to the state of the vehicle; finally, the sixth processing module 760 receives the test log sent from the vehicle. Therefore, interface interaction abnormality is simulated, and complexity of test environment configuration is reduced.
In an implementation manner of the present application, the first processing module 710 may be specifically a receiving module in the electronic device 100, the second processing module 720 may be specifically a scenario script module in the electronic device 100, the third processing module 730 and the fifth processing module 750 may be specifically script scheduling management modules 120 in the electronic device 100, and the fourth processing module 740 may be specifically a cloud abstraction interface module 100 in the electronic device 100. The fifth processing module 760 may specifically be the log module 140 in the electronic device 100 described above.
In an implementation manner of the present application, the vehicle cloud function testing device 700 may further include a seventh processing module, where the seventh processing module is configured to generate a corresponding cloud address configuration file according to preset cloud address configuration information, push the cloud address configuration file into a preset position through a serial port or based on a secure shell protocol, and restart the testing environment.
The seventh processing module may specifically be the software localization pre-processing module 130 in the electronic device 100.
It should be noted that, it should be understood that the division of the modules of the above apparatus is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; the method can also be realized in a form of calling software by a processing element, and the method can be realized in a form of hardware by a part of modules. For example, the processing module may be a processing element that is set up separately, may be implemented in a chip of the above-mentioned apparatus, or may be stored in a memory of the above-mentioned apparatus in the form of program codes, and the functions of the above-mentioned processing module may be called and executed by a processing element of the above-mentioned apparatus. The implementation of the other modules is similar. In addition, all or part of the modules can be integrated together or can be independently implemented. The processing element here may be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
Referring to fig. 10, fig. 10 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application. The electronic device can include one or more processors 1002, system control logic 1008 coupled to at least one of the processors 1002, system memory 1004 coupled to the system control logic 1008, non-volatile memory (NVM) 1006 coupled to the system control logic 1008, and a network interface 1010 coupled to the system control logic 1008.
The processor 1002 may include one or more single-core or multi-core processors. The processor 1002 may include any combination of general-purpose and special-purpose processors (e.g., graphics processor, application processor, baseband processor, etc.). In implementations herein, the processor 1002 may be configured to perform the foregoing vehicle cloud function testing method.
In some implementations, the system control logic 1008 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1002 and/or any suitable device or component in communication with the system control logic 1008.
In some implementations, the system control logic 1008 may include one or more memory controllers to provide an interface to the system memory 1004. The system memory 1004 may be used for loading and storing data and/or instructions. The system memory 1004 of the electronic device can include any suitable volatile memory in some implementations, such as suitable dynamic random access memory (Dynamic Random Access Memory, DRAM).
NVM/memory 1006 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions. In some implementations, NVM/memory 1006 may include any suitable nonvolatile memory, such as flash memory, and/or any suitable nonvolatile storage device, such as at least one of a Hard Disk Drive (HDD), compact Disc (CD) Drive, digital versatile Disc (Digital Versatile Disc, DVD) Drive.
NVM/memory 1006 may include a portion of a memory resource installed on an apparatus of an electronic device, or it may be accessed by, but not necessarily part of, the device. For example, NVM/memory 1006 may be accessed over a network via network interface 1010.
In particular, system memory 1004 and NVM/storage 1006 may each include: a temporary copy and a permanent copy of instruction 1020. The instructions 1020 may include: instructions that, when executed by at least one of the processors 1002, cause the electronic device to implement the foregoing vehicle cloud function test method. In some implementations, instructions 1020, hardware, firmware, and/or software components thereof may additionally/alternatively be disposed in system control logic 1008, network interface 1010, and/or processor 1002.
The network interface 1010 may include a transceiver to provide a radio interface for electronic devices to communicate with any other suitable device (e.g., front end module, antenna, etc.) over one or more networks. In some implementations, the network interface 1010 may be integrated with other components of the electronic device. For example, the network interface 1010 may be integrated with at least one of the processor 1002, the system memory 1004, the nvm/storage 1006, and a firmware device (not shown) having instructions that, when executed by at least one of the processor 1002, implement the vehicle cloud function test method described previously.
The network interface 1010 may further include any suitable hardware and/or firmware to provide a multiple-input multiple-output radio interface. For example, network interface 1010 may be a network adapter, a wireless network adapter, a telephone modem, and/or a wireless modem.
In one implementation, at least one of the processors 1002 may be packaged together with logic for one or more controllers of the system control logic 1008 to form a system package (System In a Package, siP). In one implementation, at least one of the processors 1002 may be integrated on the same die with logic for one or more controllers of the System control logic 1008 to form a System on Chip (SoC).
The electronic device may further include: input/output (I/O) devices 1012. The I/O device 1012 may include a user interface to enable a user to interact with the electronic device; the design of the peripheral component interface enables the peripheral component to also interact with the electronic device. In some implementations, the electronic device further includes a sensor for determining at least one of environmental conditions and location information associated with the electronic device.
In some implementations, the user interface may include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., still image cameras and/or video cameras), a flashlight (e.g., light emitting diode flash), and a keyboard.
In some implementations, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
In some implementations, the sensors may include, but are not limited to, gyroscopic sensors, accelerometers, proximity sensors, ambient light sensors, and positioning units. The positioning unit may also be part of the network interface 1010 or interact with the network interface 1010 to communicate with components of a positioning network, such as global positioning system (Global Positioning System, GPS) satellites.
It should be understood that the structure illustrated in the implementation of the present application does not constitute a specific limitation on the electronic device. In other implementations of the application, the electronic device may include more or fewer components than shown, or certain components may be combined, or certain components may be separated, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of implementations of the application, a processing system includes any system having a processor such as, for example, a digital signal processor (Digital Signal Processor, DSP), microcontroller, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or microprocessor.
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. Program code may also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described herein are not limited in scope to any particular programming language. In either case, the language may be a compiled or interpreted language.
One or more aspects of at least one implementation may be implemented by representative instructions stored on a computer-readable storage medium, which represent various logic in a processor, which when read by a machine, cause the machine to fabricate logic to perform the techniques described herein. These representations, referred to as "IP cores," may be stored on a tangible computer readable storage medium and provided to a plurality of customers or production facilities for loading into the manufacturing machine that actually manufactures the logic or processor.
It should be noted that in the drawings, some structural or method features may be shown in a specific arrangement and/or order. However, it should be understood that such a particular arrangement and/or ordering may not be required. Rather, in some implementations, the features can be arranged in a different manner and/or order than shown in the illustrative drawings. Additionally, the inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all implementations, and in some implementations, such features may not be included or may be combined with other features.
It should be noted that the terms "first," "second," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
It should be noted that in the drawings, some structural or method features may be shown in a specific arrangement and/or order. However, it should be understood that such a particular arrangement and/or ordering may not be required. Rather, in some embodiments, these features may be arranged in a different manner and/or order than shown in the illustrative figures. Additionally, the inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all embodiments, and in some embodiments, may not be included or may be combined with other features.
While the application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that the foregoing is a further detailed description of the application with reference to specific embodiments, and it is not intended to limit the practice of the application to those descriptions. Various changes in form and detail may be made therein by those skilled in the art, including a few simple inferences or alternatives, without departing from the spirit and scope of the present application.

Claims (11)

1. A vehicle cloud function test method is applied to first electronic equipment, and comprises the following steps:
Acquiring a vehicle cloud function test configuration file, wherein the vehicle cloud function test configuration file comprises related data in a vehicle cloud function test process;
generating a vehicle cloud function test code according to the vehicle cloud function test configuration file, wherein the vehicle cloud function test code is a code for testing a vehicle cloud interaction function under a target abnormal scene;
determining a test interface, an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code;
running the cloud function test code, enabling the cloud function test code to call a communication interface between the first electronic device and a vehicle, sending a network request to the vehicle, enabling the vehicle to respond to the network request, calling the test interface to conduct service test according to the interface address through service codes in the vehicle to obtain a test result, and sending the test result to the first electronic device, wherein the network request comprises the interface address;
generating feedback information according to the test result and the response type, and sending the feedback information to the vehicle, so that the vehicle responds to the feedback information to generate a test log, and sending the test log to the first electronic equipment, wherein the test log is a log related to the state of the vehicle;
And receiving the test log sent by the vehicle.
2. The vehicle cloud function test method of claim 1, wherein generating the vehicle cloud function test code from the vehicle cloud function test configuration file comprises:
generating an initial vehicle cloud function test code corresponding to the target abnormal scene according to the vehicle cloud function test configuration file;
and receiving adjustment operation of a user on the initial vehicle cloud function test code, and responding to the adjustment operation to generate the vehicle cloud function test code.
3. The vehicle cloud function test method of claim 2, wherein running the vehicle cloud function test code such that the vehicle cloud function test code invokes a communication interface between the first electronic device and the vehicle, sends a network request to the vehicle, comprises:
transmitting the network request to a domain controller of the vehicle through a local ethernet of the vehicle; or alternatively
And sending the network request to a vehicle-cloud integrated interface management platform corresponding to the vehicle, and sending the network request to a domain controller of the vehicle by the vehicle-cloud integrated interface management platform.
4. The vehicle cloud function test method according to claim 3, wherein determining a test interface, and an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code comprises:
Generating a simulation test interface according to the cloud function test code;
detecting the state of the simulation test interface through the local Ethernet of the vehicle;
and under the condition that the state of the simulation test interface meets a first preset state, determining a test interface, an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code.
5. The vehicle cloud function test method of claim 4, wherein before determining a test interface and an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code, the method further comprises:
generating a corresponding cloud address configuration file according to preset cloud address configuration information;
pushing the cloud address configuration file into a preset position through a serial port or a secure shell protocol, and restarting the test environment.
6. The vehicle cloud function test method of any of claims 1-5, wherein the response types include positive response, negative response, and no response.
7. The vehicle cloud function test method of any of claims 1-5, wherein the method further comprises: and sending the test log to second electronic equipment.
8. A vehicle cloud function test apparatus for performing the vehicle cloud function test method according to any one of claims 1 to 7, the apparatus comprising:
the vehicle cloud function test system comprises a first processing module, a second processing module and a third processing module, wherein the first processing module is used for acquiring a vehicle cloud function test configuration file, and the vehicle cloud function test configuration file comprises related data in a vehicle cloud function test process;
the second processing module is used for generating vehicle cloud function test codes according to the vehicle cloud function test configuration file, wherein the vehicle cloud function test codes are codes for testing vehicle cloud interaction functions in a target abnormal scene;
the third processing module is used for determining a test interface, an interface address and a response type corresponding to the test interface according to the vehicle cloud function test code;
the fourth processing module is used for running the cloud function test code, enabling the cloud function test code to call a communication interface between the first electronic device and a vehicle, sending a network request to the vehicle, enabling the vehicle to respond to the network request, calling the test interface according to the interface address through a service code in the vehicle to conduct service test to obtain a test result, and sending the test result to the first electronic device, wherein the network request comprises the interface address;
The fifth processing module is used for generating feedback information according to the test result and the response type and sending the feedback information to the vehicle so that the vehicle responds to the feedback information to generate a test log, and sending the test log to the first electronic equipment, wherein the test log is a log related to the state of the vehicle;
and the sixth processing module is used for receiving the test log sent by the vehicle.
9. An electronic device, comprising:
a memory for storing a computer program, the computer program comprising program instructions;
a processor configured to execute the program instructions to cause the electronic device to perform the vehicle cloud function testing method according to any one of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions that are executed by an electronic device to cause the electronic device to perform the vehicle cloud function test method according to any of claims 1-7.
11. A computer program product comprising computer programs/instructions which when executed by an electronic device implement the vehicle cloud function test method of any of claims 1-7.
CN202310923564.1A 2023-07-26 2023-07-26 Vehicle cloud function test method and device, electronic equipment and storage medium Pending CN117041111A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310923564.1A CN117041111A (en) 2023-07-26 2023-07-26 Vehicle cloud function test method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310923564.1A CN117041111A (en) 2023-07-26 2023-07-26 Vehicle cloud function test method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117041111A true CN117041111A (en) 2023-11-10

Family

ID=88623641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310923564.1A Pending CN117041111A (en) 2023-07-26 2023-07-26 Vehicle cloud function test method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117041111A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117234951A (en) * 2023-11-13 2023-12-15 建信金融科技有限责任公司 Function test method and device of application system, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117234951A (en) * 2023-11-13 2023-12-15 建信金融科技有限责任公司 Function test method and device of application system, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109933522B (en) Test method, test system and storage medium for automatic case
US20200174915A1 (en) Emulation-based testing of a microservices architecture
CN106776313B (en) Method and device for simulating service and centralized management platform
CN110413288B (en) Application deployment method, device, server and storage medium
CN107608901B (en) Jmeter-based testing method and device, storage medium and electronic equipment
CN113312064B (en) Method and device for installing and configuring physical machine and computer readable medium
CN114205342B (en) Service debugging routing method, electronic equipment and medium
CN117041111A (en) Vehicle cloud function test method and device, electronic equipment and storage medium
CN111813671A (en) IMA software simulation test system
CN107977260B (en) Task submitting method and device
CN116257438A (en) Updating method of interface test case and related equipment
CN116627849B (en) System test method, device, equipment and storage medium
CN116974874A (en) Database testing method and device, electronic equipment and readable storage medium
CN101969442B (en) Process running environment perception and migration based network analog framework implementation method
CN116401014A (en) Service release method, device, storage medium and server
CN113127009A (en) Automatic deployment method and device for big data management platform
CN105339974B (en) Analog sensor
CN115048187A (en) Operator-based pvc file importing method, device and storage medium
CN114466000A (en) CDN gateway source returning method and device
CN111124907A (en) Mobile phone game testing method and device and server
CN115373696B (en) Low code configuration method, system, equipment and storage medium for software resource generation
CN115994098B (en) Analysis method and system for software operation abnormality based on artificial intelligence
CN114443069B (en) Method and system for constructing operating system mirror image by dynamically expanding cluster
CN115473832A (en) Vehicle networking terminal cloud communication testing method, device, server, client and system
CN116302872A (en) Virtualization performance test method and device, computer equipment and readable storage medium

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