Software testing method and device, electronic equipment and storage medium
By obtaining the requirements files and building a peripheral environment model, the compiled software is tested, and the complexity and time of software testing in the existing technology is solved, and fast and effective software testing is achieved, reducing costs and manpower and material consumption. Enhance testing efficiency and accuracy, and supports testing of multi-version software.
Patent Information
- Application Number
- CN202411363338.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-07
AI Technical Summary
The prior art requires complex functional models and a large amount of manpower and material resources in software testing. The test time is long and can only be used in one version of software, cannot be quickly iterated, and the testing and evaluation of the intermediate layer is limited, and the potential problems are not effectively identified.
By obtaining requirements files, generating evaluation results and integrating them, building a peripheral environment model to test the compiled software, including extracting interactive requirements signals, signal flow directions and component prototypes, generating signal tables, simulating the software to start and modify the CAN message cycle , monitor operating indicators, conduct signal link index evaluation and calibration, and realize fast and effective software testing.
It simplifies the software testing process, reduces costs, avoids possible hidden dangers in testing, improves testing efficiency and accuracy, reduces manpower and material consumption, supports multi-version software testing, and enhances the testing capabilities of the intermediate layer.
Smart Images

Figure CN119271555A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data testing technology, and in particular to a software testing method, device, electronic device and storage medium. Background Art
[0002] The self-developed controller is the core technology in the vehicle production process. Its middle layer provides an interactive bridge between application software and basic software. It is the core of the AUTOSAR architecture and can separate the application from the underlying software. At present, most solutions evaluate the signal mapping relationship and signal link between the underlying software and the application layer after software integration by simulating real nodes, virtual external buses, calibration or application function triggering.
[0003] Existing technologies usually require the construction of complex functional models, manual configuration of variable system matrices, long test execution time, and can only be tested after the software is integrated. At the same time, a large amount of manpower and material resources are required, which is not conducive to rapid iteration testing of projects. On the other hand, the existing technology is limited to the on-off of the integrated software signal link for the middle layer test evaluation, and can only be used for the testing of one version of the software. It pays insufficient attention to the software indicators that affect the operation of the middle layer and does not conduct targeted testing, which may cause potential problems. Summary of the invention
[0004] The purpose of this application is to provide a software testing method, device, electronic device and storage medium, which can simplify the software testing process and realize fast and effective testing of the software. It does not require complex and changeable functional models, does not require a large amount of manpower and material resources, can reduce costs, and avoid potential risks in the testing process.
[0005] In a first aspect, an embodiment of the present application provides a software testing method, the method comprising:
[0006] Obtain the requirements documents needed for software testing;
[0007] Obtaining a demand document summary list according to the demand document;
[0008] Generate an evaluation result according to the summary table of the requirements document;
[0009] When the evaluation result is that the evaluation is passed, the software version is integrated and compiled to obtain the compiled software;
[0010] Building a peripheral environment model according to the requirements document;
[0011] The compiled software is tested according to the peripheral environment model to obtain a test result.
[0012] In the above implementation process, after the software is integrated and compiled according to the evaluation results, the compiled software is tested according to the peripheral environment model, which can simplify the software testing process and achieve fast and effective software testing. It does not require complex and changeable functional models, does not require a large amount of manpower and material resources, can reduce costs, and avoid potential risks in the testing process.
[0013] Furthermore, the step of obtaining a total list of demand documents according to the demand documents comprises:
[0014] Extracting interactive demand signals, signal flows, and component prototypes from the demand files;
[0015] A requirement document summary table is generated according to the interaction requirement signal, the signal flow and the component prototype.
[0016] In the above implementation process, extracting the interactive requirement signals, signal flow and component prototypes in the requirement file can improve the data processing efficiency during the test process, simplify the test process, and make the test more direct and effective.
[0017] Furthermore, the step of generating an evaluation result according to the demand document summary table includes:
[0018] Get the test script;
[0019] According to the test script, the signals in the requirement file summary table are imported into the configuration tool file one by one to generate a signal table;
[0020] Perform signal link index evaluation on the signal table to obtain the evaluation result.
[0021] In the above implementation process, the signals in the requirement file master table are imported according to the test script to generate a signal table, which can make the signal changes more intuitive, effectively improve the extraction efficiency and utilization efficiency of the signal, and shorten the signal processing time.
[0022] Furthermore, the step of testing the compiled software according to the peripheral environment model to obtain a test result includes:
[0023] Simulating software startup according to the peripheral environment model;
[0024] Modify the CAN message cycle of the opponent node, and increase the IO pressure and storage pressure;
[0025] Monitor the operation indicators in the process of modifying the CAN message cycle of the opponent node, increasing the IO pressure and storage pressure, and obtain the target signal;
[0026] The compiled software is tested according to the target signal to obtain a test result.
[0027] In the above implementation process, the CAN message cycle is modified and the IO pressure and storage pressure are increased, which can reduce the software integration process, make the software testing process more intuitive and effective, improve the signal processing capability during the test process, and reduce data redundancy.
[0028] Furthermore, the monitoring step of modifying the CAN message cycle of the opponent node, improving the operating indicators during the process of increasing the IO pressure and storage pressure, and obtaining the target signal includes:
[0029] Construct an evaluation function;
[0030] The target signal is obtained by monitoring the changes in the program flow, stack, CPU load rate and system memory during the process of modifying the CAN message cycle of the opponent node and increasing the IO pressure and storage pressure according to the evaluation function.
[0031] In the above implementation process, the changes of the operating indicators are monitored according to the evaluation function to obtain the target signal, which can improve the accuracy of the target signal, facilitate the backtracking of the test process, and enhance the testing capability of the software.
[0032] Furthermore, the step of testing the compiled software according to the target signal to obtain a test result includes:
[0033] Calibrate the target signal;
[0034] Obtaining an external environment change observation signal of the compiled software;
[0035] The calibrated target signal is tested according to the external environment change observation signal to obtain the test result.
[0036] In the above implementation process, the target signal is calibrated before testing, which makes the target signal easier to identify, improves the test efficiency of the target signal, shortens the test time, and reduces the manpower and material resources consumed in the test process.
[0037] Furthermore, the step of testing the calibrated target signal according to the external environment change observation signal to obtain the test result includes:
[0038] Monitoring whether the transmission of the calibrated target signal is normal according to the external environment change observation signal;
[0039] If so, generating the test result;
[0040] If not, the feedback is abnormal and the signal table is regenerated.
[0041] In the above implementation process, when the transmission of the target signal is normal, the test result is generated. When the transmission of the target signal is abnormal, the abnormality is fed back in time to facilitate retesting the software, thereby avoiding potential risks in the test process and improving test performance.
[0042] In a second aspect, an embodiment of the present application further provides a software testing device, the device comprising:
[0043] Acquisition module, used to obtain the requirement files required for software testing;
[0044] A data acquisition module, used for obtaining a demand document summary table according to the demand document;
[0045] A generation module, used to generate an evaluation result according to the total list of demand documents;
[0046] A compiling module, used for integrating and compiling the software version to obtain the compiled software when the evaluation result is that the evaluation is passed;
[0047] A construction module, used to construct a peripheral environment model according to the requirement document;
[0048] The testing module is used to test the compiled software according to the peripheral environment model to obtain a test result.
[0049] In the above implementation process, after the software is integrated and compiled according to the evaluation results, the compiled software is tested according to the peripheral environment model, which can simplify the software testing process and achieve fast and effective software testing. It does not require complex and changeable functional models, does not require a large amount of manpower and material resources, can reduce costs, and avoid potential risks in the testing process.
[0050] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.
[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.
[0052] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method as described in any one of the first aspects.
[0053] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0054] And it can be implemented according to the contents of the specification. The following is a detailed description of the preferred embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the range values. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0056] Figure 1 A flowchart of a software testing method provided in an embodiment of the present application;
[0057] Figure 2 A schematic diagram of the structure of a software testing device provided in an embodiment of the present application;
[0058] Figure 3 A schematic diagram of the structural composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0060] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0061] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application, but are not used to limit the scope of the present application.
[0062] Embodiment 1
[0063] Figure 1 is a flowchart of a software testing method provided in an embodiment of the present application, such as Figure 1 As shown, the method includes:
[0064] S1, obtain the requirement documents required for software testing;
[0065] S2, obtaining a demand document summary list according to the demand document;
[0066] S3, generating evaluation results according to the total list of requirement documents;
[0067] S4, when the evaluation result is that the evaluation is passed, the software version is integrated and compiled to obtain the compiled software;
[0068] S5, build the peripheral environment model according to the requirements document;
[0069] S6, testing the compiled software according to the peripheral environment model to obtain a test result.
[0070] In the above implementation process, after the software is integrated and compiled according to the evaluation results, the compiled software is tested according to the peripheral environment model, which can simplify the software testing process and achieve fast and effective software testing. It does not require complex and changeable functional models, does not require a large amount of manpower and material resources, can reduce costs, and avoid potential risks in the testing process.
[0071] In S1, the requirement documents related to the software project test are collected, including the bus matrix, the Unified Diagnostic Services (UDS) signal definition table, the IO definition table, etc.
[0072] Furthermore, S2 includes:
[0073] Extract interactive requirement signals, signal flows, and component prototypes from requirement documents;
[0074] Generate a summary list of requirement documents based on interaction requirement signals, signal flows, and component prototypes.
[0075] In the above implementation process, extracting the interactive requirement signals, signal flow and component prototypes in the requirement file can improve the data processing efficiency during the test process, simplify the test process, and make the test more direct and effective.
[0076] Furthermore, S3 includes:
[0077] Get the test script;
[0078] According to the test script, import the signals in the requirement file summary table into the configuration tool file one by one to generate a signal table;
[0079] Perform signal link index evaluation on the signal table to obtain an evaluation result.
[0080] In the above implementation process, the signals in the requirement file master table are imported according to the test script to generate a signal table, which can make the signal changes more intuitive, effectively improve the extraction efficiency and utilization efficiency of the signal, and shorten the signal processing time.
[0081] The embodiment of the present application proposes a fast automatic testing method for the middle layer problem of the AUTOSAR architecture, and evaluates the correctness of the signal link in the above manner. Specifically, the application and underlying interaction requirement signals, signal flow directions, component prototypes in the bus matrix, UDS signal definition table, IO definition table, etc. are extracted through an automated script (a test script in this application, optionally, a Python script), and the ARXML files (configuration tool files) of the AUTOSAR automatic configuration tool are imported one by one to generate a signal table, wherein the signal table contains a list of all middle layer signals, thereby performing automated testing of the signal link index (signal link index evaluation), and directly obtaining the evaluation result after the signal link index evaluation.
[0082] In S4, in the embodiment of the present application, two versions of special software are integrated and compiled, one version is for canceling the middle layer code, and the other version is for configuring the middle layer code.
[0083] Furthermore, S6 includes:
[0084] Simulate software startup based on the peripheral environment model;
[0085] Modify the Controller Area Network (CAN) message cycle of the opponent's node, while increasing IO pressure and storage pressure;
[0086] Monitor the operation indicators in the process of modifying the CAN message cycle of the opponent node, increasing the IO pressure and storage pressure, and obtain the target signal;
[0087] The compiled software is tested according to the target signal to obtain the test results.
[0088] In the above implementation process, the CAN message cycle is modified and the IO pressure and storage pressure are increased, which can reduce the software integration process, make the software testing process more intuitive and effective, improve the signal processing capability during the test process, and reduce data redundancy.
[0089] The embodiment of the present application builds a HiL peripheral environment model through matlab according to project requirements.
[0090] This application uses ECUTEST to achieve automated operation. After the controldesk or other HiL host software is powered on, the CAN message cycle of the opponent node is modified to increase the bus pressure, the controller driver port is forced to be enabled continuously to increase the IO pressure, a large number of faults are injected, and a large amount of data is written through UDS to increase the storage pressure.
[0091] In an embodiment of the present application, if the link index is missing and the evaluation result is failed, there is no need to perform further testing. The CAN message cycle of the opponent node is directly modified and fed back to the link index. When the evaluation result is passed, the test of this step is performed again. This can reduce the time of software integration, which is the concept of software testing in advance.
[0092] This application is based on the perspective of system operation and creates an extreme peripheral environment to examine the stability of the middle layer. It is also based on multiple versions of software and uses automated testing to create a targeted testing method specifically for middle-layer related system parameters.
[0093] Furthermore, the steps of monitoring the operation indicators in the process of modifying the CAN message cycle of the opponent node and increasing the IO pressure and storage pressure to obtain the target signal include:
[0094] Construct an evaluation function;
[0095] According to the evaluation function, the CAN message cycle of the opponent node is modified, and the program flow, stack, central processing unit (CPU) load rate and system memory changes in the process of increasing IO pressure and storage pressure are monitored to obtain the target signal.
[0096] In the above implementation process, the changes of the operating indicators are monitored according to the evaluation function to obtain the target signal, which can improve the accuracy of the target signal, facilitate the backtracking of the test process, and enhance the testing capability of the software.
[0097] The embodiment of the present application uses ECUTEST to construct an evaluation function to observe changes in program flow, stack, CPU load rate, system memory, etc. that affect the operation of the middle layer. The operation indicators include parameters such as program flow, stack, CPU load rate, and system memory.
[0098] Furthermore, the step of testing the compiled software according to the target signal to obtain the test result includes:
[0099] Calibrate the target signal;
[0100] Obtain observation signals of external environment changes of compiled software;
[0101] The calibrated target signal is tested according to the observation signal of the external environment change to obtain the test result.
[0102] In the above implementation process, the target signal is calibrated before testing, which makes the target signal easier to identify, improves the test efficiency of the target signal, shortens the test time, and reduces the manpower and material resources consumed in the test process.
[0103] Further, the step of testing the calibrated target signal according to the external environment change observation signal to obtain the test result includes:
[0104] Monitor the transmission of the calibrated target signal based on the external environment change observation signal to see if it is normal;
[0105] If so, generate test results;
[0106] If not, the feedback is abnormal and the signal table is regenerated.
[0107] In the above implementation process, when the transmission of the target signal is normal, the test result is generated. When the transmission of the target signal is abnormal, the abnormality is fed back in time to facilitate retesting the software, thereby avoiding potential risks in the test process and improving test performance.
[0108] The embodiment of the present application randomly extracts several intermediate layer signals (target signals), and after calibration, sends and receives the target signals, and monitors whether the transmission of the target signals is normal according to the observation signals of the external environment changes.
[0109] The embodiment of the present application sets some tests before integrating the software, which can provide strong support for integrated development, reduce the number of integration times, verify the degree of integration, and avoid the disadvantages of building complex functional models and long test execution time.
[0110] This application combines the requirements document and uses an automated script to determine the correctness of the signal link in the middle layer, thereby achieving separation from the controller's peripheral integration environment (such as a hardware-in-the-loop test system) and implementing one-click testing on a local computer by writing test scripts, thereby shortening the link test execution time.
[0111] Embodiment 2
[0112] In order to execute the method corresponding to the above embodiment 1 to achieve the corresponding functions and technical effects, a software testing device is provided below, such as Figure 2 As shown, the device comprises:
[0113] Acquisition module 1, used to obtain the requirement files required for software testing;
[0114] Data acquisition module 2, used for obtaining a demand document summary table according to the demand document;
[0115] Generating module 3, used to generate evaluation results according to the total list of requirement documents;
[0116] Compilation module 4, used for integrating and compiling the software version to obtain the compiled software when the evaluation result is that the evaluation is passed;
[0117] Construction module 5, used to construct a peripheral environment model according to the requirement document;
[0118] The testing module 6 is used to test the compiled software according to the peripheral environment model to obtain the test result.
[0119] In the above implementation process, after the software is integrated and compiled according to the evaluation results, the compiled software is tested according to the peripheral environment model, which can simplify the software testing process and achieve fast and effective software testing. It does not require complex and changeable functional models, does not require a large amount of manpower and material resources, can reduce costs, and avoid potential risks in the testing process.
[0120] Furthermore, the data acquisition module 2 is also used for:
[0121] Extract interactive requirement signals, signal flows, and component prototypes from requirement documents;
[0122] Generate a summary list of requirement documents based on interaction requirement signals, signal flows, and component prototypes.
[0123] In the above implementation process, extracting the interactive requirement signals, signal flow and component prototypes in the requirement file can improve the data processing efficiency during the test process, simplify the test process, and make the test more direct and effective.
[0124] Furthermore, the generating module 3 is also used for:
[0125] Get the test script;
[0126] According to the test script, import the signals in the requirement file summary table into the configuration tool file one by one to generate a signal table;
[0127] Perform signal link index evaluation on the signal table to obtain an evaluation result.
[0128] In the above implementation process, the signals in the requirement file master table are imported according to the test script to generate a signal table, which can make the signal changes more intuitive, effectively improve the extraction efficiency and utilization efficiency of the signal, and shorten the signal processing time.
[0129] Furthermore, the test module 6 is also used for:
[0130] Simulate software startup based on the peripheral environment model;
[0131] Modify the CAN message cycle of the opponent node, and increase the IO pressure and storage pressure;
[0132] Monitor the operation indicators in the process of modifying the CAN message cycle of the opponent node, increasing the IO pressure and storage pressure, and obtain the target signal;
[0133] The compiled software is tested according to the target signal to obtain the test results.
[0134] In the above implementation process, the CAN message cycle is modified and the IO pressure and storage pressure are increased, which can reduce the software integration process, make the software testing process more intuitive and effective, improve the signal processing capability during the test process, and reduce data redundancy.
[0135] Furthermore, the test module 6 is also used for:
[0136] Construct an evaluation function;
[0137] According to the evaluation function, the CAN message cycle of the opponent node is modified, and the program flow, stack, CPU load rate and system memory changes during the process of increasing IO pressure and storage pressure are monitored to obtain the target signal.
[0138] In the above implementation process, the changes of the operating indicators are monitored according to the evaluation function to obtain the target signal, which can improve the accuracy of the target signal, facilitate the backtracking of the test process, and enhance the testing capability of the software.
[0139] Furthermore, the test module 6 is also used for:
[0140] Calibrate the target signal;
[0141] Obtain observation signals of external environment changes of compiled software;
[0142] The calibrated target signal is tested according to the observation signal of the external environment change to obtain the test result.
[0143] In the above implementation process, the target signal is calibrated before testing, which makes the target signal easier to identify, improves the test efficiency of the target signal, shortens the test time, and reduces the manpower and material resources consumed in the test process.
[0144] Furthermore, the test module 6 is also used for:
[0145] Monitor the transmission of the calibrated target signal based on the external environment change observation signal to see if it is normal;
[0146] If so, generate test results;
[0147] If not, the feedback is abnormal and the signal table is regenerated.
[0148] In the above implementation process, when the transmission of the target signal is normal, the test result is generated. When the transmission of the target signal is abnormal, the abnormality is fed back in time to facilitate retesting the software, thereby avoiding potential risks in the test process and improving test performance.
[0149] The software testing device described above can implement the method of the above embodiment 1. The options in the above embodiment 1 are also applicable to this embodiment and will not be described in detail here.
[0150] The rest of the contents of the embodiments of the present application can refer to the contents of the above-mentioned embodiment 1, and will not be repeated in this embodiment.
[0151] Embodiment 3
[0152] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the software testing method of the first embodiment.
[0153] Optionally, the above-mentioned electronic device may be a server.
[0154] See also Figure 3 , Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 31, a communication interface 32, a memory 33 and at least one communication bus 34. The communication bus 34 is used to realize direct connection and communication between these components. The communication interface 32 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 31 may be an integrated circuit chip with signal processing capabilities.
[0155] The processor 31 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor 31 can also be any conventional processor, etc.
[0156] The memory 33 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 33 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 31, the device can execute the above-mentioned Figure 1 The method embodiment involves various steps.
[0157] Optionally, the electronic device may further include a storage controller and an input / output unit. The memory 33, the storage controller, the processor 31, the peripheral interface, and the input / output unit are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via a communication bus 34. The processor 31 is used to execute executable modules stored in the memory 33, such as software function modules or computer programs included in the device.
[0158] The input and output unit is used to provide users with the task creation and to create an optional time period or preset execution time for the task to enable interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.
[0159] Understandably, Figure 3 The structure shown is for illustration only. The electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0160] In addition, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the software testing method of embodiment 1 when executed by a processor.
[0161] The embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the method described in the method embodiment.
[0162] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based device that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0163] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0164] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0165] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0166] The above is only a specific implementation of the present application, but the protection range of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical range disclosed in the present application, which should be included in the protection range of the present application. Therefore, the protection range of the present application should be based on the protection range of the claims.
[0167] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A software testing method, characterized in that: The method comprises: Obtain the requirements documents needed for software testing; Obtaining a demand document summary list according to the demand document; Generate an evaluation result according to the summary table of the requirements document; When the evaluation result is that the evaluation is passed, the software version is integrated and compiled to obtain the compiled software; Building a peripheral environment model according to the requirements document; The compiled software is tested according to the peripheral environment model to obtain a test result.
2. The software testing method according to claim 1, characterized in that: The step of obtaining a demand document summary list according to the demand document comprises: Extracting interactive demand signals, signal flows, and component prototypes from the demand files; A requirement document summary table is generated according to the interaction requirement signal, the signal flow and the component prototype.
3. The software testing method according to claim 1, characterized in that: The step of generating an evaluation result according to the demand document summary table includes: Get the test script; According to the test script, the signals in the requirement file summary table are imported into the configuration tool file one by one to generate a signal table; Perform signal link index evaluation on the signal table to obtain the evaluation result.
4. The software testing method according to claim 1, characterized in that: The step of testing the compiled software according to the peripheral environment model to obtain a test result comprises: Simulating software startup according to the peripheral environment model; Modify the CAN message cycle of the opponent node, and increase the IO pressure and storage pressure; Monitor the operation indicators in the process of modifying the CAN message cycle of the opponent node, increasing the IO pressure and storage pressure, and obtain the target signal; The compiled software is tested according to the target signal to obtain a test result.
5. The software testing method according to claim 4, characterized in that: The monitoring step of modifying the CAN message cycle of the opponent node, improving the operating indicators in the process of increasing IO pressure and storage pressure, and obtaining the target signal includes: Construct an evaluation function; The target signal is obtained by monitoring the changes in the program flow, stack, CPU load rate and system memory during the process of modifying the CAN message cycle of the opponent node and increasing the IO pressure and storage pressure according to the evaluation function.
6. The software testing method according to claim 4, characterized in that: The step of testing the compiled software according to the target signal to obtain a test result comprises: Calibrate the target signal; Obtaining an external environment change observation signal of the compiled software; The calibrated target signal is tested according to the external environment change observation signal to obtain the test result.
7. The software testing method according to claim 6, characterized in that: The step of testing the calibrated target signal according to the external environment change observation signal to obtain the test result comprises: Monitoring whether the transmission of the calibrated target signal is normal according to the external environment change observation signal; If so, generating the test result; If not, the feedback is abnormal and the signal table is regenerated.
8. A software testing device, characterized in that: The device comprises: Acquisition module, used to obtain the requirement files required for software testing; A data acquisition module, used for obtaining a demand document summary table according to the demand document; A generation module, used to generate an evaluation result according to the total list of demand documents; A compiling module, used for integrating and compiling the software version to obtain the compiled software when the evaluation result is that the evaluation is passed; A construction module, used to construct a peripheral environment model according to the requirement document; The testing module is used to test the compiled software according to the peripheral environment model to obtain a test result.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the software testing method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the software testing method according to any one of claims 1 to 7.