WO2016107145A1 - Method for implementing white-box test and test control terminal - Google Patents

Method for implementing white-box test and test control terminal Download PDF

Info

Publication number
WO2016107145A1
WO2016107145A1 PCT/CN2015/084507 CN2015084507W WO2016107145A1 WO 2016107145 A1 WO2016107145 A1 WO 2016107145A1 CN 2015084507 W CN2015084507 W CN 2015084507W WO 2016107145 A1 WO2016107145 A1 WO 2016107145A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
code
unit
control terminal
test control
Prior art date
Application number
PCT/CN2015/084507
Other languages
French (fr)
Chinese (zh)
Inventor
王师墨
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016107145A1 publication Critical patent/WO2016107145A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • This article covers test techniques, especially one that implements white box testing and test consoles.
  • the white box test system includes a test control end and a test end.
  • the test control terminal is mainly used to receive the test command group and forward it to the tested terminal, and receive the analysis result from the tested terminal and analyze it.
  • a test command group consisting of one or more test commands is used to describe the test case, that is, a test environment for describing a test demand point; and the analysis result at least includes information indicating whether the test is successful.
  • a large number of test demand points constitute the test requirements, that is, the test objectives of the white box test.
  • the measured end includes a test unit, an operating unit, and a measured unit that needs to be tested.
  • the test unit is configured to convert the received test command group from the test control end into test code;
  • the running unit is configured to compile the test code into executable information, test the tested unit according to the executable information, and return the test result to the test.
  • Control terminal Taking the test control terminal as an example, in the art, the test control end before compilation is called the code of the test control end, and the compiled test control end is called the test control end, which is referred to as the test control end.
  • the test console is written in a programming language that supports just-in-time compilation (for example, a scripting language), while the tested end uses a software development language that makes it easier to implement the unit under test, such as a programming language that is easy to implement complex functions (for example, an object-oriented language). write.
  • a programming language that is easy to implement complex functions for example, an object-oriented language.
  • the code of the test unit in the tested end is modified according to the newly added test case, and the code of the tested end is modified and compiled to obtain a runable test end. Due to the long compile time of the tested end, this reduces the test efficiency and even delays the product. The release resulted in significant economic losses.
  • the embodiment of the invention provides a method for implementing white box testing and a test control end, which can reduce the compile time and thereby improve the testing efficiency.
  • An embodiment of the present invention provides a method for implementing white box testing, including:
  • the testing comprises:
  • the test control end converts the received test command group into a test code and sends it to the tested terminal;
  • the tested terminal compiles the received test code into executable information, tests the tested unit in the tested terminal according to the executable information, and returns the test result to the test control terminal;
  • the test control end analyzes the returned test results to obtain an analysis result.
  • the compiling of the runable test console is compiled as a just-in-time.
  • test control terminal is implemented by using a programming language that supports real-time compilation.
  • the programming language supporting instant compilation is a scripting language.
  • the embodiment of the invention further provides a test control end for implementing a white box test, comprising a receiving unit and a testing unit, wherein
  • the receiving unit is configured to receive a test command group
  • the test unit is configured to convert the test command group from the receiving unit into a test code and send it to the tested terminal.
  • the testing unit is further configured to receive, by the tested terminal, the test unit in the tested terminal according to the test code to obtain a test result, and analyze the returned test result to obtain an analysis result.
  • test control terminal is implemented by using a programming language that supports real-time compilation.
  • the programming language supporting instant compilation is a scripting language.
  • the embodiment of the invention further provides a computer readable storage medium storing program instructions, which can be implemented when the program instructions are executed.
  • the technical solution of the embodiment of the present invention includes: when the new test case needs to be supported, modifying the code of the test unit set in the test control end according to the newly added test case, and compiling the code of the test control end to obtain a runable test control end; Enter the test command group to the test console for testing.
  • the technical solution of the embodiment of the present invention by setting the test unit in the test control end, realizes the code for modifying and compiling the test control end when the new test case needs to be supported, thereby avoiding modifying and compiling the code of the tested end, thereby effectively reducing the compilation. Time, which improves test efficiency.
  • FIG. 1 is a flowchart of a method for implementing white box testing according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a test control end for implementing a white box test according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for implementing white box testing according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:
  • Step 101 When a new test case needs to be supported, the code of the test unit set in the test control end is modified according to the newly added test case;
  • the emphasis here is on modifying the code of the test unit in the test console without having to modify the code of the terminal under test.
  • Step 102 Compile the code of the test control terminal to obtain a test control terminal that can be run;
  • the code that tests the console is written in a scripting language that supports just-in-time compilation.
  • the code of the test console is written in the Python language, and the code of the compile test console in this step includes: compiling the code of the test console in real time.
  • the code for the test console can also be written in the Ruby language.
  • this step is performed by using a compiling tool corresponding to the programming language of the test console.
  • Step 103 Input a test command group to the test control terminal for testing.
  • the test command group can be included in a file, which is usually called a test script.
  • the test command group can also be composed of one or more test commands that are input in human-computer interaction.
  • the test control terminal is started by saving the location information of the test script as a parameter, thereby implementing the step of inputting the test command group to the test control terminal.
  • the input test command group is received in a human-computer interaction manner, thereby implementing the input test command group to the test control terminal.
  • the method further includes:
  • the test control terminal converts the received test command group into a test code and sends it to the tested terminal; the tested terminal compiles the received test code into executable information, and tests the tested unit in the tested terminal according to the executable information. And return the test result to the test control end; the test control end analyzes the returned test result to obtain the analysis result.
  • the executable information is typically a binary bit stream executable by a computing device, such as a computer.
  • test command group corresponds to the test code one by one. Since the test command group is used to describe the test case, the test code is also used to describe the test case.
  • the test control terminal adopts the Python language, and the measured terminal is written in the Java language as an example.
  • the test command is information that can be recognized by the Python language
  • the test code is information that can be recognized by the Java language.
  • the receiving the test command group in the above step includes: receiving the test script And extract the test command group.
  • the test control end includes a receiving unit 201 and a testing unit 202, where
  • the receiving unit 201 is configured to receive a test command group
  • the test unit 202 is configured to convert the test command group from the receiving unit into a test code and send it to the tested terminal.
  • test unit 202 on the test control side, implements the code that needs to support the new test case, modifies and compiles the test control end, avoids modifying and compiling the code of the tested end, effectively reducing the compile time, thereby improving the test. effectiveness.
  • the test console is programmed with a programming language that supports just-in-time compilation, such as a scripting language.
  • the testing unit 202 is further configured to receive the test result of the tested unit in the tested end according to the test code returned by the tested terminal, and analyze the returned test result to obtain the analysis result.
  • test control end and the measured end can be set on the same computing device, such as a server, or on different computing devices.
  • the technical solution provided by the embodiment of the present invention by setting the test unit in the test control end, realizes the code for modifying and compiling the test control end when the need for supporting the new test case is needed, thereby avoiding modifying and compiling the code of the tested end, effectively reducing Test time, which improves test efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

