Program testing method, device and equipment and storage medium

CN115934503BActive Publication Date: 2026-09-22SHENZHEN CORERAIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211168106.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2026-09-22
Estimated Expiration
2042-09-23

AI Technical Summary

Technical Problem

[0002]在芯片开发过程中,测试软件正确性是必不可少的一个环节,当软件程序开发完成后,需要在FPGA或硬件加速器上测试软件程序的正确性,当软件程序有问题时,可能会导致芯片卡住或者结果错误

Benefits of technology

[0034]本申请通过将待测试程序的输入数据及配置信息转换成激励信号,将激励信号输入硬件仿真平台对应的芯片后启动仿真测试,不需要额外的硬件设备即可复现待测试程序运行时的硬件行为,同时获取软件平台对待测试程序执行测试的测试结果,该测试结果包含待测试程序运行时的软件行为,将硬件仿真平台的测试结果和软件平台的测试结果进行的对比结果后反馈至预设终端,由于对比结果中包含了待测试程序运行时的硬件行为和软件行为,终端的测试人员可以根据软硬件平台协同测试的对比结果分析出待测试程序出现BUG的代码,并及时发现待测试程序中潜在的BUG,从而定位出待测试程序中具体是哪段代码存在问题,提高测试和调试的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934503B_ABST
    Figure CN115934503B_ABST
Patent Text Reader

Abstract

The application relates to a program testing method, device, equipment and storage medium. The method comprises the following steps: obtaining a to-be-tested program, obtaining input data and configuration information required for testing the to-be-tested program, converting the input data and the configuration information of the to-be-tested program into an excitation signal, starting simulation testing after inputting the excitation signal into a chip corresponding to a hardware simulation platform, obtaining a test result of software platform testing the to-be-tested program, and feeding back a comparison result of the test result of the hardware simulation platform and the test result of the software platform to a preset terminal. According to the comparison result, a tester can analyze the code of the to-be-tested program with a bug, and the potential bug in the to-be-tested program can be found in time, so that the specific code with problems in the to-be-tested program can be located, and the testing and debugging efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of testing technology, and in particular to a program testing method, apparatus, device and storage medium. Background Technology

[0002] In chip development, testing software correctness is an essential step. After the software program is developed, it needs to be tested on an FPGA or hardware accelerator to ensure its correctness. Problems in the software program can cause the chip to freeze or produce incorrect results. If testers only use the software platform to troubleshoot, they usually cannot pinpoint where the software program is stuck or producing incorrect results, nor can they discover potential bugs within the software program. This makes it difficult to identify the specific section of code with the problem, resulting in low testing efficiency. Summary of the Invention

[0003] In view of the above, this application provides a program testing method, apparatus, device and storage medium, the purpose of which is to solve the above-mentioned technical problems.

[0004] Firstly, this application provides a program testing method, the method comprising:

[0005] Obtain the program to be tested, and obtain the input data and configuration information required to test the program to be tested;

[0006] The input data and configuration information are converted into excitation signals;

[0007] After inputting the excitation signal into the chip corresponding to the hardware simulation platform, the simulation test is started, and the first test result is obtained.

[0008] Obtain the second test result of the test performed on the program to be tested by a preset software platform;

[0009] The first test result is compared with the second test result to obtain a comparison result, and the comparison result is fed back to a preset terminal.

[0010] Preferably, the program to be tested is the software program corresponding to a test case that failed to execute when the preset software platform performs tests on a test case set of at least one software program.

[0011] Preferably, the step of converting the input data and the configuration information into an excitation signal includes:

[0012] The input data and configuration information are converted into excitation signals by a pre-configured script. The input data includes the storage address and length of the data, and the input data is stored in a binary file. The configuration information includes the operation type of the configuration data, the address of the configuration data, and the data content of the configuration data.

[0013] Preferably, after obtaining the first test result, the method further includes:

[0014] Store the first test result into the first array.

[0015] Preferably, after obtaining the second test result of the test performed on the program to be tested by the preset software platform, the method further includes:

[0016] The second test result is stored in the second array.

[0017] Preferably, the step of comparing the first test result with the second test result to obtain a comparison result includes:

[0018] Compare the elements at the same index in the first array and the second array;

[0019] If the elements corresponding to the same index in the first array and the second array are the same, a first comparison result is generated.

[0020] If any element with the same index in the first array and the second array is different, a second comparison result is generated.

[0021] Preferably, before generating the second comparison result, the method further includes:

[0022] Mark the indices of elements with the same index in the first array and the second array that correspond to different elements.

