[go: up one dir, main page]

CN112214366A - Test methods, devices, systems, equipment and media - Google Patents

Test methods, devices, systems, equipment and media 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
test
parameter set
configuration parameter
device under
under test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3698Environments for analysis, debugging or testing of 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

本申请适用于测试技术领域,提供了测试方法,包括:获取配置文件;解析配置文件以得到配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,场景配置参数集用于从N个场景中选取第i个场景,其中,1≤i≤N;接收待测设备基于场景配置参数集进行测试的测试结果,以及接收参考设备基于场景配置参数集进行测试的测试结果;根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态。本申请通过场景配置参数集选取场景,有助于提高对待测设备进行测试的测试效率。

Figure 202011028723

The present application is applicable to the field of testing technology, and provides a testing method, including: obtaining a configuration file; parsing the configuration file to obtain a scene configuration parameter set in the configuration file, and sending the parsed scene configuration parameter set to the device under test and the reference The device, the scenario configuration parameter set is used to select the ith scenario from N scenarios, where 1≤i≤N; receive the test result of the device under test based on the scenario configuration parameter set, and receive the reference device based on the scenario configuration parameter Set the test results for testing; determine the device status of the device under test in the i-th scenario according to the test results of the device under test and the test results of the reference device. The present application selects the scene through the scene configuration parameter set, which helps to improve the test efficiency of the device to be tested.

Figure 202011028723

Description

测试方法、装置、系统、设备及介质Test methods, devices, systems, equipment and media

技术领域technical field

本申请属于测试技术领域,尤其涉及一种测试方法、装置、系统、设备及介质。The present application belongs to the technical field of testing, and in particular, relates to a testing method, device, system, equipment and medium.

背景技术Background technique

在将设备(如,处理器)投入使用前,通常需要对该设备进行测试,以找到该设备中存在的问题,从而及时对该设备中存在的问题进行改正。Before a device (eg, a processor) is put into use, it is usually necessary to test the device to find out the problems existing in the device, so that the problems existing in the device can be corrected in time.

相关技术中,需要提高对设备进行测试的测试效率。In the related art, it is necessary to improve the test efficiency for testing equipment.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了测试方法、装置、系统、设备及介质,旨在解决相关技术中对设备进行测试的测试效率不够高的问题。The embodiments of the present application provide a testing method, apparatus, system, equipment and medium, which aim to solve the problem of insufficient testing efficiency for testing equipment in the related art.

第一方面,本申请实施例提供了一种测试方法,该方法包括:In a first aspect, the embodiments of the present application provide a testing method, the method comprising:

获取配置文件;get the configuration file;

解析配置文件以得到配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,场景配置参数集用于从N个场景中选取第i个场景,其中,1≤i≤N;Parse the configuration file to obtain the scene configuration parameter set in the configuration file, and send the parsed scene configuration parameter set to the device under test and the reference device respectively, the scene configuration parameter set is used to select the ith scene from the N scenes, Among them, 1≤i≤N;

接收待测设备基于场景配置参数集进行测试的测试结果,以及接收参考设备基于场景配置参数集进行测试的测试结果;Receive the test results of the device under test based on the scenario configuration parameter set, and receive the test results of the reference device based on the scenario configuration parameter set;

根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态。According to the test result of the device under test and the test result of the reference device, determine the device state of the device under test in the ith scenario.

进一步地,获取配置文件包括以下任意一项或多项:Further, obtaining the configuration file includes any one or more of the following:

根据预设的配置文件生成步骤生成配置文件;Generate a configuration file according to the preset configuration file generation steps;

接收用户输入的配置文件;Receive the configuration file entered by the user;

从预设存储区域提取配置文件。Extract configuration files from the preset storage area.

进一步地,根据预设的配置文件生成步骤生成配置文件,包括:Further, the configuration file is generated according to the preset configuration file generation steps, including:

获取预先设定的场景配置参数集,给场景配置参数集中的各场景配置参数分配取值,其中,场景配置参数的不同取值对应不同场景;obtaining a preset scene configuration parameter set, and assigning values to each scene configuration parameter in the scene configuration parameter set, wherein different values of the scene configuration parameters correspond to different scenarios;

根据场景配置参数集中的各场景配置参数及相应场景配置参数的取值,生成配置文件。A configuration file is generated according to each scenario configuration parameter in the scenario configuration parameter set and the value of the corresponding scenario configuration parameter.

进一步地,根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态,包括:Further, according to the test result of the device under test and the test result of the reference device, determine the device state of the device under test in the i-th scenario, including:

若待测设备的测试结果与参考设备的测试结果的差值大于预设差距阈值,则确定待测设备在第i个场景下的设备状态为异常状态。If the difference between the test result of the device under test and the test result of the reference device is greater than the preset difference threshold, it is determined that the device state of the device under test in the ith scenario is an abnormal state.

进一步地,获取配置文件包括:Further, obtaining the configuration file includes:

当满足测试条件时,根据预设的配置文件生成步骤生成配置文件。When the test conditions are met, the configuration file is generated according to the preset configuration file generation steps.

进一步地,测试条件包括以下任意一项或多项:Further, the test conditions include any one or more of the following:

接收到用户输入的测试启动信息;Receive the test start information input by the user;

接收到测试结果且当前生成配置文件的次数小于预设次数阈值;The test result is received and the current number of generated configuration files is less than the preset number of thresholds;

接收到测试结果且当前用于测试的总测试时长小于预设时长阈值。The test result is received and the total test duration currently used for the test is less than the preset duration threshold.

进一步地,方法还包括:Further, the method also includes:

若待测设备在第i个场景下的设备状态为异常状态,则存储配置文件。If the device state of the device to be tested in the i-th scenario is abnormal, the configuration file is stored.

进一步地,配置文件的格式为JSON格式。Further, the format of the configuration file is JSON format.

第二方面,本申请实施例提供了一种测试系统,该系统包括:测试服务器、待测设备和参考设备,其中,In a second aspect, an embodiment of the present application provides a test system, the system includes: a test server, a device to be tested, and a reference device, wherein,

测试服务器,用于获取配置文件;解析配置文件以得到配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,场景配置参数集用于从N个场景中选取第i个场景,其中,1≤i≤N;The test server is used to obtain the configuration file; parse the configuration file to obtain the scene configuration parameter set in the configuration file, and send the parsed scene configuration parameter set to the device under test and the reference device respectively. Select the ith scene from the scenes, where 1≤i≤N;

待测设备,用于基于场景配置参数集进行测试,以及将测试结果向测试服务器发送;The device to be tested is used for testing based on the scene configuration parameter set and sending the test results to the test server;

参考设备,用于基于场景配置参数集进行测试,以及将测试结果向测试服务器发送;Reference equipment for testing based on the scene configuration parameter set and sending the test results to the test server;

测试服务器,还用于接收待测设备基于场景配置参数集进行测试的测试结果,以及接收参考设备基于场景配置参数集进行测试的测试结果;根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态。The test server is further configured to receive the test results of the device under test based on the scenario configuration parameter set, and receive the test results of the reference device based on the scenario configuration parameter set; according to the test results of the device under test and the test results of the reference device, Determine the device status of the device under test in the i-th scenario.

进一步地,系统还包括硬件解析设备,硬件解析设备分别与测试服务器和待测设备通信连接;以及Further, the system also includes a hardware parsing device, and the hardware parsing device is respectively connected to the test server and the device to be tested in communication; and

测试服务器中,解析配置文件以得到配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,包括:In the test server, the configuration file is parsed to obtain the scene configuration parameter set in the configuration file, and the parsed scene configuration parameter set is sent to the device under test and the reference device, including:

通过预设解析程序对配置文件进行解析,以及将解析得到的场景配置参数集发送至参考设备:Parse the configuration file through the preset parsing program, and send the parsed scene configuration parameter set to the reference device:

向通信连接的硬件解析设备发送配置文件,使得硬件解析设备对配置文件进行解析、将解析得到的场景配置参数集封装成指令程序以及将指令程序形式的场景配置参数集发送至待测设备。The configuration file is sent to the hardware parsing device connected in communication, so that the hardware parsing device parses the configuration file, encapsulates the parsed scene configuration parameter set into an instruction program, and sends the scene configuration parameter set in the form of an instruction program to the device under test.

进一步地,待测设备包括程序存储器、控制单元、外部输入数据直接存储访问器、外部输出数据直接存储访问器、双倍速率同步动态随机存储器、多路数据选择器和数据存储器;以及Further, the device under test includes a program memory, a control unit, an external input data direct storage accessor, an external output data direct storage accessor, a double rate synchronous dynamic random access memory, a multiplex 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 used to indicate read data or write data, a first parameter used to indicate source address information The second parameter and the third parameter used to indicate the target address information, in the device under test, the test is performed based on the scene configuration parameter set, including:

程序存储器接收以及存储指令程序;The program memory receives and stores the instruction program;

控制单元从程序存储器中读取指令程序,若第一参数指示写入数据,则将指令程序发送至外部输入数据直接存储访问器;若第一参数指示读出数据,则将指令程序发送至外部输出数据直接存储访问器;The control unit reads the instruction program from the program memory, and if the first parameter indicates writing data, sends the instruction program to the external input data direct storage accessor; if the first parameter indicates reading data, sends the instruction program to the external Output data direct storage accessor;

外部输入数据直接存储访问器根据接收到的指令程序对应的源地址信息和目标地址信息,将双倍速率同步动态随机存储器中与源地址信息对应地址处的数据通过多路数据选择器存储至数据存储器中与目标地址信息对应的地址处;The external input data direct storage accessor stores the data at the address corresponding to the source address information in the double-rate synchronous dynamic random access memory according to the source address information and target address information corresponding to the received instruction program through the multiplex data selector. at the address corresponding to the target address information in the memory;

数据存储器将存入的数据以及被存入数据的地址发送至测试服务器;The data storage sends the stored data and the address of the stored data to the test server;

外部输出数据直接存储访问器根据接收到的指令程序对应的源地址信息和目标地址信息,将数据存储器中与源地址信息对应地址处的数据通过多路数据选择器存储至双倍速率同步动态随机存储器中与目标地址信息对应的地址处;The external output data direct storage accessor stores the data at the address corresponding to the source address information in the data memory to the double-rate synchronous dynamic random access device through the multiplex data selector according to the source address information and target address information corresponding to the received instruction program. at the address corresponding to the target address information in the memory;

双倍速率同步动态随机存储器将存入的数据以及被存入数据的地址发送至测试服务器。The double rate synchronous DRAM 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 test device, the device comprising:

文件获取单元,用于获取配置文件;File acquisition unit, used to acquire configuration files;

文件解析单元,用于解析配置文件以得到配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,场景配置参数集用于从N个场景中选取第i个场景,其中,1≤i≤N;The file parsing unit is used to parse the configuration file to obtain the scene configuration parameter set in the configuration file, and send the parsed scene configuration parameter set to the device under test and the reference device respectively. Select the ith scene, where 1≤i≤N;

