WO2017162210A1 - 测试配置方法及装置 - Google Patents
测试配置方法及装置 Download PDFInfo
- Publication number
- WO2017162210A1 WO2017162210A1 PCT/CN2017/078165 CN2017078165W WO2017162210A1 WO 2017162210 A1 WO2017162210 A1 WO 2017162210A1 CN 2017078165 W CN2017078165 W CN 2017078165W WO 2017162210 A1 WO2017162210 A1 WO 2017162210A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- configuration
- test
- script
- configuration information
- device under
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2289—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Definitions
- the present disclosure relates to the field of integrated test technologies, for example, to a test configuration method and apparatus.
- Software for network device product development is generally hierarchical and modular, and software at different levels performs function calls through a negotiated interface.
- the chip driver code and the upper layer service software negotiate a function interface
- the upper layer service software calls the lower layer chip to drive a plurality of function modules through the function interface to implement the chip configuration work.
- these functional modules need to be tested.
- test method that requires developers to write test function use cases for each functional interface, and run these use cases to ensure the correctness of the functional requirements.
- the test method is inefficient, and the test function is written by the developer. It takes the time for the developer to write, compile and debug the test function. The second is reflected in the quality of these test functions, that is, if the test coverage of these functions is insufficient, the quality of the delivery will be affected. If the product fails after delivery, it will be reworked.
- the present disclosure provides a test configuration method and apparatus capable of improving the efficiency of a test method of a chip driving function.
- a test configuration method provided by the present disclosure includes:
- the method before sending the script generation instruction to the device under test, the method further includes:
- the automatically compiling and generating the test script configuration file in the second preset format according to the configuration information file includes:
- testing the device under test according to the test script configuration file includes:
- test configuration apparatus including:
- a first sending module configured to send a script generation instruction to the device under test
- a file obtaining module configured to acquire a configuration information file of a first preset format obtained by the device under test according to the script generation instruction and service function configuration information, where the configuration information file includes: a chip-driven configuration Information file
- Compiling a module configured to automatically compile a test script configuration file in a second preset format according to the configuration information file;
- test module configured to test the device under test according to the test script configuration file.
- test configuration device further includes:
- the second sending module is configured to send the service function configuration information to the device under test before sending the script generation instruction to the device under test.
- the compiling module includes:
- the parsing submodule is configured to parse the configuration information file to obtain first configuration parsing information
- An information saving submodule configured to save the first configuration parsing information in a preset syntax structure
- the compiling submodule is configured to compile the first configuration parsing information saved according to the preset syntax structure to generate a test script configuration file in a second preset format.
- test module includes:
- a script parsing submodule configured to parse the content of the test script configuration file to obtain a script configuration data stream
- the test sub-module is configured to send the script configuration data stream to the device under test, and perform service function configuration on a chip on the device under test.
- the disclosure also provides a test configuration method, including:
- the method before acquiring the script generation instruction sent by the test host, the method further includes:
- the service function configuration information is pre-processed according to the script generation instruction, and the configuration information file of the first preset format is returned to the test host, including:
- the performing service function configuration on the chip according to the script configuration data flow includes:
- the corresponding chip driver interface function is called according to the interface configuration parameter, and the service function configuration is performed on the chip.
- test configuration apparatus including:
- An instruction acquisition module configured to acquire a script generation instruction sent by the test host
- a pre-processing module configured to pre-process the service function configuration information according to the script generation instruction, and return a configuration information file of the first preset format to the test host;
- a data stream obtaining module configured to acquire a script configuration data stream sent by the test host
- the configuration module is configured to configure a service function of the chip according to the script configuration data flow.
- test configuration device further includes:
- the information obtaining module is configured to acquire the service function configuration information sent by the test host before acquiring the script generation instruction sent by the test host, and record the service function configuration information according to the second preset format.
- the preprocessing module includes:
- An information collection submodule configured to generate an instruction set business function configuration information according to the script
- a format conversion submodule configured to perform format conversion on the service function configuration information to obtain a configuration information file in a first preset format
- the method is configured to return the configuration information file of the first preset format to the test host.
- the configuration module includes:
- the parsing processing submodule is configured to parse the script configuration data stream to obtain an interface configuration parameter of the chip
- the configuration submodule is configured to invoke a corresponding chip driver interface function according to the interface configuration parameter to perform service function configuration on the chip.
- the present disclosure also provides a computer readable storage medium storing computer executable instructions arranged to perform the above method.
- test host includes:
- At least one processor At least one processor
- the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the following method:
- the present disclosure also provides a device under test, the device under test comprising:
- At least one processor At least one processor
- the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the following method:
- the test host automatically compiles the business function configuration information of the learning record on the device under test and generates a test script to implement the configuration test of the chip driving function of the device under test, so that the test can be separated from the service command line. Fast test of chip drive function, improve test efficiency and save developers' self-test time.
- 1 is a flow chart of a test configuration method of the first embodiment
- FIG. 2 is a schematic structural diagram of a test configuration apparatus of a second embodiment
- FIG. 3 is a flow chart of a test configuration method of the third embodiment
- FIG. 4 is a schematic structural diagram of a test configuration apparatus of a fourth embodiment
- FIG. 5 is a schematic diagram of a test script generation process in a test configuration method according to a fifth embodiment
- FIG. 6 is a schematic diagram of a test script test flow in a test configuration method according to a fifth embodiment
- FIG. 7 is a schematic diagram showing the workflow of a dedicated compiler in the host test platform of FIG. 5;
- FIG. 8 is a schematic diagram showing the hardware structure of a test host of the seventh embodiment
- FIG. 9 is a schematic diagram showing the hardware structure of the device under test according to the eighth embodiment.
- This embodiment provides a test configuration method.
- the test host automatically compiles the service function configuration information of the learning record on the device under test to generate a test script, and implements a configuration test of the chip drive function of the device under test, so that the test can be separated from the service command. Line, to achieve rapid testing of the chip driver function, improve test efficiency, save developers self-test time.
- this embodiment provides a test configuration method, which can be applied to a test host.
- step 110 a script generation instruction is sent to the device under test.
- step 120 the configuration information file of the first preset format obtained according to the script generation instruction and the service function configuration information returned by the device under test is obtained, where the configuration information file includes: chip driver configuration information. file.
- the service function configuration information may be pre-stored in the device under test.
- step 130 a test script configuration file of a second preset format is automatically compiled according to the configuration information file.
- step 140 the device under test is tested according to the test script configuration file.
- the test host automatically compiles and generates a test script to implement configuration test of the chip drive function of the device under test, so that the test can be separated from the service command line, and the chip drive function can be quickly tested to improve test efficiency. Save developers time on self-test.
- the method may further include: sending the service function configuration information to the device under test.
- the test host sends the configuration information to the device under test through the service command line, and the device under test learns and records the service function configuration information.
- the step 130 described in this embodiment may include:
- the first preset format is a file format of the configuration information file, and the configuration information file can be parsed by the format syntax parser.
- the first preset format may be a custom text file format
- the second preset format may be a Pyphon script format.
- the first configuration parsing information may be saved in a preset syntax structure to facilitate the classification and preservation of subsequent data.
- the default grammatical structure can be a tree structure.
- script compiling the first configuration parsing information There are various languages for script compiling the first configuration parsing information.
- the script compiling language of the embodiment is an object-oriented interpreted computer programming language Python.
- the step 140 described in this embodiment may include:
- the content of the script configuration file can be sent to the device under test by means of a script configuration data stream.
- the device under test analyzes the data stream and then tests and configures the chip.
- the device under test does not need to provide additional storage space to store test scripts, and does not need to run the test script on the device under test, which saves the storage space of the device under test and reduces the running load of the device under test.
- the running speed of the device under test is high.
- test configuration method of this embodiment can be applied to an embedded system.
- the test host automatically compiles the service function configuration information of the learning record on the device under test to generate a test script, and implements a configuration test of the chip driver function of the device under test, so that the test can be separated from the service command line. Fast test of chip drive function, improve test efficiency and save developers' self-test time.
- the embodiment further provides a test configuration device, which can be set in the test host.
- the test configuration apparatus in this embodiment includes: a first sending module 21, a file obtaining module 22, a compiling module 23, and a testing module 24.
- the first transmitting module 21 is arranged to send a script generation instruction to the device under test.
- the file obtaining module 22 is configured to acquire a configuration information file of a first preset format obtained by the device under test according to the script generation instruction and the service function configuration information, where the configuration information file includes: a chip-driven configuration Information file.
- the service function configuration information may be pre-stored in the device under test.
- the compiling module 23 is configured to automatically compile a test script configuration file in a second preset format according to the configuration information file.
- the test module 24 is configured to test the device under test according to the test script configuration file.
- test configuration apparatus in this embodiment further includes: a second sending module.
- the second sending module is configured to send the service function configuration information to the device under test before sending the script generation instruction to the device under test.
- the test host sends the configuration information to the device under test through the service command line, and the device under test learns and records the service function configuration information.
- the compiling module 23 in this embodiment may further include: a parsing submodule, an information saving submodule, and a compiling submodule.
- the parsing submodule is configured to parse the configuration information file to obtain first configuration parsing information.
- the first preset format may be a file format of the configuration information file, and may be solved by using a format syntax.
- the parser is used to parse the configuration information file.
- the information saving submodule is configured to save the first configuration parsing information in a preset syntax structure.
- the first configuration parsing information may be saved in a preset syntax structure to facilitate the classification and preservation of subsequent data.
- the default grammatical structure can be a tree structure.
- the compiling submodule is configured to compile the first configuration parsing information saved according to the preset syntax structure to generate a test script configuration file in a second preset format.
- script compiling the first configuration parsing information There are various languages for script compiling the first configuration parsing information.
- the script compiling language of the embodiment is Python.
- the test module 24 in this embodiment may include: a script parsing submodule and a test submodule.
- the script parsing submodule is configured to parse the content of the test script configuration file to obtain a script configuration data stream.
- the test sub-module is configured to send the script configuration data stream to the device under test, and perform business function configuration on the chip on the device under test.
- the content of the script configuration file can be sent to the device under test by means of a script configuration data stream.
- the device under test analyzes the data stream and then tests and configures the chip.
- the device under test does not need to provide additional storage space to store test scripts, and does not need to run the test script on the device under test, which saves the storage space of the device under test, reduces the running load of the device under test, and improves the device under test. Running speed.
- test configuration device of this embodiment can be disposed in an embedded system.
- the test configuration device of the embodiment automatically compiles the service function configuration information of the learning record on the device under test by the test host to generate a test script to implement the configuration test of the chip drive function of the device under test, so that the test can be separated from the service command line. Fast test of chip drive function, improve test efficiency and save developers' self-test time.
- the embodiment further provides a test configuration method, which can be applied to a device under test.
- step 310 a script generation instruction sent by the test host is obtained.
- step 320 the service function configuration information is preprocessed according to the script generation instruction, And returning the configuration information file of the first preset format to the test host.
- step 330 a script configuration data stream sent by the test host is obtained.
- the script configuration data stream can be obtained by testing the content of the test script configuration file by the test host.
- step 340 a service function configuration is performed on the chip according to the script configuration data stream.
- the configuration of the data function by using the script to configure the data flow enables the device under test to store the test script without providing additional storage space, and does not need to run the test script on the device under test, thereby saving the storage space of the device under test. It reduces the running load of the device under test and improves the running speed of the device under test.
- the chip configuration function of the device under test is quickly tested by testing the script configuration data flow sent by the host, so that the test can be separated from the service command line, the test efficiency is improved, and the self-test time of the developer is saved.
- test configuration method in this embodiment may further include:
- the third preset format may be a custom text file format.
- the device under test can obtain the service function configuration information sent by the test host by receiving the service command line, and the record of the service function configuration information can be implemented by embedding a learning program.
- Step 320 in this embodiment may include:
- the service function configuration information may be pre-stored in the device under test.
- the format conversion of the service function configuration information may facilitate the compilation of test scripts of the service function configuration information by the subsequent test host.
- the step 340 in this embodiment may include:
- the corresponding chip driver interface function is called according to the interface configuration parameter, and the service function configuration is performed on the chip.
- the device under test parses the script configuration data stream, instead of obtaining the interface configuration parameters of the chip after running the test script on the device under test, the device under test does not need to provide additional storage space to store the test script, and does not need to Running the test script on the device under test saves the storage space of the device under test, reduces the running load of the device under test, and improves the running speed of the device under test.
- test configuration method of this embodiment can be applied to an embedded system.
- the chip configuration function of the device under test is quickly tested by testing the script configuration data flow sent by the host, so that the test can be separated from the service command line, the test efficiency is improved, and the self-test time of the developer is saved.
- the embodiment further provides a test configuration device, which can be disposed on the device under test.
- the test configuration device in this embodiment includes: an instruction acquisition module 41, a preprocessing module 42, and a data stream acquisition module. 43 and configuration module 44.
- the instruction acquisition module 41 is configured to acquire a script generation instruction sent by the test host.
- the pre-processing module 42 is configured to pre-process the service function configuration information according to the script generation instruction, and return a configuration information file of the first preset format to the test host.
- the data stream obtaining module 43 is configured to acquire a script configuration data stream sent by the test host.
- the configuration module 44 is configured to perform business function configuration on the chip according to the script configuration data flow.
- the configuration module 44 configures the data flow by using a script to configure the service function of the chip, so that the device under test does not need to provide additional storage space to store the test script, and does not need to run the test script on the device under test, thereby saving the measured test.
- the storage space of the device reduces the running load of the device under test and improves the running speed of the device under test.
- test configuration apparatus in this embodiment further includes: an information acquiring module.
- the information obtaining module is configured to acquire the service function configuration information sent by the test host, and record the service function configuration information according to the third preset format, before acquiring the script generation instruction sent by the test host.
- the device under test can obtain the service function configuration information sent by the test host by receiving the service command line, and the record of the service function configuration information can be implemented by embedding a learning program.
- the pre-processing module 42 in this embodiment may include: an information collection sub-module, a format conversion sub-module, and a return sub-module.
- the information collection submodule is configured to generate an instruction set business function configuration information according to the script.
- the service function configuration information may be pre-stored in the device under test.
- the format conversion sub-module is configured to perform format conversion on the service function configuration information to obtain a configuration information file in a first preset format.
- the format conversion of the service function configuration information may facilitate the compilation of test scripts of the service function configuration information by the subsequent test host.
- the return submodule is configured to return the configuration information file of the first preset format to the test host.
- the configuration module 44 in this embodiment may include: an analysis processing submodule and a configuration submodule.
- the parsing processing submodule is configured to parse the script configuration data stream to obtain an interface configuration parameter of the chip.
- the configuration submodule is configured to invoke a corresponding chip driver interface function according to the interface configuration parameter, and perform business function configuration on the chip.
- the device under test parses the script configuration data stream, instead of obtaining the interface configuration parameters of the chip after running the test script on the device under test, the device under test does not need to provide additional storage space to store the test script, and does not need to Running the test script on the device under test saves the storage space of the device under test, reduces the running load of the device under test, and improves the running speed of the device under test.
- the test configuration device of the embodiment quickly tests the chip drive function of the device under test by testing the script configuration data flow sent by the host, so that the test can be separated from the service command line, the test efficiency is improved, and the self-test time of the developer is saved.
- FIG. 5 a schematic diagram of a test script generated in this embodiment is shown.
- FIG. 6 which is a schematic diagram of a test script test, an implementation process of the method in this embodiment is described in detail.
- the execution subject of the disclosed test configuration method may be the host test platform 01' and the device under test 02'.
- the host test platform 01' may include a service command line configuration interface 03', a script configuration interface 04', a command parser 05', a test script configuration file 06', and a dedicated compiler 07'.
- the device under test 02' includes an upper layer service program 08', a chip drive interface 09', a chip 10', a learning program 11', business function configuration information 12', and a test server 13'.
- the process of testing script generation includes:
- the host test platform 01' performs service function configuration through the service command line configuration interface 03', and the tester can send a service to the upper layer service program 08' on the device under test 02' by inputting the service command line on the service command line configuration interface 03'.
- Configuration command ;
- the upper layer service program 08' on the device under test 02' receives the service configuration command and then makes a driver interface call, and sets the learning program 11' between the upper layer service program 08' and the driver interface program on the chip driver interface 09'.
- the second preset format records service function configuration information, and completes service configuration, wherein the learning program 11' can be embedded between the upper layer service program 08' and the driver interface program on the chip driver interface 09';
- the host test platform 01' sends a script generation instruction to the test server 13' in the device under test 02' through the script configuration interface 04';
- the test server 13' of the device under test 02' receives the script generation instruction and aggregates the service function configuration information, and converts the service function configuration information into the configuration information file of the first preset format and returns to the host test platform 01';
- the dedicated compiler 07' in the host test platform 01' automatically compiles and converts the configuration information file of the first preset format to generate a test script configuration file of the second preset format.
- the dedicated compiler 07' is the key to the automatic generation of test scripts.
- the specialized compiler can be developed through the Python scripting language, which implements the format syntax analysis of the configuration information file and the Python command script compilation.
- the test script testing process includes:
- test script configuration file 06' of the host test platform 01' inputs the test script configuration content to the command parser 05' via the script configuration interface 04' to configure the configuration data stream;
- the command parser 05' transmits the configuration data stream to the test server 13' in the device under test 02';
- test server 13' After receiving the configuration data stream, the test server 13' parses out the interface configuration parameters, and invokes the interface function of the corresponding chip driver interface 09', and sends the configuration to the corresponding register and table of the chip 10' to complete the service function. Configuration.
- the working process of the dedicated compiler 07' includes: the configuration information file is input to the format syntax parser 14', the parsed information is saved in a specific syntax tree structure; and the Python command script compiler 15' is based on The information in the syntax tree structure is compiled and the test script configuration file for the Python language is output.
- test configuration method of the present disclosure can be separated from the command line, and the chip driver function of the device under test can be quickly realized by the test script to configure the data flow. Test.
- the test host automatically compiles the service function configuration information of the learning record on the device under test to generate a test script, and implements a configuration test of the chip driver function of the device under test, so that the test can be separated from the service command line. Fast test of chip drive function, improve test efficiency, and save developers' self-test time.
- the present embodiment provides a computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
- test host includes:
- At least one processor 80 which is exemplified by a processor 80 in FIG. 8; and a memory 81, may further include a communication interface 82 and a bus 83.
- the processor 80, the memory 81, and the communication interface 82 can complete communication with each other through the bus 83.
- Communication interface 82 can transmit information.
- the processor 80 can call the logic instructions in the memory 81 to perform the following methods:
- logic instructions in the memory 81 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
- the memory 81 is a computer readable storage medium and can be used to store a software program, a computer executable program, such as the program instructions or modules corresponding to the method described above for testing a host.
- the processor 80 executes the function application and the data processing by running a software program, an instruction or a module stored in the memory 81, that is, the method applied to the test host in the above method embodiment.
- the memory 81 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the terminal device, and the like. Further, the memory 81 may include a high speed random access memory, and may also include a nonvolatile memory.
- the device under test includes:
- At least one processor 90 which is exemplified by a processor 90 in FIG. 9; and a memory 91, may further include a communication interface 92 and a bus 93.
- the processor 90, the memory 91, and the communication interface 92 can complete communication with each other through the bus 93.
- Communication interface 92 can transmit information.
- the processor 90 can call the logic instructions in the memory 91 to perform the following methods:
- logic instructions in the memory 91 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
- the memory 91 is a computer readable storage medium and can be used to store a software program, a computer executable program, such as the program instructions or modules corresponding to the method applied to the device under test.
- the processor 90 executes the function application and the data processing by executing a software program, an instruction or a module stored in the memory 91, that is, the method applied to the device under test in the above method embodiment.
- the memory 91 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 91 may include a high speed random access memory, and may also include a nonvolatile memory.
- the technical solution of the above embodiment may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device) Etc.) Perform all or part of the steps above.
- the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
- the test configuration method and device provided by the disclosure can quickly test the chip driving function, improve the testing efficiency, and save the developer's self-test time.
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)
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
一种测试配置方法及装置,其中,该测试配置方法包括:向被测设备发送脚本生成指令;获取所述被测设备返回的根据所述脚本生成指令以及业务功能配置信息得到的第一预设格式的配置信息文件,所述配置信息文件包括:芯片驱动的配置信息文件;根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件;以及根据所述测试脚本配置文件对所述被测设备进行测试。
Description
本公开涉及集成测试技术领域,例如涉及一种测试配置方法及装置。
随着城域网的快速发展以及业务的多样化,网络运营者对接入和汇聚网络设备数量和带宽需求与日俱增,同时要求在一个设备上集成实现的业务功能也越来越多。众多的业务功能集于一体,增加了网络设备研发的复杂性,也增加了研发过程中发生功能性故障的概率。为了保证产品质量,要求研发人员在交付产品前对产品进行测试。
网络设备产品研发的软件一般是分层的和模块化的,不同层面的软件通过协商的接口进行函数调用。其中,芯片驱动代码与上层业务软件之间协商功能接口,上层业务软件通过功能接口调用下层芯片驱动多个功能模块,实现芯片的配置工作。对于芯片驱动研发人员来说,为了保证驱动多个功能模块的质量,需要对这些功能模块进行测试。
有一种测试方法要求开发人员为每一个功能的接口编写测试函数用例,通过运行这些用例来保证功能需求的正确性。测试方法效率较低,一体现在测试函数编写上,需要研发人员花时间编写、编译和调试测试函数;二体现在这些测试函数的质量上,即如果这些函数测试覆盖率不足,则会影响交付质量,一旦交付后产品出现故障,就要返工。
发明内容
本公开提供一种测试配置方法及装置,能够提高芯片驱动功能的测试方法的效率。
本公开提供的一种测试配置方法,包括:
向被测设备发送脚本生成指令;
获取所述被测设备返回的根据所述脚本生成指令以及业务功能配置信息得到的第一预设格式的配置信息文件,其中,所述配置信息文件包括:芯片驱动
的配置信息文件;
根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件;以及
根据所述测试脚本配置文件对所述被测设备进行测试。
可选的,在向被测设备发送脚本生成指令之前,所述方法还包括:
向所述被测设备发送业务功能配置信息。
可选的,所述根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件,包括:
对所述配置信息文件进行语法解析,得到第一配置解析信息;
将所述第一配置解析信息以一预设语法结构进行保存;以及
对按照所述预设语法结构保存的所述第一配置解析信息进行编译,生成第二预设格式的测试脚本配置文件。
可选的,所述根据所述测试脚本配置文件对所述被测设备进行测试,包括:
对所述测试脚本配置文件的内容进行解析,得到脚本配置数据流;以及
将所述脚本配置数据流发送至所述被测设备,对所述被测设备上的芯片进行业务功能配置。
本公开还提供一种测试配置装置,包括:
第一发送模块,设置为向被测设备发送脚本生成指令;
文件获取模块,设置为获取所述被测设备返回的根据所述脚本生成指令以及业务功能配置信息得到的第一预设格式的配置信息文件,其中,所述配置信息文件包括:芯片驱动的配置信息文件;
编译模块,设置为根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件;以及
测试模块,设置为根据所述测试脚本配置文件对所述被测设备进行测试。
可选的,所述测试配置装置还包括:
第二发送模块,设置为在向被测设备发送脚本生成指令之前,向所述被测设备发送业务功能配置信息。
可选的,所述编译模块包括:
解析子模块,设置为对所述配置信息文件进行语法解析,得到第一配置解析信息;
信息保存子模块,设置为将所述第一配置解析信息以一预设语法结构进行保存;以及
编译子模块,设置为对按照所述预设语法结构保存的所述第一配置解析信息进行编译,生成第二预设格式的测试脚本配置文件。
可选的,所述测试模块包括:
脚本解析子模块,设置为对所述测试脚本配置文件的内容进行解析,得到脚本配置数据流;以及
测试子模块,设置为将所述脚本配置数据流发送至所述被测设备,对所述被测设备上的芯片进行业务功能配置。
本公开还提供一种测试配置方法,包括:
获取测试主机发送的脚本生成指令;
根据所述脚本生成指令对业务功能配置信息进行预处理,并返回第一预设格式的配置信息文件至所述测试主机;
获取所述测试主机发送的脚本配置数据流;以及
根据所述脚本配置数据流对芯片进行业务功能配置。
可选的,在获取测试主机发送的脚本生成指令之前,所述方法还包括:
获取所述测试主机发送的业务功能配置信息,并按照第二预设格式对所述业务功能配置信息进行记录。
可选的,根据所述脚本生成指令对业务功能配置信息进行预处理,并返回第一预设格式的配置信息文件至所述测试主机,包括:
根据所述脚本生成指令集合业务功能配置信息;
对所述业务功能配置信息进行格式转换,得到第一预设格式的配置信息文件;以及
将所述第一预设格式的配置信息文件返回至所述测试主机。
可选的,所述根据所述脚本配置数据流对芯片进行业务功能配置,包括:
对所述脚本配置数据流进行解析处理,得到芯片的接口配置参数;以及
根据所述接口配置参数调用相应的芯片驱动接口函数,对所述芯片进行业务功能配置。
本公开还提供一种测试配置装置,包括:
指令获取模块,设置为获取测试主机发送的脚本生成指令;
预处理模块,设置为根据所述脚本生成指令对业务功能配置信息进行预处理,并返回第一预设格式的配置信息文件至所述测试主机;
数据流获取模块,设置为获取所述测试主机发送的脚本配置数据流;以及
配置模块,设置为根据所述脚本配置数据流对芯片进行业务功能配置。
可选的,所述测试配置装置还包括:
信息获取模块,设置为在获取测试主机发送的脚本生成指令之前,获取所述测试主机发送的业务功能配置信息,并按照第二预设格式对所述业务功能配置信息进行记录。
可选的,所述预处理模块包括:
信息集合子模块,设置为根据所述脚本生成指令集合业务功能配置信息;
格式转换子模块,设置为对所述业务功能配置信息进行格式转换,得到第一预设格式的配置信息文件;以及
返回子模块,设置为将所述第一预设格式的配置信息文件返回至所述测试主机。
可选的,所述配置模块包括:
解析处理子模块,设置为对所述脚本配置数据流进行解析处理,得到芯片的接口配置参数;以及
配置子模块,设置为根据所述接口配置参数调用相应的芯片驱动接口函数,对所述芯片进行业务功能配置。
本公开还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述方法。
本公开还提供了一种测试主机,该测试主机包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行以下方法:
向被测设备发送脚本生成指令;
获取所述被测设备返回的根据所述脚本生成指令以及业务功能配置信息得到的第一预设格式的配置信息文件,其中,所述配置信息文件包括:芯片驱动的配置信息文件;
根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件;以及
根据所述测试脚本配置文件对所述被测设备进行测试。
本公开还提供了一种被测设备,该被测设备包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行以下方法:
获取测试主机发送的脚本生成指令;
根据所述脚本生成指令对业务功能配置信息进行预处理,并返回第一预设格式的配置信息文件至所述测试主机;
获取所述测试主机发送的脚本配置数据流;以及
根据所述脚本配置数据流对芯片进行业务功能配置。
本公开的上述方案中,通过测试主机将被测设备上学习记录的业务功能配置信息自动编译并生成测试脚本,实现对被测设备的芯片驱动功能的配置测试,使得测试可脱离业务命令行,实现芯片驱动功能的快速测试,提高测试效率,节省开发人员的自测时间。
图1为第一实施例的测试配置方法的流程图;
图2为第二实施例的测试配置装置的组成结构示意图;
图3为第三实施例的测试配置方法的流程图;
图4为第四实施例的测试配置装置的组成结构示意图;
图5为第五实施例的测试配置方法中测试脚本生成流程示意图;
图6为第五实施例的测试配置方法中测试脚本测试流程示意图;
图7为图5中主机测试平台中专用编译器的工作流程示意图;
图8为第七实施例的测试主机的硬件结构示意图;以及
图9为第八实施例的被测设备的硬件结构示意图。
为使本公开的技术方案更加清楚,下面将结合附图及具体实施例进行详细描述。在不冲突的情况下,以下实施例以及实施例中的技术特征可以相互任意组合。
本实施例提供一种测试配置方法,通过测试主机将被测设备上学习记录的业务功能配置信息自动编译生成测试脚本,实现对被测设备的芯片驱动功能的配置测试,使得测试可脱离业务命令行,实现芯片驱动功能的快速测试,提高测试效率,节省开发人员的自测时间。
第一实施例
如图1所示,本实施例提供一种测试配置方法,可以应用于测试主机。
在步骤110中,向被测设备发送脚本生成指令。
在步骤120中,获取所述被测设备返回的根据所述脚本生成指令以及业务功能配置信息得到的第一预设格式的配置信息文件,其中,所述配置信息文件包括:芯片驱动的配置信息文件。
其中,业务功能配置信息可以预先保存于被测设备中。
在步骤130中,根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件。
在步骤140中,根据所述测试脚本配置文件对所述被测设备进行测试。
本实施例的测试配置方法,通过测试主机自动编译生成测试脚本,实现对被测设备的芯片驱动功能的配置测试,使得测试可脱离业务命令行,实现芯片驱动功能的快速测试,提高测试效率,节省开发人员的自测时间。
可选地,在向被测设备发送脚本生成指令之前,所述方法还可包括:向所述被测设备发送业务功能配置信息。
其中,测试主机通过业务命令行将配置信息发送至被测设备,由被测设备学习记录所述业务功能配置信息。
本实施例中所述步骤130可包括:
对所述配置信息文件进行语法解析,得到第一配置解析信息;
将所述第一配置解析信息以一预设语法结构进行保存;以及
对按照所述预设语法结构保存的所述第一配置解析信息进行编译,生成第二预设格式的测试脚本配置文件。
其中,第一预设格式为配置信息文件的文件格式,可通过格式语法解析器来对配置信息文件进行语法解析。第一预设格式可以是自定义文本文件格式,第二预设格式可以是Pyphon脚本格式。
可以以一预设语法结构对第一配置解析信息进行保存,便于后续数据的分类保存。预设语法结构可以为树状结构。
对第一配置解析信息进行脚本编译的语言有多种,可选地,本实施例的脚本编译语言为面向对象的解释型计算机程序设计语言Python。
本实施例中所述步骤140可包括:
对所述测试脚本配置文件的内容进行解析,得到脚本配置数据流;以及
将所述脚本配置数据流发送至所述被测设备,对所述被测设备上的芯片进行业务功能配置。
脚本配置文件的内容可以以脚本配置数据流的方式发送至被测设备,被测设备对数据流解析后对芯片进行测试配置。
被测设备无需提供额外的存储空间存储测试脚本,也不需要在被测设备上运行该测试脚本,节省了被测设备的存储空间,减轻被测设备的运行负担,提
高了被测设备的运行速度。
本实施例的测试配置方法可适用于嵌入式系统。
本实施例的测试配置方法,通过测试主机将被测设备上学习记录的业务功能配置信息自动编译生成测试脚本,实现对被测设备的芯片驱动功能的配置测试,使得测试可脱离业务命令行,实现芯片驱动功能的快速测试,提高测试效率,节省开发人员的自测时间。
第二实施例
如图2所示,本实施例还提供一种测试配置装置,可设置于测试主机中。本实施例中的测试配置装置包括:第一发送模块21、文件获取模块22、编译模块23和测试模块24。
第一发送模块21设置为向被测设备发送脚本生成指令。
文件获取模块22设置为获取所述被测设备返回的根据所述脚本生成指令以及业务功能配置信息得到的第一预设格式的配置信息文件,其中,所述配置信息文件包括:芯片驱动的配置信息文件。
其中,业务功能配置信息可以预先保存于被测设备中。
编译模块23设置为根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件。
测试模块24设置为根据所述测试脚本配置文件对所述被测设备进行测试。
可选地,本实施例中所述测试配置装置还包括:第二发送模块。
第二发送模块设置为在向被测设备发送脚本生成指令之前,向所述被测设备发送业务功能配置信息。
其中,测试主机通过业务命令行将配置信息发送至被测设备,由被测设备学习记录所述业务功能配置信息。
本实施例中所述编译模块23还可包括:解析子模块、信息保存子模块和编译子模块。
解析子模块设置为对所述配置信息文件进行语法解析,得到第一配置解析信息。
其中,第一预设格式可以为配置信息文件的文件格式,可通过格式语法解
析器来对配置信息文件进行语法解析。
信息保存子模块设置为将所述第一配置解析信息以一预设语法结构进行保存。
可以以一预设语法结构对第一配置解析信息进行保存,便于后续数据的分类保存。预设语法结构可以为树状结构。
编译子模块设置为对按照所述预设语法结构保存的所述第一配置解析信息进行编译,生成第二预设格式的测试脚本配置文件。
对第一配置解析信息进行脚本编译的语言有多种,可选地,本实施例的脚本编译语言为Python。
本实施例中所述测试模块24可包括:脚本解析子模块和测试子模块。
脚本解析子模块设置为对所述测试脚本配置文件的内容进行解析,得到脚本配置数据流。
测试子模块设置为将所述脚本配置数据流发送至所述被测设备,对所述被测设备上的芯片进行业务功能配置。
脚本配置文件的内容可以以脚本配置数据流的方式发送至被测设备,被测设备对数据流解析后对芯片进行测试配置。
被测设备无需提供额外的存储空间存储测试脚本,也不需要在被测设备上运行该测试脚本,节省了被测设备的存储空间,减轻了被测设备的运行负担,提高了被测设备的运行速度。
本实施例的测试配置装置可设置于嵌入式系统。
本实施例的测试配置装置,通过测试主机将被测设备上学习记录的业务功能配置信息自动编译生成测试脚本,实现对被测设备的芯片驱动功能的配置测试,使得测试可脱离业务命令行,实现芯片驱动功能的快速测试,提高测试效率,节省开发人员的自测时间。
第三实施例
如图3所示,本实施例还提供一种测试配置方法,可应用于被测设备。
在步骤310中,获取测试主机发送的脚本生成指令。
在步骤320中,根据所述脚本生成指令对业务功能配置信息进行预处理,
并返回第一预设格式的配置信息文件至所述测试主机。
在步骤330中,获取所述测试主机发送的脚本配置数据流。
其中,脚本配置数据流可通过测试主机对测试脚本配置文件的内容解析得到。
在步骤340中,根据所述脚本配置数据流对芯片进行业务功能配置。
采用脚本配置数据流的方式对芯片进行业务功能配置,可使被测设备无需提供额外的存储空间存储测试脚本,也不需要在被测设备上运行该测试脚本,节省了被测设备的存储空间,减轻了被测设备的运行负担,提高了被测设备的运行速度。
本实施例的测试配置方法,通过测试主机发送的脚本配置数据流对被测设备的芯片驱动功能进行快速测试,使得测试可脱离业务命令行,提高了测试效率,节省开发人员的自测时间。
可选地,在获取测试主机发送的脚本生成指令之前,本实施例中测试配置方法还可包括:
获取所述测试主机发送的业务功能配置信息,并按照第三预设格式对所述业务功能配置信息进行记录。其中,第三预设格式可以是自定义文本文件格式。
被测设备可通过接收业务命令行来获取所述测试主机发送的业务功能配置信息,对业务功能配置信息的记录可通过嵌入一段学习程序来实现。
本实施例中步骤320可包括:
根据所述脚本生成指令集合业务功能配置信息;
对所述业务功能配置信息进行格式转换,得到第一预设格式的配置信息文件;以及
将所述第一预设格式的配置信息文件返回至所述测试主机。
其中,业务功能配置信息可预先保存于被测设备中。
对所述业务功能配置信息进行格式转换可以便于后续测试主机对业务功能配置信息进行测试脚本的编译。
本实施例中所述步骤340可包括:
对所述脚本配置数据流进行解析处理,得到芯片的接口配置参数;以及
根据所述接口配置参数调用相应的芯片驱动接口函数,对所述芯片进行业务功能配置。
被测设备对所述脚本配置数据流进行解析处理,而不是在该被测设备上运行测试脚本后,得到芯片的接口配置参数,被测设备无需提供额外的存储空间存储测试脚本,也不需要通过被测设备上运行该测试脚本,节省了被测设备的存储空间,减轻了被测设备的运行负担,提高了被测设备的运行速度。
本实施例的测试配置方法可适用于嵌入式系统。
本实施例的测试配置方法,通过测试主机发送的脚本配置数据流对被测设备的芯片驱动功能进行快速测试,使得测试可脱离业务命令行,提高了测试效率,节省开发人员的自测时间。
第四实施例
如图4所示,本实施例还提供一种测试配置装置,可设置于被测设备,本实施例中的一种测试配置装置包括:指令获取模块41、预处理模块42、数据流获取模块43和配置模块44。
指令获取模块41设置为获取测试主机发送的脚本生成指令。
预处理模块42设置为根据所述脚本生成指令对业务功能配置信息进行预处理,并返回第一预设格式的配置信息文件至所述测试主机。
数据流获取模块43设置为获取所述测试主机发送的脚本配置数据流。
配置模块44设置为根据所述脚本配置数据流对芯片进行业务功能配置。
配置模块44中采用脚本配置数据流的方式对芯片进行业务功能配置,可使被测设备无需提供额外的存储空间存储测试脚本,也不需要在被测设备上运行该测试脚本,节省了被测设备的存储空间,减轻了被测设备的运行负担,提高了被测设备的运行速度。
可选地,本实施例中所述测试配置装置还包括:信息获取模块。
信息获取模块设置为在获取测试主机发送的脚本生成指令之前,获取所述测试主机发送的业务功能配置信息,并按照第三预设格式对所述业务功能配置信息进行记录。
被测设备可通过接收业务命令行来获取所述测试主机发送的业务功能配置信息,对业务功能配置信息的记录可通过嵌入一段学习程序来实现。
本实施例中所述预处理模块42可包括:信息集合子模块、格式转换子模块以及返回子模块。
信息集合子模块设置为根据所述脚本生成指令集合业务功能配置信息。
其中,业务功能配置信息可预先保存于被测设备中。
格式转换子模块设置为对所述业务功能配置信息进行格式转换,得到第一预设格式的配置信息文件。
对所述业务功能配置信息进行格式转换可以便于后续测试主机对业务功能配置信息进行测试脚本的编译。
返回子模块设置为将所述第一预设格式的配置信息文件返回至所述测试主机。
本实施例中所述配置模块44可包括:解析处理子模块和配置子模块。
解析处理子模块设置为对所述脚本配置数据流进行解析处理,得到芯片的接口配置参数。
配置子模块设置为根据所述接口配置参数调用相对应的芯片驱动接口函数,对所述芯片进行业务功能配置。
被测设备对所述脚本配置数据流进行解析处理,而不是在该被测设备上运行测试脚本后,得到芯片的接口配置参数,被测设备无需提供额外的存储空间存储测试脚本,也不需要在被测设备上运行该测试脚本,节省了被测设备的存储空间,减轻了被测设备的运行负担,提高了被测设备的运行速度。
本实施例的测试配置装置,通过测试主机发送的脚本配置数据流对被测设备的芯片驱动功能进行快速测试,使得测试可脱离业务命令行,提高了测试效率,节省开发人员的自测时间。
第五实施例
如图5所示,为本实施例中测试脚本生成示意图,下面结合图6,即测试脚本测试示意图,详细说明本实施例中方法的一实施过程。
本公开测试配置方法的执行主体可以为主机测试平台01’和被测设备02’。
其中,主机测试平台01’可以包括:业务命令行配置界面03’,脚本配置界面04’,命令解析器05’,测试脚本配置文件06’以及专用编译器07’。
被测设备02’包括:上层业务程序08’,芯片驱动接口09’,芯片10’,学习程序11’,业务功能配置信息12’以及测试服务器13’。测试脚本生成的过程包括:
主机测试平台01’通过业务命令行配置界面03’进行业务功能配置,测试人员可以通过在业务命令行配置界面03’上输入业务命令行向被测设备02’上的上层业务程序08’发送业务配置命令;
被测设备02’上的上层业务程序08’接收到业务配置命令后进行驱动接口调用,设置在上层业务程序08’与芯片驱动接口09’上的驱动接口程序之间的学习程序11’按照第二预设格式记录业务功能配置信息,完成业务配置,其中,该学习程序11’可嵌入到上层业务程序08’与芯片驱动接口09’上的驱动接口程序之间;
主机测试平台01’通过脚本配置界面04’发送脚本生成指令至被测设备02’中的测试服务器13’;
被测设备02’的测试服务器13’接收脚本生成指令后集合业务功能配置信息,并将业务功能配置信息转换为第一预设格式的配置信息文件并返回到主机测试平台01’;以及
主机测试平台01’中的专用编译器07’对第一预设格式的配置信息文件进行自动编译转换,生成第二预设格式的测试脚本配置文件。
专用编译器07’是测试脚本自动生成的关键,该专用编译器可通过Python脚本语言开发得到,实现了配置信息文件的格式语法解析和Python命令脚本编译。
测试脚本测试过程包括:
主机测试平台01’的测试脚本配置文件06’通过脚本配置界面04’将测试脚本配置内容输入到命令解析器05’进行配置数据流的组建;
命令解析器05’将配置数据流传送到被测设备02’中的测试服务器13’;以及
测试服务器13’收到配置数据流后解析出接口配置参数,并调用相应的芯片驱动接口09’的接口函数,将配置下发到芯片10’相应的寄存器与表项中,完成了业务功能的配置。
专用编译器07’的工作过程,如图7所示,包括:配置信息文件输入到格式语法解析器14’,解析后的信息以特定语法树状结构保存;以及Python命令脚本编译器15’根据语法树状结构中的信息进行编译,输出Python语言的测试脚本配置文件。
在生成测试脚本配置文件后,后续的被测设备上不再需要上层业务程序,本公开的测试配置方法可脱离命令行,通过测试脚本以配置数据流的方式快速实现被测设备的芯片驱动功能的测试。
本实施例的测试配置方法,通过测试主机将被测设备上学习记录的业务功能配置信息自动编译生成测试脚本,实现对被测设备的芯片驱动功能的配置测试,使得测试可脱离业务命令行,实现芯片驱动功能的快速测试,提高测试效率,同时节省开发人员的自测时间。
第六实施例
本实施例提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的方法。
第七实施例
本实施例提供了一种测试主机的硬件结构示意图。参见图8,该测试主机包括:
至少一个处理器(processor)80,图8中以一个处理器80为例;以及存储器(memory)81,还可以包括通信接口(Communications Interface)82和总线83。其中,处理器80、存储器81以及通信接口82可以通过总线83完成相互间的通信。通信接口82可以传输信息。处理器80可以调用存储器81中的逻辑指令,以执行以下方法:
向被测设备发送脚本生成指令;
获取所述被测设备返回的根据所述脚本生成指令以及业务功能配置信息得到的第一预设格式的配置信息文件,所述配置信息文件包括:芯片驱动的配置信息文件;
根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件;以及
根据所述测试脚本配置文件对所述被测设备进行测试。
此外,上述的存储器81中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。
存储器81作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如上述应用于测试主机的方法对应的程序指令或模块。处理器80通过运行存储在存储器81中的软件程序、指令或模块,从而执行功能应用以及数据处理,即实现上述方法实施例中应用于测试主机的方法。
存储器81可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器81可以包括高速随机存取存储器,还可以包括非易失性存储器。
第八实施例
本实施例提供了一种被测设备的硬件结构示意图。参见图9,该被测设备包括:
至少一个处理器(processor)90,图9中以一个处理器90为例;以及存储器(memory)91,还可以包括通信接口(Communications Interface)92和总线93。其中,处理器90、存储器91以及通信接口92可以通过总线93完成相互间的通信。通信接口92可以传输信息。处理器90可以调用存储器91中的逻辑指令,以执行以下方法:
获取测试主机发送的脚本生成指令;
根据所述脚本生成指令对业务功能配置信息进行预处理,并返回第一预设格式的配置信息文件至所述测试主机;
获取所述测试主机发送的脚本配置数据流;以及
根据所述脚本配置数据流对芯片进行业务功能配置。
此外,上述的存储器91中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。
存储器91作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如上述应用于被测设备的方法对应的程序指令或模块。处理器90通过运行存储在存储器91中的软件程序、指令或模块,从而执行功能应用以及数据处理,即实现上述方法实施例中应用于被测设备的方法。
存储器91可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器91可以包括高速随机存取存储器,还可以包括非易失性存储器。
上述实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行上述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。
本公开提供的测试配置方法及装置,能够实现芯片驱动功能的快速测试,提高了测试效率,节省开发人员的自测时间。
Claims (17)
- 一种测试配置方法,包括:向被测设备发送脚本生成指令;获取所述被测设备返回的根据所述脚本生成指令以及业务功能配置信息得到的第一预设格式的配置信息文件,其中,所述配置信息文件包括:芯片驱动的配置信息文件;根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件;以及根据所述测试脚本配置文件对所述被测设备进行测试。
- 根据权利要求1所述的方法,在向被测设备发送脚本生成指令之前,所述方法还包括:向所述被测设备发送业务功能配置信息。
- 根据权利要求1所述的方法,其中,所述根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件,包括:对所述配置信息文件进行语法解析,得到第一配置解析信息;将所述第一配置解析信息以一预设语法结构进行保存;以及对按照所述预设语法结构保存的所述第一配置解析信息进行编译,生成第二预设格式的测试脚本配置文件。
- 根据权利要求1所述的方法,其中,所述根据所述测试脚本配置文件对所述被测设备进行测试,包括:对所述测试脚本配置文件的内容进行解析,得到脚本配置数据流;以及将所述脚本配置数据流发送至所述被测设备,对所述被测设备上的芯片进行业务功能配置。
- 一种测试配置装置,包括:第一发送模块,设置为向被测设备发送脚本生成指令;文件获取模块,设置为获取所述被测设备返回的根据所述脚本生成指令以及业务功能配置信息得到的第一预设格式的配置信息文件,其中,所述配置信息文件包括:芯片驱动的配置信息文件;编译模块,设置为根据所述配置信息文件自动编译生成第二预设格式的测试脚本配置文件;以及测试模块,设置为根据所述测试脚本配置文件对所述被测设备进行测试。
- 根据权利要求5所述的装置,还包括:第二发送模块,设置为在向被测设备发送脚本生成指令之前,向所述被测设备发送业务功能配置信息。
- 根据权利要求5所述的装置,其中,所述编译模块包括:解析子模块,设置为对所述配置信息文件进行语法解析,得到第一配置解析信息;信息保存子模块,设置为将所述第一配置解析信息以一预设语法结构进行保存;以及编译子模块,设置为对按照所述预设语法结构保存的所述第一配置解析信息进行编译,生成第二预设格式的测试脚本配置文件。
- 根据权利要求5所述的装置,其中,所述测试模块包括:脚本解析子模块,设置为对所述测试脚本配置文件的内容进行解析,得到脚本配置数据流;以及测试子模块,设置为将所述脚本配置数据流发送至所述被测设备,对所述被测设备上的芯片进行业务功能配置。
- 一种测试配置方法,包括:获取测试主机发送的脚本生成指令;根据所述脚本生成指令对业务功能配置信息进行预处理,并返回第一预设格式的配置信息文件至所述测试主机;获取所述测试主机发送的脚本配置数据流;以及根据所述脚本配置数据流对芯片进行业务功能配置。
- 根据权利要求9所述的方法,在获取测试主机发送的脚本生成指令之前,所述方法还包括:获取所述测试主机发送的业务功能配置信息,并按照第二预设格式对所述业务功能配置信息进行记录。
- 根据权利要求9所述的方法,其特中,根据所述脚本生成指令对业务功能配置信息进行预处理,并返回第一预设格式的配置信息文件至所述测试主机,包括:根据所述脚本生成指令集合业务功能配置信息;对所述业务功能配置信息进行格式转换,得到第一预设格式的配置信息文件;以及将所述第一预设格式的配置信息文件返回至所述测试主机。
- 根据权利要求9所述的方法,其中,所述根据所述脚本配置数据流对芯片进行业务功能配置,包括:对所述脚本配置数据流进行解析处理,得到芯片的接口配置参数;以及根据所述接口配置参数调用相应的芯片驱动接口函数,对所述芯片进行业务功能配置。
- 一种测试配置装置,包括:指令获取模块,设置为获取测试主机发送的脚本生成指令;预处理模块,设置为根据所述脚本生成指令对业务功能配置信息进行预处理,并返回第一预设格式的配置信息文件至所述测试主机;数据流获取模块,设置为获取所述测试主机发送的脚本配置数据流;以及配置模块,设置为根据所述脚本配置数据流对芯片进行业务功能配置。
- 根据权利要求13所述的装置,还包括:信息获取模块,设置为在获取测试主机发送的脚本生成指令之前,获取所述测试主机发送的业务功能配置信息,并按照第二预设格式对所述业务功能配置信息进行记录。
- 根据权利要求13所述的装置,其中,所述预处理模块包括:信息集合子模块,设置为根据所述脚本生成指令集合业务功能配置信息;格式转换子模块,设置为对所述业务功能配置信息进行格式转换,得到第一预设格式的配置信息文件;以及返回子模块,设置为将所述第一预设格式的配置信息文件返回至所述测试主机。
- 根据权利要求13所述的装置,其中,所述配置模块包括:解析处理子模块,设置为对所述脚本配置数据流进行解析处理,得到芯片的接口配置参数;以及配置子模块,设置为根据所述接口配置参数调用相应的芯片驱动接口函数,对所述芯片进行业务功能配置。
- 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-4以及9-12中任一项的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610179291.4A CN107229542A (zh) | 2016-03-25 | 2016-03-25 | 一种测试方法及装置 |
CN201610179291.4 | 2016-03-25 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017162210A1 true WO2017162210A1 (zh) | 2017-09-28 |
Family
ID=59899262
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/078165 WO2017162210A1 (zh) | 2016-03-25 | 2017-03-24 | 测试配置方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107229542A (zh) |
WO (1) | WO2017162210A1 (zh) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109086199A (zh) * | 2018-06-22 | 2018-12-25 | 网宿科技股份有限公司 | 一种自动化生成测试脚本的方法、终端和可存储介质 |
CN110262811A (zh) * | 2019-06-18 | 2019-09-20 | 深圳创维-Rgb电子有限公司 | 外挂芯片的通用配置方法、装置和存储介质 |
CN110647458A (zh) * | 2018-06-27 | 2020-01-03 | 优视科技有限公司 | 基于分布式测试平台的测试方法、装置及电子设备 |
CN113778770A (zh) * | 2021-09-10 | 2021-12-10 | 深圳市华宇福保半导体有限公司 | 一种用于硬盘芯片的检测方法及系统 |
CN114035862A (zh) * | 2021-11-08 | 2022-02-11 | 苏州挚途科技有限公司 | 数据处理方法、装置和电子设备 |
CN114117011A (zh) * | 2021-11-29 | 2022-03-01 | 武汉联影智融医疗科技有限公司 | 一种下位机模拟器的开发方法、装置、系统及存储介质 |
CN115174430A (zh) * | 2022-06-30 | 2022-10-11 | 中车青岛四方车辆研究所有限公司 | 一种轨道交通车载设备启动时间的测试方法与装置 |
CN115473837A (zh) * | 2022-02-22 | 2022-12-13 | 北京广利核系统工程有限公司 | 可配置协议的通讯测试工具和基于其的通讯测试方法 |
CN118694681A (zh) * | 2024-08-22 | 2024-09-24 | 北京集智达智能科技有限责任公司 | 网卡测试方法、装置、设备和存储介质 |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109151860B (zh) * | 2018-07-27 | 2021-09-07 | 深圳市极致汇仪科技有限公司 | 一种无线芯片的测试配置方法及其系统 |
CN111159003B (zh) * | 2018-11-07 | 2021-03-16 | 马上消费金融股份有限公司 | 一种批处理测试方法及装置 |
CN112284437A (zh) * | 2020-10-15 | 2021-01-29 | 歌尔光学科技有限公司 | 分层式逻辑控制方法、装置、设备及可读存储介质 |
CN112444731B (zh) * | 2020-10-30 | 2023-04-11 | 海光信息技术股份有限公司 | 芯片测试方法、装置、处理器芯片及服务器 |
CN112630622B (zh) * | 2020-12-17 | 2022-05-31 | 珠海芯业测控有限公司 | ATE设备的pattern编译下载测试的方法及系统 |
CN115114164A (zh) * | 2022-06-30 | 2022-09-27 | 重庆长安汽车股份有限公司 | 测试方法、装置、电子设备及存储介质 |
CN115766541B (zh) * | 2022-11-15 | 2024-05-07 | 合众新能源汽车股份有限公司 | 器件测试方法、装置、计算机设备和存储介质 |
CN115629295B (zh) * | 2022-11-30 | 2023-04-14 | 苏州萨沙迈半导体有限公司 | 芯片自动化测试系统、方法及存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1790957A (zh) * | 2004-12-14 | 2006-06-21 | 华为技术有限公司 | 设备测试方法 |
US20070088668A1 (en) * | 2005-10-13 | 2007-04-19 | Larab Bassam A | System and method for testing business process configurations |
CN101770423A (zh) * | 2009-12-25 | 2010-07-07 | 中兴通讯股份有限公司 | 一种测试数据生成方法及测试系统 |
US9280514B1 (en) * | 2012-07-11 | 2016-03-08 | Tellabs Operations, Inc. | Optimizing testability of network devices using markup language based output |
-
2016
- 2016-03-25 CN CN201610179291.4A patent/CN107229542A/zh active Pending
-
2017
- 2017-03-24 WO PCT/CN2017/078165 patent/WO2017162210A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1790957A (zh) * | 2004-12-14 | 2006-06-21 | 华为技术有限公司 | 设备测试方法 |
US20070088668A1 (en) * | 2005-10-13 | 2007-04-19 | Larab Bassam A | System and method for testing business process configurations |
CN101770423A (zh) * | 2009-12-25 | 2010-07-07 | 中兴通讯股份有限公司 | 一种测试数据生成方法及测试系统 |
US9280514B1 (en) * | 2012-07-11 | 2016-03-08 | Tellabs Operations, Inc. | Optimizing testability of network devices using markup language based output |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109086199A (zh) * | 2018-06-22 | 2018-12-25 | 网宿科技股份有限公司 | 一种自动化生成测试脚本的方法、终端和可存储介质 |
CN109086199B (zh) * | 2018-06-22 | 2022-06-07 | 网宿科技股份有限公司 | 一种自动化生成测试脚本的方法、终端和可存储介质 |
CN110647458A (zh) * | 2018-06-27 | 2020-01-03 | 优视科技有限公司 | 基于分布式测试平台的测试方法、装置及电子设备 |
CN110262811A (zh) * | 2019-06-18 | 2019-09-20 | 深圳创维-Rgb电子有限公司 | 外挂芯片的通用配置方法、装置和存储介质 |
CN113778770A (zh) * | 2021-09-10 | 2021-12-10 | 深圳市华宇福保半导体有限公司 | 一种用于硬盘芯片的检测方法及系统 |
CN114035862A (zh) * | 2021-11-08 | 2022-02-11 | 苏州挚途科技有限公司 | 数据处理方法、装置和电子设备 |
CN114117011A (zh) * | 2021-11-29 | 2022-03-01 | 武汉联影智融医疗科技有限公司 | 一种下位机模拟器的开发方法、装置、系统及存储介质 |
CN115473837A (zh) * | 2022-02-22 | 2022-12-13 | 北京广利核系统工程有限公司 | 可配置协议的通讯测试工具和基于其的通讯测试方法 |
CN115473837B (zh) * | 2022-02-22 | 2024-03-22 | 北京广利核系统工程有限公司 | 可配置协议的通讯测试工具和基于其的通讯测试方法 |
CN115174430A (zh) * | 2022-06-30 | 2022-10-11 | 中车青岛四方车辆研究所有限公司 | 一种轨道交通车载设备启动时间的测试方法与装置 |
CN115174430B (zh) * | 2022-06-30 | 2024-01-26 | 中车青岛四方车辆研究所有限公司 | 一种轨道交通车载设备启动时间的测试方法与装置 |
CN118694681A (zh) * | 2024-08-22 | 2024-09-24 | 北京集智达智能科技有限责任公司 | 网卡测试方法、装置、设备和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN107229542A (zh) | 2017-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017162210A1 (zh) | 测试配置方法及装置 | |
US11360879B2 (en) | Script debugging method, device, and computer storage medium | |
US10810110B1 (en) | Methods, systems, and articles of manufacture for testing web services using a behavior-driven development domain specific language framework | |
US8924933B2 (en) | Method and system for automated testing of computer applications | |
US8091071B2 (en) | Method and system for template-based code generation | |
US9183113B2 (en) | Debugging analysis in running multi-user systems | |
CN101930400B (zh) | Sdk自动化测试系统及方法 | |
US11455150B2 (en) | Accelerating application modernization | |
CA2773981C (en) | System and method of substituting parameter sets in self-contained mini-applications | |
CN109857663B (zh) | 关键字驱动与图像相似度结合的自动化测试平台 | |
CN109902017A (zh) | 一种基于RobotFramework测试Dubbo接口的方法及终端 | |
EP1027648A2 (en) | Apparatus and method for semi-automated generation and application of language conformity tests | |
CN107832059A (zh) | 一种基于Makefile的代码静态分析方法和装置 | |
CN109857641A (zh) | 对程序源文件进行缺陷检测的方法及装置 | |
Garcia et al. | Bootstrapping mde development from ros manual code-part 1: Metamodeling | |
Baker et al. | Automatic generation of conformance tests from message sequence charts | |
CN111124870A (zh) | 一种接口测试方法及装置 | |
CN113157572B (zh) | 一种测试案例生成方法、系统、电子设备及存储介质 | |
CN105739481B (zh) | 工控软件的测试方法、装置及系统 | |
CN112445692B (zh) | 一种用例测试方法及终端 | |
CN107622017A (zh) | 一种通用自动化软件测试的解析方法 | |
CN118113271A (zh) | 基于大模型的代码生成方法、系统、终端及介质 | |
CN106843875B (zh) | 跨平台移植Python程序的方法和装置 | |
US9063744B2 (en) | Modifying a file written in a formal language | |
CN114090435A (zh) | 测试方法、装置、电子设备及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17769487 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17769487 Country of ref document: EP Kind code of ref document: A1 |