CN118227452A - Project testing method and device, electronic equipment and storage medium - Google Patents
Project testing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN118227452A CN118227452A CN202211639505.3A CN202211639505A CN118227452A CN 118227452 A CN118227452 A CN 118227452A CN 202211639505 A CN202211639505 A CN 202211639505A CN 118227452 A CN118227452 A CN 118227452A
- Authority
- CN
- China
- Prior art keywords
- test
- target
- module
- peripheral equipment
- tested
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 439
- 230000002093 peripheral effect Effects 0.000 claims abstract description 228
- 238000000034 method Methods 0.000 claims abstract description 50
- 238000012545 processing Methods 0.000 claims abstract description 26
- 238000012216 screening Methods 0.000 claims abstract description 13
- 230000006870 function Effects 0.000 claims description 37
- 230000008569 process Effects 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 7
- 238000010998 test method Methods 0.000 claims description 5
- 238000011161 development Methods 0.000 abstract description 20
- 238000005516 engineering process Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 6
- 238000013515 script Methods 0.000 description 6
- 230000009471 action Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000013473 artificial intelligence Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
The disclosure provides a project testing method, a project testing device, electronic equipment and a storage medium, and relates to the technical field of testing, comprising the following steps: screening in a peripheral equipment library based on test case data of the item to be tested to obtain target peripheral equipment required by the test of the item to be tested and test parameters of the target peripheral equipment; inquiring in a public module library based on the equipment information of the target peripheral equipment to obtain a target public module corresponding to the target peripheral equipment; the target public module is called to control the target peripheral equipment to execute a test flow according to the test parameters, test execution data of the target peripheral equipment are obtained, and the test execution data are sent to a domain controller corresponding to a project to be tested; and analyzing and processing the test execution data by using the domain controller to obtain a test result of the item to be tested. By the method and the device, repeated work of code compiling can be reduced, debugging time of codes is reduced, development resources can be saved, and testing efficiency can be improved while testing cost is reduced.
Description
Technical Field
The present application relates to the field of testing technologies, and in particular, to a method and apparatus for testing items, an electronic device, and a storage medium.
Background
At present, when project testing is performed, peripheral equipment required by testing and corresponding testing function modules are required to be deployed in the testing project in advance. Therefore, a large number of scripts need to be repeatedly written for each project test, so that development and deployment of peripheral equipment and corresponding test function modules are realized, however, a large amount of development resources are required to be consumed in the mode, the test cost is high, and the test efficiency is low.
Disclosure of Invention
In view of this, the application provides a project test method, a device, an electronic device and a storage medium, which can reduce the repetitive work of code compiling and the debugging time of codes, further save development resources, reduce test cost and improve test efficiency.
According to one aspect of the present application, there is provided a project testing method comprising:
screening in a peripheral equipment library based on test case data of a project to be tested to obtain target peripheral equipment required by the test of the project to be tested and test parameters of the target peripheral equipment;
Inquiring in a public module library based on the equipment information of the target peripheral equipment to obtain a target public module corresponding to the target peripheral equipment;
Invoking the target public module to control the target peripheral equipment to execute a test flow according to the test parameters to obtain test execution data of the target peripheral equipment, and sending the test execution data to a domain controller corresponding to the item to be tested;
And analyzing and processing the test execution data by using the domain controller to generate a test result of the item to be tested.
According to a second aspect of the present disclosure, there is provided an item testing apparatus comprising:
the first determining module is configured to screen in a peripheral equipment library based on test case data of a to-be-tested item to obtain target peripheral equipment required by the test of the to-be-tested item and test parameters of the target peripheral equipment;
the second determining module is configured to query in a public module library based on the equipment information of the target peripheral equipment to obtain a target public module corresponding to the target peripheral equipment;
The testing module is configured to call the target public module to control the target peripheral equipment to execute a testing flow according to the testing parameters, obtain testing execution data of the target peripheral equipment, and send the testing execution data to the domain controller corresponding to the item to be tested;
and the processing module is configured to utilize the domain controller to analyze and process the test execution data and generate a test result of the item to be tested.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect described above.
According to a fourth aspect of the present disclosure there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of the preceding first aspect.
According to a fifth aspect of the present disclosure there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method as in the first aspect described above.
According to the project testing method, the project testing device, the electronic equipment and the storage medium, screening can be performed in the peripheral equipment library based on the test case data of the project to be tested, and testing parameters of target peripheral equipment and target peripheral equipment required by the project to be tested are obtained; inquiring in a public module library based on the equipment information of the target peripheral equipment to obtain a target public module corresponding to the target peripheral equipment; then, the target public module is called to control the target peripheral equipment to execute a test flow according to the test parameters, test execution data of the target peripheral equipment are obtained, and the test execution data are sent to a domain controller corresponding to the item to be tested; and further analyzing and processing the test execution data by utilizing the domain controller to obtain a test result of the item to be tested. According to the technical scheme, in the project test process, development and deployment scripts of peripheral equipment and corresponding test function modules do not need to be independently written in advance for each test project, but target peripheral equipment required by test can be directly matched in a peripheral equipment library according to test case data of the project to be tested, and target public modules for controlling the target peripheral equipment are correspondingly screened in a public module library. The method can reduce the repeated work of code compiling and the debugging time of codes, further can save development resources, and can improve the testing efficiency while reducing the testing cost.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It should be understood that the drawings are for better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
Fig. 1 is a flow chart of a project testing method according to an embodiment of the disclosure;
FIG. 2 is a flow chart of a method for testing items according to another embodiment of the disclosure;
FIG. 3 is a schematic illustration of an example of a project test provided by an embodiment of the present disclosure;
Fig. 4 is a schematic structural diagram of an item testing device according to an embodiment of the present disclosure;
Fig. 5 is a schematic structural diagram of another item testing device according to an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The following describes an item testing method, an item testing device, an electronic device, and a storage medium according to embodiments of the present disclosure with reference to the accompanying drawings.
At present, when project testing is performed, peripheral equipment required by testing and corresponding testing function modules are required to be deployed in the testing project in advance. Therefore, a large number of scripts need to be repeatedly written for each project test, so that development and deployment of peripheral equipment and corresponding test function modules are realized, however, a large amount of development resources are required to be consumed in the mode, the test cost is high, and the test efficiency is low.
In order to solve the technical problems, the disclosure provides a project test method, a project test device, an electronic device and a storage medium, which can reduce repeated work of code compiling and debugging time of codes, further save development resources, reduce test cost and improve test efficiency. As illustrated in fig. 1, an embodiment of the present disclosure provides a project testing method, including:
And step 101, screening in a peripheral equipment library based on test case data of the item to be tested to obtain target peripheral equipment required by the test of the item to be tested and test parameters of the target peripheral equipment.
Wherein the item to be tested is an object (such as an interface, a module, a process, a function or a system, etc.) to be tested in a related manner; the test case data is used for reflecting the test requirement of the item to be tested, and can comprise a target test service type, a target test service, test input information corresponding to the target test service and the like, if the target test service type is a port test type, the target test can be a port on-off control test, and the test input information corresponding to the target test can be a test execution parameter, port information representing a specific test port and the like; the peripheral device library stores a plurality of peripheral devices in advance, and a test service type of each of the plurality of peripheral devices. In the embodiment of the disclosure, by setting the peripheral equipment library and screening the target peripheral equipment in the peripheral equipment library based on the test case data, repeated development and deployment of the peripheral equipment can be avoided, so that repeated work of code compiling can be reduced, the debugging time of the code can be shortened, development resources can be saved, and the test efficiency can be improved. The target peripheral equipment is external equipment which is needed by the project to be tested in the process of carrying out related test, such as programmable power supply, electromagnetic relay, controller area network (Controller Area Network, CAN) \serial communication network (Local Interconnect Network, LIN) transceiver equipment and the like; when the test parameters are the items to be tested, the parameter indication data of the corresponding target peripheral equipment is controlled, and different target peripheral equipment corresponds to different test parameters.
For the embodiment of the disclosure, in the process of testing the item to be tested, different types of public modules of targets can be invoked to control corresponding peripheral devices of targets to execute corresponding testing actions, and for example, the item to be tested can be a vehicle running test, after information of the item to be tested is obtained, the peripheral devices of the targets and testing parameters of the peripheral devices of the targets, which are applied to the vehicle running test, can be further selected, so that the public modules of targets matched with the peripheral devices of the targets can be directly invoked later, and control of the peripheral devices of the targets can be executed according to the testing parameters.
Step 102, inquiring in a public module library based on the equipment information of the target peripheral equipment to obtain a target public module corresponding to the target peripheral equipment.
For the embodiment of the disclosure, the public module is a pre-designed reusable functional module capable of executing specific actions, for example, the public module can comprise a programmable power module, a relay module, an excel module, a message transceiver module and the like. Specifically, several types of peripheral devices commonly required by test project engineering can be abstracted out in advance, and the modules of the several types are integrated in the existing engineering in a targeted manner to realize the same actions, but different test codes or different triggering modes are used for controlling the public modules of the peripheral devices, so that the peripheral devices become unified, generalized, standardized and easily-expanded code modules and standardized module writing specifications, different projects and subsequent test project developers can have more efforts to design test scenes and develop test logic codes, the overall test efficiency is improved, and the development quality is ensured. The common module library is pre-stored with a plurality of common modules and module function information of each common module in the plurality of common modules. In the embodiment of the disclosure, by setting the public module library, after the target peripheral equipment of the project to be tested is obtained, the equipment information of the target peripheral equipment can be matched with the module function information of the public module developed in advance in the public module library, and the target public module corresponding to the target peripheral equipment is directly obtained, so that the similar test or the same test is avoided to carry out the development operation of the target public module again, the test progress can be improved, the energy of a developer can be saved, and meanwhile, the unification of the test engineering and the maintainability of the test engineering are facilitated.
And step 103, calling a target public module to control the target peripheral equipment to execute a test flow according to the test parameters, obtaining test execution data of the target peripheral equipment, and sending the test execution data to a domain controller corresponding to the item to be tested.
In a specific application scenario, taking an item to be tested as a vehicle running test as an example, after a target peripheral device of the item to be tested is connected with the vehicle to be tested, a target public module matched with the target peripheral device can be utilized to execute a test flow, when the test flow is required to be cooperatively executed by utilizing a plurality of target peripheral devices, control over corresponding target peripheral devices can be respectively executed by calling a plurality of different target public modules, after the test of the plurality of target peripheral devices is finished, test execution data obtained by processing the plurality of target peripheral devices is sent to a domain controller of the item to be tested, so that the domain controller can determine a test result of the vehicle running test according to the test execution data obtained by processing the plurality of peripheral devices.
For example, if the item to be tested is a vehicle power system test, after determining a target peripheral device and a test parameter of the target peripheral device required for the vehicle power system test, a target public module matched with the target peripheral device may be further obtained, and a corresponding test procedure is executed according to the test parameter, where the test parameter may include: controlling at least one of the operations of the programmable power switch, setting the power supply voltage, setting the power supply current, inquiring the current power supply voltage value, inquiring the current power supply current value, inquiring the current power supply power and the like. After the target public module controls the target peripheral equipment to process to obtain test execution data, the test execution data can be further sent to the domain controller of the item to be tested, so that the domain controller can determine the test result of the vehicle running test according to the test execution data obtained by the target peripheral equipment.
And 104, analyzing and processing the test execution data by using the domain controller to obtain a test result of the item to be tested.
In a specific application scenario, after receiving test execution data of one or more target peripheral devices under the control of a corresponding target public module, the domain controller can further perform data processing calculation on the test execution data to analyze and evaluate performance of a to-be-tested item, and then output an analysis result so that a developer or a tester can know performance indexes of the to-be-tested item after seeing the test result of the to-be-tested item, and can perform optimization processing on the performance of the to-be-tested item according to abnormal indexes displayed in the test result in time when the test result is poor.
In summary, according to the project testing method provided by the present disclosure, screening may be performed in a peripheral device library based on test case data of a project to be tested, so as to obtain a target peripheral device required for testing the project to be tested and testing parameters of the target peripheral device; inquiring in a public module library based on the equipment information of the target peripheral equipment to obtain a target public module corresponding to the target peripheral equipment; then, the target public module is called to control the target peripheral equipment to execute a test flow according to the test parameters, test execution data of the target peripheral equipment are obtained, and the test execution data are sent to a domain controller corresponding to the item to be tested; and further analyzing and processing the test execution data by utilizing the domain controller to obtain a test result of the item to be tested. According to the technical scheme, in the project test process, development and deployment scripts of peripheral equipment and corresponding test function modules do not need to be independently written in advance for each test project, but target peripheral equipment required by test can be directly matched in a peripheral equipment library according to test case data of the project to be tested, and target public modules for controlling the target peripheral equipment are correspondingly screened in a public module library. The method can reduce the repeated work of code compiling and the debugging time of codes, further can save development resources, and can improve the testing efficiency while reducing the testing cost.
Further, as a refinement and extension of the foregoing embodiment, in order to fully describe a specific implementation procedure of the method of the present embodiment, the present embodiment provides a specific method as shown in fig. 2, where the method includes:
step 201, screening in a peripheral device library based on test case data of the item to be tested, to obtain a target peripheral device required by the test of the item to be tested and test parameters of the target peripheral device.
The test case data is used for reflecting the test requirement of the item to be tested, and the test case data can comprise a target test service type, a target test service, test input information corresponding to the target test service and the like. In a specific application scenario, the target peripheral equipment required by the test of the item to be tested and the test parameters of each target peripheral equipment can be determined by analyzing the test requirement information, wherein the test parameters can comprise input data, processing data, limitations, constraints and the like, and can also comprise the test execution sequence of the target peripheral equipment, information and data transferred between the target peripheral equipment and other target peripheral equipment and the like.
For the embodiment of the disclosure, the type of the target test service, the target test service and the test input information corresponding to the target test service can be extracted from the test case by acquiring the corresponding test case data in the item to be tested, so that the peripheral equipment with the same type of the corresponding test service as the target test service is screened from the peripheral equipment library, the peripheral equipment is used as the target peripheral equipment required by the test of the item to be tested, and the test input information corresponding to the target test service and the target test service is determined as the test parameters for controlling the execution of the test flow by the target peripheral equipment. For example, in the test case, the type of the target test service is extracted as the relay type, the target test service is extracted as the port on-off function of the test relay, and the test input information corresponding to the target test service is extracted as the port information of the port to be tested. And the peripheral equipment with the corresponding test service type of the relay type, such as a relay, can be screened from the peripheral equipment library to serve as target peripheral equipment required by the test of the item to be tested, and meanwhile, the port on-off function of the port of the test relay is used as target test service, and the port information of the port to be tested is used as test parameters for controlling the relay to execute the test flow.
Accordingly, the embodiment steps may include: acquiring test case data of a project to be tested, wherein the test case data at least comprises a target test service type, a target test service and test input information corresponding to the target test service; determining peripheral equipment with a corresponding test service type as a target test service type in a peripheral equipment library as target peripheral equipment required by the test of the item to be tested, wherein a plurality of peripheral equipment and the test service type of each peripheral equipment in the plurality of peripheral equipment are stored in the peripheral equipment library; and determining the target test service and the test input information corresponding to the target test service as the test parameters of the target peripheral equipment.
Step 202, inquiring in a public module library based on the device information of the target peripheral device to obtain a target public module corresponding to the target peripheral device.
In a specific application scenario, as a possible implementation manner, in order to avoid repeatedly designing a matched target public module for the same target peripheral device, public modules corresponding to each peripheral device may be extracted in advance based on a project test result at a historical time, and the extracted public modules may be uniformly stored in a public module library. In order to accurately and quickly search the required target public modules in the public module library, module function information can be configured for each target public module according to the control function realized by each target public module and/or the controlled target peripheral equipment, and the module function information contains equipment information (such as equipment identification and the like) of the peripheral equipment controlled by the public module, so that related testers can quickly screen out target public modules matched with the target peripheral equipment from a plurality of public modules contained in the public module library based on the equipment information. Specifically, the steps of the embodiment may include: acquiring a plurality of historical module test cases of a plurality of projects; generating a common module decoupled from the test logic based on the plurality of historical module test cases; configuring module function information for each public module, wherein the module function information comprises equipment information of peripheral equipment controlled by the public module; and storing the public module and the module function information corresponding to the public module into a public module library. For the embodiment of the disclosure, the public module can be independently extracted from the history test item, and the public module is decoupled from the test logic of the history test item by a module importing method, i.e., the public module does not contain any test logic, so that the extracted public module is uniformly stored in a public module library for subsequent direct calling. When the public module is specifically called to control the peripheral equipment to execute the test flow, the public module can control the test logic according to the test parameters uploaded by the peripheral equipment, so that the application range of the public module can be expanded, and the reusability is improved.
Correspondingly, for the embodiment of the disclosure, when the target public module matched with the target peripheral device is determined in the process of executing the test of the item to be tested, the target public module matched with the target peripheral device can be quickly searched from the public module library based on the device information, so that the workload of the item test can be reduced, and the test efficiency can be improved. Specifically, the steps of the embodiment may include: extracting target device information of target peripheral devices; and determining the public module of which the corresponding module function information in the public module library contains the target equipment information as a target public module for controlling the target peripheral equipment.
In a specific application scenario, as a possible implementation manner, when a target public module for controlling a target peripheral device is not queried in the public module library, a module test case of the target peripheral device required by the test of the item to be tested can be further extracted, and then the target public module matched with the target peripheral device is developed based on the module test case. Specifically, the steps of the embodiment may include: if the target public module for controlling the target peripheral device does not exist in the public module library, the target public module for controlling the target peripheral device is developed according to the module test case of the target peripheral device. After the new development generates the target public module, the public module library is updated for continuously and abundantly updating the public modules contained in the public module library, so that the public module library is dynamically updated, and the new development target public module can be updated to the public module library as a preferred implementation mode. In addition, after the tester extracts the target public module matched with the target peripheral equipment from the public module library, if the target public module is adaptively adjusted according to the test requirement, the adjusted target public module can be updated to the public module library as well, so that the dimension of the target public module corresponding to the same target peripheral equipment is enriched, and the personalized selection of the tester is facilitated.
Accordingly, as another possible implementation manner, when the target public module for controlling the target peripheral device is not queried in the public module library, decoupling or combining can be performed according to one or more historical module test cases, a new target public module matched with the item to be tested is developed, module function information is configured for the newly generated target public module, and the module function information is updated and stored in the public module library.
For example, when the C project test is performed, if there is no target common module for controlling the target peripheral device in the common module library, the function of querying the current power supply voltage value in the D project test and the function of querying the current power supply power in the E project test in the history module test case may be combined to generate a new target common module having a function of matching the target peripheral device for the C project test, thereby implementing the C project test action, and updating and storing the newly generated target common module in the common module library.
And 203, generating a test control code corresponding to the test parameter, and transmitting the test control code into the target public module so that the target public module can control the target peripheral equipment to execute a test flow by using the test control code.
For the embodiment of the present disclosure, as a possible implementation manner, a corresponding test control code template may be designed for the target peripheral device under each device type, so that in this embodiment, according to the test parameters and the corresponding test control code templates, test control codes may be quickly and automatically compiled and generated, so that the target public module implements operation control on the target peripheral device by executing the test control codes. For example, if it is found that the target peripheral device is a relay, the target public module corresponding to the target peripheral device is a relay module, and the determining test parameter includes a target test service of testing a port on-off function of the relay and port information of a port to be tested, so as to generate a test control code corresponding to the test parameter, and then the test control code is transmitted to the relay module, and the relay module can control the target peripheral device to execute a port on-off function test of the port to be tested corresponding to the port information by running the test control code.
And 204, analyzing and processing the test execution data by using the domain controller to generate a test result of the item to be tested.
In a specific application scenario, the public module library may further include a result report generating module, where the result report generating module may be used to implement visual display of a test result of the item to be tested. Accordingly, after generating the test result of the item to be tested, as a possible implementation manner, the embodiment steps may further include: and transmitting the test execution data and the test result of the target peripheral equipment to a report generating module by using the domain controller to obtain a test result report corresponding to the item to be tested, wherein the test result report is generated by the report generating module according to the test execution data and the test result.
For clarity of presentation of the technical solutions of the present disclosure, the technical solutions in the present disclosure are fully described herein with further reference to the example schematic diagram shown in fig. 3. After obtaining the item to be tested: after the FSD test project and the XCU test project, determining the target peripheral equipment required by the test and the test parameters of the target peripheral equipment according to the FSD test project and the XCU test project, wherein the target peripheral equipment required by the FSD test project can comprise: the system comprises a program-controlled power supply B, a relay B and message receiving and transmitting equipment B; the target peripheral devices required for XCU test engineering testing may include: program-controlled power supply A, relay A, message transceiver A, and then can confirm the public module of target that matches with the peripheral equipment of target: the target public module matched with the program-controlled power supply A and the program-controlled power supply B is a program-controlled power supply module, the target public module matched with the relay A and the relay B is a relay module, and the target public module matched with the message receiving and transmitting equipment A and the message receiving and transmitting equipment B is a message receiving and transmitting module; furthermore, the target public module can be called to control the target peripheral equipment to execute a test flow according to the test parameters, test execution data of the target peripheral equipment is sent to a domain controller corresponding to the item to be tested, and the domain controller is used for analyzing and processing the test execution data to generate a test result of the item to be tested. Correspondingly, the FSD domain controller can respectively receive the test execution data of the program-controlled power supply B sent by the program power supply module, the test execution data of the relay B sent by the relay module and the test execution data of the message receiving and sending equipment B sent by the message receiving and sending module. After integrating and analyzing the test execution data, the FSD domain controller can generate a test result of the FSD test engineering, and as an alternative way, a report generating module (excel processing module) can be further utilized to generate a corresponding result report; correspondingly, the XCU domain controller may receive the test execution data of the program-controlled power source a sent by the program power source module, the test execution data of the relay a sent by the relay module, and the test execution data of the message transceiver device a sent by the message transceiver module, respectively. After integrating and analyzing the test execution data, the XCU domain controller may generate a test result of the XCU test engineering, and as an alternative manner, may further generate a corresponding result report by using a report generating module (excel processing module).
In fig. 3, the types of the target common modules and the included functional examples are as follows:
1. Program-controlled power supply module: after the connection with the power supply is established, the programmable power supply switch can be controlled, the power supply voltage can be set, the power supply current can be set, the current power supply voltage value can be inquired, the current power supply current value can be inquired, and the current power supply power can be inquired.
2. And a relay module: the on-off of all ports of the relay can be controlled, the on-off of a single port can be independently controlled, and port information is configured during initialization.
3. Excel module: the method mainly comprises the steps of excel file creation, excel sheet page creation, cell content writing, cell merging and storage and exit.
4. Message receiving and transmitting module: the method mainly comprises the steps of sending and receiving messages of different types, wherein the messages comprise standard CAN periodic sending (cancelling sending), standard CAN single-frame sending (cancelling sending), extended CAN periodic sending (cancelling sending) and extended CAN single-frame sending (cancelling sending).
In the foregoing examples, it should be noted that, for different target peripheral devices of the same type, the target peripheral devices may be matched to the same target common module, or may be matched to different target common modules of the same type, for example, the target common modules matched by the relay a and the relay B may be relay modules, or the relay a may be matched to the target common module to be relay module a, and the relay B may be matched to the target common module to be relay module B, which is not limited specifically.
In summary, according to the process communication management method provided by the present disclosure, test case data of a to-be-tested item may be screened in a peripheral device library to obtain a target peripheral device required for testing the to-be-tested item and test parameters of the target peripheral device; inquiring in a public module library based on the equipment information of the target peripheral equipment to obtain a target public module corresponding to the target peripheral equipment; then, the target public module is called to control the target peripheral equipment to execute a test flow according to the test parameters, test execution data of the target peripheral equipment are obtained, and the test execution data are sent to a domain controller corresponding to the item to be tested; and further analyzing and processing the test execution data by utilizing the domain controller to obtain a test result of the item to be tested. According to the technical scheme, the peripheral equipment and the corresponding test function modules are decoupled from the test items respectively, and in the project test process, development and deployment scripts of the peripheral equipment and the corresponding test function modules do not need to be written in advance for each test item, but target peripheral equipment required by the test can be directly matched according to test case data of the project to be tested, and target public modules for controlling the target peripheral equipment are correspondingly screened. The method can reduce the repeated work of code compiling and the debugging time of codes, further can save development resources, and can improve the testing efficiency while reducing the testing cost.
Based on the specific implementation of the method shown in fig. 1-2, the embodiment provides an item testing device, as shown in fig. 4, including: screening module 31, inquiry module 32, test module 33, processing module 34.
The screening module 31 is configured to screen in the peripheral device library based on the test case data of the item to be tested, so as to obtain the target peripheral device required by the test of the item to be tested and the test parameters of the target peripheral device;
The query module 32 is configured to query in the public module library based on the device information of the target peripheral device to obtain a target public module corresponding to the target peripheral device;
The test module 33 is configured to call the target public module to control the target peripheral device to execute a test flow according to the test parameters, obtain test execution data of the target peripheral device, and send the test execution data to the domain controller corresponding to the item to be tested;
the processing module 34 is configured to perform analysis processing on the test execution data by using the domain controller, and generate a test result of the item to be tested.
In a specific application scenario, the screening module 31 is specifically configured to obtain test case data of a project to be tested, where the test case data at least includes a target test service type, a target test service, and test input information corresponding to the target test service; determining peripheral equipment with a corresponding test service type as a target test service type in a peripheral equipment library as target peripheral equipment required by the test of the item to be tested, wherein a plurality of peripheral equipment and the test service type of each peripheral equipment in the plurality of peripheral equipment are stored in the peripheral equipment library; and determining the target test service and the test input information corresponding to the target test service as the test parameters of the target peripheral equipment.
In a specific application scenario, as shown in fig. 5, the present apparatus further includes: an acquisition module 35, a generation module 36 and a storage module 37;
an acquisition module 35 configured to acquire a plurality of historical module test cases for a plurality of projects.
A generating module 36 configured to generate common modules decoupled from the test logic based on the plurality of historical module test cases, and to configure module function information for each common module, the module function information including device information of peripheral devices controlled by the common module.
The storage module 37 is configured to store the common module and module function information corresponding to the common module library.
In a specific application scenario, the query module 32 is specifically configured to develop, if a target common module corresponding to the target peripheral device is not queried in the common module library, a target common module for controlling the target peripheral device according to a module test case of the target peripheral device.
In a specific application scenario, the storage module 37 is further configured to store the developed target common module to the common module library.
In a specific application scenario, the test module 33 is specifically configured to generate a test control code corresponding to the test parameter; and transmitting the test control code into the target public module so that the target public module controls the target peripheral device to execute the test flow by using the test control code.
In a specific application scenario, the common module library further includes a result report generating module, and the processing module 34 is further configured to send, by using the domain controller, test execution data and a test result of the target peripheral device to the report generating module, to obtain a test result report corresponding to the item to be tested, where the test result report is generated by the report generating module according to the test execution data and the test result.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
In summary, according to the project testing method provided by the present disclosure, screening may be performed in a peripheral device library based on test case data of a project to be tested, so as to obtain a target peripheral device required for testing the project to be tested and testing parameters of the target peripheral device; inquiring in a public module library based on the equipment information of the target peripheral equipment to obtain a target public module corresponding to the target peripheral equipment; then, the target public module is called to control the target peripheral equipment to execute a test flow according to the test parameters, test execution data of the target peripheral equipment are obtained, and the test execution data are sent to a domain controller corresponding to the item to be tested; and further analyzing and processing the test execution data by utilizing the domain controller to obtain a test result of the item to be tested. According to the technical scheme, the peripheral equipment and the corresponding test function modules are decoupled from the test items respectively, and in the project test process, the peripheral equipment and the deployment script of the corresponding test function modules do not need to be written in advance for each test item, but target peripheral equipment required by the test can be directly matched according to the test case data of the to-be-tested item, and the target public modules for controlling the target peripheral equipment are correspondingly screened. The method can reduce the repeated work of code compiling and the debugging time of codes, further can save development resources, and can improve the testing efficiency while reducing the testing cost.
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated Circuit System, FPGA (Field Programmable GATE ARRAY ), ASIC (Application-SPECIFIC INTEGRATED Circuit, application-specific integrated Circuit), ASSP (Application SPECIFIC STANDARD Product, application-specific standard Product), SOC (System On Chip ), CPLD (Complex Programmable Logic Device, complex programmable logic device), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, RAM, ROM, EPROM (ELECTRICALLY PROGRAMMABLE READ-Only-Memory, erasable programmable read-Only Memory) or flash Memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., CRT (Cathode-Ray Tube) or LCD (Liquid CRYSTAL DISPLAY) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network ), WAN (Wide Area Network, wide area network), internet and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual PRIVATE SERVER" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be noted that, artificial intelligence is a subject of studying a certain thought process and intelligent behavior (such as learning, reasoning, thinking, planning, etc.) of a computer to simulate a person, and has a technology at both hardware and software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology and the like.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.
Claims (11)
1. A method of testing items, comprising:
screening in a peripheral equipment library based on test case data of a project to be tested to obtain target peripheral equipment required by the test of the project to be tested and test parameters of the target peripheral equipment;
Inquiring in a public module library based on the equipment information of the target peripheral equipment to obtain a target public module corresponding to the target peripheral equipment;
Invoking the target public module to control the target peripheral equipment to execute a test flow according to the test parameters to obtain test execution data of the target peripheral equipment, and sending the test execution data to a domain controller corresponding to the item to be tested;
And analyzing and processing the test execution data by using the domain controller to obtain a test result of the item to be tested.
2. The method according to claim 1, wherein the screening the test case data based on the item to be tested in the peripheral device library to obtain the target peripheral device required by the test of the item to be tested and the test parameters of the target peripheral device includes:
Acquiring test case data of a project to be tested, wherein the test case data at least comprises a target test service type, a target test service and test input information corresponding to the target test service;
Determining peripheral equipment with the corresponding test service type as the target test service type in a peripheral equipment library as target peripheral equipment required by the test of the item to be tested, wherein a plurality of peripheral equipment and the test service type of each peripheral equipment in the plurality of peripheral equipment are stored in the peripheral equipment library;
and determining the test input information corresponding to the target test service as the test parameter of the target peripheral equipment.
3. The method according to claim 1, wherein the method further comprises:
acquiring a plurality of historical module test cases of a plurality of projects;
Generating a common module decoupled from the test logic based on the plurality of historical module test cases;
configuring module function information for each public module, wherein the module function information comprises equipment information of peripheral equipment controlled by the public module;
and storing the public module and the module function information corresponding to the public module into a public module library.
4. The method of claim 1, wherein the method further comprises:
If the target public module corresponding to the target peripheral equipment is not queried in the public module library, developing the target public module for controlling the target peripheral equipment according to the module test case of the target peripheral equipment.
5. The method according to claim 4, wherein the method further comprises:
and storing the developed target public module into the public module library.
6. The method of claim 1, wherein the invoking the target common module to control the target peripheral device to execute a test procedure according to the test parameter comprises:
generating a test control code corresponding to the test parameter;
And transmitting the test control code into the target public module so that the target public module can control the target peripheral equipment to execute a test flow by using the test control code.
7. A method according to claim 3, wherein the common module library further comprises a result report generating module, and after the analyzing the test execution data by the domain controller to generate the test result of the item to be tested, the method further comprises:
And transmitting the test execution data and the test result of the target peripheral equipment to the report generating module by utilizing the domain controller to obtain a test result report corresponding to the item to be tested, wherein the test result report is generated by the report generating module according to the test execution data and the test result.
8. An item testing apparatus, comprising:
the first determining module is configured to screen in a peripheral equipment library based on test case data of a to-be-tested item to obtain target peripheral equipment required by the test of the to-be-tested item and test parameters of the target peripheral equipment;
the second determining module is configured to query in a public module library based on the equipment information of the target peripheral equipment to obtain a target public module corresponding to the target peripheral equipment;
The testing module is configured to call the target public module to control the target peripheral equipment to execute a testing flow according to the testing parameters, obtain testing execution data of the target peripheral equipment, and send the testing execution data to the domain controller corresponding to the item to be tested;
And the processing module is configured to analyze and process the test execution data by utilizing the domain controller to obtain a test result of the item to be tested.
9. An electronic device, comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211639505.3A CN118227452A (en) | 2022-12-20 | 2022-12-20 | Project testing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211639505.3A CN118227452A (en) | 2022-12-20 | 2022-12-20 | Project testing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118227452A true CN118227452A (en) | 2024-06-21 |
Family
ID=91508069
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211639505.3A Pending CN118227452A (en) | 2022-12-20 | 2022-12-20 | Project testing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118227452A (en) |
-
2022
- 2022-12-20 CN CN202211639505.3A patent/CN118227452A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111310934B (en) | Model generation method and device, electronic equipment and storage medium | |
US10642721B2 (en) | Generation of automated testing scripts by converting manual test cases | |
CN107861870B (en) | Interface test and test data generation method, device, terminal and storage medium | |
CN109977012B (en) | Joint debugging test method, device, equipment and computer readable storage medium of system | |
CN111984476A (en) | Test method and device | |
CN113360144B (en) | Auxiliary processing method, device, storage medium and program product for software development | |
CN114445047B (en) | Workflow generation method and device, electronic equipment and storage medium | |
JP2021128779A (en) | Method, device, apparatus, and storage medium for expanding data | |
CN113778849A (en) | Method, apparatus, device and storage medium for testing code | |
CN115509522A (en) | Interface arranging method and system for low-code scene and electronic equipment | |
CN117632710A (en) | Method, device, equipment and storage medium for generating test code | |
CN114090365A (en) | Method, device and equipment for performing function test by using dynamic link library | |
CN113138937A (en) | Test method and device | |
CN117724980A (en) | Method and device for testing software framework performance, electronic equipment and storage medium | |
CN112988578A (en) | Automatic testing method and device | |
CN117521568A (en) | Reference model generation method, device, equipment and storage medium | |
US10289788B1 (en) | System and method for suggesting components associated with an electronic design | |
CN111767316A (en) | Target task processing method and device and electronic equipment | |
CN115481594B (en) | Scoreboard implementation method, scoreboard, electronic equipment and storage medium | |
CN113190154B (en) | Model training and entry classification methods, apparatuses, devices, storage medium and program | |
CN116301916A (en) | Service deployment method, device, electronic equipment and storage medium | |
CN115454818A (en) | White box interface testing method and device, electronic equipment and storage medium | |
CN118227452A (en) | Project testing method and device, electronic equipment and storage medium | |
CN115185819A (en) | System testing method, device, equipment and computer readable storage medium | |
KR20190012492A (en) | Apparatus and method for generating automatic sentence |
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 |