结果接收单元,用于接收待测设备基于场景配置参数集进行测试的测试结果,以及接收参考设备基于场景配置参数集进行测试的测试结果;a result receiving unit, configured to receive the test result of the device to be tested based on the scenario configuration parameter set, and the test result of the reference device's test based on the scenario configuration parameter set;

异常判断单元,用于根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态。The abnormality judgment unit is used to determine the device state of the device under test in the i-th scenario according to the test result of the device under test and the test result of the reference device.

第四方面,本申请实施例提供了一种电子设备,包括存储器、处理器以及存储在存储器中并可在处理器上运行的计算机程序,处理器执行计算机程序时实现上述测试方法的步骤。In a fourth aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the above testing method when the computer program is executed.

第五方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现上述测试方法的步骤。In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the test method are implemented.

第六方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第一方面中任一项的测试方法。In a sixth aspect, an embodiment of the present application provides a computer program product, which, when the computer program product runs on an electronic device, enables the electronic device to perform the test method of any one of the above-mentioned first aspects.

本申请实施例的有益效果是:通过场景配置参数集选取场景,可以使得对场景的选取变得简单且易于实现。可以实现方便快捷地选取到用于对待测设备进行测试的场景,从而加快测试速度,有助于提高对待测设备进行测试的测试效率。The beneficial effects of the embodiments of the present application are: selecting a scene through the scene configuration parameter set can make the scene selection simple and easy to implement. The scene for testing the device under test can be conveniently and quickly selected, thereby accelerating the test speed and helping to improve the test efficiency of testing the device under test.

可以理解的是,上述第二方面至第六方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It can be understood that, for the beneficial effects of the foregoing second aspect to the sixth aspect, reference may be made to the relevant descriptions in the foregoing first aspect, and details are not described herein again.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1是本申请一实施例提供的测试方法的流程示意图;1 is a schematic flowchart of a testing method provided by an embodiment of the present application;

图2是本申请另一实施例提供的测试方法的流程示意图;2 is a schematic flowchart of a testing method provided by another embodiment of the present application;

图3是本申请一实施例提供的测试系统的示意图;3 is a schematic diagram of a test system provided by an embodiment of the present application;

图4是本申请一实施例提供的待测设备基于场景配置参数集进行测试的流程示意图;4 is a schematic flowchart of a device under test performing a test based on a scene configuration parameter set provided by an embodiment of the present application;

图5是本申请另一实施例提供的测试系统的示意图;5 is a schematic diagram of a test system provided by another embodiment of the present application;

图6是本申请一实施例提供的测试装置的结构示意图;6 is a schematic structural diagram of a test device provided by an embodiment of the present application;

图7是本申请一实施例提供的电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without 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 is to be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described feature, integer, step, operation, element and/or component, but does not exclude one or more other The presence or addition of features, integers, steps, operations, elements, components and/or sets thereof.

还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items.

如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in the specification of this application and the appended claims, the term "if" may be contextually interpreted as "when" or "once" or "in response to determining" or "in response to detecting ". Similarly, the phrases "if it is determined" or "if the [described condition or event] is detected" may be interpreted, depending on the context, to mean "once it is determined" or "in response to the determination" or "once the [described condition or event] is detected. ]" or "in response to detection of the [described condition or event]".

另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and should not be construed as indicating or implying relative importance.

在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean 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," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.

本申请实施例提供的测试方法,可以应用于测试服务器。上述测试服务器可以是硬件也可以是软件。当测试服务器为硬件时,可以实现成提供测试服务的分布式服务器集群,也可以实现成单个服务器。当测试服务器为软件时,可以安装在上述所列举的服务器中。其可以实现成多个软件或软件模块,也可以实现成单个软件或软件模块,在此不做具体限定。The test method provided by the embodiment of the present application can be applied to a test server. The above-mentioned test server may be hardware or software. When the test server is hardware, it can be implemented as a distributed server cluster providing test services, or it can be implemented as a single server. When the test server is software, it can be installed in the servers listed above. It may be implemented as multiple software or software modules, or may be implemented as a single software or software module, which is not specifically limited here.

为了说明本申请的技术方案,下面通过以下实施例来进行说明。In order to illustrate the technical solutions of the present application, the following examples are used to illustrate.

实施例一Example 1

请参阅图1,本申请实施例提供一种测试方法,包括:Please refer to FIG. 1, the embodiment of the present application provides a test method, including:

步骤101,获取配置文件。Step 101, obtaining a configuration file.

其中,配置文件通常是指对测试的参数进行配置的文件。Among them, the configuration file usually refers to a file that configures the parameters of the test.

在本实施例中,上述测试方法的执行主体可以为测试服务器。上述执行主体可以通过多种方式获取配置文件。例如,上述执行主体可以通过从设定设备(如,U盘)中读取数据的方式来获取配置文件。再例如,上述执行主体也可以通过直接获取用户输入信息的方式来获取配置文件。In this embodiment, the execution body of the above test method may be a test server. The above executive body can obtain the configuration file in various ways. For example, the above-mentioned execution body may acquire the configuration file by reading data from a setting device (eg, a U disk). For another example, the above-mentioned execution body may also obtain the configuration file by directly obtaining the information input by the user.

步骤102,解析配置文件以得到配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备。Step 102 , parse the configuration file to obtain a scene configuration parameter set in the configuration file, and send the parsed scene configuration parameter set to the device under test and the reference device, respectively.

其中,场景配置参数集用于从N个场景中选取第i个场景。其中,1≤i≤N。The scene configuration parameter set is used to select the ith scene from the N scenes. Among them, 1≤i≤N.

其中,场景配置参数集中的场景配置参数可以为用于对场景进行描述的各种参数。如,场景配置参数可以为用于描述读取数据的起始地址的参数,也可以为用于描述读取数据的终止地址的参数。还可以为用于描述读取数据的方式的参数。场景配置参数集中的每个场景配置参数可以描述场景的一部分,且场景配置参数集中的所有场景配置参数的组合可以描述一个完整的场景。The scene configuration parameters in the scene configuration parameter set may be various parameters used to describe the scene. For example, the scene configuration parameter may be a parameter used to describe the starting address of the read data, or may be a parameter used to describe the end address of the read data. Can also be a parameter describing how the data is read. Each scenario configuration parameter in the scenario configuration parameter set may describe a part of the scenario, and the combination of all scenario configuration parameters in the scenario configuration parameter set may describe a complete scenario.

实际应用中,场景配置参数集中的场景配置参数可以包括但不限于:用于描述数据格式的参数、用于描述数据存储器的起始地址的参数、用于描述数据存储器的结束地址的参数、用于描述双倍速率同步动态随机存储器的地址的参数等。其中,用于描述数据格式的参数的取值可以为1、2、3。作为示例,若用于描述数据格式的参数的取值为1,可以用于指示数据格式为16位的数据。若用于描述数据格式的参数的取值为2,可以用于指示数据格式为8位的数据。用于描述数据存储器的起始地址的参数的取值可以为0~100000。用于描述数据存储器的结束地址的参数的取值可以为0~100000。用于描述双倍速率同步动态随机存储器的地址的参数的取值可以为0~100000。In practical applications, the scene configuration parameters in the scene configuration parameter set may include, but are not limited to: parameters used to describe the data format, parameters used to describe the start address of the data memory, parameters used to describe the end address of the data memory, Parameters used to describe the address of the double-rate synchronous dynamic random access memory, etc. The value of the parameter used to describe the data format may be 1, 2, or 3. As an example, if the value of the parameter used to describe the data format is 1, it can be used to indicate that the data format is 16-bit data. If the value of the parameter used to describe the data format is 2, it can be used to indicate that the data format is 8-bit data. The value of the parameter used to describe the starting address of the data memory can be 0 to 100000. The value of the parameter used to describe the end address of the data memory can be 0 to 100000. The value of the parameter used to describe the address of the double-rate synchronous dynamic random access memory can be 0-100000.

上述场景通常是指模拟出的对设备进行应用时的场景。如,上述场景可以为:将设备中的甲存储单元的A地址中数据写入乙存储单元的B地址。上述场景也可以为:将设备中的乙存储单元的B地址中数据写入甲存储单元的A地址。上述场景还可以为:将设备中的甲存储单元中以A1地址为起始地址且以A2地址为结束地址中的数据,写入乙存储单元中以B1地址为起始地址的连续的多个地址中。The above scenario usually refers to a simulated scenario when the device is applied. For example, the above scenario may be: writing data in address A of storage unit A in the device to address B of storage unit B. The above scenario may also be: writing the data in the B address of the B storage unit in the device to the A address of the A storage unit. The above scenario can also be: write the data in the A storage unit in the equipment with the A1 address as the starting address and the A2 address as the ending address, and write the data in the B storage unit with the B1 address as the starting address. address.

其中,上述待测设备可以是需要测试的各种设备,如,智能手机、台式计算机等。需要指出的是,上述待测设备可以是硬件也可以是软件。The above-mentioned device to be tested may be various devices that need to be tested, such as a smart phone, a desktop computer, and the like. It should be pointed out that the above-mentioned device to be tested may be hardware or software.

实践中,上述待测设备可以为神经网络处理器(Neural Network ProcessorNNP)。神经网络处理器通常是采用神经网络方法对数据进行处理的处理器。神经网络处理器可以为硬件也可以为软件。作为示例,当神经网络处理器为硬件时,其可以实现成芯片。作为另一示例,当神经网络处理器为软件时,其可以实现成多个软件或软件模块,也可以实现成单个软件或软件模块。In practice, the above-mentioned device to be tested may be a neural network processor (Neural Network ProcessorNNP). A neural network processor is usually a processor that uses a neural network method to process data. The neural network processor can 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 multiple software or software modules, or may be implemented as a single software or software module.

其中,上述参考设备通常是用作测试对照的设备。需要指出的是,上述参考设备可以是硬件也可以是软件。实践中,上述参考设备通常是测试服务器预先构建的与待测设备结构相同或相近的软件设备。Among them, the above-mentioned reference equipment is usually used as a test control equipment. It should be noted that the above reference device may be hardware or software. In practice, the above reference device is usually a software device pre-built by the test server with the same or similar structure as the device under test.

这里,给待测设备和参考设备配置相同的配置参数,可以使得待测设备和参考设备具有完全相同的测试输入。这样,上述执行主体可以通过比较二者的测试输出,及时准确地捕捉到待测设备可能存在的问题,有助于提高测试准确率。Here, configuring the same configuration parameters for the device under test and the reference device can make the device under test and the reference device have exactly the same test input. In this way, the above-mentioned executive body can timely and accurately capture possible problems of the device under test by comparing the test outputs of the two, which helps to improve the test accuracy.

在本实施例中,由于配置文件通常具有一定的格式,因此,上述执行主体可以按照配置文件的格式对配置文件进行解析,从而得到配置文件中的场景配置参数,解析得到的所有场景配置参数的集合,即为上述场景配置参数集。在得到场景配置参数集后,上述执行主体可以通过有线连接方式或者无线连接方式,将所得到的场景配置参数集发送给待测设备和参考设备。这样,上述待测设备和上述参考设备可以各自基于场景配置参数集进行测试。In this embodiment, since the configuration file usually has a certain format, the above-mentioned execution body can 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 the parameters of all the scene configuration parameters obtained by parsing are Set, that is, configure the parameter set for the above scenario. After obtaining the scene configuration parameter set, the above-mentioned executing subject may send the obtained scene configuration parameter set to the device under test and the reference device through a wired connection or a wireless connection. In this way, the above-mentioned device under test and the above-mentioned reference device can each perform testing based on the scene configuration parameter set.