A method for implementing a white-box test and a test control terminal. The method comprises: when a newly added test case needs to be supported, modifying, according to the newly added test case, code of a test unit arranged in a test control terminal, and compiling the code of the test control terminal to obtain the test control terminal that can be run; and inputting a test command group to the test control terminal to implement a test.

Description

一种实现白盒测试的方法和测试控制端Method for realizing white box test and test control end 技术领域Technical field
本文涉及测试技术,尤指一种实现白盒测试的方法和测试控制端。This article covers test techniques, especially one that implements white box testing and test consoles.
背景技术Background technique
众所周知,白盒测试已经成为一种常用的软件测试手段。相关技术中,白盒测试系统包括测试控制端和被测端。测试控制端主要用于接收测试命令组并转发给被测端,以及接收来自被测端的分析结果并进行分析。其中,由一个或一个以上测试命令组成的测试命令组用于描述测试用例,即用于描述针对一个测试需求点的测试环境;分析结果至少包括指示测试是否成功的信息。通常,很多个测试需求点构成测试需求,即白盒测试的测试目标。As everyone knows, white box testing has become a common means of software testing. In the related art, the white box test system includes a test control end and a test end. The test control terminal is mainly used to receive the test command group and forward it to the tested terminal, and receive the analysis result from the tested terminal and analyze it. Wherein, a test command group consisting of one or more test commands is used to describe the test case, that is, a test environment for describing a test demand point; and the analysis result at least includes information indicating whether the test is successful. Usually, a large number of test demand points constitute the test requirements, that is, the test objectives of the white box test.
被测端包括测试单元、运行单元和需要进行测试的被测单元。其中,测试单元用于将接收到的来自测试控制端的测试命令组转换成测试代码;运行单元,用于将测试代码编译成可执行信息,根据可执行信息测试被测单元并返回测试结果给测试控制端。以测试控制端为例来看,通常本领域中将编译前的测试控制端称为测试控制端的代码,而将编译后的测试控制端称为可运行的测试控制端,简称为测试控制端。The measured end includes a test unit, an operating unit, and a measured unit that needs to be tested. The test unit is configured to convert the received test command group from the test control end into test code; the running unit is configured to compile the test code into executable information, test the tested unit according to the executable information, and return the test result to the test. Control terminal. Taking the test control terminal as an example, in the art, the test control end before compilation is called the code of the test control end, and the compiled test control end is called the test control end, which is referred to as the test control end.
通常,测试控制端采用支持即时编译的编程语言(例如,脚本语言)编写;而被测端采用更容易实现被测单元的软件开发语言如易于实现复杂功能的编程语言(例如,面向对象语言)编写。由于被测端包括功能复杂的被测单元,因此其实现复杂度明显大于测试控制端的实现复杂度,而且易于实现复杂功能的编程语言的编译效率相对于支持即时编译的编程语言的编译效率低得多。综上所述,由于功能明显复杂且采用的编程语言的编译效率较低,因此被测端的编译时间明显大于测试控制端的编译时间。Typically, the test console is written in a programming language that supports just-in-time compilation (for example, a scripting language), while the tested end uses a software development language that makes it easier to implement the unit under test, such as a programming language that is easy to implement complex functions (for example, an object-oriented language). write. Since the measured end includes a unit with a complex function, the implementation complexity is significantly larger than the implementation complexity of the test console, and the compilation efficiency of a programming language that is easy to implement complex functions is less efficient than that of a programming language that supports real-time compilation. many. In summary, because the function is obviously complicated and the programming language used has low compilation efficiency, the compile time of the tested end is significantly larger than the compile time of the test control end.
在上述白盒测试系统中,需要支持新增测试用例时,根据新增测试用例修改被测端中测试单元的代码,修改并编译被测端的代码,以得到可运行的被测端。由于被测端的编译时间较长,这样降低了测试效率,甚至延后产品 发布从而带来重大经济损失。In the above white box test system, when it is necessary to support the new test case, the code of the test unit in the tested end is modified according to the newly added test case, and the code of the tested end is modified and compiled to obtain a runable test end. Due to the long compile time of the tested end, this reduces the test efficiency and even delays the product. The release resulted in significant economic losses.
发明内容Summary of the invention
本发明实施例提供了一种实现白盒测试的方法和测试控制端,能够减少编译时间,从而提高测试效率。The embodiment of the invention provides a method for implementing white box testing and a test control end, which can reduce the compile time and thereby improve the testing efficiency.
本发明实施例提供了一种实现白盒测试的方法,包括:An embodiment of the present invention provides a method for implementing white box testing, including:
需要支持新增测试用例时,根据新增测试用例修改设置在测试控制端中的测试单元的代码,并编译测试控制端的代码,以得到可运行的测试控制端;When you need to support the new test case, modify the code of the test unit set in the test console according to the new test case, and compile the code of the test console to get the runable test control terminal;
输入测试命令组给测试控制端,以进行测试。Enter the test command group to the test console for testing.
可选地,所述进行测试包括:Optionally, the testing comprises:
所述测试控制端将接收到的测试命令组转换成测试代码,并发送给被测端;The test control end converts the received test command group into a test code and sends it to the tested terminal;
被测端将接收到的测试代码编译成可执行信息,根据可执行信息测试被测端中的被测单元,并返回测试结果给所述测试控制端;The tested terminal compiles the received test code into executable information, tests the tested unit in the tested terminal according to the executable information, and returns the test result to the test control terminal;
所述测试控制端分析返回的测试结果,以得到分析结果。The test control end analyzes the returned test results to obtain an analysis result.
可选地,所述得到可运行的测试控制端的编译为即时编译。Optionally, the compiling of the runable test console is compiled as a just-in-time.
可选地,所述测试控制端采用支持即时编译的编程语言进行编程实现。Optionally, the test control terminal is implemented by using a programming language that supports real-time compilation.
可选地,所述支持即时编译的编程语言为脚本语言。Optionally, the programming language supporting instant compilation is a scripting language.
本发明实施例还提供了一种实现白盒测试的测试控制端,包括接收单元和测试单元,其中,The embodiment of the invention further provides a test control end for implementing a white box test, comprising a receiving unit and a testing unit, wherein
所述接收单元,设置为接收测试命令组;The receiving unit is configured to receive a test command group;
所述测试单元,设置为将来自接收单元的的测试命令组转换成测试代码并发送给被测端。The test unit is configured to convert the test command group from the receiving unit into a test code and send it to the tested terminal.
可选地,所述测试单元还设置为接收所述被测端返回的根据所述测试代码测试所述被测端中的被测单元得到测试结果,并分析返回的测试结果,以得到分析结果。Optionally, the testing unit is further configured to receive, by the tested terminal, the test unit in the tested terminal according to the test code to obtain a test result, and analyze the returned test result to obtain an analysis result. .
可选地,所述测试控制端采用支持即时编译的编程语言进行编程实现。 Optionally, the test control terminal is implemented by using a programming language that supports real-time compilation.
可选地,所述支持即时编译的编程语言为脚本语言。Optionally, the programming language supporting instant compilation is a scripting language.
本发明实施例还提供一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时可实现上述方法。The embodiment of the invention further provides a computer readable storage medium storing program instructions, which can be implemented when the program instructions are executed.
本发明实施例技术方案包括:需要支持新增测试用例时,根据新增测试用例修改设置在测试控制端中的测试单元的代码,并编译测试控制端的代码,以得到可运行的测试控制端;输入测试命令组给测试控制端,以进行测试。本发明实施例技术方案,通过将测试单元设置在测试控制端中,实现了需要支持新增测试用例时,修改并编译测试控制端的代码,避免了修改并编译被测端的代码,有效减少了编译时间,从而提高了测试效率。The technical solution of the embodiment of the present invention includes: when the new test case needs to be supported, modifying the code of the test unit set in the test control end according to the newly added test case, and compiling the code of the test control end to obtain a runable test control end; Enter the test command group to the test console for testing. The technical solution of the embodiment of the present invention, by setting the test unit in the test control end, realizes the code for modifying and compiling the test control end when the new test case needs to be supported, thereby avoiding modifying and compiling the code of the tested end, thereby effectively reducing the compilation. Time, which improves test efficiency.
附图概述BRIEF abstract
图1为本发明实施例实现白盒测试的方法的流程图;1 is a flowchart of a method for implementing white box testing according to an embodiment of the present invention;
图2为本发明实施例实现白盒测试的测试控制端的组成结构示意图。FIG. 2 is a schematic structural diagram of a test control end for implementing a white box test according to an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
下文中将结合附图对本发明实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps illustrated in the flowchart of the figures may be executed in a computer system such as a set of computer executable instructions. Also, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
图1为本发明实施例实现白盒测试的方法的流程图,如图1所示,包括:FIG. 1 is a flowchart of a method for implementing white box testing according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:
步骤101:需要支持新增测试用例时,根据新增测试用例修改设置在测试控制端中的测试单元的代码;Step 101: When a new test case needs to be supported, the code of the test unit set in the test control end is modified according to the newly added test case;
这里强调的是,修改测试控制端中的测试单元的代码,而不必修改被测端的代码。The emphasis here is on modifying the code of the test unit in the test console without having to modify the code of the terminal under test.
步骤102:编译测试控制端的代码,以得到可运行的测试控制端; Step 102: Compile the code of the test control terminal to obtain a test control terminal that can be run;
可选地,测试控制端的代码通过支持即时编译的脚本语言进行编写的。Optionally, the code that tests the console is written in a scripting language that supports just-in-time compilation.
在一个实施例中,测试控制端的代码通过Python语言编写,本步骤中的编译测试控制端的代码包括:对测试控制端的代码进行即时编译。In one embodiment, the code of the test console is written in the Python language, and the code of the compile test console in this step includes: compiling the code of the test console in real time.
在另一个实施例中,测试控制端的代码还可通过Ruby语言编写。In another embodiment, the code for the test console can also be written in the Ruby language.
需要说明的是,本步骤是利用测试控制端的编程语言对应的编译工具进行的。It should be noted that this step is performed by using a compiling tool corresponding to the programming language of the test console.
步骤103:输入测试命令组给测试控制端,以进行测试。Step 103: Input a test command group to the test control terminal for testing.
其中,测试命令组可以包括在一个文件中,通常该文件称为测试脚本。测试命令组还可以由一个或一个以上以人机交互方式输入的测试命令组成。The test command group can be included in a file, which is usually called a test script. The test command group can also be composed of one or more test commands that are input in human-computer interaction.
在一个实施例中,测试脚本保存后,以保存测试脚本的位置信息作为参数启动测试控制端,从而实现输入测试命令组给测试控制端的步骤。In one embodiment, after the test script is saved, the test control terminal is started by saving the location information of the test script as a parameter, thereby implementing the step of inputting the test command group to the test control terminal.
在另一个实施例中,测试控制端启动后,以人机交互方式接收输入的测试命令组,从而实现了输入测试命令组给测试控制端。In another embodiment, after the test control terminal is started, the input test command group is received in a human-computer interaction manner, thereby implementing the input test command group to the test control terminal.
从步骤101~103来看,通过将测试单元设置在测试控制端中,实现了需要支持新增测试用例时,修改并编译测试控制端的代码,避免了修改并编译被测端的代码,有效减少了编译时间,从而提高了测试效率。From the steps 101 to 103, by setting the test unit in the test control terminal, the code for modifying and compiling the test control terminal is needed when the test case needs to be supported, thereby avoiding the modification and compiling the code of the tested terminal, thereby effectively reducing the code. Compile time, which improves test efficiency.
可选地,步骤103之后还包括:Optionally, after step 103, the method further includes:
测试控制端将接收到的测试命令组转换成测试代码,并发送给被测端;被测端将接收到的测试代码编译成可执行信息,根据可执行信息测试被测端中的被测单元,并返回测试结果给测试控制端;测试控制端分析返回的测试结果,以得到分析结果。The test control terminal converts the received test command group into a test code and sends it to the tested terminal; the tested terminal compiles the received test code into executable information, and tests the tested unit in the tested terminal according to the executable information. And return the test result to the test control end; the test control end analyzes the returned test result to obtain the analysis result.
其中,可执行信息通常为计算设备如计算机可执行的二进制比特流。Wherein, the executable information is typically a binary bit stream executable by a computing device, such as a computer.
不难看出,测试命令组与测试代码一一对应,由于测试命令组用于描述测试用例,因此测试代码也用于描述测试用例。以测试控制端采用Python语言,被测端采用Java语言编写为例来看,测试命令为Python语言可以识别的信息,测试代码为Java语言可以识别的信息。It is not difficult to see that the test command group corresponds to the test code one by one. Since the test command group is used to describe the test case, the test code is also used to describe the test case. The test control terminal adopts the Python language, and the measured terminal is written in the Java language as an example. The test command is information that can be recognized by the Python language, and the test code is information that can be recognized by the Java language.
在一个实施例中,上述步骤中的接收测试命令组,包括:接收测试脚本 并提取测试命令组。In an embodiment, the receiving the test command group in the above step includes: receiving the test script And extract the test command group.
图2为本发明实施例实现白盒测试的测试控制端的组成结构示意图,如图2所示,测试控制端包括接收单元201和测试单元202,其中,2 is a schematic structural diagram of a test control end of a white box test according to an embodiment of the present invention. As shown in FIG. 2, the test control end includes a receiving unit 201 and a testing unit 202, where
所述接收单元201,设置为接收测试命令组;The receiving unit 201 is configured to receive a test command group;
所述测试单元202,设置为将来自接收单元的的测试命令组转换成测试代码并发送给被测端。The test unit 202 is configured to convert the test command group from the receiving unit into a test code and send it to the tested terminal.
不难看出,测试单元202在测试控制端,实现了需要支持新增测试用例时,修改并编译测试控制端的代码,避免了修改并编译被测端的代码,有效减少了编译时间,从而提高了测试效率。It is not difficult to see that the test unit 202, on the test control side, implements the code that needs to support the new test case, modifies and compiles the test control end, avoids modifying and compiling the code of the tested end, effectively reducing the compile time, thereby improving the test. effectiveness.
可选地,在一个实施例中,测试控制端采用支持即时编译的编程语言如脚本语言进行编程实现。Optionally, in one embodiment, the test console is programmed with a programming language that supports just-in-time compilation, such as a scripting language.
测试单元202还设置为接收被测端返回的根据测试代码测试被测端中的被测单元得到测试结果,并分析返回的测试结果,以得到分析结果。The testing unit 202 is further configured to receive the test result of the tested unit in the tested end according to the test code returned by the tested terminal, and analyze the returned test result to obtain the analysis result.
需要说明的是,测试控制端和被测端可以设置在同一计算设备如服务器上,也可以设置在不同的计算设备上。It should be noted that the test control end and the measured end can be set on the same computing device, such as a server, or on different computing devices.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,上述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本发明实施例不限制于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be accomplished by a program that instructs the associated hardware, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiment may be implemented in the form of hardware or in the form of a software function module. Embodiments of the invention are not limited to any specific form of combination of hardware and software.
工业实用性Industrial applicability
本发明实施例提供的技术方案,通过将测试单元设置在测试控制端中,实现了需要支持新增测试用例时,修改并编译测试控制端的代码,避免了修改并编译被测端的代码,有效减少了测试时间,从而提高了测试效率。 The technical solution provided by the embodiment of the present invention, by setting the test unit in the test control end, realizes the code for modifying and compiling the test control end when the need for supporting the new test case is needed, thereby avoiding modifying and compiling the code of the tested end, effectively reducing Test time, which improves test efficiency.