[0023] Secondly, this application provides a program testing apparatus, which includes:

[0024] Acquisition module: used to acquire the program to be tested, and to acquire the input data and configuration information required to test the program to be tested;

[0025] Conversion module: used to convert the input data and configuration information into excitation signals;

[0026] First test module: used to input the excitation signal into the chip corresponding to the hardware simulation platform to start the simulation test and obtain the first test result;

[0027] The second testing module is used to obtain the second test results of the test performed on the program under test by a preset software platform.

[0028] Comparison module: used to compare the first test result with the second test result to obtain a comparison result, and to feed back the comparison result to a preset terminal.

[0029] Thirdly, this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0030] Memory, used to store computer programs;

[0031] When a processor executes a program stored in memory, it implements the steps of the program testing method described in any embodiment of the first aspect.

[0032] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the program testing method as described in any embodiment of the first aspect.

[0033] The technical solutions provided in this application have the following advantages compared with the prior art:

[0034] This application converts the input data and configuration information of the program under test into stimulus signals. These signals are then input to the corresponding chip on the hardware simulation platform to initiate simulation testing. This allows for the reproduction of the hardware behavior of the program under test without additional hardware equipment. Simultaneously, the test results from the software platform are obtained, including the software behavior of the program under test. The comparison between the hardware and software platform test results is fed back to a preset terminal. Since the comparison results include both the hardware and software behavior of the program under test, terminal testers can analyze the code containing bugs in the program under test based on the comparison results of the hardware and software platform collaborative testing. This allows for timely discovery of potential bugs and pinpointing the specific code segment with the problem, thus improving testing and debugging efficiency. Attached Figure Description

[0035] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1This is a flowchart illustrating a preferred embodiment of the procedure testing method of this application;

[0038] Figure 2 This is a schematic diagram of a preferred embodiment of the testing apparatus for the present application.

[0039] Figure 3 This is a schematic diagram of a preferred embodiment of the electronic device of this application;

[0040] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0042] It should be noted that the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.

[0043] This application provides a program testing method. (Refer to...) Figure 1 The diagram shown is a flowchart illustrating an embodiment of the program testing method of this application. This method can be executed by an electronic device, which can be implemented in software and / or hardware. The program testing method includes:

[0044] Step S10: Obtain the program to be tested, and obtain the input data and configuration information required to test the program to be tested;

[0045] Step S20: Convert the input data and the configuration information into excitation signals;

[0046] Step S30: Input the excitation signal into the chip corresponding to the hardware simulation platform and start the simulation test to obtain the first test result;

[0047] Step S40: Obtain the second test result of the test performed on the program to be tested by the preset software platform;

[0048] Step S50: Compare the first test result with the second test result to obtain a comparison result, and feed back the comparison result to a preset terminal.

[0049] In this embodiment, the electronic device is equipped with a hardware simulation platform and a preset software platform. The hardware simulation platform can perform simulation tests on the program to be tested, and the preset software platform can test the correctness of the program code. The program to be tested can refer to the software program running on the chip that needs to be tested during chip development. This software program can be the software code of a functional module in a software product, or it can be the software code of a complete software product. Furthermore, when the preset software platform executes tests on at least one software program's test case set, there are software programs corresponding to test cases that fail to execute. That is, after the software program fails to be tested or debugged, the program to be tested that failed to debug can be obtained, and it is also necessary to obtain the input data and configuration information required to test the program to be tested.

[0050] For example, if there are three software programs, A, B, and C, each with a corresponding test case set, and if the software platform executes tests on the test case set of software program A, and there are test cases that fail, then software program A is taken as the program to be tested. The platform then obtains the input data and configuration information required to test software program A and verifies it using a hardware simulation platform. The configuration information refers to the configuration information of the failed test case scenarios, such as the size of the input image and the size of the output result. The input data refers to the data input to the software platform for testing corresponding to the failed test case scenarios, such as input image information and feature function information.

[0051] After obtaining the input data and configuration information required for testing the program under test, the input data and configuration information are converted into stimulus signals. These stimulus signals are then input to the corresponding chip on the hardware simulation platform (e.g., an EDA platform) to initiate simulation testing, yielding a first test result. Simulation testing refers to testing the software program in a simulated real-world usage environment, configuring it to a realistic usage state. The first test result represents the test result of the program under test on the hardware simulation platform, containing the hardware behavior of the program under test during runtime. Simultaneously, a second test result is obtained from a preset software platform that performs the test on the program under test. This second test result represents the test result of the program under test on the software platform, containing the software behavior of the program under test during runtime. The second test result can be obtained from the Golden real-time database.