上述待测设备通常可以将各场景配置参数的参数值分别赋值给待测设备中的相应运行参数,使得待测设备进行运行测试,从而实现对待测设备进行测试。The above-mentioned device under test can usually assign the parameter values of the configuration parameters of each scenario to the corresponding operating parameters in the device under test, so that the device under test can perform an operation test, thereby realizing the test of the device under test.

同理地,上述参考设备通常可以将各场景配置参数的参数值分别赋值给参考设备中的相应运行参数,使得参考设备进行运行测试,从而实现对参考设备进行测试。Similarly, the above-mentioned reference device can usually assign parameter values of configuration parameters of each scenario to corresponding operating parameters in the reference device, so that the reference device can perform a running test, thereby realizing the test of the reference device.

需要指出的是,本实施例对待测设备和参考设备进行测试的具体过程,不做具体限定。It should be pointed out that the specific process of testing the device under test and the reference device in this embodiment is not specifically limited.

步骤103,接收待测设备基于场景配置参数集进行测试的测试结果,以及接收参考设备基于场景配置参数集进行测试的测试结果。Step 103: Receive a test result of the device under test performing the test based on the scenario configuration parameter set, and receive the test result of the reference device performing the test based on the scenario configuration parameter set.

在本实施例中,上述执行主体可以通过有线连接方式或者无线连接方式接收到待测设备的测试结果,以及接收到参考设备的测试结果。In this embodiment, the above-mentioned execution body may receive the test result of the device under test and the test result of the reference device through wired connection or wireless connection.

步骤104,根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态。Step 104, according to the test result of the device under test and the test result of the reference device, determine the device state of the device under test in the ith scenario.

其中,上述设备状态通常是用于指示待测设备是否存在异常的状态。上述设备状态可以包括正常状态和异常状态。The above-mentioned device state is usually a state used to indicate whether the device under test is abnormal. The above-mentioned device states may include normal states and abnormal states.

在本实施例中,上述执行主体可以将待测设备的测试结果与参考设备的测试结果进行比较,通过二者比较的结果确定待测设备的设备状态。作为示例,上述执行主体可以在待测设备的测试结果与参考设备的测试结果相同时,认为待测设备当前不存在异常,设备状态为正常状态。反之,若待测设备的测试结果与参考设备的测试结果不相同,则认为待测设备当前存在异常,设备状态为异常状态。In this embodiment, the above-mentioned execution body may compare the test result of the device under test with the test result of the reference device, and determine the device state of the device under test by the result of the comparison between the two. As an example, when the test result of the device under test is the same as the test result of the reference device, the executive body may consider that the device under test is not abnormal and the device state is normal. Conversely, if the test result of the device under test is different from the test result of the reference device, it is considered that the device under test is currently abnormal, and the device state is abnormal.

在本实施例中,在场景配置参数集所选取的场景为第i个场景时,可以实现测试待测设备在第i个场景下是否存在异常。以场景为单位对待测设备进行测试,有助于及时准确地发现待测设备针对某个或某几个特定场景所表现的异常,从而有针对性对待测设备进行问题解决。有助于提高对待测设备进行测试的整体测试效率。In this embodiment, when the scene selected by the scene configuration parameter set is the ith scene, it is possible to test whether the device under test is abnormal in the ith scene. Testing the device under test in units of scenarios helps to timely and accurately discover the abnormality of the device under test for one or several specific scenarios, so as to solve the problem of the device under test in a targeted manner. Helps to improve the overall test efficiency of testing the device under test.

在本实施例中,通过场景配置参数集选取场景,可以使得对场景的选取变得简单且易于实现。可以实现方便快捷地选取到用于对待测设备进行测试的场景,从而加快测试速度,有助于提高对待测设备进行测试的测试效率。另外,采用参考设备作为待测设备的测试对照,通过给待测设备和参考设备配置相同的配置参数,使得待测设备和参考设备具有完全相同的测试输入。参考设备和待测设备在相同的测试环境下进行测试,可以实现通过比较二者的测试输出,及时准确地捕捉到待测设备可能存在的问题,有助于提高测试准确率。In this embodiment, selecting a scene through the scene configuration parameter set can make the scene selection simple and easy to implement. The scene for testing the device under test can be conveniently and quickly selected, thereby accelerating the test speed and helping to improve the test efficiency of testing the device under test. In addition, the reference device is used as the test comparison of the device under test, and the device under test and the reference device have exactly the same test input by configuring the same configuration parameters for the device under test and the reference device. The reference device and the device under test are tested in the same test environment. By comparing the test outputs of the two, it is possible to timely and accurately capture the possible problems of the device under test, which helps to improve the test accuracy.

在本实施例的一些可选的实现方式中,上述获取配置文件可以通过以下任意一种或多种方式实现:In some optional implementation manners of this embodiment, the foregoing acquisition of the configuration file may be implemented in any one or more of the following manners:

其一、根据预设的配置文件生成步骤生成配置文件。First, a configuration file is generated according to a preset configuration file generation step.

其二、接收用户输入的配置文件。Second, receive the configuration file entered by the user.

其三、从预设存储区域提取配置文件。Third, extract the configuration file from the preset storage area.

其中,上述预设存储区域可以是测试服务器本地,也可以是与测试服务器通信连接的存储设备。Wherein, the above-mentioned preset storage area may be local to the test server, or may be a storage device communicatively connected to the test server.

本实现方式中,上述执行主体可以通过三种可选的方式实现获取到配置文件。具体地,上述执行主体可以通过自行生成配置文件的方式获取到配置文件。上述执行主体也可以通过接收用户输入的配置文件的方式获取到配置文件。上述执行主体还可以通过从预设存储区域提取配置文件的方式获取到配置文件。In this implementation manner, the above-mentioned execution body can obtain the configuration file in three optional ways. Specifically, the above-mentioned execution body can obtain the configuration file by generating the configuration file by itself. The above execution body may also obtain the configuration file by receiving the configuration file input by the user. The above-mentioned execution body may also obtain the configuration file by extracting the configuration file from the preset storage area.

需要指出的是,若通过自行生成配置文件的方式获取到配置文件,则上述执行主体可以采用预设的配置文件生成步骤,生成配置文件。上述预设的配置文件生成步骤可以是预先设定的用于生成配置文件的各种步骤。作为示例,上述预设的配置文件生成步骤可以包括:首先,给预先设定的场景配置参数集中的场景配置参数分配参数值。然后,将所有场景配置参数和场景配置参数的参数值编译成文本。最后,将编译得到的文本作为配置文件。作为另一示例,上述预设的配置文件生成步骤也可以包括:首先,给预先设定的场景配置参数集中的场景配置参数分配参数值。然后,将所有场景配置参数和场景配置参数的参数值编译成文本。之后,将编译得到的文本进一步编译成JSON文件。最后,将所得到的JSON文件作为配置文件。It should be pointed out that, if the configuration file is obtained by generating the configuration file by itself, the above-mentioned execution subject may use the preset configuration file generation steps to generate the configuration file. The above-mentioned preset configuration file generating steps may be various preset steps for generating a configuration file. As an example, the above-mentioned preset configuration file generating step may include: first, assigning parameter values to the scene configuration parameters in the preset scene configuration parameter set. Then, compile all scene configuration parameters and parameter values of scene configuration parameters into text. Finally, use the compiled text as a configuration file. As another example, the above-mentioned preset configuration file generating step may also include: first, assigning parameter values to the scene configuration parameters in the preset scene configuration parameter set. Then, compile all scene configuration parameters and parameter values of scene configuration parameters into text. After that, the compiled text is further compiled into a JSON file. Finally, use the resulting JSON file as a configuration file.

本实现方式中的测试方法,可以支持多种获取配置文件的方式,更加灵活实用。实践中,通过接收用户输入的配置文件的方式或者通过从预设存储区域提取配置文件的方式所获取到的配置文件,通常是用户关注的配置文件。采用用户关注的配置文件进行测试,可以实现有针对性地测试,有助于提高测试效率。另外,通过自行生成配置文件的方式获取到的配置文件,具有一般代表性,且不需要人工干预,可以加快测试速度,节约测试时间。因此,针对某一待测设备的测试,若先后采用上述三种方式中的多种方式获取配置文件用于对该待测设备进行测试,有助于从整体上提高对该待测设备进行测试的测试效率。The test method in this implementation can support multiple ways of obtaining configuration files, and is more flexible and practical. In practice, the configuration file obtained by receiving the configuration file input by the user or by extracting the configuration file from the preset storage area is usually the configuration file concerned by the user. Using user-focused configuration files for testing can achieve targeted testing and help improve testing efficiency. In addition, the configuration file obtained by generating the configuration file by itself is generally representative and does not require manual intervention, which can speed up the test and save the test time. Therefore, for the test of a certain device under test, if the configuration files are obtained in multiple ways among the above three methods for testing the device under test, it will help to improve the overall test of the device under test. test efficiency.

在本申请的各个实施例的可选的实现方式中,上述根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态,包括:In an optional implementation manner of each embodiment of the present application, the above-mentioned determination of the device state of the device under test in the i-th scenario according to the test result of the device under test and the test result of the reference device includes:

若待测设备的测试结果与参考设备的测试结果的差值大于预设差距阈值,则确定待测设备在第i个场景下的设备状态为异常状态。If the difference between the test result of the device under test and the test result of the reference device is greater than the preset difference threshold, it is determined that the device state of the device under test in the ith scenario is an abnormal state.

其中,上述差距阈值可以是预先设定的用于描述差距的数值。作为示例,上述差距阈值可以为0.1,0.6等。Wherein, the above-mentioned difference threshold may be a preset value for describing the difference. As an example, the above gap threshold may be 0.1, 0.6, etc.

这里,上述执行主体可以将两个设备分别对应的测试结果的差值与差距阈值进行比较,若上述差值大于差距阈值,则可以认为上述待测设备当前存在异常。反之,若上述差值小于或等于差距阈值,则可以认为上述待测设备当前不存在异常,即,上述待测设备当前正常。本实现方式引入差距阈值,将两个设备分别对应的测试结果的差值与差距阈值进行比较,可以避免由于测试精度范围内的误差导致的误判,可以在保证及时准确地捕捉到待测设备可能存在的问题的情况下节约测试时间,有助于进一步提高测试效率。Here, the executive body may compare the difference between the test results corresponding to the two devices with the difference threshold. If the difference is greater than the difference threshold, it can be considered that the device under test is currently abnormal. On the contrary, if the above-mentioned difference is less than or equal to the difference threshold, it can be considered that the above-mentioned device under test is not abnormal at present, that is, the above-mentioned device under test is currently normal. This implementation method introduces a gap threshold, and compares the difference between the test results corresponding to the two devices with the gap threshold, which can avoid misjudgments caused by errors within the test accuracy range, and can ensure timely and accurate capture of the device to be tested. It saves test time in case of possible problems and helps to further improve test efficiency.

