CN112214366A - Test method, device, system, equipment and medium - Google Patents

Test method, device, system, equipment and medium Download PDF

Info

Publication number
CN112214366A
CN112214366A CN202011028723.4A CN202011028723A CN112214366A CN 112214366 A CN112214366 A CN 112214366A CN 202011028723 A CN202011028723 A CN 202011028723A CN 112214366 A CN112214366 A CN 112214366A
Authority
CN
China
Prior art keywords
scene
parameter set
test
configuration parameter
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.)
Granted
Application number
CN202011028723.4A
Other languages
Chinese (zh)
Other versions
CN112214366B (en
Inventor
胡海莽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Shenzhen Intellifusion Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Intellifusion Technologies Co Ltd filed Critical Shenzhen Intellifusion Technologies Co Ltd
Priority to CN202011028723.4A priority Critical patent/CN112214366B/en
Publication of CN112214366A publication Critical patent/CN112214366A/en
Application granted granted Critical
Publication of CN112214366B publication Critical patent/CN112214366B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2236Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2294Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by remote test
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application is applicable to the technical field of testing, and provides a testing method, which comprises the following steps: acquiring a configuration file; analyzing the configuration file to obtain a scene configuration parameter set in the configuration file, and respectively sending the scene configuration parameter set obtained by analysis to the device to be tested and the reference device, wherein the scene configuration parameter set is used for selecting the ith scene from N scenes, and i is more than or equal to 1 and less than or equal to N; receiving a test result of the device to be tested based on the scene configuration parameter set, and receiving a test result of the reference device based on the scene configuration parameter set; and determining the equipment state of the equipment to be tested in the ith scene according to the test result of the equipment to be tested and the test result of the reference equipment. According to the method and the device, the scene is selected through the scene configuration parameter set, and the test efficiency of testing the device to be tested is improved.

Description

Test method, device, system, equipment and medium
Technical Field
The present application relates to the field of testing technologies, and in particular, to a testing method, apparatus, system, device, and medium.
Background
Before a device (e.g., a processor) is put into use, it is often necessary to test the device to find problems with the device, and to correct problems with the device in a timely manner.
In the related art, it is necessary to improve the test efficiency of testing the device.
Disclosure of Invention
The embodiment of the application provides a test method, a test device, a test system, equipment and a medium, and aims to solve the problem that the test efficiency of equipment test in the related art is not high enough.
In a first aspect, an embodiment of the present application provides a testing method, where the method includes:
acquiring a configuration file;
analyzing the configuration file to obtain a scene configuration parameter set in the configuration file, and respectively sending the scene configuration parameter set obtained by analysis to the device to be tested and the reference device, wherein the scene configuration parameter set is used for selecting the ith scene from N scenes, and i is more than or equal to 1 and less than or equal to N;
receiving a test result of the device to be tested based on the scene configuration parameter set, and receiving a test result of the reference device based on the scene configuration parameter set;
and determining the equipment state of the equipment to be tested in the ith scene according to the test result of the equipment to be tested and the test result of the reference equipment.
Further, obtaining the configuration file includes any one or more of:
generating a configuration file according to a preset configuration file generation step;
receiving a configuration file input by a user;
and extracting the configuration file from a preset storage area.
Further, generating the configuration file according to a preset configuration file generating step includes:
acquiring a preset scene configuration parameter set, and distributing values to each scene configuration parameter in the scene configuration parameter set, wherein different values of the scene configuration parameters correspond to different scenes;
and generating a configuration file according to each scene configuration parameter in the scene configuration parameter set and the value of the corresponding scene configuration parameter.
Further, determining the device state of the device to be tested in the ith scene according to the test result of the device to be tested and the test result of the reference device, including:
and if the difference value between the test result of the equipment to be tested and the test result of the reference equipment is greater than the preset difference threshold value, determining that the equipment state of the equipment to be tested in the ith scene is an abnormal state.
Further, obtaining the configuration file comprises:
and when the test condition is met, generating a configuration file according to a preset configuration file generation step.
Further, the test conditions include any one or more of:
receiving test starting information input by a user;
receiving a test result, wherein the number of times of generating the configuration file currently is less than a preset number threshold;
and receiving a test result, wherein the total test time for testing currently is less than a preset time threshold.
Further, the method further comprises:
and if the equipment state of the equipment to be tested in the ith scene is an abnormal state, storing the configuration file.
Further, the configuration file is in a JSON format.
In a second aspect, an embodiment of the present application provides a test system, including: a test server, a device under test and a reference device, wherein,
the test server is used for acquiring a configuration file; analyzing the configuration file to obtain a scene configuration parameter set in the configuration file, and respectively sending the scene configuration parameter set obtained by analysis to the device to be tested and the reference device, wherein the scene configuration parameter set is used for selecting the ith scene from N scenes, and i is more than or equal to 1 and less than or equal to N;
the device to be tested is used for testing based on the scene configuration parameter set and sending a test result to the test server;
the reference equipment is used for testing based on the scene configuration parameter set and sending a test result to the test server;
the test server is also used for receiving a test result of the device to be tested based on the scene configuration parameter set and receiving a test result of the reference device based on the scene configuration parameter set; and determining the equipment state of the equipment to be tested in the ith scene according to the test result of the equipment to be tested and the test result of the reference equipment.
Furthermore, the system also comprises hardware analysis equipment which is respectively in communication connection with the test server and the equipment to be tested; and
in the test server, parsing the configuration file to obtain a scene configuration parameter set in the configuration file, and sending the scene configuration parameter set obtained by parsing to the device to be tested and the reference device, respectively, including:
analyzing the configuration file through a preset analysis program, and sending a scene configuration parameter set obtained through analysis to a reference device:
and sending the configuration file to a hardware analysis device in communication connection, so that the hardware analysis device analyzes the configuration file, encapsulates the scene configuration parameter set obtained by analysis into an instruction program, and sends the scene configuration parameter set in the form of the instruction program to the device to be tested.
Furthermore, the device to be tested comprises a program memory, a control unit, an external input data direct memory accessor, an external output data direct memory accessor, a double-rate synchronous dynamic random access memory, a multi-path data selector and a data memory; and
if the scene configuration parameter set sent to the device under test is a scene configuration parameter set in the form of an instruction program, and the scene configuration parameter set includes a first parameter for indicating read data or write data, a second parameter for indicating source address information, and a third parameter for indicating destination address information, then, in the device under test, a test is performed based on the scene configuration parameter set, which includes:
the program memory receives and stores instruction programs;
the control unit reads the instruction program from the program memory, and if the first parameter indicates to write data, the control unit sends the instruction program to the external input data direct storage accessor; if the first parameter indicates to read out the data, sending the instruction program to an external output data direct storage accessor;
the external input data direct memory access device stores the data at the address corresponding to the source address information in the double-rate synchronous dynamic random access memory to the address corresponding to the target address information in the data memory through the multi-channel data selector according to the source address information and the target address information corresponding to the received instruction program;
the data memory sends the stored data and the address of the stored data to the test server;
the external output data direct memory access device stores the data at the address corresponding to the source address information in the data memory to the address corresponding to the target address information in the double-rate synchronous dynamic random access memory through the multi-channel data selector according to the source address information and the target address information corresponding to the received instruction program;
the double-rate synchronous dynamic random access memory sends the stored data and the address of the stored data to the test server.
In a third aspect, an embodiment of the present application provides a testing apparatus, including:
a file acquisition unit for acquiring a configuration file;
the file analysis unit is used for analyzing the configuration file to obtain a scene configuration parameter set in the configuration file and respectively sending the scene configuration parameter set obtained through analysis to the device to be tested and the reference device, wherein the scene configuration parameter set is used for selecting the ith scene from N scenes, and i is more than or equal to 1 and less than or equal to N;
the result receiving unit is used for receiving a test result of the device to be tested based on the scene configuration parameter set and receiving a test result of the reference device based on the scene configuration parameter set;
and the abnormality judgment unit is used for determining the equipment state of the equipment to be tested in the ith scene according to the test result of the equipment to be tested and the test result of the reference equipment.
In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the steps of the test method are implemented.
In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the test method.
In a sixth aspect, the present application provides a computer program product, which when run on an electronic device, causes the electronic device to execute the test method of any one of the above first aspects.
The beneficial effects of the embodiment of the application are that: the scene is selected through the scene configuration parameter set, so that the selection of the scene becomes simple and easy to realize. The method and the device can conveniently and quickly select the scene for testing the equipment to be tested, thereby accelerating the testing speed and being beneficial to improving the testing efficiency of the equipment to be tested.
It is understood that the beneficial effects of the second to sixth aspects can be seen from the description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic flow chart of a testing method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a testing method according to another embodiment of the present application;
FIG. 3 is a schematic diagram of a test system provided by an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a process of testing a device under test based on a scene configuration parameter set according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a test system provided in another embodiment of the present application;
FIG. 6 is a schematic structural diagram of a testing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The test method provided by the embodiment of the application can be applied to a test server. The test server may be hardware or software. When the test server is hardware, it may be implemented as a distributed server cluster providing test service, or may be implemented as a single server. When the test server is software, it can be installed in the above listed servers. It may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, and is not particularly limited herein.
In order to explain the technical means of the present application, the following examples are given below.
Example one
Referring to fig. 1, an embodiment of the present application provides a testing method, including:
step 101, obtaining a configuration file.
The configuration file generally refers to a file for configuring parameters of the test.
In this embodiment, the execution subject of the test method may be a test server. The execution body may acquire the configuration file in various ways. For example, the execution body may acquire the configuration file by reading data from a setting device (e.g., a usb disk). For another example, the execution subject may obtain the configuration file by directly obtaining the user input information.
Step 102, parsing the configuration file to obtain a scene configuration parameter set in the configuration file, and sending the scene configuration parameter set obtained by parsing to the device to be tested and the reference device respectively.
The scene configuration parameter set is used for selecting the ith scene from the N scenes. Wherein i is more than or equal to 1 and less than or equal to N.
The scene configuration parameters in the scene configuration parameter set may be various parameters for describing a scene. For example, the scene configuration parameter may be a parameter for describing a start address of the read data, and may also be a parameter for describing an end address of the read data. But also parameters describing the way the data is read. Each scene configuration parameter in the scene configuration parameter set may describe a portion of a scene, and the combination of all scene configuration parameters in the scene configuration parameter set may describe a complete scene.
In practical applications, the scene configuration parameters in the scene configuration parameter set may include, but are not limited to: parameters for describing data format, parameters for describing start address of data memory, parameters for describing end address of data memory, parameters for describing address of double rate synchronous dynamic random access memory, etc. The values of the parameters for describing the data format may be 1, 2, and 3. As an example, if the value of the parameter for describing the data format is 1, the parameter may be used to indicate that the data format is 16-bit data. If the value of the parameter for describing the data format is 2, the parameter can be used to indicate that the data format is 8 bits of data. The parameter for describing the start address of the data memory may take a value of 0 to 100000. The value of the parameter for describing the ending address of the data memory can be 0-100000. The parameter for describing the address of the DDR SDRAM may take a value of 0 to 100000.
The above scenario generally refers to a simulated scenario when the device is applied. For example, the above scenario may be: and writing the data in the A address of the A storage unit in the device into the B address of the B storage unit. The above scenario may also be: and writing the data in the B address of the B storage unit in the device into the A address of the A storage unit. The above scenario may also be: data in an A storage unit in the device with an A1 address as a starting address and an A2 address as an ending address is written into a plurality of continuous addresses with a B1 address as a starting address in a B storage unit.
The device to be tested may be various devices to be tested, such as a smart phone, a desktop computer, and the like. It should be noted that the device under test may be hardware or software.
In practice, the device under test may be a Neural Network Processor (Neural Network Processor NNP). A neural network processor is generally a processor that processes data using a neural network method. The neural network processor may be hardware or software. As an example, when the neural network processor is hardware, it may be implemented as a chip. As another example, when the neural network processor is software, it may be implemented as a plurality of software or software modules, or as a single software or software module.
Wherein the above-mentioned reference device is typically a device used as a test control. It should be noted that the above-mentioned reference device may be hardware or software. In practice, the reference device is usually a software device that is pre-constructed by the test server and has the same or similar structure as the device under test.
Here, configuring the device under test and the reference device with the same configuration parameters may cause the device under test and the reference device to have exactly the same test inputs. Therefore, the execution main body can timely and accurately capture possible problems of the equipment to be tested by comparing the test output of the execution main body and the test output of the execution main body, and the test accuracy is improved.
In this embodiment, since the configuration file generally has a certain format, the execution main body may parse the configuration file according to the format of the configuration file, so as to obtain the scene configuration parameters in the configuration file, and a set of all the scene configuration parameters obtained through parsing is the scene configuration parameter set. After the scene configuration parameter set is obtained, the execution main body may send the obtained scene configuration parameter set to the device to be tested and the reference device in a wired connection manner or a wireless connection manner. In this way, the device under test and the reference device may be tested based on the scene configuration parameter set.
The device to be tested can generally assign the parameter values of the scene configuration parameters to corresponding operation parameters in the device to be tested, so that the device to be tested performs operation test, and the device to be tested is tested.
Similarly, the reference device may generally assign the parameter values of the scene configuration parameters to corresponding operating parameters in the reference device, so that the reference device performs an operation test, thereby implementing the test on the reference device.
It should be noted that, the specific process of testing the device to be tested and the reference device in this embodiment is not specifically limited.
Step 103, receiving a test result of the device to be tested based on the scene configuration parameter set, and receiving a test result of the reference device based on the scene configuration parameter set.
In this embodiment, the execution main body may receive the test result of the device under test and the test result of the reference device through a wired connection manner or a wireless connection manner.
And 104, determining the equipment state of the equipment to be tested in the ith scene according to the test result of the equipment to be tested and the test result of the reference equipment.
The device state is generally a state indicating whether an abnormality exists in the device under test. The device state may include a normal state and an abnormal state.
In this embodiment, the execution subject may compare the test result of the device under test with the test result of the reference device, and determine the device status of the device under test according to the comparison result. As an example, the executing entity may consider that the device under test does not have an abnormality currently and the device status is a normal status when the test result of the device under test is the same as the test result of the reference device. Otherwise, if the test result of the device to be tested is different from the test result of the reference device, the device to be tested is considered to be abnormal currently, and the device state is an abnormal state.
In this embodiment, when the scene selected by the scene configuration parameter set is the ith scene, it may be implemented to test whether the device under test is abnormal in the ith scene. The device to be tested is tested by taking the scene as a unit, so that the abnormity of the device to be tested, which is shown for a certain scene or a plurality of specific scenes, can be timely and accurately found, and the problem of the device to be tested is pertinently solved. The overall test efficiency of the test of the device to be tested is improved.
In this embodiment, the scene is selected through the scene configuration parameter set, so that the selection of the scene becomes simple and easy to implement. The method and the device can conveniently and quickly select the scene for testing the equipment to be tested, thereby accelerating the testing speed and being beneficial to improving the testing efficiency of the equipment to be tested. In addition, the reference equipment is used as the test comparison of the equipment to be tested, and the equipment to be tested and the reference equipment are enabled to have the same test input by configuring the same configuration parameters for the equipment to be tested and the reference equipment. The reference equipment and the equipment to be tested are tested under the same test environment, the possible problems of the equipment to be tested can be timely and accurately captured by comparing the test output of the reference equipment and the equipment to be tested, and the test accuracy is improved.
In some optional implementation manners of this embodiment, the obtaining of the configuration file may be implemented by any one or more of the following manners:
firstly, generating a configuration file according to a preset configuration file generating step.
And secondly, receiving a configuration file input by a user.
And thirdly, extracting the configuration file from the preset storage area.
The preset storage area may be local to the test server, or may be a storage device in communication connection with the test server.
In this implementation manner, the execution main body may obtain the configuration file through three optional manners. Specifically, the execution subject may obtain the configuration file by self-generating the configuration file. The execution main body can also acquire the configuration file by receiving the configuration file input by the user. The execution main body can also acquire the configuration file by extracting the configuration file from a preset storage area.
It should be noted that, if the configuration file is obtained by a manner of generating the configuration file by itself, the execution subject may generate the configuration file by using a preset configuration file generation step. The preset profile generation step may be various preset steps for generating a profile. As an example, the preset profile generating step may include: first, parameter values are assigned to scene configuration parameters in a preset scene configuration parameter set. Then, all scene configuration parameters and parameter values of the scene configuration parameters are compiled into text. And finally, using the compiled text as a configuration file. As another example, the preset configuration file generating step may also include: first, parameter values are assigned to scene configuration parameters in a preset scene configuration parameter set. Then, all scene configuration parameters and parameter values of the scene configuration parameters are compiled into text. And then, further compiling the compiled text into a JSON file. And finally, taking the obtained JSON file as a configuration file.
The test method in the implementation mode can support various modes of obtaining the configuration file, and is more flexible and practical. In practice, the configuration file acquired by receiving the configuration file input by the user or by extracting the configuration file from the preset storage area is generally the configuration file concerned by the user. The configuration file concerned by the user is adopted for testing, so that targeted testing can be realized, and the testing efficiency is improved. In addition, the configuration file acquired by the mode of self-generating the configuration file has general representativeness, manual intervention is not needed, the testing speed can be accelerated, and the testing time is saved. Therefore, for the test of a certain device to be tested, if the configuration file is acquired in multiple of the three modes successively for testing the device to be tested, the overall test efficiency of the device to be tested is improved.
In an optional implementation manner of each embodiment of the present application, the determining, according to the test result of the device to be tested and the test result of the reference device, the device state of the device to be tested in the ith scenario includes:
and if the difference value between the test result of the equipment to be tested and the test result of the reference equipment is greater than the preset difference threshold value, determining that the equipment state of the equipment to be tested in the ith scene is an abnormal state.
The gap threshold may be a preset value for describing the gap. As an example, the gap threshold may be 0.1, 0.6, etc.
Here, the execution subject may compare a difference between the test results respectively corresponding to the two devices with a difference threshold, and if the difference is greater than the difference threshold, it may be determined that the device under test is currently abnormal. On the contrary, if the difference is smaller than or equal to the difference threshold, it may be determined that the device under test is not currently abnormal, that is, the device under test is currently normal. The difference threshold value is introduced in the implementation mode, the difference value of the test results respectively corresponding to the two devices is compared with the difference threshold value, misjudgment caused by errors in the test precision range can be avoided, test time can be saved under the condition that the possible problems of the devices to be tested are guaranteed to be timely and accurately captured, and the test efficiency is further improved.
In an optional implementation manner of each embodiment of the present application, the test method may further include the following steps: and if the equipment state of the equipment to be tested in the ith scene is an abnormal state, storing the configuration file.
Here, when there is an abnormality currently in the device under test, the execution main body may store a current configuration file. In this way, after the device under test is modified, the execution subject may continue to perform retesting using the configuration file. And the targeted test can be realized, and the test efficiency is further improved.
In an optional implementation manner of the various embodiments of the present application, the format of the configuration file is a JSON format.
The json (javascript Object notification) is a lightweight data exchange format, which is easy to read and write, and easy to parse and generate by a machine. Here, since the JSON-formatted file is easy to parse and generate, the configuration file in this implementation is in the JSON format, which can further improve the accuracy of parsing the configuration file, and is helpful to further improve the test efficiency of testing the device under test.
Example two
The embodiment of the present application provides a testing method, which is a further description of the first embodiment, and reference may be specifically made to the related description of the first embodiment where the same or similar to the first embodiment, and details are not repeated here. Referring to fig. 2, the testing method in the present embodiment includes:
step 201, generating a configuration file according to a preset configuration file generating step.
In this embodiment, the configuration file may be acquired by generating the configuration file. At this time, the execution agent may generate the configuration file through the execution step 2011-.
In step 2011, a preset scene configuration parameter set is obtained, and a value is assigned to each scene configuration parameter in the scene configuration parameter set.
Wherein, different values of the scene configuration parameters correspond to different scenes.
The scene configuration parameters in the scene configuration parameter set may be various parameters for describing a scene. For example, the scene configuration parameter may be a parameter for describing a start address of the read data, and may also be a parameter for describing an end address of the read data. But also parameters describing the way the data is read. Each scene configuration parameter in the scene configuration parameter set may describe a portion of a scene, and the combination of all scene configuration parameters in the scene configuration parameter set may describe a complete scene.
In practical applications, the scene configuration parameters in the scene configuration parameter set may include, but are not limited to: parameters for describing data format, parameters for describing start address of data memory, parameters for describing end address of data memory, parameters for describing address of double rate synchronous dynamic random access memory, etc. The values of the parameters for describing the data format may be 1, 2, and 3. As an example, if the value of the parameter for describing the data format is 1, the parameter may be used to indicate that the data format is 16-bit data. If the value of the parameter for describing the data format is 2, the parameter can be used to indicate that the data format is 8 bits of data. The parameter for describing the start address of the data memory may take a value of 0 to 100000. The value of the parameter for describing the ending address of the data memory can be 0-100000. The parameter for describing the address of the DDR SDRAM may take a value of 0 to 100000.
In this embodiment, the execution body may preset a plurality of scene configuration parameters and set a value range of each scene configuration parameter. In practice, the preset scene configuration parameters are usually variables. In this way, the assignment of values to the configuration parameters of each scene can be realized by assigning values to the variables. In this embodiment, the execution main body may allocate a value to each scene configuration parameter according to a preset allocation manner. The allocation method may be a preset allocation method. As an example, the allocation manner may be random allocation. As another example, the allocation manner may be incremental allocation according to a value. For example, if the value allocated to a scene configuration parameter last time is 1, the value allocated to the scene configuration parameter this time may be 2.
In practice, since the situation that the device faces in real use is generally random, the above allocation manner is generally random allocation in order to test the universality and stability of the device.
Step 2012, generating a configuration file according to each scene configuration parameter in the scene configuration parameter set and the value of the corresponding scene configuration parameter.
As an example, the execution agent may generate the configuration file as follows: and directly compiling the scene configuration parameters and the values of the scene configuration parameters into texts in a key value pair mode. And then, using the compiled text as a configuration file. For example, if there are two scene configuration parameters in the scene configuration parameter set, the two scene configuration parameters are parameter 1 and parameter 2, respectively. If the value of the parameter 1 is 10, the value of the parameter 2 is 20. The scene configuration parameters and the values of the scene configuration parameters are compiled into texts in a key value pair mode, and the texts which can be obtained are { (parameters 1, 10), (parameters 2, 20) }.
As another example, the execution subject may also generate the configuration file by: firstly, scene configuration parameters and values of the scene configuration parameters are compiled into texts in a key value pair mode. The compiled text is then compiled into a JSON formatted file using a scripting language (e.g., Python). And finally, taking the obtained JSON format file as a configuration file.
Step 202, parsing the configuration file to obtain a scene configuration parameter set in the configuration file, and sending the scene configuration parameter set obtained by parsing to the device to be tested and the reference device, respectively.
The scene configuration parameter set is used for selecting the ith scene from N scenes, wherein i is more than or equal to 1 and less than or equal to N.
Step 203, receiving a test result of the device to be tested based on the scene configuration parameter set, and receiving a test result of the reference device based on the scene configuration parameter set.
And 204, determining the equipment state of the equipment to be tested in the ith scene according to the test result of the equipment to be tested and the test result of the reference equipment.
The device state is generally a state indicating whether an abnormality exists in the device under test. The device state may include a normal state and an abnormal state.
In the present embodiment, the specific operations of steps 202-204 are substantially the same as the operations of steps 102-104 in the embodiment shown in fig. 1, and are not repeated herein.
In this embodiment, values are allocated to the scene configuration parameters in the scene configuration parameter set, so that the device to be tested and the reference device can be tested in the selected scene. It should be noted that in this embodiment, the test scenarios of the device to be tested and the reference device can be switched by changing the values of the scenario configuration parameters, so that the operation is simple and easy to implement, and the improvement of the test efficiency is facilitated.
It should be noted that, under the actual use condition, the device to be tested generally needs to process different scenes and needs to switch between different scenes, so that the test scenes of the device to be tested and the reference device are switched by changing the values of the scene configuration parameters, so that the stability of the device to be tested under the condition of scene change can be effectively tested, and the device to be tested can be fully tested.
In some optional implementation manners of this embodiment, when the test condition is satisfied, the configuration file is generated according to a preset configuration file generation step.
The test conditions may be various preset conditions.
In this implementation, generating the configuration file is performed only if the current situation satisfies the test condition. It may be achieved that generating the configuration file is only performed if the test conditions are fulfilled. The unnecessary loss of the computing resources can be reduced, and the computing resources can be saved.
Optionally, the test conditions may include any one or more of:
and under the condition one, test starting information input by a user is received.
The test start information may be information for instructing to start a test. As an example, the test start information may be "open" or "start". The specific form of the test initiation information is not particularly limited in the present application.
And secondly, receiving the test result, wherein the current times of generating the configuration file is less than a preset time threshold.
The number threshold may be a preset value for describing the number. E.g., 20 times.
And thirdly, receiving a test result, wherein the total test time for testing currently is less than a preset time threshold.
The time length threshold may be a preset value for describing a time length. E.g., 2 hours.
In practice, if a test result is received, it usually indicates that the current test is finished. At this time, the execution main body may determine whether the test is currently required to be continued according to the test condition, and if so, execute the step of generating the configuration file. The implementation mode can realize automatic testing, is beneficial to saving testing time and improving testing efficiency. In addition, in the automatic test process, the test scenes of the equipment to be tested and the reference equipment can be switched by changing the value of the scene configuration parameters, so that the stability of the equipment to be tested under the condition of scene change can be effectively tested, and the full test of the equipment to be tested is facilitated.
EXAMPLE III
With continuing reference to fig. 3, a schematic structural diagram of a test system provided in the embodiments of the present application is shown. As shown in fig. 3, the test system may include a test server 301, a device under test 302, and a reference device 303. Wherein the content of the first and second substances,
the test server 301 is used for acquiring a configuration file; analyzing the configuration file to obtain a scene configuration parameter set in the configuration file, and respectively sending the scene configuration parameter set obtained by analysis to the device to be tested and the reference device, wherein the scene configuration parameter set is used for selecting the ith scene from N scenes, and i is more than or equal to 1 and less than or equal to N;
the device under test 302 is configured to perform a test based on the scene configuration parameter set and send a test result to the test server;
the reference device 303 is configured to perform a test based on the scene configuration parameter set, and send a test result to the test server;
the test server 304 is further configured to receive a test result of the device to be tested based on the scene configuration parameter set, and receive a test result of the reference device based on the scene configuration parameter set; and determining the equipment state of the equipment to be tested in the ith scene according to the test result of the equipment to be tested and the test result of the reference equipment.
The system provided by the embodiment selects the scene through the scene configuration parameter set, so that the selection of the scene becomes simple and easy to realize. The method and the device can conveniently and quickly select the scene for testing the equipment to be tested, thereby accelerating the testing speed and being beneficial to improving the testing efficiency of the equipment to be tested.
It should be noted that, because the contents of the information interaction, the execution process, and the like among the test server, the device to be tested, and the reference device are based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be specifically referred to a part of the method embodiment, and details thereof are not described herein.
In some optional implementation manners of this embodiment, the system further includes a hardware analysis device, where the hardware analysis device is in communication connection with the test server and the device under test, respectively. At this time, the analyzing the configuration file in the test server to obtain the scene configuration parameter set in the configuration file, and sending the scene configuration parameter set obtained by the analyzing to the device to be tested and the reference device, respectively, may include the following step one and step two.
Step one, analyzing the configuration file through a preset analysis program, and sending the scene configuration parameter set obtained through analysis to the reference equipment.
The preset analysis program may be a preset program for analyzing the configuration file.
Here, the test server may directly parse the configuration file by using a preset parser stored in the test server, so as to obtain the scene configuration parameter set in the configuration file. And then, sending the scene configuration parameter set obtained by parsing to the reference device. Such that the reference device may be tested based on the set of scene configuration parameters.
And step two, sending a configuration file to the hardware analysis equipment in communication connection, so that the hardware analysis equipment analyzes the configuration file, encapsulates the scene configuration parameter set obtained by analysis into an instruction program, and sends the scene configuration parameter set in the form of the instruction program to the equipment to be tested.
The hardware parsing device is generally a hardware device for parsing a configuration file. As an example, the above hardware parsing device may be a JSON parser for parsing a configuration file in a JSON format.
Here, the test server may send the configuration file to the hardware parsing device. In this way, the hardware parsing device may parse the configuration file to obtain the scene configuration parameter set in the configuration file. And then, encapsulating the scene configuration parameter set obtained by parsing into an instruction program. And finally, sending the instruction program to the equipment to be tested. In practice, the hardware parsing device may package the scene configuration parameter set into the instruction program by writing each scene configuration parameter in the scene configuration parameter set into a preset template. The preset template may be a preset file template, and the file template may include a plurality of variables. The hardware analysis device can assign the scene configuration parameters in the scene configuration parameter set to the variables of the file template respectively, so that the scene configuration parameter set is packaged into an instruction program. In practice, the program of instructions may typically be implemented as a binary file that is easily readable by a machine.
In this implementation manner, the test server parses the configuration file in a software parsing manner, and sends the parsed scene configuration parameter set to the reference device, so that the reference device can perform a test based on the scene configuration parameter set parsed by the software. In addition, the test server analyzes the configuration file through the hardware analysis device, and sends the scene configuration parameter set obtained through analysis to the device to be tested in the form of the instruction program through the hardware analysis device, so that the device to be tested can be tested based on the scene configuration parameter set in the form of the instruction program. The same configuration file is analyzed by adopting different analysis modes, and the same analysis result can be obtained generally.
In the implementation mode, the test server sends the configuration file to the hardware analysis equipment for analysis, so that the scene configuration parameter set in the instruction program form is sent to the equipment to be tested through the hardware analysis equipment, the calculation amount of the test server can be reduced, the test speed of the equipment to be tested is accelerated, and the test efficiency is improved. In addition, if the device state of the device under test specified by the test server is always an abnormal state, it is highly likely that a problem occurs in the hardware analysis device. Therefore, the implementation mode is beneficial to timely finding the problems of the hardware analysis equipment while ensuring the test accuracy.
In some optional implementation manners of this embodiment, the device to be tested may include a Program Memory (PM), a Control Unit (CU), an External Input Data Direct Memory Access (EIDMA), an External Output Data Direct Memory Access (EODMA), a Double Data rate synchronous dynamic random Access Memory (DDR), a multi-channel Data selector (cross bar, XBAR), and a Data Memory (Data Memory, DM).
If the scene configuration parameter set sent to the device under test is a scene configuration parameter set in the form of an instruction program, and the scene configuration parameter set includes a first parameter for indicating read data or write data, a second parameter for indicating source address information, and a third parameter for indicating destination address information. The first parameter may be used to indicate reading data or writing data. As an example, the value of the first parameter may be "1" for indicating reading data, or "2" for indicating writing data.
At this time, the step 401 and the step 406 may be included in the device under test, which performs the test based on the scene configuration parameter set.
Fig. 4 is a schematic flowchart of a process of testing a device under test based on a scene configuration parameter set according to an embodiment of the present application.
In step 401, the PM receives and stores a program of instructions.
Step 402, a CU reads a command program from a PM, and sends the command program to an EIDMA if a first parameter indicates to write data; if the first parameter indicates to read data, the instruction program is sent to the EODMA.
And step 403, the EIDMA stores the data at the address corresponding to the source address information in the DDR to the address corresponding to the target address information in the DM through the XBAR according to the source address information and the target address information corresponding to the received instruction program.
The XBAR has the function of providing a plurality of data channels, can realize the parallel access of multiple paths of data and is beneficial to improving the quick access of the data.
In step 404, the DM sends the stored data and the address of the stored data to the test server.
For example, if the data 100 is stored in the address A in the DM. The data 100 and address a may be sent to the test server. For example, the content sent by the DM to the test server may be: the data in address a is 100.
And 405, storing the data at the address corresponding to the source address information in the DM to the address corresponding to the target address information in the DDR through the XBAR by the EODMA according to the source address information and the target address information corresponding to the received instruction program.
At step 406, the DDR sends the stored data and the address of the stored data to the test server.
It is noted that the scene configuration parameter set includes a first parameter for indicating read data or write data, a second parameter for indicating source address information, and a third parameter for indicating destination address information. In practical applications, the scene configuration parameter set may further include other parameters, for example, a parameter for describing a reading manner. As an example, the reading mode may be that 5 bytes of data are sequentially read with the address corresponding to the source address information as a start address. The reading mode may also be that an address corresponding to the source address information is used as a start address, and one data is read every 1 byte until 5 bytes of data are read.
In this implementation, the changed address in the memory of the device under test may be compared to determine whether the changed address is the same as the changed address in the memory of the reference device. And further comparing whether the data in the address with the data change in the device to be tested is the same as the data in the address with the data change in the reference device. If the two are the same, it can be determined that there is no abnormality in the memory of the device under test. Otherwise, if one or both of the two are different, the memory of the device under test may be considered to be abnormal. The realization mode can timely and accurately capture the possible problems of the memory of the equipment to be tested, and is beneficial to improving the test accuracy.
Example four
With continuing reference to fig. 5, a schematic structural diagram of a test system provided in the embodiments of the present application is shown. As shown in fig. 5, the JSON file may be directly obtained by the test server, or a random JSON file may be generated by random configuration. Here, the JSON file is the above-described configuration file. The test server may obtain the configuration file in a variety of ways. The obtained configuration file includes a scene configuration parameter set. The scene configuration parameter set may include a first parameter indicating read data or write data, a second parameter indicating source address information, and a third parameter indicating destination address information.
The test server can perform software analysis on the JSON file by adopting a JSON analysis program to obtain a scene configuration parameter set and transmit the scene configuration parameter set to the reference device, so that the reference device performs test based on the scene configuration parameter set obtained by the software analysis. Here, the reference device is a software device which is pre-constructed by the test server and has the same or similar structure with the device to be tested.
The reference device may write the test results to a scoreboard of the test server.
The test server may send the JSON file to a communicatively connected hardware JSON parser. Here, the hardware JSON parser is the above-described hardware parsing device.
And the hardware JSON parser parses the JSON file to obtain a binary file. Here, the hardware JSON parser parses the JSON file to obtain a scene configuration parameter set. The scene configuration parameter set is then encapsulated into a program of instructions. And finally, sending the scene configuration parameter set in the form of the instruction program to the equipment to be tested. The obtained binary file is a carrier of the instruction program.
And the hardware JSON resolver sends the binary file to the PM of the equipment to be tested.
The device to be tested comprises PM, CU, EIDMA, EODMA, DDR, XBAR and DM. Wherein the PM receives and stores binary files. Here, the PM may obtain a program of instructions. The device under test may be tested based on the binary file.
The process of testing the device to be tested based on the binary file comprises the following steps: the CU reads the instruction program from the PM, and sends the instruction program to the EIDMA if the first parameter indicates to write data; if the first parameter indicates to read data, the instruction program is sent to the EODMA. And the EIDMA stores the data at the address corresponding to the source address information in the DDR to the address corresponding to the target address information in the DM through the XBAR according to the source address information and the target address information corresponding to the received instruction program. The XBAR has the function of providing a plurality of data channels, can realize the parallel access of multiple paths of data and is beneficial to improving the quick access of the data. The DM transmits the stored data and the address of the stored data to the monitor of the test server. And the EODMA stores the data at the address corresponding to the source address information in the DM to the address corresponding to the target address information in the DDR through the XBAR according to the source address information and the target address information corresponding to the received instruction program. The DDR sends the stored data and the address of the stored data to a monitor of the test server.
The monitor of the test server may acquire data information of each component of the device under test, and may record the acquired data information on the score board.
The score board of the test server is used for recording test results of the equipment to be tested and the reference equipment and prompting the equipment state of the equipment to be tested according to the test results of the reference equipment and the equipment to be tested. If the test result of the device to be tested is consistent with the test result of the reference device, the score counting board can prompt 'OK'.
EXAMPLE five
Fig. 6 shows a block diagram of a testing apparatus 600 provided in the embodiment of the present application, which corresponds to the testing method in the first embodiment, and only shows the relevant parts in the embodiment of the present application for convenience of description.
Referring to fig. 6, the apparatus includes:
a file acquiring unit 601 configured to acquire a configuration file;
a file parsing unit 602, configured to parse the configuration file to obtain a scene configuration parameter set in the configuration file, and send the scene configuration parameter set obtained through parsing to the device to be tested and the reference device, respectively, where the scene configuration parameter set is used to select an ith scene from N scenes, where i is greater than or equal to 1 and less than or equal to N;
a result receiving unit 603, configured to receive a test result of the device under test performing a test based on the scene configuration parameter set, and receive a test result of the reference device performing a test based on the scene configuration parameter set;
the abnormality determining unit 604 is configured to determine, according to the test result of the device to be tested and the test result of the reference device, a device state of the device to be tested in the ith scene.
In one embodiment, in the file obtaining unit 601, obtaining the configuration file includes any one or more of the following:
generating a configuration file according to a preset configuration file generation step;
receiving a configuration file input by a user;
and extracting the configuration file from a preset storage area.
In one embodiment, generating the configuration file according to the preset configuration file generating step includes:
acquiring a preset scene configuration parameter set, and distributing values to each scene configuration parameter in the scene configuration parameter set, wherein different values of the scene configuration parameters correspond to different scenes;
and generating a configuration file according to each scene configuration parameter in the scene configuration parameter set and the value of the corresponding scene configuration parameter.
In an embodiment, the determining, by the anomaly determining unit 604, the device state of the device under test in the ith scene according to the test result of the device under test and the test result of the reference device includes:
and if the difference value between the test result of the equipment to be tested and the test result of the reference equipment is greater than the preset difference threshold value, determining that the equipment state of the equipment to be tested in the ith scene is an abnormal state.
In one embodiment, the apparatus further comprises an execution judgment unit configured to: and when the test condition is met, generating a configuration file according to a preset configuration file generation step.
In one embodiment, the test conditions include any one or more of:
receiving test starting information input by a user;
receiving a test result, wherein the number of times of generating the configuration file currently is less than a preset number threshold;
and receiving a test result, wherein the total test time for testing currently is less than a preset time threshold.
In one embodiment, the apparatus further comprises a file storage unit for: and if the equipment state of the equipment to be tested in the ith scene is an abnormal state, storing the configuration file.
The device provided by the embodiment selects the scene through the scene configuration parameter set, so that the selection of the scene becomes simple and easy to realize. The method and the device can conveniently and quickly select the scene for testing the equipment to be tested, thereby accelerating the testing speed and being beneficial to improving the testing efficiency of the equipment to be tested.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as the method in the first embodiment of the present application, and specific reference may be made to a part of the embodiment, which is not described herein again.
EXAMPLE six
Fig. 7 is a schematic structural diagram of an electronic device 700 according to an embodiment of the present application. As shown in fig. 7, the electronic apparatus 700 of this embodiment includes: at least one processor 701 (only one processor is shown in fig. 7), a memory 702, and a computer program 703, such as a test program, stored in the memory 702 and executable on the at least one processor 701. The steps in any of the various method embodiments described above are implemented when the computer program 703 is executed by the processor 701. The steps in the embodiments of the test methods described above are implemented when the computer program 703 is executed by the processor 701. The processor 701, when executing the computer program 703, implements the functions of each module/unit in each device embodiment described above, such as the functions of the units 601 to 604 shown in fig. 6.
Illustratively, the computer program 703 may be partitioned into one or more modules/units, which are stored in the memory 702 and executed by the processor 701 to accomplish the present application. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 703 in the electronic device 700. For example, the computer program 703 may be divided into a file obtaining unit, a file parsing unit, a result receiving unit, and an abnormality determining unit, and specific functions of each unit are described in the foregoing embodiments, and are not described herein again.
The electronic device 700 may be a server, a desktop computer, a tablet computer, a cloud server, a mobile terminal, and other computing devices. The electronic device 700 may include, but is not limited to, a processor 701, a memory 702. Those skilled in the art will appreciate that fig. 7 is merely an example of an electronic device 700 and does not constitute a limitation of electronic device 700 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., an electronic device may also include input-output devices, network access devices, buses, etc.
The Processor 701 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 702 may be an internal storage unit of the electronic device 700, such as a hard disk or a memory of the electronic device 700. The memory 702 may also be an external storage device of the electronic device 700, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the electronic device 700. Further, the memory 702 may also include both internal storage units and external storage devices of the electronic device 700. The memory 702 is used to store computer programs and other programs and data required by the electronic device. The memory 702 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other ways. For example, the above-described apparatus/electronic device embodiments are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated module, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the embodiments described above may be implemented by a computer program, which is stored in a computer readable storage medium and used by a processor to implement the steps of the embodiments of the methods described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method of testing, the method comprising:
acquiring a configuration file;
analyzing the configuration file to obtain a scene configuration parameter set in the configuration file, and respectively sending the scene configuration parameter set obtained by analysis to a device to be tested and a reference device, wherein the scene configuration parameter set is used for selecting the ith scene from N scenes, and i is more than or equal to 1 and less than or equal to N;
receiving a test result of the device to be tested based on the scene configuration parameter set, and receiving a test result of the reference device based on the scene configuration parameter set;
and determining the equipment state of the equipment to be tested in the ith scene according to the test result of the equipment to be tested and the test result of the reference equipment.
2. The method of claim 1, wherein the obtaining the configuration file comprises any one or more of:
generating a configuration file according to a preset configuration file generation step;
receiving a configuration file input by a user;
and extracting the configuration file from a preset storage area.
3. The method according to claim 2, wherein the generating the configuration file according to the preset configuration file generating step comprises:
acquiring a preset scene configuration parameter set, and distributing values to each scene configuration parameter in the scene configuration parameter set, wherein different values of the scene configuration parameters correspond to different scenes;
and generating a configuration file according to each scene configuration parameter in the scene configuration parameter set and the value of the corresponding scene configuration parameter.
4. The method according to any one of claims 1 to 3, wherein the determining the device state of the device under test in the ith scenario according to the test result of the device under test and the test result of the reference device comprises:
and if the difference value between the test result of the equipment to be tested and the test result of the reference equipment is greater than a preset difference threshold value, determining that the equipment state of the equipment to be tested in the ith scene is an abnormal state.
5. A test system, characterized in that the system comprises a test server, a device under test and a reference device, wherein,
the test server is used for acquiring a configuration file; analyzing the configuration file to obtain a scene configuration parameter set in the configuration file, and respectively sending the scene configuration parameter set obtained by analysis to a device to be tested and a reference device, wherein the scene configuration parameter set is used for selecting the ith scene from N scenes, and i is more than or equal to 1 and less than or equal to N;
the device to be tested is used for testing based on the scene configuration parameter set and sending a test result to the test server;
the reference device is used for testing based on the scene configuration parameter set and sending a test result to the test server;
the test server is further configured to receive a test result of the device under test based on the scene configuration parameter set, and receive a test result of the reference device based on the scene configuration parameter set; and determining the equipment state of the equipment to be tested in the ith scene according to the test result of the equipment to be tested and the test result of the reference equipment.
6. The system of claim 5, further comprising a hardware analysis device, wherein the hardware analysis device is in communication connection with the test server and the device under test respectively; and
in the test server, the parsing the configuration file to obtain a scene configuration parameter set in the configuration file, and sending the scene configuration parameter set obtained by parsing to the device to be tested and the reference device, respectively, includes:
analyzing the configuration file through a preset analysis program, and sending a scene configuration parameter set obtained through analysis to the reference equipment;
and sending the configuration file to a hardware analysis device in communication connection, so that the hardware analysis device analyzes the configuration file, encapsulates the scene configuration parameter set obtained by analysis into an instruction program, and sends the scene configuration parameter set in the form of the instruction program to the device to be tested.
7. The system of claim 5 or 6, wherein the device under test comprises a program memory, a control unit, an external input data direct memory access, an external output data direct memory access, a double rate synchronous dynamic random access memory, a multiplexer, and a data memory; and
if the scene configuration parameter set sent to the device under test is a scene configuration parameter set in the form of an instruction program, and the scene configuration parameter set includes a first parameter for indicating read data or write data, a second parameter for indicating source address information, and a third parameter for indicating destination address information, then, in the device under test, the performing the test based on the scene configuration parameter set includes:
the program memory receives and stores the program of instructions;
the control unit reads the instruction program from the program memory, and if the first parameter indicates to write data, the control unit sends the instruction program to the external input data direct memory access device; if the first parameter indicates to read out data, sending the instruction program to the external output data direct memory access device;
the external input data direct memory access device stores the data at the address corresponding to the source address information in the double-rate synchronous dynamic random access memory to the address corresponding to the target address information in the data memory through the multi-path data selector according to the source address information and the target address information corresponding to the received instruction program;
the data memory sends the stored data and the address of the stored data to the test server;
the external output data direct memory access device stores the data at the address corresponding to the source address information in the data memory to the address corresponding to the target address information in the double-rate synchronous dynamic random access memory through the multi-channel data selector according to the source address information and the target address information corresponding to the received instruction program;
and the double-rate synchronous dynamic random access memory sends the stored data and the address of the stored data to the test server.
8. A test apparatus, the apparatus comprising:
a file acquisition unit for acquiring a configuration file;
the file analysis unit is used for analyzing the configuration file to obtain a scene configuration parameter set in the configuration file, and sending the scene configuration parameter set obtained through analysis to the device to be tested and the reference device respectively, wherein the scene configuration parameter set is used for selecting the ith scene from N scenes, and i is more than or equal to 1 and less than or equal to N;
a result receiving unit, configured to receive a test result of the device under test performing a test based on the scene configuration parameter set, and receive a test result of the reference device performing a test based on the scene configuration parameter set;
and the abnormality judgment unit is used for determining the equipment state of the equipment to be tested in the ith scene according to the test result of the equipment to be tested and the test result of the reference equipment.
9. 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 method of any of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
CN202011028723.4A 2020-09-24 2020-09-24 Test method, device, system, equipment and medium Active CN112214366B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011028723.4A CN112214366B (en) 2020-09-24 2020-09-24 Test method, device, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011028723.4A CN112214366B (en) 2020-09-24 2020-09-24 Test method, device, system, equipment and medium

Publications (2)

Publication Number Publication Date
CN112214366A true CN112214366A (en) 2021-01-12
CN112214366B CN112214366B (en) 2023-07-28

Family

ID=74051921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011028723.4A Active CN112214366B (en) 2020-09-24 2020-09-24 Test method, device, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN112214366B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925584A (en) * 2021-02-26 2021-06-08 北京百度网讯科技有限公司 Scene-based file configuration method, device, storage medium, and program product
CN113411144A (en) * 2021-07-30 2021-09-17 深圳市富创优越科技有限公司 Device testing method, server and medium
CN113438133A (en) * 2021-06-30 2021-09-24 北京小米移动软件有限公司 UWB device test method, device, system, electronic device and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020095623A1 (en) * 2000-11-30 2002-07-18 Bruce Ross H. Method and apparatus for testing a storage device
US6845353B1 (en) * 1999-12-23 2005-01-18 Transmeta Corporation Interpage prologue to protect virtual address mappings
US20050154940A1 (en) * 2003-12-01 2005-07-14 Fujitsu Limited Information system
JP2012014364A (en) * 2010-06-30 2012-01-19 Fujitsu Semiconductor Ltd Logic verification scenario generator, and logic verification scenario generation program
CN102737727A (en) * 2012-05-22 2012-10-17 华为技术有限公司 Method and system for testing stability of double date rate synchronous dynamic random access memory
US20150095712A1 (en) * 2013-09-30 2015-04-02 Unitest Inc. Non-mounted storage test device based on fpga
CN110795343A (en) * 2019-10-12 2020-02-14 车智互联(北京)科技有限公司 Test system, test method and computing device
CN111198790A (en) * 2019-12-23 2020-05-26 深圳市优必选科技股份有限公司 Robot testing method, robot testing device and robot
CN111208798A (en) * 2019-12-26 2020-05-29 深圳市优必选科技股份有限公司 Robot testing method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6845353B1 (en) * 1999-12-23 2005-01-18 Transmeta Corporation Interpage prologue to protect virtual address mappings
US20020095623A1 (en) * 2000-11-30 2002-07-18 Bruce Ross H. Method and apparatus for testing a storage device
US20050154940A1 (en) * 2003-12-01 2005-07-14 Fujitsu Limited Information system
JP2012014364A (en) * 2010-06-30 2012-01-19 Fujitsu Semiconductor Ltd Logic verification scenario generator, and logic verification scenario generation program
CN102737727A (en) * 2012-05-22 2012-10-17 华为技术有限公司 Method and system for testing stability of double date rate synchronous dynamic random access memory
US20150095712A1 (en) * 2013-09-30 2015-04-02 Unitest Inc. Non-mounted storage test device based on fpga
CN110795343A (en) * 2019-10-12 2020-02-14 车智互联(北京)科技有限公司 Test system, test method and computing device
CN111198790A (en) * 2019-12-23 2020-05-26 深圳市优必选科技股份有限公司 Robot testing method, robot testing device and robot
CN111208798A (en) * 2019-12-26 2020-05-29 深圳市优必选科技股份有限公司 Robot testing method and device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925584A (en) * 2021-02-26 2021-06-08 北京百度网讯科技有限公司 Scene-based file configuration method, device, storage medium, and program product
CN113438133A (en) * 2021-06-30 2021-09-24 北京小米移动软件有限公司 UWB device test method, device, system, electronic device and storage medium
CN113438133B (en) * 2021-06-30 2022-11-29 北京小米移动软件有限公司 UWB device test method, device, system, electronic device and storage medium
CN113411144A (en) * 2021-07-30 2021-09-17 深圳市富创优越科技有限公司 Device testing method, server and medium

Also Published As

Publication number Publication date
CN112214366B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
CN112214366A (en) Test method, device, system, equipment and medium
CN108984389B (en) Application program testing method and terminal equipment
CN113127338A (en) Firmware testing method, server and computer readable storage medium
CN113608518B (en) Data generation method, device, terminal equipment and medium
CN114089713A (en) Communication method based on UDS, ECU and upper computer
CN112445490A (en) File sequence processing method and device, terminal equipment and storage medium
CN112416775A (en) Software automation testing method and device based on artificial intelligence and electronic equipment
CN109918221B (en) Hard disk error reporting analysis method, system, terminal and storage medium
CN109558315B (en) Method, device and equipment for determining test range
CN112395144A (en) Test method, test system, terminal equipment and readable storage medium
CN105843740B (en) Method and device for detecting code compiling result
CN113127314A (en) Method and device for detecting program performance bottleneck and computer equipment
CN115443452A (en) Embedding data in an address stream
CN113806231A (en) Code coverage rate analysis method, device, equipment and medium
CN114637551A (en) Device driving method, system and storage medium
CN113177014A (en) Serial port communication method based on inspection mode and serial port chip
CN111338956A (en) Automatic pressure measurement method, device, equipment and storage medium
CN113759884B (en) Method and system for generating input/output point product file of distributed control system
CN117394945B (en) Method, device and equipment for detecting ports of optical splitters based on multivariate algorithm
CN117851306B (en) Method for determining operation mode, chip module and storage medium
CN108665938B (en) Write test method, read-write test method and terminal equipment
US11397662B2 (en) Method for debugging computer program, device employing method, and storage medium
CN117857650A (en) Data acquisition method based on data structuring and related equipment
CN116820853A (en) Analysis method and device of chip test data, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant