WO2016201995A1 - Method and apparatus for implementation of test object construction, and service configuration test apparatus - Google Patents

Method and apparatus for implementation of test object construction, and service configuration test apparatus Download PDF

Info

Publication number
WO2016201995A1
WO2016201995A1 PCT/CN2016/073527 CN2016073527W WO2016201995A1 WO 2016201995 A1 WO2016201995 A1 WO 2016201995A1 CN 2016073527 W CN2016073527 W CN 2016073527W WO 2016201995 A1 WO2016201995 A1 WO 2016201995A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
class
jar
keyword
jar package
Prior art date
Application number
PCT/CN2016/073527
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 WO2016201995A1 publication Critical patent/WO2016201995A1/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 document refers to, but is not limited to, interface testing technology, especially a device, a device and a service configuration test device for implementing a test object.
  • the configuration of the service on the U2000 usually includes three parts: configuration, upload, and page display.
  • the configuration means that the corresponding parameters are configured and saved for a service in the GUI (Graphical User Interface).
  • the data enters the server, and the data is sent to the device through the server. If successful, the data is stored in the database.
  • Uploading means reading the data in the library and configuring the data on the device for persistence.
  • the interface display means: according to the data persistence processing, the interface is displayed on the client GUI interface.
  • test for service configuration is mainly carried out by using tools such as QTP (an automatic test tool developed by Mercury).
  • QTP an automatic test tool developed by Mercury.
  • the test of service configuration depends on the network management environment and is only suitable for use when the interface is relatively stable. When the interface changes greatly, the tester needs to modify the script according to the interface change. The maintenance work of the test process is quite large, and the test efficiency is low.
  • the configuration of the configuration module of the business configuration on the network management has the same process, so the network management reflects this similarity through its own framework, and the developer can complete the development of a configuration module by providing the necessary data according to the framework.
  • the data provided by the developer in this development mode is not directly connected to the direct test because the framework participates in the configuration module in the development of the configuration module; therefore, the test for the configuration module actually becomes unit test.
  • MOCK analog
  • MOCK technology is used in the test process, for some objects that are not easy to construct or not easy to obtain, use a virtual object to create a test method for testing
  • the open source MOCK technology has the function missing, which makes the process of building the test object complex.
  • the related technology does not support the automatic deep MOCK.
  • the MOCK test object does not support the definition according to the return test type. Behavior, does not support simulation and has the same CLASS class as MOCK object Type object, does not support the simulation of equals() and hashcode() methods.
  • the method of constructing test objects by using MOCK technology takes a lot of time and is inefficient; in addition, the related MOCK technology does not support automatic deep MOCK, which easily affects the inability of the test framework to run.
  • the embodiment of the invention provides a device, a device and a service configuration test device for implementing a test object, which can quickly realize the construction of a test object.
  • An embodiment of the present invention provides a method for implementing a test object, including:
  • the server assigns a test class included in each configuration module of the service configuration test according to a preset default value policy
  • the server builds the test object according to the corresponding evaluation class of each configuration module through the MOCK method.
  • the preset default value policy includes:
  • test class Depending on the type of test class, assign a corresponding default value to the test class contained in each configuration module; and/or,
  • test class included in each configuration module is assigned a corresponding default value
  • the test class includes a conventional test class and a new test class.
  • the method further includes:
  • the server Based on the annotation Annotation technique, the server reflects the type of the test class corresponding to the constructed test object, so that the constructed test object supports the collection and the map MAP member.
  • the method further includes:
  • the server assigns a default value to the Internet Protocol IP address, mask or reverse mask, and media access control MAC address in the constructed test object.
  • the method further includes:
  • the server After the server builds the test object, the server passes the simulation test object, and the Java archive file JAR package matched with the configuration module preset in the test library and the dependency relationship between the JAR packages involved in the test, and the server passes the simulation. Forward conversion and reverse conversion are tested.
  • the server establishes a subdirectory of the JAR package that matches each type of configuration module, and a mapping relationship of the JAR package involved in the test.
  • the method before the testing by the analog forward conversion and the reverse conversion, the method further includes:
  • the server performs secondary encapsulation on the JAR package with a preset user keyword
  • the server performs the configuration of the dependency through a preset user keyword.
  • the constructed test object includes a PO class
  • the forward conversion includes:
  • the server calls the corresponding JAR package according to the keyword of the JAR package converted to the communication interface F port type of the network management client and the server, and converts the constructed persistent object PO class into the F port class; based on the communication interface converted into the network management device and the device
  • the keyword of the JAR packet of the QX port class calls the corresponding JAR package, and converts the converted F port class into a QX port class;
  • the reverse conversion includes:
  • the server calls the corresponding JAR package based on the keyword of the JAR package converted to the F-port class, and converts the converted QX port class into a F-port class; and calls the corresponding JAR according to the keyword of the JAR package converted to the PO port class.
  • the package converts the converted F-port class into a PO port class;
  • the keyword includes a library keyword or a user keyword of the JAR package.
  • an embodiment of the present invention further provides an apparatus for implementing a test object, including: a first evaluation unit and a construction unit; wherein
  • the first assignment unit is configured to assign a test class included in each configuration module according to a preset default value policy
  • the building unit is set to build the test object according to the corresponding evaluation class of each configuration module through the MOCK method.
  • the first assignment unit is configured to assign a default value to the test class included in each configuration module according to the type of the test class; and/or, according to the method name of the test class, for each The test class contained in the configuration module is assigned the corresponding default value.
  • the apparatus further includes a reflection unit configured to reflect the type of the test class corresponding to the constructed test object based on the annotation Annotation technique, so that the constructed test object supports the collection and the map MAP member.
  • the apparatus further includes a second evaluation unit configured to assign a default value to the Internet Protocol IP address, the mask or the reverse mask, and the media access control MAC address in the constructed test object based on the Annotation technology.
  • a second evaluation unit configured to assign a default value to the Internet Protocol IP address, the mask or the reverse mask, and the media access control MAC address in the constructed test object based on the Annotation technology.
  • Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
  • the embodiment of the present invention further provides an apparatus for implementing a service configuration test, including: any one of the foregoing modules for implementing a test object, and the method further includes:
  • Configuring a dependency unit configured to preset a dependency between a Java Archive JAR package matching the configuration module and a JAR package involved in the test;
  • the test unit set to test based on dependencies and built test objects, by simulating forward and reverse conversions.
  • the configuration dependency unit is configured to establish, according to the type of the configuration module, a subdirectory of the JAR package that matches each type of configuration module, and a mapping relationship of the JAR package involved in the test.
  • the device further includes a secondary encapsulation unit, configured to perform secondary encapsulation on the JAR package matched with the configuration module by using a preset user keyword;
  • the configuration dependency unit is further configured to establish a sub-directory of the sub-packaged JAR package according to a preset user keyword, and test a mapping relationship of the involved JAR package.
  • the constructed test object includes a PO class
  • the test unit is set to,
  • the server Convert the constructed PO persistent object class to the F port class with the corresponding JAR package; call the corresponding JAR package based on the keyword of the JAR packet converted to the communication interface of the network management device and the device, and convert the completed F port. Class is converted to QX port class;
  • the QAR packet is converted into a F-port class based on the keyword of the JAR packet converted to the F-port class, and the corresponding JAR packet is called according to the keyword of the JAR packet converted to the PO port class. Convert the converted F-port class to the PO port class running test framework for testing.
  • the keyword includes a library keyword or a user keyword of the JAR package.
  • the technical solution of the present application includes: assigning a test class included in each configuration module of the service configuration test according to a preset default value policy; and correspondingly assigning a value according to each configuration module by using the MOCK method.
  • the test class builds the test object.
  • the method of the embodiment of the present invention assigns a test class included in the configuration module through a preset default value policy, thereby realizing rapid construction of the test object.
  • the test object supports the collection and the map MAP member, supports the IP address, the mask/inverse mask, and the MAC address assignment default value, and implements the automatic depth MOCK of the test.
  • FIG. 1 is a flowchart of a method for implementing a test object according to an embodiment of the present invention
  • FIG. 2 is a structural diagram of an apparatus for implementing a test object according to an embodiment of the present invention
  • FIG. 3 is a structural diagram of an apparatus for implementing a service configuration test according to an embodiment of the present invention.
  • FIG. 4 is a flow chart of a method in accordance with a first embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for constructing a test object according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:
  • Step 100 The server assigns a test class included in each configuration module according to a preset default value policy.
  • the default policy set in advance includes:
  • test class Depending on the type of test class, assign a corresponding default value to the test class contained in each configuration module; and/or,
  • the default value of the test class included in each configuration module is assigned.
  • the corresponding default value may be preset
  • the server assigns a value to each test class according to the default value policy set in advance, according to the type of the test class, and assigns a value to each test class by using the test method name, so that the MOCK test object supports the return test type. Define the behavior.
  • the default value is a preset value, so MOCK's modification of the default value is supported.
  • the test classes here include regular test classes, and new test classes in the technical application process.
  • Step 101 The server constructs a test object according to the corresponding assigned test class of each configuration module by using the MOCK method.
  • the server builds the test object through the assigned test class, which provides a basis for quickly building test objects.
  • the server Based on the annotation technique, the server reflects the type of the test class corresponding to the constructed test object, so that the constructed test object supports the collection and the map MAP member.
  • the server reflects the type of the test class, so that the test of the service configuration supports the simulation and the object of the same CLASS type by the MOCK object; further, the original MOCK method does not support the simulation of the equals() and hashcode() methods. The problem.
  • the server assigns a default value to an Internet Protocol (IP) address, a mask or an anti-mask, and a Media Access Control (MAC) address in the constructed test object; wherein, the default value is given The value of a normal String member in the test object is different.
  • IP Internet Protocol
  • MAC Media Access Control
  • the server assigns an IP address, a MAC address, a mask, and an inverse mask
  • the IP address, the MAC address, the mask, and the inverse mask are assigned according to the set string type.
  • the ordinary String member is distinguished.
  • the server passes the simulated test object and the Java archive file (JAR) package matched with the configuration module preset in the test library and the dependency relationship between the JAR packages involved in the test. Conversion and reverse conversion are tested.
  • JAR Java archive file
  • the server performs end-to-end testing according to the pre-configured dependencies in the test library.
  • the method of constructing the test object by using the MOCK technology in the related art saves the time spent on constructing the test object and improves the test efficiency.
  • the tested test objects include PO classes
  • the forward conversion includes:
  • the server calls the corresponding JAR package according to the keyword in the JAR package of the communication interface (F port) class converted to the network management client and the server, and converts the constructed persistent object (PO) class to the F port class;
  • the keywords in the JAR package of the communication interface (QX port) of the network management device and the device are called to call the corresponding JAR package, and the converted F port class is converted into a QX port class;
  • Reverse conversion includes:
  • the server calls the corresponding JAR package based on the keyword of the JAR package converted to the F-port class, and converts the converted QX port class into a F-port class; and calls the corresponding JAR packet according to the keyword of the JAR packet converted to the PO port class, Convert the converted F-port class to a PO port class;
  • the method further includes:
  • the server establishes a subdirectory of the JAR package that matches each type of configuration module, and a mapping relationship between the JAR packages involved in the test.
  • the method before testing by simulating forward conversion and reverse conversion, the method further includes:
  • the server performs secondary encapsulation on the JAR package with a preset user keyword
  • the server configures the dependencies through pre-set user keywords.
  • the specific encapsulation of the JAR packet by the server may be implemented by using a well-known technology of the present invention, and is not intended to limit the scope of the present invention, and details are not described herein again.
  • the keyword that invokes the JAR packet may be a library key of the JAR package or a user keyword of the secondary encapsulation.
  • the specific types of keywords are mainly based on whether or not the secondary encapsulation is performed, and the usage habits of the technical personnel on the library keywords and the user keywords.
  • the general user keywords are keywords defined by the technician according to the usage habits, and are convenient to be based on and edited. Test text usage.
  • the method of the embodiment of the present invention further includes: configuring, by the server, the environment variable of the running test framework according to the location of the test library.
  • the running test framework in addition to setting the environment variable according to the location of the test library, also includes settings of other related parameters, which are common knowledge of those skilled in the art.
  • the embodiment of the present invention does not depend on the operating environment of the network management system by configuring the dependency relationship and editing the test text of the test object constructed based on the dependency relationship. Because the service configuration test is not dependent on the operating environment, the performance requirements of the service configuration test on the test system are reduced. The hardware requirements for testing are greatly reduced.
  • the method of the embodiment of the present invention assigns a test class included in the configuration module through a preset default value policy, thereby realizing rapid construction of the test object.
  • the test object supports the collection and the map MAP member, supports the IP address, the mask/inverse mask, and the MAC type assignment default value, and implements the automatic depth MOCK of the test. Only the keywords need to be tested end-to-end. Compared with the existing test object construction method, the time spent on building the test object is greatly saved, and the test efficiency is improved.
  • the testing process does not depend on the operating environment of the network management. Reduce the hardware requirements of the service configuration, making business configuration testing easier to implement.
  • Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
  • FIG. 2 is a structural diagram of an apparatus for implementing a test object according to an embodiment of the present invention. As shown in FIG. 2, the method includes: a first assignment unit and a construction unit;
  • the first assignment unit is configured to assign a test class included in each configuration module according to a preset default value policy
  • the building unit is set to build the test object according to the corresponding evaluation class of each configuration module through the MOCK method.
  • the first assignment unit is configured to assign a corresponding default value to the test class included in each configuration module according to the type of the test class; and/or according to the method name of the test class. For each test module, the test class is assigned a default value, and the test class contained in each configuration module is assigned.
  • the building unit is set to build the test object according to the corresponding evaluation class of each configuration module through the MOCK method.
  • the apparatus of the embodiment of the present invention further includes a reflection unit configured to reflect the type of the test class corresponding to the constructed test object based on an annotation technique, so that the constructed test object supports the collection and the map MAP member.
  • the apparatus of the embodiment of the present invention further includes a second evaluation unit configured to assign a default value to the Internet Protocol IP address, the mask or the reverse mask, and the media access control MAC address in the constructed test object based on the Annotation technology.
  • FIG. 3 is a structural diagram of an apparatus for implementing a service configuration test according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes: any one of the foregoing apparatus for implementing a test object.
  • the method further includes: configuring a dependency unit, and setting a dependency between a Java archive file JAR package matching the configuration module and a JAR package involved in the test;
  • the test unit set to test based on dependencies and built test objects, by simulating forward and reverse conversions.
  • the configuration dependency unit is configured to establish a subdirectory of the JAR package matching each type of configuration module according to the type of the configuration module, and the test involves The mapping relationship of JAR packages.
  • the device of the embodiment of the present invention further includes a secondary encapsulation unit, configured to perform secondary encapsulation on the JAR packet matched with the configuration module by using a preset user keyword;
  • the configuration dependency unit is configured to establish a sub-directory of the sub-packaged JAR package according to a preset user keyword, and a mapping relationship of the JAR package involved in the test.
  • the built test object includes a PO class, and the test unit is set to test the test object of the test object constructed by the dependency configuration configured by each configuration module, and the edited test text is
  • the corresponding JAR package is called, and the constructed PO persistent object class is converted into the F port class; based on the communication interface QX converted into the network management device and the device
  • the keyword of the JAR package of the mouth class calls the corresponding JAR package, and converts the converted F port class into a QX port class;
  • the corresponding JAR package is called based on the keyword of the JAR package converted to the F-port class, and the converted QX port class is converted into the F-port class; the corresponding JAR package is called according to the keyword of the JAR package converted to the PO port class, The converted F-port class is converted to a PO port class.
  • Keywords include library keywords or user keywords for JAR packages.
  • the test is implemented by comparing whether the PO class before the forward conversion and the PO class after the reverse conversion are the same. If they are the same, it indicates that the forward conversion and the reverse conversion process are accurate, and if they are not the same, the forward direction is indicated. The conversion or reverse conversion process is not accurate.
  • the user in the embodiment sorts the JAR packets in the test library according to the type of the service configuration, the type of each configuration module, and the JAR package in the subdirectory.
  • the JAR package is secondarily packaged, and the test text is edited by the user keyword of the secondary package.
  • the server assigns the test class of the configuration module by default value measurement, builds the test object according to the assignment of the test class, and performs service configuration test based on the edited test text of the test object
  • FIG. 4 is the first implementation of the present invention.
  • the method flow chart of the example, as shown in FIG. 4, includes:
  • Step 400 Assign a test class to the test module by using a default value measurement, and construct a test object according to the assignment of the test class. It is assumed here that the type of the test class is A, and the test class of type A is assigned according to the default value test set by the technician, and the test object constructed includes item 1 (obj1).
  • the tester collects and sorts according to the test library, processes the JAR package by the second package, sets the environment variables of the test framework, and runs the built test object in the test framework, specifically including forward conversion and reverse conversion; wherein, the forward conversion Including step 401 and step 402, the reverse conversion includes steps 403 and 404; specifically,
  • Step 401 Convert the test object to be converted into a FAR class JAR package by editing the test text, and convert the constructed test object into a F port class;
  • the constructed test object is a PO port class, which is assumed to be named Obj1, assuming that the generated F-port class is named Fobj1; specifically,
  • the JAR package converted to the F-port class is called by the user keyword. If the secondary package does not perform secondary encapsulation on the JAR package, the library keyword is used for calling. Of course, when the test file is edited, the library key is also used. Words are edited.
  • Step 402 Calling the F-port class that converts the conversion into a JAR packet of the QX port class, and converting the F-port class into a QX port class;
  • Reverse conversion includes:
  • Step 403 Convert the QX port class that has been converted into a JAR packet of the F port class, and convert the QX port class into a F port class; here, in order to distinguish from the F port class generated by the forward conversion, assume the generated reverse direction
  • the F-port class generated by the conversion is named Fobj2;
  • Step 404 The F port class that converts the conversion is converted into a JAR package of the PO port class, and the F port class is converted into a PO port class; and the PO port class generated by the reverse conversion is named as obj2.
  • the service configuration test is determined by the comparison between obj1 and obj2. If the content of obj1 and obj2 is the same, the service configuration is successful. If the content is inconsistent, the test fails.
  • the parameters including the default value policy assignment of the embodiment of the present invention are compared.
  • the change of other conventional parameters in the running process can determine the location where the error occurs in the test, and the method for analyzing the test log is a conventional technical means of those skilled in the art, and details are not described herein again.
  • each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program in a storage and a memory by a processor. / instruction to achieve its corresponding function.
  • the invention is not limited to any specific form of combination of hardware and software.
  • the method of the embodiment of the invention realizes the rapid construction of the test object, and further, realizes the automatic depth MOCK of the test.

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)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A method and apparatus for implementation of test object construction, and a service configuration test apparatus, the method comprising: according to a pre-set default value policy, assigning a value to a test class contained in each configuration module of a service configuration test; and by means of a MOCK method, constructing a test object according to a test class with a corresponding assigned value of each configuration module.