在本申请的各个实施例的可选的实现方式中,上述测试方法还可以包括如下步骤:若待测设备在第i个场景下的设备状态为异常状态,则存储配置文件。In an optional implementation manner of each embodiment of the present application, the above test method may further include the following steps: if the device state of the device under test in the i-th scenario is an abnormal state, storing a configuration file.

这里,在待测设备当前存在异常时,上述执行主体可以存储当前的配置文件。这样,在对该待测设备进行改进后,上述执行主体可以继续采用该配置文件进行重新测试。可以实现有针对性地测试,有助于进一步提高测试效率。Here, when the device under test is currently abnormal, the above-mentioned execution body may store the current configuration file. In this way, after the device under test is improved, the above-mentioned executive body can continue to use the configuration file for re-testing. Targeted testing can be achieved, which helps to further improve testing efficiency.

在本申请的各个实施例的可选的实现方式中,配置文件的格式为JSON格式。In an optional implementation manner of each embodiment of the present application, the format of the configuration file is JSON format.

其中,JSON(JavaScript Object Notation)是一种轻量级的数据交换格式,易于阅读与编写,同时也易于机器解析和生成。这里,由于JSON格式的文件易于解析和生成,因此,本实现方式中的配置文件为JSON格式,可以进一步提高对配置文件进行解析的正确率,有助于进一步提高对待测设备进行测试的测试效率。Among them, JSON (JavaScript Object Notation) is a lightweight data exchange format, which is easy to read and write, and also easy to parse and generate by machine. Here, since the file in JSON format is easy to parse and generate, the configuration file in this implementation is in JSON format, which can further improve the accuracy of parsing the configuration file and help to further improve the test efficiency of the device under test. .

实施例二Embodiment 2

本申请实施例提供一种测试方法,本实施例是对实施例一的进一步说明,与实施例一相同或相似的地方,具体可参见实施例一的相关描述,此处不再赘述。请参阅图2,本实施例中的测试方法,包括:This embodiment of the present application provides a testing method. This embodiment is a further description of the first embodiment. For the same or similar places as the first embodiment, reference may be made to the relevant description of the first embodiment, which will not be repeated here. Please refer to Fig. 2, the test method in this embodiment includes:

步骤201,根据预设的配置文件生成步骤生成配置文件。Step 201: Generate a configuration file according to a preset configuration file generation step.

在本实施例中,可以通过生成配置文件的方式获取配置文件。此时,上述执行主体可以通过执行步骤2011-2012生成配置文件。In this embodiment, the configuration file may be obtained by generating the configuration file. At this time, the above-mentioned execution body may generate a configuration file by executing steps 2011-2012.

步骤2011,获取预先设定的场景配置参数集,给场景配置参数集中的各场景配置参数分配取值。Step 2011: Acquire a preset scene configuration parameter set, and assign a value 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 used to describe the scene. For example, the scene configuration parameter may be a parameter used to describe the starting address of the read data, or may be a parameter used to describe the end address of the read data. Can also be a parameter describing how the data is read. Each scenario configuration parameter in the scenario configuration parameter set may describe a part of the scenario, and the combination of all scenario configuration parameters in the scenario configuration parameter set may describe a complete scenario.

实际应用中,场景配置参数集中的场景配置参数可以包括但不限于:用于描述数据格式的参数、用于描述数据存储器的起始地址的参数、用于描述数据存储器的结束地址的参数、用于描述双倍速率同步动态随机存储器的地址的参数等。其中,用于描述数据格式的参数的取值可以为1、2、3。作为示例,若用于描述数据格式的参数的取值为1,可以用于指示数据格式为16位的数据。若用于描述数据格式的参数的取值为2,可以用于指示数据格式为8位的数据。用于描述数据存储器的起始地址的参数的取值可以为0~100000。用于描述数据存储器的结束地址的参数的取值可以为0~100000。用于描述双倍速率同步动态随机存储器的地址的参数的取值可以为0~100000。In practical applications, the scene configuration parameters in the scene configuration parameter set may include, but are not limited to: parameters used to describe the data format, parameters used to describe the start address of the data memory, parameters used to describe the end address of the data memory, Parameters used to describe the address of the double-rate synchronous dynamic random access memory, etc. The value of the parameter used to describe the data format may be 1, 2, or 3. As an example, if the value of the parameter used to describe the data format is 1, it can be used to indicate that the data format is 16-bit data. If the value of the parameter used to describe the data format is 2, it can be used to indicate that the data format is 8-bit data. The value of the parameter used to describe the starting address of the data memory can be 0 to 100000. The value of the parameter used to describe the end address of the data memory can be 0 to 100000. The value of the parameter used to describe the address of the double-rate synchronous dynamic random access memory can be 0-100000.

在本实施例中,上述执行主体可以预先设定多个场景配置参数以及设定各场景配置参数的取值范围。实践中,预先设定的场景配置参数通常为变量。这样,可以通过给各变量赋值的方式实现给每个场景配置参数分配取值。本实施例中,上述执行主体可以按照预先设定的分配方式给每个场景配置参数分配取值。其中,上述分配方式可以是预先设定的分配方式。作为一个示例,上述分配方式可以是随机分配。作为另一示例,上述分配方式也可以是按照取值递增分配。举例来说,若上一次给某场景配置参数分配的取值为1,则这一次给该场景配置参数分配的取值可以为2。In this embodiment, the above-mentioned execution body may preset a plurality of scene configuration parameters and set the value range of each scene configuration parameter. In practice, the preset scene configuration parameters are usually variables. In this way, it is possible to assign values to each scene configuration parameter by assigning values to each variable. In this embodiment, the above-mentioned execution subject may assign a value to each scene configuration parameter according to a preset assignment method. Wherein, the above allocation manner may be a preset allocation manner. As an example, the above allocation manner may be random allocation. As another example, the above allocation manner may also be incremental allocation according to the value. For example, if the value assigned to a scene configuration parameter last time is 1, the value assigned to the scene configuration parameter this time may be 2.

实践中,由于设备在真实使用时所面对的情况通常是随机的,因此,为了测试设备的通用性和稳定性,上述分配方式通常为随机分配。In practice, since the situations faced by the device in real use are usually random, the above allocation method is usually random in order to test the versatility and stability of the device.

步骤2012,根据场景配置参数集中的各场景配置参数及相应场景配置参数的取值,生成配置文件。Step 2012: Generate a configuration file according to each scenario configuration parameter in the scenario configuration parameter set and the value of the corresponding scenario configuration parameter.

作为示例,上述执行主体可以通过如下方式生成配置文件:直接将场景配置参数和场景配置参数的取值,按照键值对的方式编译成文本。然后,将编译得到的文本作为配置文件。进一步举例来说,若场景配置参数集中有两个场景配置参数,分别为参数1和参数2。若参数1的取值为10,参数2的取值为20。则将场景配置参数和场景配置参数的取值,按照键值对的方式编译成文本,可以得到的文本为{(参数1,10),(参数2,20)}。As an example, the above-mentioned execution body may generate the configuration file in the following manner: directly compiling the scene configuration parameters and the values of the scene configuration parameters into text in the form of key-value pairs. Then, use the compiled text as a configuration file. For further example, if there are two scene configuration parameters in the scene configuration parameter set, they are parameter 1 and parameter 2 respectively. If the value of parameter 1 is 10, the value of parameter 2 is 20. Then, the scene configuration parameters and the values of the scene configuration parameters are compiled into text in the form of key-value pairs, and the obtained text is {(parameter 1, 10), (parameter 2, 20)}.

作为另一示例,上述执行主体还可以通过如下方式实现生成配置文件:首先,将场景配置参数和场景配置参数的取值,按照键值对的方式编译成文本。然后,采用脚本语言(如,Python)将编译得到的文本编译成JSON格式文件。最后,将所得到的JSON格式文件作为配置文件。As another example, the above-mentioned execution body may also generate a configuration file in the following manner: First, the scene configuration parameters and the values of the scene configuration parameters are compiled into text in the form of key-value pairs. Then, the compiled text is compiled into a JSON format file using a scripting language (eg, Python). Finally, use the resulting JSON format file as a configuration file.

步骤202,解析配置文件以得到配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备。Step 202 , parse the configuration file to obtain a scene configuration parameter set in the configuration file, and send the parsed scene configuration parameter set to the device under test and the reference device, respectively.

其中,场景配置参数集用于从N个场景中选取第i个场景,其中,1≤i≤N。The scene configuration parameter set is used to select the ith scene from the N scenes, where 1≤i≤N.

步骤203,接收待测设备基于场景配置参数集进行测试的测试结果,以及接收参考设备基于场景配置参数集进行测试的测试结果。Step 203: Receive a test result of the device under test performing the test based on the scenario configuration parameter set, and receive the test result of the reference device performing the test based on the scenario configuration parameter set.

步骤204,根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态。Step 204 , according to the test result of the device under test and the test result of the reference device, determine the device state of the device under test in the ith scenario.

其中,上述设备状态通常是用于指示待测设备是否存在异常的状态。上述设备状态可以包括正常状态和异常状态。The above-mentioned device state is usually a state used to indicate whether the device under test is abnormal. The above-mentioned device states may include normal states and abnormal states.

在本实施例中,步骤202-204的具体操作与图1所示的实施例中步骤102-104的操作基本相同,在此不再赘述。In this embodiment, the specific operations of steps 202 to 204 are basically the same as the operations of steps 102 to 104 in the embodiment shown in FIG. 1 , and details are not repeated here.

在本实施例中,通过给场景配置参数集中各场景配置参数分配取值,可以实现待测设备和参考设备在所选取的场景下进行测试。需要指出的是,本实施例可以通过改变场景配置参数的取值的方式,切换待测设备和参考设备的测试场景,操作简单易于实现,有助于提高测试效率。In this embodiment, by assigning values to each scenario configuration parameter in the scenario configuration parameter set, the device under test and the reference device can be tested in the selected scenario. It should be pointed out that, in this embodiment, the test scenarios of the device under test and the reference device can be switched by changing the value of the scenario configuration parameter, the operation is simple and easy to implement, and the test efficiency is improved.

需要指出的是,由于待测设备在真实使用情况下,通常需要处理不同的场景以及需要在不同的场景中进行切换,因此,本实施例通过改变场景配置参数的取值的方式,切换待测设备和参考设备的测试场景,可以有效测试待测设备针对场景变化情况下的稳定性,有助于实现对待测设备进行充分测试。It should be pointed out that, because the device under test usually needs to deal with different scenarios and needs to switch between different scenarios in the real use situation, this embodiment switches the under test by changing the value of the scene configuration parameter. The test scenarios of the device and the reference device can effectively test the stability of the device under test against scene changes, and help to fully test the device under test.