Claims (10)

  1. 一种实现白盒测试的方法,包括:A method of implementing white box testing, comprising:
    需要支持新增测试用例时,根据新增测试用例修改设置在测试控制端中的测试单元的代码,并编译测试控制端的代码,以得到可运行的测试控制端;When you need to support the new test case, modify the code of the test unit set in the test console according to the new test case, and compile the code of the test console to get the runable test control terminal;
    输入测试命令组给测试控制端,以进行测试。Enter the test command group to the test console for testing.
  2. 根据权利要求1所述的方法,其中,所述进行测试包括:The method of claim 1 wherein said conducting a test comprises:
    所述测试控制端将接收到的测试命令组转换成测试代码,并发送给被测端;The test control end converts the received test command group into a test code and sends it to the tested terminal;
    被测端将接收到的测试代码编译成可执行信息,根据可执行信息测试被测端中的被测单元,并返回测试结果给所述测试控制端;The tested terminal compiles the received test code into executable information, tests the tested unit in the tested terminal according to the executable information, and returns the test result to the test control terminal;
    所述测试控制端分析返回的测试结果,以得到分析结果。The test control end analyzes the returned test results to obtain an analysis result.
  3. 根据权利要求1或2所述的方法,其中,所述得到可运行的测试控制端的编译为即时编译。The method of claim 1 or 2, wherein the compiling of the runnable test console is compiled as a just-in-time.
  4. 根据权利要求1或2所述的方法,其中,所述测试控制端采用支持即时编译的编程语言进行编程实现。The method according to claim 1 or 2, wherein the test control terminal is programmed to be implemented in a programming language that supports instant compilation.
  5. 根据权利要求4所述的方法,其中,所述支持即时编译的编程语言为脚本语言。The method of claim 4 wherein the programming language that supports instant compilation is a scripting language.
  6. 一种实现白盒测试的测试控制端,包括接收单元和测试单元,其中:A test control end for implementing white box testing, comprising a receiving unit and a testing unit, wherein:
    所述接收单元,设置为接收测试命令组;The receiving unit is configured to receive a test command group;
    所述测试单元,设置为将来自接收单元的的测试命令组转换成测试代码并发送给被测端。The test unit is configured to convert the test command group from the receiving unit into a test code and send it to the tested terminal.
  7. 根据权利要求6所述的测试控制端,所述测试单元还设置为接收所述被测端返回的根据所述测试代码测试所述被测端中的被测单元得到测试结果,并分析返回的测试结果,以得到分析结果。The test control terminal according to claim 6, wherein the test unit is further configured to receive the test unit returned by the tested terminal and test the test unit according to the test code to obtain a test result, and analyze the returned Test the results to get the analysis results.
  8. 根据权利要求6或7所述的测试控制端,其中,所述测试控制端采用支持即时编译的编程语言进行编程实现。The test control terminal according to claim 6 or 7, wherein the test control terminal is programmed by using a programming language that supports instant compilation.
  9. 根据权利要求8所述的测试控制端,其中,所述支持即时编译的编程 语言为脚本语言。The test control terminal according to claim 8, wherein said programming supporting instant compilation The language is a scripting language.
  10. 一种计算机可读存储介质,存储有程序指令,当该程序指令被执行时可实现权利要求1-5任一项所述的方法。 A computer readable storage medium storing program instructions that, when executed, can implement the method of any of claims 1-5.