Description

实现构建测试对象的方法、装置及业务配置测试的装置Method, device and service configuration test device for realizing test object 技术领域Technical field
本文涉及但不限于界面测试技术,尤指一种实现构建测试对象的方法、装置及业务配置测试的装置。This document refers to, but is not limited to, interface testing technology, especially a device, a device and a service configuration test device for implementing a test object.
背景技术Background technique
网管上的业务配置通常包含配置、上载及页面展示三个部分;其中,配置(包括下载)是指在网管客户端图形用户界面(GUI,Graphical User Interface)针对一个业务配置好相应的参数并保存,数据进入服务端,通过服务端把数据下发到设备上去,如果成功则进行数据入库。上载是指:读取入库的数据,在设备上将数据进行配置后,进行持久化处理。界面展示是指:根据数据持久化处理,在客户端GUI界面上进行界面展示。The configuration of the service on the U2000 usually includes three parts: configuration, upload, and page display. The configuration (including download) means that the corresponding parameters are configured and saved for a service in the GUI (Graphical User Interface). The data enters the server, and the data is sent to the device through the server. If successful, the data is stored in the database. Uploading means reading the data in the library and configuring the data on the device for persistence. The interface display means: according to the data persistence processing, the interface is displayed on the client GUI interface.
目前,针对业务配置的测试主要是采用QTP(Mercury公司开发的一种自动测试工具)等工具进行,业务配置的测试依赖于网管运行环境,且只适合在界面相对稳定的情况下使用,而在界面变化较大的情况下,需要测试人员根据界面变化进行脚本修改,测试过程的维护工作量相当大,测试效率低。At present, the test for service configuration is mainly carried out by using tools such as QTP (an automatic test tool developed by Mercury). The test of service configuration depends on the network management environment and is only suitable for use when the interface is relatively stable. When the interface changes greatly, the tester needs to modify the script according to the interface change. The maintenance work of the test process is quite large, and the test efficiency is low.
从另外一个角度,网管上业务配置的配置模块开发都有着相同的流程,所以网管通过自己的框架来体现这种雷同,开发人员按照这种框架提供必要的数据就能完成一个配置模块的开发。这种开发模式下开发人员提供的数据由于框架在配置模块开发中参与了配置模块的处理,因此无法直接串联在一起进行直接测试;因此针对配置模块的测试实际上变成了单元测试。From another point of view, the configuration of the configuration module of the business configuration on the network management has the same process, so the network management reflects this similarity through its own framework, and the developer can complete the development of a configuration module by providing the necessary data according to the framework. The data provided by the developer in this development mode is not directly connected to the direct test because the framework participates in the configuration module in the development of the configuration module; therefore, the test for the configuration module actually becomes unit test.
要想实现对配置模块的端到端测试,需要花费大量的时间用于测试对象的构建。其中一种方法是采用模拟(MOCK)技术(MOCK技术就是在测试过程中,对于某些不容易构造或者不容易获取的对象,用一个虚拟的对象来创建以便测试的测试方法)进行测试对象的构建,相关技术中,开源MOCK技术存在功能缺失,使得构建测试对象过程复杂,尤其在构建测试对象时,相关技术中不支持自动的深度MOCK,例如、MOCK测试对象不支持依据返回测试类型来定义行为,不支持模拟和被MOCK对象具有相同CLASS类 型的对象,不支持equals()和hashcode()方法的模拟,不能区别对待同样是String类型的IP地址、MAC地址、掩码、反掩码和普通的String成员、不支持MOCK对默认值的修改。由于不支持自动的深度MOCK,业务配置的测试可能出现无法运行的问题,例如现有的IP地址不能区分普通的String成员,就会导致测试框架无法运行。To achieve end-to-end testing of configuration modules, it takes a lot of time to test the construction of objects. One of the methods is to use the analog (MOCK) technology (MOCK technology is used in the test process, for some objects that are not easy to construct or not easy to obtain, use a virtual object to create a test method for testing) In the related technology, the open source MOCK technology has the function missing, which makes the process of building the test object complex. Especially when building the test object, the related technology does not support the automatic deep MOCK. For example, the MOCK test object does not support the definition according to the return test type. Behavior, does not support simulation and has the same CLASS class as MOCK object Type object, does not support the simulation of equals() and hashcode() methods. It cannot distinguish between IP addresses, MAC addresses, masks, anti-masks and ordinary String members that are also of type String, and does not support MOCK for default values. modify. Since the automatic deep MOCK is not supported, the test of the service configuration may be inoperable. For example, the existing IP address cannot distinguish the ordinary String member, and the test framework cannot be run.
综上,相关技术中,采用MOCK技术进行测试对象构建的方法,需要花费大量的时间,效率低下;另外,相关的MOCK技术,不支持自动的深度MOCK容易影响测试框架无法运行。In summary, in the related art, the method of constructing test objects by using MOCK technology takes a lot of time and is inefficient; in addition, the related MOCK technology does not support automatic deep MOCK, which easily affects the inability of the test framework to run.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供一种实现构建测试对象的方法、装置及业务配置测试的装置,能够快速的实现测试对象的构建。The embodiment of the invention provides a device, a device and a service configuration test device for implementing a test object, which can quickly realize the construction of a test object.
本发明实施例提供了一种实现构建测试对象的方法,包括:An embodiment of the present invention provides a method for implementing a test object, including:
服务器根据预先设置的默认值策略,对业务配置测试的每一个配置模块所包含的测试类进行赋值;The server assigns a test class included in each configuration module of the service configuration test according to a preset default value policy;
服务器通过MOCK方法,依据每一个配置模块相应的赋值的测试类构建测试对象。The server builds the test object according to the corresponding evaluation class of each configuration module through the MOCK method.
可选地,预先设置的默认值策略包括:Optionally, the preset default value policy includes:
根据测试类的类型不同,为每一个配置模块所包含的测试类赋相应的默认值;和/或,Depending on the type of test class, assign a corresponding default value to the test class contained in each configuration module; and/or,
根据测试类的方法名不同,为每一个配置模块所包含的测试类赋相应的默认值;According to the method name of the test class, the test class included in each configuration module is assigned a corresponding default value;
所述测试类包括常规的测试类和新建的测试类。The test class includes a conventional test class and a new test class.
可选地,该方法还包括:Optionally, the method further includes:
服务器基于注释Annotation技术,对构建的测试对象对应的测试类的类型进行反射,使所述构建的测试对象支持集合和地图MAP成员。 Based on the annotation Annotation technique, the server reflects the type of the test class corresponding to the constructed test object, so that the constructed test object supports the collection and the map MAP member.
可选地,该方法还包括:Optionally, the method further includes:
服务器基于Annotation技术,对构建的测试对象中的互联网协议IP地址、掩码或反掩码、媒体访问控制MAC地址赋值默认值。Based on the Annotation technology, the server assigns a default value to the Internet Protocol IP address, mask or reverse mask, and media access control MAC address in the constructed test object.
可选地,该方法还包括:Optionally, the method further includes:
服务器构建完测试对象后,所述服务器根据构建的测试对象,以及测试库中预先设置的与配置模块相匹配的Java归档文件JAR包和进行测试涉及的JAR包之间的依赖关系,服务器通过模拟顺向转换和逆向转换进行测试。After the server builds the test object, the server passes the simulation test object, and the Java archive file JAR package matched with the configuration module preset in the test library and the dependency relationship between the JAR packages involved in the test, and the server passes the simulation. Forward conversion and reverse conversion are tested.
可选地,通过模拟顺向转换和逆向转换运进行测试之前还包括:Optionally, before testing by simulating forward and reverse conversion, it also includes:
所述服务器建立与每一种类配置模块相匹配的JAR包的子目录,和测试涉及的JAR包的映射关系。The server establishes a subdirectory of the JAR package that matches each type of configuration module, and a mapping relationship of the JAR package involved in the test.
可选地,在所述通过模拟顺向转换和逆向转换进行测试之前还包括:Optionally, before the testing by the analog forward conversion and the reverse conversion, the method further includes:
服务器对所述JAR包以预先设定的用户关键字进行二次封装;The server performs secondary encapsulation on the JAR package with a preset user keyword;
服务器通过预先设定的用户关键字进行所述依赖关系的配置。The server performs the configuration of the dependency through a preset user keyword.
可选地,构建的测试对象包括PO类,所述顺向转换包括:Optionally, the constructed test object includes a PO class, and the forward conversion includes:
服务器根据转换为网管客户端和服务端的通讯接口F口类的JAR包的关键字调用相应的JAR包,将构建的持久化对象PO类转换为F口类;基于转换为网管和设备的通讯接口QX口类的JAR包的关键字调用相应的JAR包,将转换完成的F口类转换为QX口类;The server calls the corresponding JAR package according to the keyword of the JAR package converted to the communication interface F port type of the network management client and the server, and converts the constructed persistent object PO class into the F port class; based on the communication interface converted into the network management device and the device The keyword of the JAR packet of the QX port class calls the corresponding JAR package, and converts the converted F port class into a QX port class;
所述逆向转换包括:The reverse conversion includes:
服务器基于转换为F口类的JAR包的关键字调用相应的JAR包,将转换完成的所述QX口类转换为F口类;根据转换为PO口类的JAR包的关键字调用相应的JAR包,将转换完成的F口类转换为PO口类;The server calls the corresponding JAR package based on the keyword of the JAR package converted to the F-port class, and converts the converted QX port class into a F-port class; and calls the corresponding JAR according to the keyword of the JAR package converted to the PO port class. The package converts the converted F-port class into a PO port class;
所述关键字包括JAR包的库关键字或用户关键字。The keyword includes a library keyword or a user keyword of the JAR package.
另一方面,本发明实施例还提供一种实现构建测试对象的装置,包括:第一赋值单元和构建单元;其中,On the other hand, an embodiment of the present invention further provides an apparatus for implementing a test object, including: a first evaluation unit and a construction unit; wherein
第一赋值单元,设置为根据预先设置的默认值策略,对每一个配置模块所包含的测试类进行赋值; The first assignment unit is configured to assign a test class included in each configuration module according to a preset default value policy;
构建单元,设置为通过MOCK方法,依据每一个配置模块相应的赋值的测试类构建测试对象。The building unit is set to build the test object according to the corresponding evaluation class of each configuration module through the MOCK method.
可选地,第一赋值单元是设置为,根据测试类的类型不同,为每一个配置模块所包含的测试类赋相应的默认值;和/或,根据测试类的方法名不同,为每一个配置模块所包含的测试类赋相应的默认值。Optionally, the first assignment unit is configured to assign a default value to the test class included in each configuration module according to the type of the test class; and/or, according to the method name of the test class, for each The test class contained in the configuration module is assigned the corresponding default value.
可选地,该装置还包括反射单元,设置为基于注释Annotation技术,对构建的测试对象对应的测试类的类型进行反射,使所述构建的测试对象支持集合和地图MAP成员。Optionally, the apparatus further includes a reflection unit configured to reflect the type of the test class corresponding to the constructed test object based on the annotation Annotation technique, so that the constructed test object supports the collection and the map MAP member.
可选地,该装置还包括第二赋值单元,设置为基于Annotation技术,对构建的测试对象中的互联网协议IP地址、掩码或反掩码、媒体访问控制MAC地址赋值默认值。Optionally, the apparatus further includes a second evaluation unit configured to assign a default value to the Internet Protocol IP address, the mask or the reverse mask, and the media access control MAC address in the constructed test object based on the Annotation technology.
本发明实施例还提出了一种计算机可读存储介质,存储有计算机可执行指令,计算机可执行指令用于执行上述描述的任意一个方法。Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
再一方面,本发明实施例还提供一种实现业务配置测试的装置,包括:上述所述的任意一个实现构建测试对象的装置中的所有模块,还包括:In a further aspect, the embodiment of the present invention further provides an apparatus for implementing a service configuration test, including: any one of the foregoing modules for implementing a test object, and the method further includes:
配置依赖关系单元,设置为预先设置与配置模块相匹配的Java归档文件JAR包和进行测试涉及的JAR包之间的依赖关系;Configuring a dependency unit, configured to preset a dependency between a Java Archive JAR package matching the configuration module and a JAR package involved in the test;
测试单元,设置为根据依赖关系和构建的测试对象,通过模拟顺向转换和逆向转换进行测试。The test unit, set to test based on dependencies and built test objects, by simulating forward and reverse conversions.
可选地,配置依赖关系单元是设置为,根据配置模块种类的不同,建立与每一种类配置模块相匹配的JAR包的子目录,和测试涉及的JAR包的映射关系。Optionally, the configuration dependency unit is configured to establish, according to the type of the configuration module, a subdirectory of the JAR package that matches each type of configuration module, and a mapping relationship of the JAR package involved in the test.
可选地,该装置还包括二次封装单元,设置为对与配置模块相匹配的JAR包以预先设定的用户关键字进行二次封装;Optionally, the device further includes a secondary encapsulation unit, configured to perform secondary encapsulation on the JAR package matched with the configuration module by using a preset user keyword;
所述配置依赖关系单元还设置为,根据预先设定的用户关键字建立二次封装后的JAR包的子目录,和测试涉及的JAR包的映射关系。The configuration dependency unit is further configured to establish a sub-directory of the sub-packaged JAR package according to a preset user keyword, and test a mapping relationship of the involved JAR package.
可选地,构建的测试对象包括PO类,所述测试单元是设置为,Optionally, the constructed test object includes a PO class, and the test unit is set to,
根据转换为网管客户端和服务端的通讯接口F口类的JAR包的关键字调 用相应的JAR包,将构建的PO持久化对象类转换为F口类;基于转换为网管和设备的通讯接口QX口类的JAR包的关键字调用相应的JAR包,将转换完成的F口类转换为QX口类;According to the keyword conversion of the JAR package of the F interface of the communication interface converted to the network management client and the server Convert the constructed PO persistent object class to the F port class with the corresponding JAR package; call the corresponding JAR package based on the keyword of the JAR packet converted to the communication interface of the network management device and the device, and convert the completed F port. Class is converted to QX port class;
基于转换为F口类的JAR包的关键字调用相应的JAR包,将转换完成的所述QX口类转换为F口类;根据转换为PO口类的JAR包的关键字调用相应的JAR包,将转换完成的F口类转换为PO口类运行测试框架进行测试,The QAR packet is converted into a F-port class based on the keyword of the JAR packet converted to the F-port class, and the corresponding JAR packet is called according to the keyword of the JAR packet converted to the PO port class. Convert the converted F-port class to the PO port class running test framework for testing.
所述关键字包括JAR包的库关键字或用户关键字。The keyword includes a library keyword or a user keyword of the JAR package.
与相关技术相比,本申请技术方案包括:根据预先设置的默认值策略,对业务配置测试的每一个配置模块所包含的测试类进行赋值;通过MOCK方法,依据每一个配置模块相应的赋值的测试类构建测试对象。本发明实施例的方法通过预先设置的默认值策略对配置模块包含的测试类进行赋值,实现了测试对象的快速构建。Compared with the related art, the technical solution of the present application includes: assigning a test class included in each configuration module of the service configuration test according to a preset default value policy; and correspondingly assigning a value according to each configuration module by using the MOCK method. The test class builds the test object. The method of the embodiment of the present invention assigns a test class included in the configuration module through a preset default value policy, thereby realizing rapid construction of the test object.
进一步地,通过注释技术,使测试对象支持集合和地图MAP成员,支持IP地址、掩码/反掩码、MAC地址赋值默认值,实现了测试的自动深度MOCK。Further, through the annotation technology, the test object supports the collection and the map MAP member, supports the IP address, the mask/inverse mask, and the MAC address assignment default value, and implements the automatic depth MOCK of the test.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1为本发明实施例实现构建测试对象的方法的流程图;FIG. 1 is a flowchart of a method for implementing a test object according to an embodiment of the present invention;
图2为本发明实施例实现构建测试对象的装置的结构程图;2 is a structural diagram of an apparatus for implementing a test object according to an embodiment of the present invention;
图3为本发明实施例实现业务配置测试的装置的结构程图;3 is a structural diagram of an apparatus for implementing a service configuration test according to an embodiment of the present invention;
图4为本发明第一实施例的方法流程图。4 is a flow chart of a method in accordance with a first embodiment of the present invention.
本发明的实施方式Embodiments of the invention
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。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.
图1为本发明实施例实现构建测试对象的方法的流程图,如图1所示,包括: FIG. 1 is a flowchart of a method for constructing a test object according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:
步骤100、服务器根据预先设置的默认值策略,对每一个配置模块所包含的测试类进行赋值。Step 100: The server assigns a test class included in each configuration module according to a preset default value policy.
本步骤中,预先设置的默认值策略包括:In this step, the default policy set in advance includes:
根据测试类的类型不同,为每一个配置模块所包含的测试类赋相应的默认值;和/或,Depending on the type of test class, assign a corresponding default value to the test class contained in each configuration module; and/or,
根据测试类的方法名不同,为每一个配置模块所包含的测试类赋相应的默认值。According to the method name of the test class, the default value of the test class included in each configuration module is assigned.
其中,对于基础数据类型的测试类,可以预先设置对应的默认值;Wherein, for the test class of the basic data type, the corresponding default value may be preset;
对于复杂类型的测试类,可以通过MOCK进行赋值。For complex types of test classes, you can assign them via MOCK.
需要说明的是,服务器通过预先设置的默认值策略,根据测试类的类型不同进行默认值赋值和通过测试类方法名的不同为每一个测试类赋值,使MOCK测试对象支持依据返回测试类类型来定义行为。默认值为预先设定的数值,因此支持MOCK对默认值的修改。另外,这里测试类包含常规的测试类,和技术应用过程中新增的测试类。It should be noted that the server assigns a value to each test class according to the default value policy set in advance, according to the type of the test class, and assigns a value to each test class by using the test method name, so that the MOCK test object supports the return test type. Define the behavior. The default value is a preset value, so MOCK's modification of the default value is supported. In addition, the test classes here include regular test classes, and new test classes in the technical application process.
步骤101、服务器通过MOCK方法,依据每一个配置模块相应的赋值的测试类构建测试对象。Step 101: The server constructs a test object according to the corresponding assigned test class of each configuration module by using the MOCK method.
需要说明的是,服务器通过赋值的测试类进行测试对象的构建,为快速构建测试对象提供了基础。It should be noted that the server builds the test object through the assigned test class, which provides a basis for quickly building test objects.
本发明实施例方法还包括:The method of the embodiment of the invention further includes:
服务器基于注释(Annotation)技术,对构建的测试对象对应的测试类的类型进行反射,使构建的测试对象支持集合和地图MAP成员。Based on the annotation technique, the server reflects the type of the test class corresponding to the constructed test object, so that the constructed test object supports the collection and the map MAP member.
其中,具体如何对测试类的类型进行反射可以采用本领域技术人员的熟知技术实现,并不用于限定本发明的保护范围,这里不再赘述。The specific reflection of the type of the test class can be implemented by using the well-known technology of the person skilled in the art, and is not intended to limit the scope of the present invention, and details are not described herein again.
服务器通过对测试类的类型进行反射,使业务配置的测试支持模拟和被MOCK对象具有相同CLASS类型的对象;进一步的,解决了原有的MOCK方式不支持equals()和hashcode()方法的模拟的问题。The server reflects the type of the test class, so that the test of the service configuration supports the simulation and the object of the same CLASS type by the MOCK object; further, the original MOCK method does not support the simulation of the equals() and hashcode() methods. The problem.
本发明实施例方法还包括: The method of the embodiment of the invention further includes:
服务器基于Annotation技术,对构建的测试对象中的互连网协议(IP,InternetProtocol)地址、掩码或反掩码、媒体访问控制(MAC,Media Access Control)地址赋值默认值;其中,赋予的默认值与测试对象中的普通的String成员的值不同。Based on the Annotation technology, the server assigns a default value to an Internet Protocol (IP) address, a mask or an anti-mask, and a Media Access Control (MAC) address in the constructed test object; wherein, the default value is given The value of a normal String member in the test object is different.
需要说明的是,服务器通过对IP地址、MAC地址、掩码、反掩码的赋值处理,使IP地址、MAC地址、掩码、反掩码按照设定的字符串类型进行赋值后,可以和普通的String成员进行区分。It should be noted that after the server assigns an IP address, a MAC address, a mask, and an inverse mask, the IP address, the MAC address, the mask, and the inverse mask are assigned according to the set string type. The ordinary String member is distinguished.
本发明实施例方法还包括:The method of the embodiment of the invention further includes:
构建完测试对象后,服务器根据构建的测试对象,以及测试库中预先设置的与配置模块相匹配的Java归档文件(JAR)包和进行测试涉及的JAR包之间的依赖关系,通过模拟顺向转换和逆向转换进行测试。After the test object is built, the server passes the simulated test object and the Java archive file (JAR) package matched with the configuration module preset in the test library and the dependency relationship between the JAR packages involved in the test. Conversion and reverse conversion are tested.
需要说明的是,在通过MOCK技术构建测试对象之后,服务器根据测试库中预先配置的依赖关系进行端对端的测试。与相关技术中采用MOCK技术进行测试对象构建的方法,节省了构建测试对象上耗费的时间,提高了测试效率。It should be noted that after the test object is built by the MOCK technology, the server performs end-to-end testing according to the pre-configured dependencies in the test library. The method of constructing the test object by using the MOCK technology in the related art saves the time spent on constructing the test object and improves the test efficiency.
本步骤中,构建的测试对象包括PO类,顺向转换包括:In this step, the tested test objects include PO classes, and the forward conversion includes:
服务器根据转换为网管客户端和服务端的通讯接口(F口)类的JAR包中的关键字调用相应的JAR包,将构建的持久化对象(PO,Persistence Object)类转换为F口类;基于转换为网管和设备的通讯接口(QX口)类的JAR包中的关键字调用相应的JAR包,将转换完成的F口类转换为QX口类;The server calls the corresponding JAR package according to the keyword in the JAR package of the communication interface (F port) class converted to the network management client and the server, and converts the constructed persistent object (PO) class to the F port class; The keywords in the JAR package of the communication interface (QX port) of the network management device and the device are called to call the corresponding JAR package, and the converted F port class is converted into a QX port class;
逆向转换包括:Reverse conversion includes:
服务器基于转换为F口类的JAR包的关键字调用相应的JAR包,将转换完成的QX口类转换为F口类;根据转换为PO口类的JAR包的关键字调用相应的JAR包,将转换完成的F口类转换为PO口类;The server calls the corresponding JAR package based on the keyword of the JAR package converted to the F-port class, and converts the converted QX port class into a F-port class; and calls the corresponding JAR packet according to the keyword of the JAR packet converted to the PO port class, Convert the converted F-port class to a PO port class;
上述通过模拟顺向转换和逆向转换进行测试,而不需要直接调用网管上的顺向转换和逆向转换,简单地实现了测试。The above tests are performed by simulating forward conversion and reverse conversion, and the test is simply implemented without directly calling the forward conversion and the reverse conversion on the network management.
本发明实施例方法之前还包括: Before the method of the embodiment of the present invention, the method further includes:
服务器建立与每一种类配置模块相匹配的JAR包的子目录,和测试涉及的JAR包之间的映射关系。The server establishes a subdirectory of the JAR package that matches each type of configuration module, and a mapping relationship between the JAR packages involved in the test.
本发明实施例方法中,在通过模拟顺向转换和逆向转换进行测试之前还包括:In the method of the embodiment of the present invention, before testing by simulating forward conversion and reverse conversion, the method further includes:
服务器对JAR包以预先设定的用户关键字进行二次封装;The server performs secondary encapsulation on the JAR package with a preset user keyword;
服务器通过预先设定的用户关键字进行依赖关系的配置。The server configures the dependencies through pre-set user keywords.
其中,服务器具体如何对JAR包进行二次封装可以采用本领域技术人员的熟知技术实现,并不用于限定本发明的保护范围,这里不再赘述。The specific encapsulation of the JAR packet by the server may be implemented by using a well-known technology of the present invention, and is not intended to limit the scope of the present invention, and details are not described herein again.
在顺向转换和逆向转换过程中,调用JAR包的关键字可以是JAR包的库关键字或二次封装的用户关键字。具体采用关键字的种类主要依据是否进行了二次封装,以及技术人员对库关键字和用户关键字的使用习惯,一般的用户关键字是技术人员根据使用习惯定义的关键字,方便基于和编辑测试文本使用。In the forward conversion and reverse conversion processes, the keyword that invokes the JAR packet may be a library key of the JAR package or a user keyword of the secondary encapsulation. The specific types of keywords are mainly based on whether or not the secondary encapsulation is performed, and the usage habits of the technical personnel on the library keywords and the user keywords. The general user keywords are keywords defined by the technician according to the usage habits, and are convenient to be based on and edited. Test text usage.
依赖关系配置完成后,本发明实施例方法还包括,服务器根据测试库的位置,配置运行测试框架的环境变量。After the dependency configuration is completed, the method of the embodiment of the present invention further includes: configuring, by the server, the environment variable of the running test framework according to the location of the test library.
需要说明的是,处理根据测试库的位置设置环境变量外,运行测试框架还包含有其他相关参数的设置,属于本领域技术人员的公知常识。本发明实施例通过配置依赖关系,和基于依赖关系进行构建的测试对象的测试文本的编辑,测试过程不依赖与网管的运行环境。由于不依赖运行环境进行业务配置测试,降低了业务配置测试对测试系统的性能要求。使测试的硬件要求大大降低。It should be noted that, in addition to setting the environment variable according to the location of the test library, the running test framework also includes settings of other related parameters, which are common knowledge of those skilled in the art. The embodiment of the present invention does not depend on the operating environment of the network management system by configuring the dependency relationship and editing the test text of the test object constructed based on the dependency relationship. Because the service configuration test is not dependent on the operating environment, the performance requirements of the service configuration test on the test system are reduced. The hardware requirements for testing are greatly reduced.
本发明实施例方法通过预先设置的默认值策略对配置模块包含的测试类进行赋值,实现了测试对象的快速构建。进一步地,通过注释技术,使测试对象支持集合和地图MAP成员,支持IP地址、掩码/反掩码、MAC类型赋值默认值,实现了测试的自动深度MOCK。只需要进行关键字进行端对端的测试驱动。与现有的测试对象构建的方法相比,大大节省了构建测试对象上耗费的时间,提高了测试效率。测试过程不依赖与网管的运行环境。降低了业务配置的硬件要求,使业务配置测试更加容易实现。 The method of the embodiment of the present invention assigns a test class included in the configuration module through a preset default value policy, thereby realizing rapid construction of the test object. Further, through the annotation technology, the test object supports the collection and the map MAP member, supports the IP address, the mask/inverse mask, and the MAC type assignment default value, and implements the automatic depth MOCK of the test. Only the keywords need to be tested end-to-end. Compared with the existing test object construction method, the time spent on building the test object is greatly saved, and the test efficiency is improved. The testing process does not depend on the operating environment of the network management. Reduce the hardware requirements of the service configuration, making business configuration testing easier to implement.
本发明实施例还提出了一种计算机可读存储介质,存储有计算机可执行指令,计算机可执行指令用于执行上述描述的任意一个方法。Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
图2为本发明实施例实现构建测试对象的装置的结构程图,如图2所示,包括:第一赋值单元和构建单元;其中,2 is a structural diagram of an apparatus for implementing a test object according to an embodiment of the present invention. As shown in FIG. 2, the method includes: a first assignment unit and a construction unit;
第一赋值单元,设置为根据预先设置的默认值策略,对每一个配置模块所包含的测试类进行赋值;The first assignment unit is configured to assign a test class included in each configuration module according to a preset default value policy;
构建单元,设置为通过MOCK方法,依据每一个配置模块相应的赋值的测试类构建测试对象。The building unit is set to build the test object according to the corresponding evaluation class of each configuration module through the MOCK method.
本发明实施例的装置中,第一赋值单元是设置为,根据测试类的类型不同,为每一个配置模块所包含的测试类赋相应的默认值;和/或,根据测试类的方法名不同,为每一个配置模块所包含的测试类赋相应的默认值,对每一个配置模块所包含的测试类进行赋值。In the apparatus of the embodiment of the present invention, the first assignment unit is configured to assign a corresponding default value to the test class included in each configuration module according to the type of the test class; and/or according to the method name of the test class. For each test module, the test class is assigned a default value, and the test class contained in each configuration module is assigned.
构建单元,设置为通过MOCK方法,依据每一个配置模块相应的赋值的测试类构建测试对象。The building unit is set to build the test object according to the corresponding evaluation class of each configuration module through the MOCK method.
本发明实施例装置还包括反射单元,设置为基于注释(Annotation)技术,对构建的测试对象对应的测试类的类型进行反射,使构建的测试对象支持集合和地图MAP成员。The apparatus of the embodiment of the present invention further includes a reflection unit configured to reflect the type of the test class corresponding to the constructed test object based on an annotation technique, so that the constructed test object supports the collection and the map MAP member.
本发明实施例装置还包括第二赋值单元,设置为基于Annotation技术,对构建的测试对象中的互联网协议IP地址、掩码或反掩码、媒体访问控制MAC地址赋值默认值。The apparatus of the embodiment of the present invention further includes a second evaluation unit configured to assign a default value to the Internet Protocol IP address, the mask or the reverse mask, and the media access control MAC address in the constructed test object based on the Annotation technology.
图3为本发明实施例实现业务配置测试的装置的结构程图,如图3所示,包括:上述任意一个实现构建测试对象的装置。FIG. 3 is a structural diagram of an apparatus for implementing a service configuration test according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes: any one of the foregoing apparatus for implementing a test object.
还包括:配置依赖关系单元,设置为预先设置与配置模块相匹配的Java归档文件JAR包和进行测试涉及的JAR包之间的依赖关系;The method further includes: configuring a dependency unit, and setting a dependency between a Java archive file JAR package matching the configuration module and a JAR package involved in the test;
测试单元,设置为根据依赖关系和构建的测试对象,通过模拟顺向转换和逆向转换进行测试。The test unit, set to test based on dependencies and built test objects, by simulating forward and reverse conversions.
本发明实施例装置中,配置依赖关系单元是设置为,根据配置模块种类的不同,建立与每一种类配置模块相匹配的JAR包的子目录,和测试涉及的 JAR包的映射关系。In the apparatus of the embodiment of the present invention, the configuration dependency unit is configured to establish a subdirectory of the JAR package matching each type of configuration module according to the type of the configuration module, and the test involves The mapping relationship of JAR packages.
本发明实施例装置还包括二次封装单元,设置为对与配置模块相匹配的JAR包以预先设定的用户关键字进行二次封装;The device of the embodiment of the present invention further includes a secondary encapsulation unit, configured to perform secondary encapsulation on the JAR packet matched with the configuration module by using a preset user keyword;
配置依赖关系单元是设置为,根据预先设定的用户关键字建立二次封装后的JAR包的子目录,和测试涉及的JAR包的映射关系。The configuration dependency unit is configured to establish a sub-directory of the sub-packaged JAR package according to a preset user keyword, and a mapping relationship of the JAR package involved in the test.
构建的测试对象包括PO类,测试单元是设置为,通过每一个配置模块配置的依赖关系编辑构建的测试对象的测试文本,通过编辑的测试文本,The built test object includes a PO class, and the test unit is set to test the test object of the test object constructed by the dependency configuration configured by each configuration module, and the edited test text is
根据转换为网管客户端和服务端的通讯接口F口类的JAR包的关键字调用相应的JAR包,将构建的PO持久化对象类转换为F口类;基于转换为网管和设备的通讯接口QX口类的JAR包的关键字调用相应的JAR包,将转换完成的F口类转换为QX口类;According to the keyword of the JAR package converted to the communication interface F port class of the network management client and the server, the corresponding JAR package is called, and the constructed PO persistent object class is converted into the F port class; based on the communication interface QX converted into the network management device and the device The keyword of the JAR package of the mouth class calls the corresponding JAR package, and converts the converted F port class into a QX port class;
基于转换为F口类的JAR包的关键字调用相应的JAR包,将转换完成的QX口类转换为F口类;根据转换为PO口类的JAR包的关键字调用相应的JAR包,将转换完成的F口类转换为PO口类。The corresponding JAR package is called based on the keyword of the JAR package converted to the F-port class, and the converted QX port class is converted into the F-port class; the corresponding JAR package is called according to the keyword of the JAR package converted to the PO port class, The converted F-port class is converted to a PO port class.
关键字包括JAR包的库关键字或用户关键字。Keywords include library keywords or user keywords for JAR packages.
上述方法中,通过对比顺向转换之前的PO类和逆向转换之后的PO类是否相同来实现测试,如果相同,则表示顺向转换和逆向转换过程是准确的,如果不相同,则表示顺向转换或逆向转换过程是不准确的。In the above method, the test is implemented by comparing whether the PO class before the forward conversion and the PO class after the reverse conversion are the same. If they are the same, it indicates that the forward conversion and the reverse conversion process are accurate, and if they are not the same, the forward direction is indicated. The conversion or reverse conversion process is not accurate.
以下通过具体实施例对本发明实施例方法进行清楚详细的说明,实施例仅用于陈述本发明,并不用于限制本发明方法的保护范围。The method of the embodiments of the present invention is described in detail below by way of specific examples. The embodiments are only used to illustrate the present invention and are not intended to limit the scope of protection of the method of the present invention.
实施例1Example 1
在实施本实施例之前,本实施例用户对测试库中的JAR包按照业务配置的类型,每一个配置模块的种类等进行的目录和子目录下JAR包的整理。对JAR包进行了二次封装,通过二次封装的用户关键字进行测试文本的编辑。Before implementing the embodiment, the user in the embodiment sorts the JAR packets in the test library according to the type of the service configuration, the type of each configuration module, and the JAR package in the subdirectory. The JAR package is secondarily packaged, and the test text is edited by the user keyword of the secondary package.
服务器通过默认值测量对配置模块的测试类进行了赋值,依据测试类的赋值进行测试对象的构建,基于构建的测试对象采用编辑的测试文本进行了业务配置测试,图4为本发明第一实施例的方法流程图,如图4所示,包括: The server assigns the test class of the configuration module by default value measurement, builds the test object according to the assignment of the test class, and performs service configuration test based on the edited test text of the test object, and FIG. 4 is the first implementation of the present invention. The method flow chart of the example, as shown in FIG. 4, includes:
步骤400、通过默认值测量对配置模块的测试类进行赋值,依据测试类的赋值构建测试对象。这里假设测试类的类型为A,根据技术人员设定的默认值测试,对类型为A的测试类进行赋值,构建的测试对象包括项目1(obj1)。Step 400: Assign a test class to the test module by using a default value measurement, and construct a test object according to the assignment of the test class. It is assumed here that the type of the test class is A, and the test class of type A is assigned according to the default value test set by the technician, and the test object constructed includes item 1 (obj1).
测试人员根据测试库的收集整理,二次封装对JAR包的处理,测试框架的环境变量的设置,在测试框架中运行构建的测试对象,具体包括顺向转换和逆向转换;其中,顺向转换包括步骤401和步骤402,逆向转换包括步骤403和步骤404;具体的,The tester collects and sorts according to the test library, processes the JAR package by the second package, sets the environment variables of the test framework, and runs the built test object in the test framework, specifically including forward conversion and reverse conversion; wherein, the forward conversion Including step 401 and step 402, the reverse conversion includes steps 403 and 404; specifically,
步骤401、通过编辑的测试文本,调用将构建的测试对象转换为F口类的JAR包,将构建的测试对象转换为F口类;这里,构建的测试对象为PO口类,假设取名为obj1,假设生成的F口类取名为Fobj1;具体的,Step 401: Convert the test object to be converted into a FAR class JAR package by editing the test text, and convert the constructed test object into a F port class; here, the constructed test object is a PO port class, which is assumed to be named Obj1, assuming that the generated F-port class is named Fobj1; specifically,
转换为F口类的JAR包通过用户关键字进行调用,如果二次封装并未对该JAR包进行二次封装时,则采用库关键字进行调用,当然测试文件在编辑时,也采用库关键字进行编辑。The JAR package converted to the F-port class is called by the user keyword. If the secondary package does not perform secondary encapsulation on the JAR package, the library keyword is used for calling. Of course, when the test file is edited, the library key is also used. Words are edited.
步骤402、调用将转换完成的F口类转换为QX口类的JAR包,将F口类转换为QX口类;Step 402: Calling the F-port class that converts the conversion into a JAR packet of the QX port class, and converting the F-port class into a QX port class;
逆向转换包括:Reverse conversion includes:
步骤403、调用将转换完成的QX口类转换为F口类的JAR包,将QX口类转换为F口类;这里,为了和之前顺向转换生成的F口类进行区分,假设生成的逆向转换生成的F口类取名为Fobj2;Step 403: Convert the QX port class that has been converted into a JAR packet of the F port class, and convert the QX port class into a F port class; here, in order to distinguish from the F port class generated by the forward conversion, assume the generated reverse direction The F-port class generated by the conversion is named Fobj2;
步骤404、调用将转换完成的F口类转换为PO口类的JAR包,将F口类转换为PO口类;假设逆向转换生成的PO口类取名为obj2。Step 404: The F port class that converts the conversion is converted into a JAR package of the PO port class, and the F port class is converted into a PO port class; and the PO port class generated by the reverse conversion is named as obj2.
通过obj1和obj2比较确定业务配置测试是否成功,如果obj1和obj2内容一致,则业务配置成功,如果不一致,则测试失败,通过对比测试日志,比对包含本发明实施例默认值策略赋值的参数及其他常规参数在运行过程中的变化,可以确定测试出现错误的位置,具体对测试日志进行分析的方法,属于本领域技术人员的惯用技术手段,在此不再赘述。 The service configuration test is determined by the comparison between obj1 and obj2. If the content of obj1 and obj2 is the same, the service configuration is successful. If the content is inconsistent, the test fails. By comparing the test logs, the parameters including the default value policy assignment of the embodiment of the present invention are compared. The change of other conventional parameters in the running process can determine the location where the error occurs in the test, and the method for analyzing the test log is a conventional technical means of those skilled in the art, and details are not described herein again.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储与存储器中的程序/指令来实现其相应功能。本发明不限于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. 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, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program in a storage and a memory by a processor. / instruction to achieve its corresponding function. The invention is not limited to any specific form of combination of hardware and software.
虽然本发明所揭露的实施方式如上,但所述的内容仅为便于理解本发明而采用的实施方式,并非用以限定本发明。任何本发明所属领域内的技术人员,在不脱离本发明所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本发明的专利保护范围,仍须以所附的权利要求书所界定的范围为准。While the embodiments of the present invention have been described above, the described embodiments are merely for the purpose of understanding the invention and are not intended to limit the invention. Any modification and variation in the form and details of the embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention. The scope defined by the appended claims shall prevail.
工业实用性Industrial applicability
本发明实施例的方法实现了测试对象的快速构建,进一步地,实现了测试的自动深度MOCK。 The method of the embodiment of the invention realizes the rapid construction of the test object, and further, realizes the automatic depth MOCK of the test.