在本实施例的一些可选的实现方式中,当满足测试条件时,根据预设的配置文件生成步骤生成配置文件。In some optional implementations of this embodiment, when the test conditions are met, a configuration file is generated according to a preset configuration file generation step.

其中,上述测试条件可以是预先设定的各种条件。Wherein, the above-mentioned test conditions may be various preset conditions.

本实现方式中,只有在当前情形满足测试条件的情况下,才执行生成配置文件。可以实现只在满足测试条件情形才执行生成配置文件。可以减少不必要的计算资源的损耗,有助于节约计算资源。In this implementation manner, the generation of the configuration file is performed only when the current situation meets the test conditions. It can be implemented to generate configuration files only when the test conditions are met. It can reduce the consumption of unnecessary computing resources and help save computing resources.

可选地,上述测试条件可以包括以下任意一项或多项:Optionally, the above test conditions may include any one or more of the following:

条件一,接收到用户输入的测试启动信息。Condition 1: The test start information input by the user is received.

其中,上述测试启动信息可以是用于指示启动测试的信息。作为示例,上述测试启动信息可以为“open”,也可以为“启动”。本申请对测试启动信息的具体形式不做具体限定。Wherein, the above-mentioned test start information may be information used to instruct to start the test. As an example, the above test start information may be "open" or "start". This application does not specifically limit the specific form of the test initiation information.

条件二,接收到测试结果且当前生成配置文件的次数小于预设次数阈值。Condition 2: The test result is received and the number of times the configuration file is currently generated is less than the preset number of times threshold.

其中,上述次数阈值可以是预先设定的用于描述次数的数值。如,20次。Wherein, the above-mentioned threshold of times may be a preset numerical value used to describe the times. For example, 20 times.

条件三,收到测试结果且当前用于测试的总测试时长小于预设时长阈值。Condition 3: The test result is received and the total test duration currently used for the test is less than the preset duration threshold.

其中,上述时长阈值可以是预先设定的用于描述时间长度的数值。如,2小时。Wherein, the above-mentioned duration threshold may be a preset numerical value used to describe the duration. For example, 2 hours.

实践中,若接收到测试结果则通常表明当前测试结束。此时,上述执行主体可以依据测试条件判断当前是否需要继续进行测试,若需要,则执行生成配置文件步骤。本实现方式可以实现自动测试,有助于节约测试时间,提高测试效率。另外,在自动测试的过程中,可以通过改变场景配置参数的取值的方式,切换待测设备和参考设备的测试场景,可以有效测试待测设备针对场景变化情况下的稳定性,有助于实现对待测设备进行充分测试。In practice, receipt of a test result usually indicates the end of the current test. At this time, the above-mentioned execution body can judge whether it is currently necessary to continue the test according to the test conditions, and if necessary, execute the step of generating a configuration file. This implementation manner can realize automatic testing, which is helpful for saving testing time and improving testing efficiency. In addition, in the process of automatic testing, the test scenarios of the device under test and the reference device can be switched by changing the values of the scene configuration parameters, which can effectively test the stability of the device under test against the scene changes, which is helpful for Enables adequate testing of the device under test.

实施例三Embodiment 3

继续参考图3,为本申请实施例提供的测试系统的结构示意图。如图3所示地,测试系统可以包括测试服务器301、待测设备302和参考设备303。其中,Continuing to refer to FIG. 3 , it is a schematic structural diagram of a testing system provided by an embodiment of the present application. As shown in FIG. 3 , the test system may include a test server 301 , a device under test 302 and a reference device 303 . in,

测试服务器301,用于获取配置文件;解析配置文件以得到配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,场景配置参数集用于从N个场景中选取第i个场景,其中,1≤i≤N;The test server 301 is used to obtain a configuration file; parse the configuration file to obtain a scene configuration parameter set in the configuration file, and send the parsed scene configuration parameter set to the device under test and the reference device respectively, and the scene configuration parameter set is used to obtain the scene configuration parameter set from the device under test and the reference device. Select the ith scene from the N scenes, where 1≤i≤N;

待测设备302,用于基于场景配置参数集进行测试,以及将测试结果向测试服务器发送;The device under test 302 is configured to perform a test based on the scene configuration parameter set, and send the test result to the test server;

参考设备303,用于基于场景配置参数集进行测试,以及将测试结果向测试服务器发送;Reference device 303, configured to perform a test based on the scenario configuration parameter set, and send the test result to the test server;

测试服务器304,还用于接收待测设备基于场景配置参数集进行测试的测试结果,以及接收参考设备基于场景配置参数集进行测试的测试结果;根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态。The test server 304 is further configured to receive the test result of the device under test based on the scenario configuration parameter set, and receive the test result of the reference device based on the scenario configuration parameter set; according to the test result of the device under test and the test result of the reference device , to determine the device state of the device under test in the i-th scenario.

本实施例提供的系统,通过场景配置参数集选取场景,可以使得对场景的选取变得简单且易于实现。可以实现方便快捷地选取到用于对待测设备进行测试的场景,从而加快测试速度,有助于提高对待测设备进行测试的测试效率。In the system provided in this embodiment, the scene is selected through the scene configuration parameter set, which can make the selection of the scene simple and easy to implement. The scene for testing the device under test can be conveniently and quickly selected, thereby accelerating the test speed and helping to improve the test efficiency of testing the device under test.

需要说明的是,上述测试服务器、待测设备和参考设备之间的信息交互、执行过程等内容,由于与本申请的方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information exchange, execution process and other contents between the above-mentioned test server, the device under test and the reference device are based on the same concept as the method embodiments of the present application, and the specific functions and technical effects brought by them can be specifically Refer to the method embodiment section, which will not be repeated here.

在本实施例的一些可选的实现方式中,系统还包括硬件解析设备,其中,硬件解析设备分别与测试服务器和待测设备通信连接。此时,测试服务器中,解析配置文件以得到配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,可以包括如下步骤一和步骤二。In some optional implementations of this embodiment, the system further includes a hardware parsing device, wherein the hardware parsing device is connected in communication with the test server and the device to be tested, respectively. At this time, in the test server, parsing the configuration file to obtain the scene configuration parameter set in the configuration file, and sending the parsed scene configuration parameter set to the device under test and the reference device respectively, may include the following steps 1 and 2.

步骤一,通过预设解析程序对配置文件进行解析,以及将解析得到的场景配置参数集发送至参考设备。In step 1, the configuration file is parsed by a preset parsing program, and the scene configuration parameter set obtained by the analysis is sent to the reference device.

其中,上述预设解析程序可以是预先设定的用于对配置文件进行解析的程序。The above-mentioned preset parsing program may be a preset program for parsing the configuration file.

这里,测试服务器可以直接采用自身存储的预设解析程序对配置文件进行解析,以得到配置文件中的场景配置参数集。然后,将解析得到的场景配置参数集发送至参考设备。以使得参考设备可以基于场景配置参数集进行测试。Here, the test server may directly use a preset parsing program stored by itself to parse the configuration file to obtain the scene configuration parameter set in the configuration file. Then, the scene configuration parameter set obtained by parsing is sent to the reference device. So that the reference device can be tested based on the scenario configuration parameter set.

步骤二,向通信连接的硬件解析设备发送配置文件,使得硬件解析设备对配置文件进行解析、将解析得到的场景配置参数集封装成指令程序以及将指令程序形式的场景配置参数集发送至待测设备。Step 2: Send a configuration file to the hardware parsing device connected in communication, so that the hardware parsing device parses the configuration file, encapsulates the parsed scene configuration parameter set into an instruction program, and sends the scene configuration parameter set in the form of an instruction program to the under-test. equipment.

其中,上述硬件解析设备通常是用于对配置文件进行解析的硬件设备。作为示例,上述硬件解析设备可以为用于对JSON格式的配置文件进行解析的JSON解析器。Wherein, the above-mentioned hardware parsing device is usually 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 JSON format.

这里,测试服务器可以将配置文件发送至硬件解析设备。这样,硬件解析设备可以对配置文件进行解析,以得到配置文件中的场景配置参数集。然后,将解析得到的场景配置参数集封装成指令程序。最后,将指令程序发送至待测设备。实践中,硬件解析设备可以通过将场景配置参数集中各场景配置参数写入预设模板,实现将场景配置参数集封装成指令程序。其中,上述预设模板可以是预先设定的文件模板,该文件模板中可以包括多个变量。硬件解析设备可以将场景配置参数集中各场景配置参数分别赋值给该文件模板的各变量,实现将场景配置参数集封装成指令程序。实际应用中,指令程序通常可以实现成便于机器读取的二进制文件。Here, the test server can send the configuration file to the hardware parsing device. In this way, the hardware parsing device can parse the configuration file to obtain the scene configuration parameter set in the configuration file. Then, the scene configuration parameter set obtained by parsing is encapsulated into an instruction program. Finally, send the command program to the device under test. In practice, the hardware parsing device can encapsulate the scene configuration parameter set into an 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 multiple variables. The hardware parsing device may assign each scene configuration parameter in the scene configuration parameter set to each variable of the file template, so as to encapsulate the scene configuration parameter set into an instruction program. In practical applications, the instruction program can usually be implemented as a binary file that is easy to read by a machine.

本实现方式中,测试服务器通过软件解析方式对配置文件进行解析,以及将解析得到的场景配置参数集发送给参考设备,以使得参考设备可以基于软件解析得到的场景配置参数集进行测试。另外,测试服务器通过硬件解析设备对配置文件进行解析,以及通过硬件解析设备将解析得到的场景配置参数集以指令程序的形式发送至待测设备,以使得待测设备可以基于指令程序形式的场景配置参数集进行测试。采用不同的解析方式对同一配置文件进行解析,通常可以得到相同的解析结果。In this implementation manner, the test server parses the configuration file through software parsing, and sends the parsed scene configuration parameter set to the reference device, so that the reference device can perform testing based on the software parsed scene configuration parameter set. In addition, the test server parses the configuration file through the hardware parsing device, and sends the parsed scene configuration parameter set to the device under test in the form of an instruction program through the hardware parsing device, so that the device under test can be based on the scene in the form of an instruction program. Configure the parameter set for testing. Using different parsing methods to parse the same configuration file can usually obtain the same parsing result.

本实现方式中,测试服务器将配置文件发送至硬件解析设备进行解析,以实现通过硬件解析设备将指令程序形式的场景配置参数集发送至待测设备,可以减少测试服务器的计算量,从而加快对待测设备的测试速度,有助于提高测试效率。另外,若测试服务器所确定的待测设备的设备状态总是为异常状态,则极有可能是硬件解析设备出现问题。因此,本实现方式有助于实现在保障测试准确率的同时及时发现硬件解析设备存在的问题。In this implementation manner, the test server sends the configuration file to the hardware parsing device for parsing, so as to send the scene configuration parameter set in the form of an instruction program to the device under test through the hardware parsing device, which can reduce the amount of calculation of the test server and thus speed up the processing The test speed of the test equipment is helpful to improve the test efficiency. In addition, if the device state of the device under test determined by the test server is always in an abnormal state, it is very likely that there is a problem with the hardware parsing device. Therefore, this implementation is helpful to realize the timely discovery of the problems existing in the hardware analysis device while ensuring the test accuracy.