PCT/CN2015/084507 2014-12-31 2015-07-20 Method for implementing white-box test and test control terminal WO2016107145A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410854039.XA CN105808421A (en) 2014-12-31 2014-12-31 White box test realization method and test control end
CN201410854039.X 2014-12-31

Publications (1)

Publication Number Publication Date
WO2016107145A1 true WO2016107145A1 (en) 2016-07-07

Family

ID=56284104

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/084507 WO2016107145A1 (en) 2014-12-31 2015-07-20 Method for implementing white-box test and test control terminal

Country Status (2)

Country Link
CN (1) CN105808421A (en)
WO (1) WO2016107145A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1471249A (en) * 2002-07-23 2004-01-28 华为技术有限公司 White ox measuring system and method using script patch
CN101196817A (en) * 2008-01-04 2008-06-11 福建星网锐捷网络有限公司 Test case generating method and system
CN101212759A (en) * 2006-12-26 2008-07-02 中兴通讯股份有限公司 Integrated mobile telephone software test method
CN101401075A (en) * 2006-11-17 2009-04-01 深圳市领测科技有限公司 Mapping method in the program testing system and program testing system
US20130308457A1 (en) * 2012-04-28 2013-11-21 International Business Machines Corporation System detection method and apparatus and flow control method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1318976C (en) * 2004-06-16 2007-05-30 华为技术有限公司 Software detection method and system
CN100363906C (en) * 2006-02-28 2008-01-23 华为技术有限公司 Method for testing software unit
CN100511135C (en) * 2007-08-14 2009-07-08 中兴通讯股份有限公司 Unit test system and method thereof
US9727436B2 (en) * 2008-01-02 2017-08-08 International Business Machines Corporation Adding a profiling agent to a virtual machine to permit performance and memory consumption analysis within unit tests

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1471249A (en) * 2002-07-23 2004-01-28 华为技术有限公司 White ox measuring system and method using script patch
CN101401075A (en) * 2006-11-17 2009-04-01 深圳市领测科技有限公司 Mapping method in the program testing system and program testing system
CN101212759A (en) * 2006-12-26 2008-07-02 中兴通讯股份有限公司 Integrated mobile telephone software test method
CN101196817A (en) * 2008-01-04 2008-06-11 福建星网锐捷网络有限公司 Test case generating method and system
US20130308457A1 (en) * 2012-04-28 2013-11-21 International Business Machines Corporation System detection method and apparatus and flow control method and device