[0052] The comparison results are obtained by comparing the first test result with the second test result, that is, by comparing the test results of the program under test on the hardware simulation platform with the test results of the program under test on the software platform. The comparison results are then matched with a pre-configured fault analysis table. Based on the matching results, the problems existing in the program under test are determined. It can be understood that the fault analysis table records the mapping relationship between various comparison results and the problems existing when the program under test fails to debug. Based on the comparison results of the first test result and the second test result, the problems existing in the program under test can be found. The comparison results can also be fed back to a preset terminal, which can be the terminal corresponding to the tester. After receiving the comparison results, the tester can analyze and locate the problems existing in the program under test based on the comparison results. For the program under test that fails to test or debug, the program under test is reproduced through the hardware simulation platform. The tester can quickly understand where the problem in the program under test is by viewing the waveform and analyzing it.

[0053] This application converts the input data and configuration information of the program under test into excitation signals. After inputting the excitation signals into the chip corresponding to the hardware simulation platform, the simulation test is started, and the test results of the software platform executing the test on the program under test are obtained. The test results of the hardware simulation platform and the software platform are compared and fed back to the preset terminal. Since the comparison results include the test results of the hardware simulation platform and the software platform, the testers at the terminal can analyze the code in the program under test that contains bugs based on the comparison results, and promptly discover potential bugs in the program under test, thereby locating the specific code segment in the program under test that has a problem, improving the efficiency of testing and debugging.

[0054] In one embodiment, converting the input data and the configuration information into an excitation signal includes:

[0055] The input data and configuration information are converted into excitation signals by a pre-configured script. The input data includes the storage address and length of the data, and the input data is stored in a binary file. The configuration information includes the operation type of the configuration data, the address of the configuration data, and the data content of the configuration data.

[0056] Input data is stored as a binary (bin) file, including its storage address and length. Configuration information includes the operation type, address, and content of the configuration data. Based on the binary file and configuration data, a pre-configured script can convert the input data and configuration information into excitation signals—in other words, into information that the hardware simulation platform can recognize.

[0057] In one embodiment, after obtaining the first test result, the method further includes:

[0058] Store the first test result into the first array.

[0059] The first test result is the chip simulation test result of the hardware simulation platform. Storing the first test result in the array mem_data can save simulation space. The format of the first array is mem_data[addr] = data.

[0060] Furthermore, after obtaining the second test result of the test performed on the program under test by the preset software platform, the method further includes:

[0061] The second test result is stored in the second array.

[0062] The second test result is the test result of the software platform on the program to be tested. The second test result is stored in the array mem_golden, and the format of the second array is mem_golden[addr] = data.

[0063] Further, the step of comparing the first test result with the second test result to obtain a comparison result includes:

[0064] Compare the elements at the same index in the first array and the second array;

[0065] If the elements corresponding to the same index in the first array and the second array are the same, a first comparison result is generated.

[0066] If any element with the same index in the first array and the second array is different, a second comparison result is generated.

[0067] An array index indicates the position of an array element within the array. Each array has multiple indices, and each index corresponds to an element. The elements corresponding to the same index in the first array and the second array are compared. For example, if the first array is m with indices 0, 1, 2, and 3, and the second array is n with indices 0, 1, 2, and 3, then the elements of m[0] are compared with those of n[0], m[1] with those of n[1], m[2] with those of n[2], and m[3] with those of n[3]. If the elements corresponding to each index in the first and second arrays are identical, it indicates that the test results of the hardware simulation platform and the software platform are the same, and a first comparison result is generated (e.g., the comparison results are the same). If any element with the same index in the first array and the second array are different, a second comparison result is generated (for example, the comparison results are different). For example, if the elements of m[1] and n[1] are different, it means that the test results of the hardware simulation platform and the software platform are different. When the program to be tested is a software program that failed the test on the software platform, the tester can use waveform analysis to analyze the internal behavior of the chip. By analyzing the waveform, it can be determined whether there is a problem with the configuration. If there is no problem with the configuration, the signals of each module of the chip can be analyzed to determine whether there is a problem with the calculation, thereby locating which part of the code of the program to be tested has a problem.

[0068] Furthermore, before generating the second comparison result, the method further includes:

[0069] Mark the indices of elements with the same index in the first array and the second array that correspond to different elements.

[0070] Since there may be multiple elements corresponding to the same index that are different, for example, the elements of m[1] and n[1] are different, and the elements of m[3] and n[3] are different. In order for the testers to clearly see the comparison results, the indices of the elements corresponding to the same index that are different in the first array and the second array can be marked. For example, if the elements of m[1] and n[1] are different, then the index 1 of the first array m and the index 1 of the second array n are marked. The testers can see the indices of the different elements in the first array and the second array in the comparison results.