在本实施例的一些可选的实现方式中,待测设备可以包括程序存储器(ProgramMemory,PM)、控制单元(Control Unit,CU)、外部输入数据直接存储访问器(ExternalInput data Direct Memory Access,EIDMA)、外部输出数据直接存储访问器(ExternalOutput data Direct Memory Access,EODMA)、双倍速率同步动态随机存储器(DoubleDataRate synchronous dynamic random access memory,DDR)、多路数据选择器(crossbar,XBAR)和数据存储器(Data Memory,DM)。In some optional implementations of this embodiment, the device to be tested may include a program memory (Program Memory, PM), a control unit (Control Unit, CU), an external input data direct memory access device (External Input data Direct Memory Access, EIDMA) ), External Output Data Direct Memory Access (EODMA), Double DataRate synchronous dynamic random access memory (DDR), multiplex data selector (crossbar, XBAR) and data memory (Data Memory, DM).

若发送至待测设备的场景配置参数集为指令程序形式的场景配置参数集,且场景配置参数集包括用于指示读出数据或写入数据的第一参数、用于指示源地址信息的第二参数和用于指示目标地址信息的第三参数。其中,上述第一参数可以用于指示读出数据或写入数据。作为示例,第一参数的取值可以为“1”,用于指示读出数据,也可以为“2”,用于指示写入数据。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 used to indicate read data or write data, a first parameter used to indicate source address information A second parameter and a third parameter for indicating target address information. Wherein, the above-mentioned first parameter may be used to indicate reading data or writing data. As an example, the value of the first parameter may be "1", which is used to indicate reading data, or "2", which is used to indicate writing data.

此时,待测设备中,基于场景配置参数集进行测试,可以包括步骤401-406。At this time, in the device under test, the test is performed based on the scene configuration parameter set, which may include steps 401-406.

图4是本申请实施例提供的待测设备基于场景配置参数集进行测试的流程示意图。FIG. 4 is a schematic flowchart of a device under test performing a test based on a scene configuration parameter set provided by an embodiment of the present application.

步骤401,PM接收以及存储指令程序。Step 401, the PM receives and stores the instruction program.

步骤402,CU从PM中读取指令程序,若第一参数指示写入数据,则将指令程序发送至EIDMA;若第一参数指示读出数据,则将指令程序发送至EODMA。Step 402, the CU reads the instruction program from the PM, and if the first parameter indicates writing data, sends the instruction program to EIDMA; if the first parameter indicates reading data, sends the instruction program to EODMA.

步骤403,EIDMA根据接收到的指令程序对应的源地址信息和目标地址信息,将DDR中与源地址信息对应地址处的数据通过XBAR存储至DM中与目标地址信息对应的地址处。Step 403, 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.

其中,XBAR的作用是提供多个数据通道,可以实现多路数据的并行存取,有助于提高数据的快速存取。Among them, the function of XBAR is to provide multiple data channels, which can realize the parallel access of multiple data channels, which helps to improve the fast access of data.

步骤404,DM将存入的数据以及被存入数据的地址发送至测试服务器。Step 404, the DM sends the stored data and the address of the stored data to the test server.

举例来说,若DM中的地址甲中存入了数据100。则可以将数据100和地址甲发送至测试服务器。如,DM发送至测试服务器的内容可以为:地址甲中的数据为100。For example, if data 100 is stored in address A in DM. Then data 100 and address A can be sent to the test server. For example, the content sent by DM to the test server can be: the data in address A is 100.

步骤405,EODMA根据接收到的指令程序对应的源地址信息和目标地址信息,将DM中与源地址信息对应地址处的数据通过XBAR存储至DDR中与目标地址信息对应的地址处。Step 405, 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 XBAR according to the source address information and target address information corresponding to the received instruction program.

步骤406,DDR将存入的数据以及被存入数据的地址发送至测试服务器。Step 406, the DDR sends the stored data and the address of the stored data to the test server.

需要指出的是,场景配置参数集包括用于指示读出数据或写入数据的第一参数、用于指示源地址信息的第二参数和用于指示目标地址信息的第三参数。实际应用中,场景配置参数集还可以包括其他参数,如,还可以包括用于描述读取方式的参数。作为示例,读取方式可以为以源地址信息对应的地址为起始地址,顺次读取5个字节的数据。读取方式也可以为以源地址信息对应的地址为起始地址,每间隔1个字节读取一个数据直至读取到5个字节的数据。It should be 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 target address information. In practical applications, the scene configuration parameter set may further include other parameters, for example, may also include parameters for describing the reading method. As an example, the reading method may be to use the address corresponding to the source address information as the starting address, and sequentially read 5 bytes of data. The reading method can also be that the address corresponding to the source address information is used as the starting address, and one data is read every 1 byte until 5 bytes of data are read.

本实现方式中,可以比较待测设备的存储器中发生变化的地址,是否与参考设备的存储器中发生变化的地址相同。也可以进一步比较待测设备中发生数据变化的地址中的数据,是否与参考设备中发生数据变化的地址中的数据相同。若上述二者皆相同,则可以认为待测设备的存储器不存在异常。反之,若上述二者存在一者不同或二者皆不同,则可以认为待测设备的存储器存在异常。本实现方式可以及时准确地捕捉到待测设备的存储器可能存在的问题,有助于提高测试准确率。In this implementation manner, it is possible to compare whether the changed address in the memory of the device under test is the same as the changed address in the memory of the reference device. It is also possible to further compare whether the data in the address where the data change occurs in the device under test is the same as the data in the address where the data change occurs in the reference device. If the above two are the same, it can be considered that there is no abnormality in the memory of the device under test. On the contrary, if one or both of the above two are different, it can be considered that there is an abnormality in the memory of the device under test. This implementation manner can timely and accurately capture possible problems in the memory of the device under test, which helps to improve the test accuracy.

实施例四Embodiment 4

继续参考图5,为本申请实施例提供的测试系统的结构示意图。如图5所示地,测试服务器可以直接得到JSON文件,也可以通过随机配置生成随机JSON文件。这里,JSON文件为上述配置文件。测试服务器可以通过多种方式得到配置文件。所得到的配置文件中包括场景配置参数集。场景配置参数集可以包括用于指示读出数据或写入数据的第一参数、用于指示源地址信息的第二参数和用于指示目标地址信息的第三参数。Continue to refer to FIG. 5 , which is a schematic structural diagram of the testing system provided by the embodiment of the present application. As shown in Figure 5, the test server can directly obtain the JSON file or generate a random JSON file through random configuration. Here, the JSON file is the above configuration file. Test servers can obtain configuration files in several ways. The resulting configuration file includes a set of scene configuration parameters. The scene configuration parameter set may include 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.

测试服务器可以采用JSON解析程序对JSON文件进行软件解析,得到场景配置参数集以及将场景配置参数集传输至参考设备,使得参考设备基于软件解析得到的场景配置参数集进行测试。这里,参考设备为测试服务器预先构建的与待测设备结构相同或相近的软件设备。The test server can use a JSON parsing program to perform software parsing on the JSON file, obtain a scene configuration parameter set, and transmit the scene configuration parameter set to the reference device, so that the reference device can perform testing based on the scene configuration parameter set obtained by software analysis. Here, the reference device is a software device pre-built by the test server with the same or similar structure as the device under test.

参考设备可以将测试结果写入测试服务器的计分板。The reference device can write test results to the test server's scoreboard.

测试服务器可以将JSON文件发送至通信连接的硬件JSON解析器。这里,硬件JSON解析器为上述硬件解析设备。The test server can send JSON files to the hardware JSON parser of the communication connection. Here, the hardware JSON parser is the above-mentioned hardware parsing device.

硬件JSON解析器对JSON文件进行解析,以得到二进制文件。这里,硬件JSON解析器对JSON文件解析得到场景配置参数集。然后,将场景配置参数集封装成指令程序。最后,将指令程序形式的场景配置参数集发送至待测设备。所得到的二进制文件为上述指令程序的载体。The hardware JSON parser parses the JSON file to get the binary file. Here, the hardware JSON parser parses the JSON file to obtain the scene configuration parameter set. Then, the scene configuration parameter set is encapsulated into an instruction program. Finally, the scene configuration parameter set in the form of an instruction program is sent to the device under test. The obtained binary file is the carrier of the above instruction program.

硬件JSON解析器将二进制文件发送至待测设备的PM中。The hardware JSON parser sends the binary to the PM of the device under test.

待测设备包括PM、CU、EIDMA、EODMA、DDR、XBAR和DM。其中,PM接收以及存储二进制文件。这里,PM可以得到指令程序。待测设备可以基于二进制文件进行测试。Devices under test include PM, CU, EIDMA, EODMA, DDR, XBAR and DM. Among them, PM receives and stores binary files. Here, the PM can get the instruction program. The device under test can be tested based on binary files.

待测设备基于二进制文件进行测试的过程为:CU从PM中读取指令程序,若第一参数指示写入数据,则将指令程序发送至EIDMA;若第一参数指示读出数据,则将指令程序发送至EODMA。EIDMA根据接收到的指令程序对应的源地址信息和目标地址信息,将DDR中与源地址信息对应地址处的数据通过XBAR存储至DM中与目标地址信息对应的地址处。其中,XBAR的作用是提供多个数据通道,可以实现多路数据的并行存取,有助于提高数据的快速存取。DM将存入的数据以及被存入数据的地址发送至测试服务器的监控器。EODMA根据接收到的指令程序对应的源地址信息和目标地址信息,将DM中与源地址信息对应地址处的数据通过XBAR存储至DDR中与目标地址信息对应的地址处。DDR将存入的数据以及被存入数据的地址发送至测试服务器的监控器。The test process of the device under test based on the binary file is as follows: CU reads the instruction program from the PM, and if the first parameter indicates to write data, the instruction program is sent to EIDMA; if the first parameter indicates to read data, the instruction program is sent to Program is sent to EODMA. According to the source address information and target address information corresponding to the received command program, 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 XBAR. Among them, the function of XBAR is to provide multiple data channels, which can realize the parallel access of multiple data channels, which helps to improve the fast access of data. The DM sends the stored data and the address of the stored data to the monitor of the test server. 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 XBAR according to the source address information and target address information corresponding to the received instruction program. The DDR sends the stored data and the address of the stored data to the monitor of the test server.

测试服务器的监控器可以获取待测设备的各部件的数据信息,以及可以将所获取的数据信息记录在计分板上。The monitor of the test server can acquire the data information of each component of the device under test, and can record the acquired data information on the scoreboard.

测试服务器的计分板用于记录待测设备和参考设备的测试结果,以及针对参考设备和待测设备的测试结果提示待测设备的设备状态。如,若待测设备的测试结果与参考设备的测试结果一致,则计分板可以提示“OK”。The scoreboard of the test server is used to record the test results of the device under test and the reference device, and prompt the device status of the device under test for the test results of the reference device and the device under test. For example, if the test result of the device under test is consistent with the test result of the reference device, the scoreboard may prompt "OK".

实施例五Embodiment 5