Claims (17)

  1. 一种实现构建测试对象的方法,包括:A method for implementing a test object, comprising:
    服务器根据预先设置的默认值策略,对每一个配置模块所包含的测试类进行赋值;The server assigns a test class included in each configuration module according to a preset default value policy;
    服务器通过模拟MOCK方法,依据每一个配置模块相应的赋值的测试类构建测试对象。The server builds the test object by simulating the MOCK method according to the corresponding assigned test class of each configuration module.
  2. 根据权利要求1所述的方法,其中,所述预先设置的默认值策略包括:The method of claim 1 wherein said predetermined default value policy comprises:
    根据测试类的类型不同,为每一个配置模块所包含的测试类赋相应的默认值;和/或,Depending on the type of test class, assign a corresponding default value to the test class contained in each configuration module; and/or,
    根据测试类的方法名不同,为每一个配置模块所包含的测试类赋相应的默认值;According to the method name of the test class, the test class included in each configuration module is assigned a corresponding default value;
    所述测试类包括常规的测试类和新建的测试类。The test class includes a conventional test class and a new test class.
  3. 根据权利要求2所述的方法,该方法还包括:The method of claim 2, further comprising:
    所述服务器基于注释Annotation技术,对构建的测试对象对应的测试类的类型进行反射,使所述构建的测试对象支持集合和地图MAP成员。The server reflects the type of the test class corresponding to the constructed test object based on the annotation Annotation technique, so that the constructed test object supports the set and the map MAP member.
  4. 根据权利要求1所述的方法,该方法还包括:The method of claim 1 further comprising:
    基于Annotation技术,所述服务器对构建的测试对象中的互联网协议IP地址、掩码或反掩码、媒体访问控制MAC地址赋值默认值。Based on the Annotation technology, the server assigns a default value to the Internet Protocol IP address, mask or reverse mask, and media access control MAC address in the constructed test object.
  5. 根据权利要求1~4任意一项所述的方法,该方法还包括:The method according to any one of claims 1 to 4, further comprising:
    构建完所述测试对象后,所述服务器根据构建的测试对象,以及测试库中预先设置的与配置模块相匹配的Java归档文件JAR包和进行测试涉及的JAR包之间的依赖关系,通过模拟顺向转换和逆向转换运进行测试。After the test object is constructed, the server passes the simulation according to the built test object, and the Java archive file JAR package matched with the configuration module preset in the test library and the dependency relationship between the JAR packages involved in the test. Forward conversion and reverse conversion are tested.
  6. 根据权利要求5所述的方法,还包括:The method of claim 5 further comprising:
    所述通过模拟顺向转换和逆向转换运进行测试之前,Before performing the test by simulating the forward conversion and the reverse conversion operation,
    所述服务器建立与每一种类配置模块相匹配的JAR包的子目录,和测试 涉及的JAR包的映射关系。The server establishes a subdirectory of the JAR package that matches each type of configuration module, and tests The mapping relationship of the JAR packets involved.
  7. 根据权利要求6所述的方法,还包括:The method of claim 6 further comprising:
    在所述通过模拟顺向转换和逆向转换进行测试之前,Before testing by analog forward and reverse conversion,
    所述服务器对所述JAR包以预先设定的用户关键字进行二次封装;The server performs secondary encapsulation on the JAR package with a preset user keyword;
    所述服务器通过预先设定的用户关键字进行所述依赖关系的配置。The server performs configuration of the dependency relationship through a preset user keyword.
  8. 根据权利要求5所述的方法,其中,所述构建的测试对象包括PO类,所述顺向转换包括:The method of claim 5 wherein said constructed test object comprises a PO class, said forward conversion comprising:
    所述服务器根据转换为网管客户端和服务端的通讯接口F口类的JAR包中的关键字调用相应的JAR包,将构建的持久化对象PO类转换为F口类;基于转换为网管和设备的通讯接口QX口类的JAR包中的关键字调用相应的JAR包,将转换完成的F口类转换为QX口类;The server invokes the corresponding JAR package according to the keyword in the JAR package of the F interface of the communication interface of the network management client and the server, and converts the constructed persistent object PO class into the F port class; based on the conversion to the network management device and the device The keyword in the JAR packet of the communication interface QX port calls the corresponding JAR package, and converts the converted F port class into a QX port class;
    所述逆向转换包括:The reverse conversion includes:
    所述服务器基于转换为F口类的JAR包的关键字调用相应的JAR包,将转换完成的所述QX口类转换为F口类;根据转换为PO口类的JAR包的关键字调用相应的JAR包,将转换完成的F口类转换为PO口类;The server calls the corresponding JAR package based on the keyword of the JAR package converted to the F-port class, and converts the converted QX port class into a F-port class; according to the keyword of the JAR packet converted to the PO port class, the corresponding call is performed. The JAR package converts the converted F-port class into a PO port class;
    其中,所述关键字包括JAR包的库关键字或用户关键字。The keyword includes a library keyword or a user keyword of the JAR package.
  9. 一种实现构建测试对象的装置,包括:第一赋值单元和构建单元;其中,An apparatus for implementing a test object, comprising: a first assignment unit and a construction unit; wherein
    第一赋值单元,设置为根据预先设置的默认值策略,对每一个配置模块所包含的测试类进行赋值;The first assignment unit is configured to assign a test class included in each configuration module according to a preset default value policy;
    构建单元,设置为通过MOCK方法,依据每一个配置模块相应的赋值的测试类构建测试对象。The building unit is set to build the test object according to the corresponding evaluation class of each configuration module through the MOCK method.
  10. 根据权利要求9所述的装置,其中,所述第一赋值单元是设置为,根据测试类的类型不同,为每一个配置模块所包含的测试类赋相应的默认值;和/或,根据测试类的方法名不同,为每一个配置模块所包含的测试类赋相应的默认值。The apparatus according to claim 9, wherein the first assignment unit is configured to assign a corresponding default value to a test class included in each configuration module according to a type of the test class; and/or, according to the test The method names of the classes are different, and the default values for the test classes contained in each configuration module are assigned.
  11. 根据权利要求9所述的装置,该装置还包括反射单元,设置为基于 注释Annotation技术,对构建的测试对象对应的测试类的类型进行反射,使所述构建的测试对象支持集合和地图MAP成员。The apparatus according to claim 9, further comprising a reflection unit configured to be based on Annotating the Annotation technique to reflect the type of the test class corresponding to the constructed test object, so that the constructed test object supports the collection and the map MAP member.
  12. 根据权利要求9所述的装置,该装置还包括第二赋值单元,设置为基于Annotation技术,对构建的测试对象中的互联网协议IP地址、掩码或反掩码、媒体访问控制MAC地址赋值默认值。The apparatus according to claim 9, further comprising a second evaluation unit configured to assign a default value of an Internet Protocol IP address, a mask or an inverse mask, and a media access control MAC address in the constructed test object based on an Annotation technique. value.
  13. 一种实现业务配置测试的装置,包括:权利要求9~12任意一项所述的装置的所有模块;以及An apparatus for implementing a service configuration test, comprising: all modules of the apparatus according to any one of claims 9 to 12;
    配置依赖关系单元,设置为为预先设置与配置模块相匹配的Java归档文件JAR包和进行测试涉及的JAR包之间的依赖关系;Configuring a dependency unit, set to pre-set the dependency between the Java Archive JAR package matching the configuration module and the JAR package involved in the test;
    测试单元,设置为根据依赖关系和构建的测试对象,通过模拟顺向转换和逆向转换进行测试。The test unit, set to test based on dependencies and built test objects, by simulating forward and reverse conversions.
  14. 根据权利要求13所述的装置,所述配置依赖关系单元是设置为,根据配置模块种类的不同,建立与每一种类配置模块相匹配的JAR包的子目录,和测试涉及的JAR包的映射关系。The apparatus according to claim 13, wherein the configuration dependency unit is configured to establish a subdirectory of a JAR package matching each type of configuration module according to a type of the configuration module, and map the JAR package involved in the test. relationship.
  15. 根据权利要求13所述的装置,该装置还包括二次封装单元,设置为对与配置模块相匹配的JAR包以预先设定的用户关键字进行二次封装;The apparatus according to claim 13, further comprising a secondary encapsulation unit configured to perform secondary encapsulation on a JAR packet matching the configuration module with a preset user keyword;
    所述配置依赖关系单元是设置为,根据预先设定的用户关键字建立二次封装后的JAR包的子目录,和测试涉及的JAR包的映射关系。The configuration dependency unit is configured to establish a sub-directory of the sub-packaged JAR package according to a preset user keyword, and a mapping relationship of the JAR package involved in the test.
  16. 根据权利要求13所述的装置,其中,构建的测试对象包括PO类,所述测试单元是设置为,The apparatus according to claim 13, wherein the constructed test object comprises a PO class, and the test unit is set to
    根据转换为网管客户端和服务端的通讯接口F口类的JAR包的关键字调用相应的JAR包,将构建的PO持久化对象类转换为F口类;基于转换为网管和设备的通讯接口QX口类的JAR包的关键字调用相应的JAR包,将转换完成的F口类转换为QX口类;According to the keyword of the JAR package converted to the communication interface F port class of the network management client and the server, the corresponding JAR package is called, and the constructed PO persistent object class is converted into the F port class; based on the communication interface QX converted into the network management device and the device The keyword of the JAR package of the mouth class calls the corresponding JAR package, and converts the converted F port class into a QX port class;
    基于转换为F口类的JAR包的关键字调用相应的JAR包,将转换完成的所述QX口类转换为F口类;根据转换为PO口类的JAR包的关键字调用相应的JAR包,将转换完成的F口类转换为PO口类进行测试,The QAR packet is converted into a F-port class based on the keyword of the JAR packet converted to the F-port class, and the corresponding JAR packet is called according to the keyword of the JAR packet converted to the PO port class. Convert the converted F-port class to the PO port class for testing.
    所述关键字包括JAR包的库关键字或用户关键字。 The keyword includes a library keyword or a user keyword of the JAR package.
  17. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1~9任意一项所述的方法。 A computer readable storage medium storing computer executable instructions for performing the method of any one of claims 1-9.