[0071] Reference Figure 2 The diagram shown is a functional module schematic of the procedure testing device 100 of this application.

[0072] The program testing device 100 described in this application can be installed in an electronic device. Depending on the functions implemented, the program testing device 100 may include an acquisition module 110, a conversion module 120, a first testing module 130, a second testing module 140, and a comparison module 150. The module described in this application can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device.

[0073] In this embodiment, the functions of each module / unit are as follows:

[0074] Acquisition module 110: used to acquire the program to be tested, and to acquire the input data and configuration information required to test the program to be tested;

[0075] Conversion module 120: used to convert the input data and the configuration information into excitation signals;

[0076] First test module 130: used to input the excitation signal into the chip corresponding to the hardware simulation platform to start the simulation test and obtain the first test result;

[0077] Second test module 140: used to obtain the second test result of the test performed on the program to be tested by the preset software platform;

[0078] Comparison module 150: used to compare the first test result with the second test result to obtain a comparison result, and to feed back the comparison result to a preset terminal.

[0079] In one embodiment, the program to be tested is a software program corresponding to test cases that fail to execute when the preset software platform performs tests on a test case set of at least one software program.

[0080] In one embodiment, converting the input data and the configuration information into an excitation signal includes:

[0081] The input data and configuration information are converted into excitation signals by a pre-configured script. The input data includes the storage address and length of the data, and the input data is stored in a binary file. The configuration information includes the operation type of the configuration data, the address of the configuration data, and the data content of the configuration data.

[0082] In one embodiment, the first test module 130 is further configured to:

[0083] Store the first test result into the first array.

[0084] In one embodiment, the first test module 140 is further configured to:

[0085] The second test result is stored in the second array.

[0086] In one embodiment, comparing the first test result with the second test result to obtain a comparison result includes:

[0087] Compare the elements at the same index in the first array and the second array;

[0088] If the elements corresponding to the same index in the first array and the second array are the same, a first comparison result is generated.

[0089] If any element with the same index in the first array and the second array is different, a second comparison result is generated.

[0090] In one embodiment, the comparison module 150 is further configured to:

[0091] Mark the indices of elements with the same index in the first array and the second array that correspond to different elements.

[0092] Reference Figure 3 The diagram shown is a schematic diagram of a preferred embodiment of the electronic device 1 of this application.

[0093] The electronic device 1 includes, but is not limited to, a memory 11, a processor 12, a display 13, and a communication interface 14. The electronic device 1 can connect to a network via the communication interface 14. The network can be an intranet, the Internet, a Global System for Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA) network, a 4G network, a 5G network, Bluetooth, Wi-Fi, a voice communication network, or other wireless or wired networks.

[0094] The memory 11 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as the hard disk or memory of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. of the electronic device 1. Of course, the memory 11 may include both the internal storage unit and the external storage device of the electronic device 1. In this embodiment, the memory 11 is typically used to store the operating system and various computer programs installed on the electronic device 1, such as the program code of computer program 10. In addition, the memory 11 may also be used to temporarily store various types of data that have been output or will be output.

[0095] In some embodiments, processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. Processor 12 is typically used to control the overall operation of the electronic device 1, such as performing data interaction or communication-related control and processing. In this embodiment, processor 12 is used to run program code stored in memory 11 or process data, such as running the program code of computer program 10.

[0096] The display 13 may be referred to as a display screen or display unit. In some embodiments, the display 13 may be an LED display, a liquid crystal display, a touch liquid crystal display, or an organic light-emitting diode (OLED) touch screen, etc. The display 13 is used to display information processed in the electronic device 1 and to display a visual working interface.

[0097] The communication interface 14 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface), which is typically used to establish a communication connection between the electronic device 1 and other electronic devices.

[0098] Figure 3Only an electronic device 1 having components 11-14 and computer program 10 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0099] In the above embodiments, when the processor 12 executes the computer program 10 stored in the memory 11, it can perform the following steps:

[0100] Obtain the program to be tested, and obtain the input data and configuration information required to test the program to be tested;

[0101] The input data and configuration information are converted into excitation signals;

[0102] After inputting the excitation signal into the chip corresponding to the hardware simulation platform, the simulation test is started, and the first test result is obtained.

[0103] Obtain the second test result of the test performed on the program to be tested by a preset software platform;