对应于上文实施例一的测试方法,图6示出了本申请实施例提供的测试装置600的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the test method of the first embodiment above, FIG. 6 shows a structural block diagram of the test apparatus 600 provided by the embodiment of the present application. For convenience of description, only the part related to the embodiment of the present application is shown.

参照图6,该装置包括:Referring to Figure 6, the device includes:

文件获取单元601,用于获取配置文件;a file obtaining unit 601, configured to obtain a configuration file;

文件解析单元602,用于解析配置文件以得到配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,场景配置参数集用于从N个场景中选取第i个场景,其中,1≤i≤N;The file parsing unit 602 is configured to parse the configuration file to obtain a scene configuration parameter set in the configuration file, and send the parsed scene configuration parameter set to the device under test and the reference device, respectively, where the scene configuration parameter set is used to select from N scenarios Select the i-th scene from , where 1≤i≤N;

结果接收单元603,用于接收待测设备基于场景配置参数集进行测试的测试结果,以及接收参考设备基于场景配置参数集进行测试的测试结果;A result receiving unit 603, configured to receive a test result of the device under test performing the test based on the scenario configuration parameter set, and receiving the test result of the reference device performing the test based on the scenario configuration parameter set;

异常判断单元604,用于根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态。The abnormality determination unit 604 is configured to determine the device state of the device under test in the i-th scenario according to the test result of the device under test and the test result of the reference device.

在一个实施例中,文件获取单元601中,获取配置文件包括以下任意一项或多项:In one embodiment, in the file obtaining unit 601, obtaining the configuration file includes any one or more of the following:

根据预设的配置文件生成步骤生成配置文件;Generate a configuration file according to the preset configuration file generation steps;

接收用户输入的配置文件;Receive the configuration file entered by the user;

从预设存储区域提取配置文件。Extract configuration files from the preset storage area.

在一个实施例中,根据预设的配置文件生成步骤生成配置文件,包括:In one embodiment, the configuration file is generated according to a preset configuration file generation step, including:

获取预先设定的场景配置参数集,给场景配置参数集中的各场景配置参数分配取值,其中,场景配置参数的不同取值对应不同场景;obtaining a preset scene configuration parameter set, and assigning values to each scene configuration parameter in the scene configuration parameter set, wherein different values of the scene configuration parameters correspond to different scenarios;

根据场景配置参数集中的各场景配置参数及相应场景配置参数的取值,生成配置文件。A configuration file is generated according to each scenario configuration parameter in the scenario configuration parameter set and the value of the corresponding scenario configuration parameter.

在一个实施例中,异常判断单元604中,根据待测设备的测试结果和参考设备的测试结果,确定待测设备在第i个场景下的设备状态,包括:In one embodiment, the abnormality judging unit 604 determines the device state of the device under test in the i-th scenario according to the test result of the device under test and the test result of the reference device, including:

若待测设备的测试结果与参考设备的测试结果的差值大于预设差距阈值,则确定待测设备在第i个场景下的设备状态为异常状态。If the difference between the test result of the device under test and the test result of the reference device is greater than the preset difference threshold, it is determined that the device state of the device under test in the ith scenario is an abnormal state.

在一个实施例中,装置还包括执行判断单元,用于:当满足测试条件时,根据预设的配置文件生成步骤生成配置文件。In one embodiment, the apparatus further includes an execution judging unit, configured to: when the test condition is satisfied, generate a configuration file according to a preset configuration file generating step.

在一个实施例中,测试条件包括以下任意一项或多项:In one embodiment, the test conditions include any one or more of the following:

接收到用户输入的测试启动信息;Receive the test start information input by the user;

接收到测试结果且当前生成配置文件的次数小于预设次数阈值;The test result is received and the current number of generated configuration files is less than the preset number of thresholds;

接收到测试结果且当前用于测试的总测试时长小于预设时长阈值。The test result is received and the total test duration currently used for the test is less than the preset duration threshold.

在一个实施例中,装置还包括文件存储单元,用于:若待测设备在第i个场景下的设备状态为异常状态,则存储配置文件。In one embodiment, the apparatus further includes a file storage unit, configured to: if the device state of the device under test in the i-th scenario is an abnormal state, store the configuration file.

本实施例提供的装置,通过场景配置参数集选取场景,可以使得对场景的选取变得简单且易于实现。可以实现方便快捷地选取到用于对待测设备进行测试的场景,从而加快测试速度,有助于提高对待测设备进行测试的测试效率。In the apparatus provided in this embodiment, the scene is selected through the scene configuration parameter set, which can make the selection of the scene simple and easy to implement. The scene for testing the device under test can be conveniently and quickly selected, thereby accelerating the test speed and helping to improve the test efficiency of testing the device under test.

需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请实施例一的方法基于同一构思,其具体功能及带来的技术效果,具体可参见实施例一部分,此处不再赘述。It should be noted that the information exchange, execution process, etc. between the above-mentioned devices/units are based on the same concept as the method in the first embodiment of the present application, and the specific functions and technical effects brought by it can refer to the part of the embodiments for details. It is not repeated here.

实施例六Embodiment 6

图7为本申请一实施例提供的电子设备700的结构示意图。如图7所示,该实施例的电子设备700包括:至少一个处理器701(图7中仅示出一个处理器)、存储器702以及存储在存储器702中并可在至少一个处理器701上运行的计算机程序703,例如测试程序。处理器701执行计算机程序703时实现上述任意各个方法实施例中的步骤。处理器701执行计算机程序703时实现上述各个测试方法的实施例中的步骤。处理器701执行计算机程序703时实现上述各装置实施例中各模块/单元的功能,例如图6所示单元601至604的功能。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 device 700 of this embodiment includes: at least one processor 701 (only one processor is shown in FIG. 7 ), a memory 702 , and is stored in the memory 702 and can run on the at least one processor 701 703 of a computer program, such as a test program. When the processor 701 executes the computer program 703, the steps in any of the foregoing method embodiments are implemented. When the processor 701 executes the computer program 703, the steps in the above embodiments of the respective testing methods are implemented. When the processor 701 executes the computer program 703, the functions of the modules/units in the above device embodiments are realized, for example, the functions of the units 601 to 604 shown in FIG. 6 .

示例性的,计算机程序703可以被分割成一个或多个模块/单元,一个或者多个模块/单元被存储在存储器702中,并由处理器701执行,以完成本申请。一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述计算机程序703在电子设备700中的执行过程。例如,计算机程序703可以被分割成文件获取单元、文件解析单元、结果接收单元和异常判断单元,各单元具体功能在上述实施例中已有描述,此处不再赘述。Exemplarily, the computer program 703 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 702 and executed by the processor 701 to complete the present application. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 703 in the electronic device 700 . For example, the computer program 703 can be divided into a file obtaining unit, a file parsing unit, a result receiving unit, and an abnormality judging unit. The specific functions of each unit have been described in the above embodiments, and will not be repeated here.

电子设备700可以是服务器、台式电脑、平板电脑、云端服务器和移动终端等计算设备。电子设备700可包括,但不仅限于,处理器701,存储器702。本领域技术人员可以理解,图7仅仅是电子设备700的示例,并不构成对电子设备700的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如电子设备还可以包括输入输出设备、网络接入设备、总线等。The electronic device 700 may be a computing device such as a server, a desktop computer, a tablet computer, a cloud server, and a mobile terminal. The electronic device 700 may include, but is not limited to, a processor 701 and a memory 702 . Those skilled in the art can understand that FIG. 7 is only an example of the electronic device 700, and does not constitute a limitation to the electronic device 700, and may include more or less components than the one shown, or combine some components, or different components For example, the electronic device may also include an input and output device, a network access device, a bus, and the like.

所称处理器701可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 701 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

存储器702可以是电子设备700的内部存储单元,例如电子设备700的硬盘或内存。存储器702也可以是电子设备700的外部存储设备,例如电子设备700上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(FlashCard)等。进一步地,存储器702还可以既包括电子设备700的内部存储单元也包括外部存储设备。存储器702用于存储计算机程序以及电子设备所需的其他程序和数据。存储器702还可以用于暂时地存储已经输出或者将要输出的数据。The memory 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 memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card (Flash Card) equipped on the electronic device 700 )Wait. Further, the memory 702 may also include both an internal storage unit of the electronic device 700 and an external storage device. 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 or will be output.

所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion means dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.

在本申请所提供的实施例中,应该理解到,所揭露的装置/电子设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/电子设备实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are only illustrative, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components May be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

集成的模块如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,计算机程序包括计算机程序代码,计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读介质可以包括:能够携带计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The integrated modules, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer-readable storage medium. Based on this understanding, the present application realizes all or part of the processes in the methods of the above embodiments, and can also be completed by instructing relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program is in When executed by a processor, the steps of each of the above method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate forms, and the like. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in computer-readable media may be appropriately increased or decreased in accordance with the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include Electrical carrier signals and telecommunication signals.

以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in the application. within the scope of protection.

Claims (10)