PCT/CN2016/073527 2015-06-16 2016-02-04 Method and apparatus for implementation of test object construction, and service configuration test apparatus WO2016201995A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510332511.8 2015-06-16
CN201510332511.8A CN106326088B (en) 2015-06-16 2015-06-16 Method and device for realizing construction of test object and device for realizing service configuration test

Publications (1)

Publication Number Publication Date
WO2016201995A1 true WO2016201995A1 (en) 2016-12-22

Family

ID=57544960

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/073527 WO2016201995A1 (en) 2015-06-16 2016-02-04 Method and apparatus for implementation of test object construction, and service configuration test apparatus

Country Status (2)

Country Link
CN (1) CN106326088B (en)
WO (1) WO2016201995A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111258885A (en) * 2020-01-08 2020-06-09 聚好看科技股份有限公司 Unit testing method and system
CN111858083A (en) * 2019-12-30 2020-10-30 北京嘀嘀无限科技发展有限公司 Remote service calling method and device, electronic equipment and storage medium
CN112783759A (en) * 2019-11-11 2021-05-11 腾讯科技(深圳)有限公司 White box test task execution method and device, storage medium and computer equipment
CN113778888A (en) * 2021-09-16 2021-12-10 平安银行股份有限公司 Code automatic test method, system, equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804303B (en) * 2017-05-05 2022-04-12 北京京东尚科信息技术有限公司 Method and system for providing data
CN109739526A (en) * 2017-10-30 2019-05-10 北京京东尚科信息技术有限公司 Code update method and device
CN109933534B (en) * 2019-03-26 2023-02-24 上海上湖信息技术有限公司 Method and device for determining financial test object
CN112579440A (en) * 2020-12-02 2021-03-30 深圳前海微众银行股份有限公司 Method and device for determining virtual test dependent object

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100037100A1 (en) * 2006-09-25 2010-02-11 Typemock Ltd. Method and system for isolating software components
CN102693182A (en) * 2012-05-25 2012-09-26 苏州博远容天信息科技有限公司 Repository mode using test-driven development in MVC (model view controller)
CN102855178A (en) * 2011-06-30 2013-01-02 阿里巴巴集团控股有限公司 Method and device for generating Mock base during unit test
CN102855177A (en) * 2011-06-30 2013-01-02 阿里巴巴集团控股有限公司 Unit test method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609255B (en) * 2012-01-19 2015-09-23 中国科学院计算机网络信息中心 A kind of generation method of Spring IOC configuration file

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100037100A1 (en) * 2006-09-25 2010-02-11 Typemock Ltd. Method and system for isolating software components
CN102855178A (en) * 2011-06-30 2013-01-02 阿里巴巴集团控股有限公司 Method and device for generating Mock base during unit test
CN102855177A (en) * 2011-06-30 2013-01-02 阿里巴巴集团控股有限公司 Unit test method and device
CN102693182A (en) * 2012-05-25 2012-09-26 苏州博远容天信息科技有限公司 Repository mode using test-driven development in MVC (model view controller)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783759A (en) * 2019-11-11 2021-05-11 腾讯科技(深圳)有限公司 White box test task execution method and device, storage medium and computer equipment
CN112783759B (en) * 2019-11-11 2023-10-03 腾讯科技(深圳)有限公司 White box test task execution method and device, storage medium and computer equipment
CN111858083A (en) * 2019-12-30 2020-10-30 北京嘀嘀无限科技发展有限公司 Remote service calling method and device, electronic equipment and storage medium
CN111858083B (en) * 2019-12-30 2024-05-14 北京嘀嘀无限科技发展有限公司 Remote service calling method and device, electronic equipment and storage medium
CN111258885A (en) * 2020-01-08 2020-06-09 聚好看科技股份有限公司 Unit testing method and system
CN111258885B (en) * 2020-01-08 2023-09-15 聚好看科技股份有限公司 Unit test method and system
CN113778888A (en) * 2021-09-16 2021-12-10 平安银行股份有限公司 Code automatic test method, system, equipment and storage medium
CN113778888B (en) * 2021-09-16 2024-05-17 平安银行股份有限公司 Code automatic test method, system, equipment and storage medium