[0104] The first test result is compared with the second test result to obtain a comparison result, and the comparison result is fed back to a preset terminal.

[0105] The storage device can be the memory 11 of the electronic device 1, or it can be other storage devices that are communicatively connected to the electronic device 1.

[0106] For a detailed explanation of the above steps, please refer to the above. Figure 2 Functional block diagram of embodiment of program testing device 100 and Figure 1 Description of the flowchart of the implementation of the program testing method.

[0107] Furthermore, this application also proposes a computer-readable storage medium, which can be non-volatile or volatile. This computer-readable storage medium can be any one or any combination of several of the following: hard disk, multimedia card, SD card, flash memory card, SMC, read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, etc. The computer-readable storage medium includes a data storage area and a program storage area. The program storage area stores a computer program 10, which, when executed by a processor, performs the following operations:

[0108] Obtain the program to be tested, and obtain the input data and configuration information required to test the program to be tested;

[0109] The input data and configuration information are converted into excitation signals;

[0110] After inputting the excitation signal into the chip corresponding to the hardware simulation platform, the simulation test is started, and the first test result is obtained.

[0111] Obtain the second test result of the test performed on the program to be tested by a preset software platform;

[0112] The first test result is compared with the second test result to obtain a comparison result, and the comparison result is fed back to a preset terminal.

[0113] The specific implementation of the computer-readable storage medium in this application is largely the same as the specific implementation of the program testing method described above, and will not be repeated here.

[0114] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware simulation platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, electronic device, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0116] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A program testing method, characterized in that, The method includes: Obtain the program to be tested, and obtain the input data and configuration information required to test the program to be tested. The program to be tested is the software program corresponding to the test cases that fail to execute when the preset software platform executes the test case set of at least one software program. The configuration information is the configuration information of the failed test case scenario. The input data refers to the data input to the software platform for testing corresponding to the failed test case scenario. The input data and configuration information are converted into excitation signals by a pre-configured script. The input data includes the storage address and length of the data, and the input data is stored in a binary file. The configuration information includes the operation type of the configuration data, the address of the configuration data, and the data content of the configuration data. After inputting the excitation signal into the chip corresponding to the hardware simulation platform, the simulation test is started, the first test result is obtained, and the first test result is stored in the first array; Obtain the second test result of the test performed on the program to be tested by the preset software platform, and store the second test result in the second array; The first test result is compared with the second test result to obtain a comparison result, and the comparison result is fed back to a preset terminal; The step of comparing the first test result with the second test result to obtain a comparison result includes: Compare the elements at the same index in the first array and the second array; If the elements corresponding to the same index in the first array and the second array are the same, a first comparison result is generated. If any element with the same index in the first array and the second array is different, a second comparison result is generated.

2. The program testing method as described in claim 1, characterized in that, The program to be tested is the software program corresponding to a test case that failed to execute when the preset software platform performs tests on at least one software program's test case set.

3. The program testing method as described in claim 1, characterized in that, Before generating the second comparison result, the method further includes: Mark the indices of elements with the same index in the first array and the second array that correspond to different elements.

4. A program testing device, characterized in that, The device includes: Acquisition Module: Used to acquire the program to be tested, and to acquire the input data and configuration information required to test the program to be tested. The program to be tested is the software program corresponding to the test cases that failed to execute when the preset software platform executes the test case set of at least one software program. The configuration information is the configuration information of the failed test case scenario. The input data refers to the data input to the software platform for testing corresponding to the failed test case scenario. Conversion module: used to convert the input data and configuration information into excitation signals through a pre-configured script, wherein the input data includes the storage address and length of the data, the input data is stored in a binary file, and the configuration information includes the operation type of the configuration data, the address of the configuration data, and the data content of the configuration data; First test module: used to input the excitation signal into the chip corresponding to the hardware simulation platform to start the simulation test, obtain the first test result, and store the first test result into the first array; The second test module is used to obtain the second test result of the test performed on the program to be tested by the preset software platform, and store the second test result in the second array. Comparison module: used to compare the first test result with the second test result to obtain a comparison result, and to feed back the comparison result to a preset terminal; The step of comparing the first test result with the second test result to obtain a comparison result includes: Compare the elements at the same index in the first array and the second array; If the elements corresponding to the same index in the first array and the second array are the same, a first comparison result is generated. If any element with the same index in the first array and the second array is different, a second comparison result is generated.

5. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the program testing method according to any one of claims 1 to 3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the program testing method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Chip simulation verification method, system and device and storage medium

    CN113032195A

  • High-efficiency standardized SOC system-level verification method and device

    CN114325333A