1.一种测试方法,其特征在于,所述方法包括:1. a test method, is characterized in that, described method comprises: 获取配置文件;get the configuration file; 解析所述配置文件以得到所述配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,所述场景配置参数集用于从N个场景中选取第i个场景,其中,1≤i≤N;Parse the configuration file to obtain a scene configuration parameter set in the configuration file, and send the parsed scene configuration parameter set to the device under test and the reference device, respectively, where the scene configuration parameter set is used to select from N scenarios Select the ith scene, where 1≤i≤N; 接收所述待测设备基于所述场景配置参数集进行测试的测试结果,以及接收所述参考设备基于所述场景配置参数集进行测试的测试结果;receiving a test result of the device under test performing a test based on the scenario configuration parameter set, and receiving a test result of the reference device performing a test based on the scenario configuration parameter set; 根据所述待测设备的测试结果和所述参考设备的测试结果,确定所述待测设备在第i个场景下的设备状态。According to the test result of the device under test and the test result of the reference device, the device state of the device under test in the i-th scenario is determined. 2.根据权利要求1所述的方法,其特征在于,所述获取配置文件包括以下任意一项或多项:2. The method according to claim 1, wherein the obtaining the configuration file comprises any one or more of the following: 根据预设的配置文件生成步骤生成配置文件;Generate a configuration file according to the preset configuration file generation steps; 接收用户输入的配置文件;Receive the configuration file entered by the user; 从预设存储区域提取配置文件。Extract configuration files from the preset storage area. 3.根据权利要求2所述的方法,其特征在于,所述根据预设的配置文件生成步骤生成配置文件,包括:3. The method according to claim 2, wherein the generating a configuration file according to a preset configuration file generating step comprises: 获取预先设定的场景配置参数集,给所述场景配置参数集中的各场景配置参数分配取值,其中,所述场景配置参数的不同取值对应不同场景;obtaining a preset scene configuration parameter set, and assigning a value to each scene configuration parameter in the scene configuration parameter set, wherein different values of the scene configuration parameter correspond to different scenes; 根据所述场景配置参数集中的各场景配置参数及相应场景配置参数的取值,生成配置文件。A configuration file is generated according to each scenario configuration parameter in the scenario configuration parameter set and the value of the corresponding scenario configuration parameter. 4.根据权利要求1-3中任意一项所述的方法,其特征在于,所述根据所述待测设备的测试结果和所述参考设备的测试结果,确定所述待测设备在第i个场景下的设备状态,包括:4. The method according to any one of claims 1-3, wherein, according to the test result of the device under test and the test result of the reference device, it is determined that the device under test is in the i-th Device status in each scenario, including: 若所述待测设备的测试结果与所述参考设备的测试结果的差值大于预设差距阈值,则确定所述待测设备在第i个场景下的设备状态为异常状态。If the difference between the test result of the device under test and the test result of the reference device is greater than a preset difference threshold, it is determined that the device state of the device under test in the i-th scenario is an abnormal state. 5.一种测试系统,其特征在于,所述系统包括测试服务器、待测设备和参考设备,其中,5. A test system, characterized in that the system comprises a test server, a device under test and a reference device, wherein, 所述测试服务器,用于获取配置文件;解析所述配置文件以得到所述配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,所述场景配置参数集用于从N个场景中选取第i个场景,其中,1≤i≤N;The test server is used to obtain a configuration file; parse the configuration file to obtain a scene configuration parameter set in the configuration file, and send the parsed scene configuration parameter set to the device under test and the reference device, respectively, the The scene configuration parameter set is used to select the ith scene from N scenes, where 1≤i≤N; 所述待测设备,用于基于所述场景配置参数集进行测试,以及将测试结果向所述测试服务器发送;the device under test, configured to perform a test based on the scene configuration parameter set, and send the test result to the test server; 所述参考设备,用于基于所述场景配置参数集进行测试,以及将测试结果向所述测试服务器发送;the reference device, configured to perform a test based on the scene configuration parameter set, and send the test result to the test server; 所述测试服务器,还用于接收所述待测设备基于所述场景配置参数集进行测试的测试结果,以及接收所述参考设备基于所述场景配置参数集进行测试的测试结果;根据所述待测设备的测试结果和所述参考设备的测试结果,确定所述待测设备在第i个场景下的设备状态。The test server is further configured to receive a test result of the device under test based on the scenario configuration parameter set, and receive a test result of the reference device based on the scenario configuration parameter set; The test result of the device under test and the test result of the reference device are used to determine the device state of the device under test in the ith scenario. 6.根据权利要求5所述的系统,其特征在于,所述系统还包括硬件解析设备,所述硬件解析设备分别与所述测试服务器和所述待测设备通信连接;以及6. The system according to claim 5, wherein the system further comprises a hardware parsing device, and the hardware parsing device is respectively connected in communication with the test server and the device under test; and 所述测试服务器中,所述解析所述配置文件以得到所述配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,包括:In the test server, parsing the configuration file to obtain the scene configuration parameter set in the configuration file, and sending the parsed scene configuration parameter set to the device under test and the reference device respectively, including: 通过预设解析程序对所述配置文件进行解析,以及将解析得到的场景配置参数集发送至所述参考设备;Parse the configuration file through a preset parsing program, and send the parsed scene configuration parameter set to the reference device; 向通信连接的硬件解析设备发送所述配置文件,使得所述硬件解析设备对所述配置文件进行解析、将解析得到的场景配置参数集封装成指令程序以及将指令程序形式的场景配置参数集发送至所述待测设备。Send the configuration file to the hardware parsing device connected in communication, so that the hardware parsing device parses the configuration file, encapsulates the parsed scene configuration parameter set into an instruction program, and sends the scene configuration parameter set in the form of an instruction program to the device under test. 7.根据权利要求5或6所述的系统,其特征在于,所述待测设备包括程序存储器、控制单元、外部输入数据直接存储访问器、外部输出数据直接存储访问器、双倍速率同步动态随机存储器、多路数据选择器和数据存储器;以及7. The system according to claim 5 or 6, wherein the device under test comprises a program memory, a control unit, an external input data direct storage accessor, an external output data direct storage accessor, a double-rate synchronous dynamic random access memories, multiplexers and data memories; 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 used to indicate read data or write data, a first parameter used to indicate source address information two parameters and a third parameter used to indicate target address information, in the device under test, the testing based on the scenario configuration parameter set includes: 所述程序存储器接收以及存储所述指令程序;the program memory receives and stores the instruction program; 所述控制单元从所述程序存储器中读取所述指令程序,若所述第一参数指示写入数据,则将所述指令程序发送至所述外部输入数据直接存储访问器;若所述第一参数指示读出数据,则将所述指令程序发送至所述外部输出数据直接存储访问器;The control unit reads the instruction program from the program memory, and if the first parameter indicates writing data, sends the instruction program to the external input data direct storage accessor; A parameter indicates reading data, then sending the instruction program to the external output data direct storage accessor; 所述外部输入数据直接存储访问器根据接收到的指令程序对应的源地址信息和目标地址信息,将所述双倍速率同步动态随机存储器中与源地址信息对应地址处的数据通过所述多路数据选择器存储至所述数据存储器中与目标地址信息对应的地址处;The external input data direct storage accessor passes the data at the address corresponding to the source address information in the double-rate synchronous dynamic random access memory through the multiplexer according to the source address information and target address information corresponding to the received instruction program. The data selector is stored at the address corresponding to the target address information in the data memory; 所述数据存储器将存入的数据以及被存入数据的地址发送至所述测试服务器;The data storage sends the stored data and the address of the stored data to the test server; 所述外部输出数据直接存储访问器根据接收到的指令程序对应的源地址信息和目标地址信息,将所述数据存储器中与源地址信息对应地址处的数据通过所述多路数据选择器存储至所述双倍速率同步动态随机存储器中与目标地址信息对应的地址处;The external output data direct storage accessor stores the data at the address corresponding to the source address information in the data memory through the multiplex data selector according to the source address information and target address information corresponding to the received instruction program. at the address corresponding to the target address information in the double-rate synchronous dynamic random access memory; 所述双倍速率同步动态随机存储器将存入的数据以及被存入数据的地址发送至所述测试服务器。The double rate synchronous DRAM sends the stored data and the address of the stored data to the test server. 8.一种测试装置,其特征在于,所述装置包括:8. A test device, characterized in that the device comprises: 文件获取单元,用于获取配置文件;File acquisition unit, used to acquire configuration files; 文件解析单元,用于解析所述配置文件以得到所述配置文件中的场景配置参数集,以及将解析得到的场景配置参数集分别发送至待测设备和参考设备,所述场景配置参数集用于从N个场景中选取第i个场景,其中,1≤i≤N;A file parsing unit, configured to parse the configuration file to obtain the scene configuration parameter set in the configuration file, and send the parsed scene configuration parameter set to the device under test and the reference device respectively, and the scene configuration parameter set is used for to select the ith scene from N scenes, where 1≤i≤N; 结果接收单元,用于接收所述待测设备基于所述场景配置参数集进行测试的测试结果,以及接收所述参考设备基于所述场景配置参数集进行测试的测试结果;a result receiving unit, configured to receive a test result of the device under test performing a test based on the scenario configuration parameter set, and receiving a test result of the reference device performing a test based on the scenario configuration parameter set; 异常判断单元,用于根据所述待测设备的测试结果和所述参考设备的测试结果,确定所述待测设备在第i个场景下的设备状态。An abnormality judging unit, configured to determine the device state of the device under test in the i-th scenario according to the test result of the device under test and the test result of the reference device. 9.一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至4任一项所述的方法。9. An electronic device comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements the computer program as claimed in the claims when executing the computer program The method of any one of 1 to 4. 10.一种计算机可读存储介质,所述存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至4任一项所述的方法。10. A computer-readable storage medium storing a computer program, wherein the computer program implements the method according to any one of claims 1 to 4 when the computer program is executed by a processor.
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 (7)

* 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
CN114328049A (en) * 2021-12-24 2022-04-12 中电信数智科技有限公司 Block storage performance testing method, device, electronic device and storage medium
CN114924925A (en) * 2022-05-31 2022-08-19 上海阵量智能科技有限公司 Test method, device, electronic device and storage medium for instruction set simulator
CN116340063A (en) * 2023-03-20 2023-06-27 武汉芯必达微电子有限公司 Method, storage medium, electronic equipment and device for testing electronic hardware products
CN119597658A (en) * 2024-11-21 2025-03-11 飞腾信息技术有限公司 Multi-core consistency testing method, device, 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 equipment
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 equipment
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 (9)

* 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 equipment testing method, device, system, electronic equipment and storage medium
CN113411144A (en) * 2021-07-30 2021-09-17 深圳市富创优越科技有限公司 Device testing method, server and medium
CN114328049A (en) * 2021-12-24 2022-04-12 中电信数智科技有限公司 Block storage performance testing method, device, electronic device and storage medium
CN114924925A (en) * 2022-05-31 2022-08-19 上海阵量智能科技有限公司 Test method, device, electronic device and storage medium for instruction set simulator
CN116340063A (en) * 2023-03-20 2023-06-27 武汉芯必达微电子有限公司 Method, storage medium, electronic equipment and device for testing electronic hardware products
CN119597658A (en) * 2024-11-21 2025-03-11 飞腾信息技术有限公司 Multi-core consistency testing method, device, electronic device and storage medium
CN119597658B (en) * 2024-11-21 2025-10-03 飞腾信息技术有限公司 Multi-core consistency testing method, device, electronic device and storage medium

Also Published As

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

Similar Documents

Publication Publication Date Title
CN112214366B (en) Test method, device, system, equipment and medium
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
CN109240924B (en) Application program testing method and device
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
CN112087354A (en) Communication protocol testing method and device, electronic equipment and storage medium
EP4191905A1 (en) Test method and device
CN114879630A (en) Vehicle fault diagnosis method, device, device and readable storage medium
CN117112447B (en) Data transmission method and device, electronic equipment and readable storage medium
CN117149550A (en) Solid state disk performance detection method and device and electronic equipment
CN119358476B (en) Register model generation method and device for chip verification platform
CN119025358A (en) Storage test device and test method thereof
CN110261758B (en) Device under test verification device and related product
CN117931547A (en) HMB configuration test method and device in SSD, computer equipment and storage medium
CN114416446B (en) Memory parameter adaptation method, device, terminal equipment and storage medium
CN114124992B (en) Method, device, equipment and system for monitoring running state of whole vehicle domain controller
US11321204B2 (en) Complex programmable logic device and operation method thereof
CN116915676B (en) A method, device and equipment for evaluating electromagnetic transient real-time simulation communication components
CN111597096A (en) Benchmark test method, system and terminal equipment
CN112732557B (en) Interface test script implementation method and automatic test method for data offset downloading
CN120196529B (en) Performance test method and related device for static trusted protection file
CN120371357B (en) Firmware upgrading system, method, computing device and electronic device
CN114116291B (en) Log detection method, log detection device, computer equipment and storage medium
CN110046120B (en) Data processing method, device and system based on IIC protocol and storage medium
CN120492250A (en) Memory test system and method, board card and server
CN117169768A (en) Power consumption testing device, system and method

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