Also Published As

Publication number Publication date
CN106326088B (en) 2021-03-23
CN106326088A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
WO2016201995A1 (en) Method and apparatus for implementation of test object construction, and service configuration test apparatus
US11860821B2 (en) Generating target application packages for groups of computing devices
TWI670672B (en) Automated constructing method of cloud manufacturing service, computer program product, and cloud manufacturing system
US10970057B2 (en) Methods and apparatus to generate a customized application blueprint
WO2019095936A1 (en) Method and system for building container mirror image, and server, apparatus and storage medium
CN108964968B (en) Service access management method and system in container cloud environment
CN109933522B (en) Test method, test system and storage medium for automatic case
WO2019153472A1 (en) Automated interface testing method, device, equipment, and storage medium
EP3454214A1 (en) Infrastructure instantiation, collaboration, and validation architecture for serverless execution frameworks
US9268592B2 (en) Methods and apparatus to generate a customized application blueprint
US20180253373A1 (en) Systems and methods for automated web performance testing for cloud apps in use-case scenarios
US10564938B2 (en) Method and device of resource orchestration using an object-oriented language
CN107368503B (en) Data synchronization method and system based on button
CN109783388B (en) UI (user interface) automatic testing method and device and electronic equipment
WO2018036342A1 (en) Csar-based template design visualization method and device
JP7050106B2 (en) How to instantiate an executable analysis module
WO2019075994A1 (en) Method, device and system for mock data at ios end, and storage medium
CN107395747B (en) High-expansion method based on STF platform
US8677339B2 (en) Component relinking in migrations
US11829278B2 (en) Secure debugging in multitenant cloud environment
US11184251B2 (en) Data center cartography bootstrapping from process table data
US11803429B2 (en) Managing alert messages for applications and access permissions
CN114115982A (en) Code issuing method, device, equipment and storage medium
US20160275002A1 (en) Image capture in application lifecycle management for documentation and support
Aly Hands-On Enterprise Automation with Python: Automate common administrative and security tasks with Python

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: 16810736

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: 16810736

Country of ref document: EP

Kind code of ref document: A1