Also Published As

Publication number Publication date
CN105808421A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
KR102059705B1 (en) Adaptive portable libraries
US10613964B2 (en) Conditional debugging of server-side production code
US10042744B2 (en) Adopting an existing automation script to a new framework
WO2016004657A1 (en) Device for automatically generating test cases for embedded software and method thereof
US8881115B2 (en) Compiling source code for debugging with expanded snapshots
US9477579B2 (en) Embedded software debug system with partial hardware acceleration
CN104505126A (en) Dynamic memory testing system and dynamic memory testing method
US20180025162A1 (en) Application program analysis apparatus and method
CN104102581A (en) Method and device for implementing unit testing
US10241888B2 (en) Method to verify correctness of computer system software and hardware components and corresponding test environment
CN106919374B (en) Script generation method and device
US20150277875A1 (en) Optimization of software symbol tables
KR102141749B1 (en) APP program execution method and device
JP2014063415A (en) Test case automatic generation device and test case automatic generation program
CN110209565A (en) A kind of metadata schema adjustment method and its device
CN106547537B (en) Method for realizing assembled electric power application software based on QML technology
WO2016107145A1 (en) Method for implementing white-box test and test control terminal
CN104317723A (en) Method and system for tracking running information of drive program
CN108132799B (en) Inter-process static program analysis information extraction method, device and equipment
CN116594861A (en) Native dynamic link library analysis method and system based on simulation execution
CN108121658B (en) Method for testing LINUX end tested software based on WINDOWS end testing tool
US9940218B2 (en) Debugging optimized code using fat binary
CN113254027A (en) Method, system, equipment and storage medium for converting control program of semiconductor equipment
CN107563025B (en) Verification platform management method and device
US20200226082A1 (en) Input/output control code filter

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15874834

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15874834

Country of ref document: EP

Kind code of ref document: A1