WO2020019418A1 - 数据库配置信息适配方法、装置、计算机设备和存储介质 - Google Patents

数据库配置信息适配方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2020019418A1
WO2020019418A1 PCT/CN2018/104760 CN2018104760W WO2020019418A1 WO 2020019418 A1 WO2020019418 A1 WO 2020019418A1 CN 2018104760 W CN2018104760 W CN 2018104760W WO 2020019418 A1 WO2020019418 A1 WO 2020019418A1
Authority
WO
WIPO (PCT)
Prior art keywords
instance
implementation class
event
configuration information
code
Prior art date
Application number
PCT/CN2018/104760
Other languages
English (en)
French (fr)
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 WO2020019418A1 publication Critical patent/WO2020019418A1/zh

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
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Definitions

  • the present application relates to a database configuration information adaptation method, apparatus, computer equipment, and storage medium.
  • a database configuration information adaptation method is provided.
  • a database configuration information adaptation method includes:
  • a database configuration information adaptation device includes:
  • Code collection query module for querying the implementation code collection corresponding to the database operation
  • a code running module for running all the implementation code in the implementation code collection
  • the reflection mechanism operation module is used to obtain the implementation class instance and the corresponding instance method contained in the implementation class code through the reflection mechanism;
  • a configuration information acquisition module for generating configuration information according to the implementation class instance and the corresponding instance method
  • the database configuration module is configured to configure the changed database according to the configuration information.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions, and the computer-readable instructions, when executed by the one or more processors, cause the one or more Processors implement the steps of the database configuration information adaptation method provided in any one of the embodiments of the present application.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to implement any Steps of the database configuration information adaptation method provided in one embodiment.
  • FIG. 1 is an application scenario diagram of a database configuration information adaptation method according to one or more embodiments.
  • FIG. 2 is a schematic flowchart of a database configuration information adaptation method according to one or more embodiments.
  • FIG. 3 is a schematic flowchart of a database configuration information adaptation step according to one or more embodiments.
  • FIG. 4 is a schematic flowchart of a database configuration information adaptation method in another embodiment.
  • FIG. 5 is a block diagram of a database configuration information adaptation apparatus according to one or more embodiments.
  • FIG. 6 is a block diagram of a computer device according to one or more embodiments.
  • the database configuration information adaptation method provided in this application can be applied to the application environment shown in FIG. 1.
  • the test server 110, the database server 120, and the system server 130 communicate through a network.
  • the test server 110 detects that the database server 120 changes the database, it queries the set of implementation code corresponding to the database operation.
  • the test server 110 runs all the implementation class codes in the implementation class code set in the system server 130, and obtains the implementation class instances and corresponding instance methods contained in the implementation class codes through a reflection mechanism, and then according to the implementation class instances and corresponding instances
  • the method generates configuration information, and configures the changed database in the database server 120 according to the configuration information.
  • test server 110 the database server 120, and the system server 130 may be implemented by independent servers or a server cluster composed of multiple servers.
  • a database configuration information adaptation method is provided.
  • the method is applied to the test server 110 in FIG. 1 as an example for description, and includes the following steps:
  • S202 Query an implementation-type code set corresponding to a database operation.
  • the steps of querying the implementation code corresponding to the database operation will be executed when the database is detected to be changed.
  • Changing the database can be either migrating the database's data to the new database, or changing the type of database.
  • the implementation class code collection is a collection of DAO class (Data Access Object) code.
  • the DAO class code is specifically used to operate the database, such as the operation of modifying, adding, and deleting the database.
  • test server when the test server detects that the data in the original database is migrated to the new database, it queries the corresponding DAO-type code set in the original database from the database.
  • the implementation class codes in the implementation class code set are arranged according to a preset arrangement rule.
  • the preset arrangement rule may specifically be the time when the implementation class code is written into the implementation class code set, or the operation type corresponding to the implementation class code, or the first letter of the implementation class code.
  • Running all the implementation class codes in the implementation class code collection may specifically be that the test server sequentially executes the implementation class codes according to the arrangement order of the implementation class codes in the implementation class code collection.
  • the test server when the test server runs the implementation code sequentially in accordance with the arrangement order of the implementation code, when running an implementation code, the running result includes calling a non-adjacent implementation code in the arrangement order.
  • Implementation class code the test server can define this implementation class code and the called implementation class code as an implementation class code combination.
  • the reflection mechanism is specifically a JAVA reflection mechanism.
  • JAVA reflection mechanism is in the running state, for any class, you can know all the properties and methods of this class, and for any object, you can call any of its methods and properties.
  • Implementation class instances are the result of instantiation of implementation class code. Instantiation is the process of running the implementation class code.
  • An instance method is the code needed to generate a complete implementation of an instance of a class.
  • the test server runs the implementation class code, identifies the methods of the implementation class code when running the implementation class code, and generates an implementation class instance corresponding to the implementation class code when the implementation class code is generated. Instance method.
  • Configuration information is information for the configuration database. Specifically, after the system changes the database, the changed database needs to be reconfigured, and using the configuration information of the original database to directly configure the changed database may cause the database to be incompatible with the system. Therefore, after changing the database, The configuration information of the original database needs to be re-adapted so that the re-adapted configuration information can satisfy the compatibility between the changed database and the system.
  • the changed database is configured according to the configuration information. Specifically, the changed database path may be added to the implementation code of the database.
  • the implementation class instance and corresponding instance method obtained through the reflection mechanism can completely reflect the problems that occur in the database. Generate configuration information according to the implementation class instance and corresponding instance methods, and then configure the changed database based on the configuration information to ensure that all problems in the database are tested. Moreover, because the implementation class instances and instance methods in the code collection are directly obtained through the reflection mechanism, there is no need for testers to manually test, and it can also save the time spent on testing, thereby reducing the time spent changing the database, and then modifying the changes Database efficiency.
  • step S206 includes: S302, registering the event listener in the listener registry; S304, when the event listener receives the event publishing information sent by the event broadcaster, the information is released according to the event , Determine the call path of the corresponding event; S306, record the code called under the call path according to the event listener; S308, obtain the implementation class instance and the corresponding instance method from the code.
  • Event listeners are computer-readable instructions for recording the occurrence of events.
  • the event may be a process in which the test server runs the implementation code, that is, operation information of the test server operating on the database.
  • An event broadcaster is computer-readable instructions for monitoring whether an event is triggered and notifying the event listener.
  • the calling path of the event specifically the corresponding path of the code that triggered the event. For example, when an event that deletes the history is triggered, the DAO-type code encapsulated on the page is called.
  • the path of the DAO-type code on the page is the event Call path, and the code recorded by the event listener is generated when this DAO class code is called, including but not limited to the encapsulated DAO class code.
  • the test server selects a DAO class code from the code library associated with the spring framework, and then runs the DAO class code through the JAVA reflection mechanism.
  • the test server runs the DAO class code, it passes an event The broadcaster notifies the event listener to listen.
  • an event listener and an event broadcaster are used to obtain the event call path, and then the called code is obtained from the event call path to obtain the implementation class instance and the corresponding instance method.
  • the method further includes: creating the event listener; binding the event listener to the event broadcaster; and storing the event listener bound to the event broadcaster in the listener registry.
  • Binding the event listener with the event broadcaster specifically, writing the path of the event listener to the event broadcaster.
  • the event broadcaster detects that an event is triggered, it generates an event publishing message, and sends the event publishing information to the event listener storing the path.
  • the event listener is bound to the event broadcaster, and then the bound event listener is stored in the listener registry, and the event listener and the event broadcaster are bound. It can ensure that the event listener can record the corresponding implementation class instance and instance method of each event, thereby ensuring the integrity of the obtained data.
  • the method further includes: determining a corresponding function point identifier according to the information released by the event; when obtaining the implementation class instance, pairing the function point identifier with the implementation class instance; according to the function point identifier, and The function class identifies the implementation class instance and the corresponding instance method to generate configuration information.
  • the function point identification is specifically the identification of the event on the front end.
  • an event is to delete a piece of data in the database.
  • the function points on the front end can be the delete button and the select button. This data is selected by the front of the select button and the delete button triggers the deletion of this data.
  • the test server pairs the function point identifier with the implementation class instance, and when the system triggers an event based on the function point identifier, the corresponding event is triggered by the implementation class instance paired with the function point identifier.
  • the function point identification on the system is triggered when the business person operates the system, and the system sends an instruction to the spring framework to call the function point identification corresponding function point.
  • the spring framework selects the DAO class code that matches the function point identifier according to the received instruction, executes the corresponding function according to the selected DAO class code, and feeds back to the system the result obtained after executing the DAO class code.
  • the method further includes: running the instance method to obtain a running result; confirming the running result from the running result; obtaining an implementation class instance corresponding to the running result; and according to the obtained implementation class instance Generate configuration information.
  • a result mark indicating that the operation is correct will be displayed.
  • a result indicator indicating the operation error will be displayed. For example, a red icon can be used. Indicates a running error. The green icon indicates that the operation is correct. You can also use "correct” to indicate that the operation is correct, and "error" to indicate a running error.
  • the test server runs the instance method to obtain the operation result, selects the result from the operation result to identify the correct operation result, and queries the DAO class instance corresponding to the selected operation result, and converts the selected DAO class instance Into MySQL configuration information.
  • the running result is obtained.
  • the implementation class instance is directly obtained according to the running correct operation result, and the configuration information is generated according to the implementation class instance, so that Under the condition that the generated configuration information is free from errors, the configuration information is quickly generated, reducing the time spent for testing, and thereby improving the efficiency of database changes.
  • the method further includes: confirming the running result of the running error from the running result; obtaining an instance method corresponding to the running result of the running error; modifying the obtained instance method; and re-acquiring the corresponding according to the modified instance method.
  • Implementation class instance ; generate configuration information from the reacquired implementation class instance.
  • the corresponding implementation class instance is re-acquired.
  • the revised instance method can be run. The process of running the revised instance method can be recorded to obtain the corresponding implementation class instance.
  • the cause of the running result error is detected. If it is caused by a syntax error, the compiler identifies the location of the syntax error in the instance method according to the compiler, and corrects it according to the correct prompt given by the compiler. If the error is caused by a condition error, correct the condition when running the instance method. If a logic error causes a running error, the logic calculation is re-performed according to the debugging tool, and then the correct logic method is obtained, and then the instance method is modified according to the correct logic method.
  • the test server inputs the process of recalculating each time into the logic correction model to train the logic correction model. After training the logic correction model for 3 months, it can directly input the instance method In the logic correction quasi-model, the logic method of the example method is automatically corrected by the logic correction model.
  • the instance method is modified, and the corresponding implementation class instance of the revised instance method is obtained again, so as to ensure that the configuration information generated according to the reacquired implementation class instance is not Errors, thereby ensuring the stability and security of the database.
  • a method for adapting database configuration information is further provided.
  • the method specifically includes the following steps:
  • steps S420 and S426 may be performed.
  • step S436 may be performed.
  • the above database configuration information adaptation method queries a set of implementation code corresponding to a database operation. Since the implementation code set queried contains the code corresponding to the database operation, after running all the implementation code in the implementation code set The implementation class instance and the corresponding instance method obtained through the reflection mechanism can completely reflect the problems of the database. Generate configuration information according to the implementation class instance and corresponding instance methods, and then configure the changed database based on the configuration information to ensure that all problems in the database are tested. Moreover, because the implementation class instances and instance methods in the code collection are directly obtained through the reflection mechanism, there is no need for testers to manually test, and it can also save the time spent on testing, thereby reducing the time spent changing the database, and then modifying the changes Database efficiency.
  • steps in the flowcharts of FIGS. 2-4 are sequentially displayed in accordance with the directions of the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless explicitly stated in this document, the execution of these steps is not strictly limited, and these steps can be performed in other orders. Moreover, at least a part of the steps in Figure 2-4 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. These sub-steps or stages The execution order of is not necessarily performed sequentially, but may be performed in turn or alternately with at least a part of another step or a sub-step or stage of another step.
  • a database configuration information adaptation device 500 including: a code collection query module 502, a code execution module 504, a reflection mechanism operation module 506, a configuration information acquisition module 508, and Database configuration module 510, wherein: code collection query module 502 is used to query the implementation code collection corresponding to the database operation; code operation module 504 is used to run all implementation code in the implementation code collection; reflection mechanism is run Module 506, configured to obtain the implementation class instance and corresponding instance method included in the implementation class code through a reflection mechanism; configuration information acquisition module 508, configured to generate configuration information according to the implementation class instance and corresponding instance method; database configuration module 510 To configure the changed database based on the configuration information.
  • the above-mentioned database configuration information adapting device 500 queries the implementation code set corresponding to the database operation. Since the query implementation code set contains the code corresponding to the database operation, all the implementation code in the implementation code set is run. Later, the implementation class instance and corresponding instance method obtained through the reflection mechanism can completely reflect the problems that occur in the database. Generate configuration information according to the implementation class instance and corresponding instance methods, and then configure the changed database based on the configuration information to ensure that all problems in the database are tested. Moreover, because the implementation class instances and instance methods in the code collection are directly obtained through the reflection mechanism, there is no need for testers to manually test, and it can also save the time spent on testing, thereby reducing the time spent changing the database, and then modifying the changes. Database efficiency.
  • the device further includes: a listener registration module for registering the event listener in the listener registry; and a call path determination module for when the event listener receives the information sent by the event broadcaster.
  • a listener registration module for registering the event listener in the listener registry
  • a call path determination module for when the event listener receives the information sent by the event broadcaster.
  • the device further includes: a listener creation module for creating the event listener; a listener binding module for binding the event listener to the event broadcaster; a listener storage module, Stores the event listener bound to the event broadcaster into the listener registry.
  • the device further includes: an identification determining module for determining a corresponding function point identifier according to the information released by the event; an identification pairing module for identifying the function point identifier when obtaining the implementation class instance Pair with the implementation class instance; the configuration information acquisition module 508 is further configured to generate configuration information according to the function point identifier, the implementation class instance matched with the function point identifier, and the corresponding instance method.
  • the device further includes: a method running module for running the instance method to obtain a running result; a result confirming module for confirming the correct running result from the running result; an instance obtaining module for An implementation class instance corresponding to the correct running result is obtained.
  • the configuration information acquisition module 508 is further configured to generate configuration information according to the obtained implementation class instance.
  • the result confirmation module is further configured to confirm a running result of the running error from the running result; the device further includes: a method obtaining module for obtaining a corresponding instance method of the running result of the running error; Method modification module, which is used to modify the obtained instance method.
  • the instance acquisition module is also used to re-acquire the corresponding implementation class instance according to the revised instance method.
  • the configuration information acquisition module 508 is also used to implement the re-acquired implementation. Class instances generate configuration information.
  • Each module in the database configuration information adaptation device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • Each of the above modules may be embedded in the hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 6.
  • the computer device includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for operating the operating system and computer-readable instructions in a non-volatile storage medium.
  • the database of the computer device is used to store at least one of an implementation-type code set, configuration information, and the like.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by a processor to implement a database configuration information adaptation method.
  • FIG. 6 is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer equipment to which the scheme of the present application is applied.
  • the specific computer equipment may be Include more or fewer parts than shown in the figure, or combine certain parts, or have a different arrangement of parts.
  • a computer device includes a memory and one or more processors.
  • Computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by one or more processors, the one or more processors implement any one of the present application.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors implement one of the embodiments of the present application Provide the steps of the database configuration information adaptation method.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Synchlink DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种数据库配置信息适配方法,包括:查询与数据库操作相对应的实现类代码集合;运行该实现类代码集合中所有的实现类代码;通过反射机制获取该实现类代码包含的实现类实例和相应的实例方法;根据该实现类实例和相应的实例方法生成配置信息;根据该配置信息配置更改后的数据库。

Description

数据库配置信息适配方法、装置、计算机设备和存储介质
本申请要求于2018年07月24日提交中国专利局,申请号为2018108192351,申请名称为“数据库配置信息适配方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种数据库配置信息适配方法、装置、计算机设备和存储介质。
背景技术
随着互联网技术的发展,数据库被越来越广泛地应用在各个系统中,而由于互联网上数据越来越多,数据更新越来越频繁,定期更改数据库也变得比较常见。而数据库的更改除了要迁移相关的库、表和数据之外,还需要针对应用数据库的系统进行适配。
然而,发明人意识到,目前的数据库配置方法非常依赖手工进行测试,而手工进行测试不但容易遗漏一些细微的问题没有测试,还会导致花费了大量的时间在测试上,导致更改数据库的效率很低。
发明内容
根据本申请公开的各种实施例,提供一种数据库配置信息适配方法、装置、计算机设备和存储介质。
一种数据库配置信息适配方法包括:
查询与数据库操作相对应的实现类代码集合;
运行该实现类代码集合中所有的实现类代码;
通过反射机制获取该实现类代码包含的实现类实例和相应的实例方法;
根据该实现类实例和相应的实例方法生成配置信息;及
根据该配置信息配置更改后的数据库。
一种数据库配置信息适配装置包括:
代码集合查询模块,用于查询与数据库操作相对应的实现类代码集合;
代码运行模块,用于运行该实现类代码集合中所有的实现类代码;
反射机制运行模块,用于通过反射机制获取该实现类代码包含的实现类实例和相应的实例方法;
配置信息获取模块,用于根据该实现类实例和相应的实例方法生成配置信息;及
数据库配置模块,用于根据该配置信息配置更改后的数据库。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器实现本申请任意一个实施例中提供的数据库配置信息适配方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器实现本申请任意一个实施例中提供的数据库配置信息适配方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中数据库配置信息适配方法的应用场景图。
图2为根据一个或多个实施例中数据库配置信息适配方法的流程示意图。
图3为根据一个或多个实施例中数据库配置信息适配步骤的流程示意图。
图4为另一个实施例中数据库配置信息适配方法的流程示意图。
图5为根据一个或多个实施例中数据库配置信息适配装置的框图。
图6为根据一个或多个实施例中计算机设备的框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的数据库配置信息适配方法,可以应用于如图1所示的应用环境中。测试服务器110、数据库服务器120和系统服务器130通过网络进行通信。当测试服务器110检测到数据库服务器120更改数据库时,则查询与数据库操作相对应的实现类代码集合。测试服务器110在系统服务器130中运行该实现类代码集合中所有的实现类代码,通过反射机制获取该实现类代码包含的实现类实例和相应的实例方法,再根据该实现类实例和相应的实例方法生成配置信息,根据该配置信息在数据库服务器120中配置更改后的数据库。
测试服务器110、数据库服务器120和系统服务器130可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在其中一个实施例中,如图2所示,提供了一种数据库配置信息适配方法,以该方法应用于图1中的测试服务器110为例进行说明,包括以下步骤:
S202,查询与数据库操作相对应的实现类代码集合。
具体的,在检测到更改数据库时,才会执行查询与数据库操作相对应的实现类代码的步骤。更改数据库具体可以是迁移数据库的数据到新的数据库 中,也可以是更改数据库的类型。实现类代码集合是DAO类(Data Access Object,数据访问对象)代码的集合,DAO类代码具体用于操作数据库,例如修改、添加和删除数据库的操作。
在其中一个具体的实施例中,测试服务器检测到原有的数据库中数据迁移到新的数据库中时,则从数据库中查询原有数据库相应的DAO类代码集合。
S204,运行该实现类代码集合中所有的实现类代码。
实现类代码集合中的实现类代码按照预设的排列规则排列。预设的排列规则具体可以是实现类代码写入实现类代码集合中的时间,也可以是实现类代码相应的操作类型,还可以是实现类代码的首字母。运行该实现类代码集合中所有的实现类代码,具体可以是测试服务器根据实现类代码在实现类代码集合中的排列顺序,依次运行实现类代码。
在其中一个具体的实施例中,测试服务器按照实现类代码的排列顺序依次运行实现类代码时,在运行一个实现类代码时,运行结果包括调用一个在排列顺序中与该实现类代码不相邻的实现类代码,则测试服务器可以将这个实现类代码和被调用的实现类代码定义为一个实现类代码组合。
S206,通过反射机制获取该实现类代码包含的实现类实例和相应的实例方法。
反射机制具体是JAVA反射机制。JAVA反射机制是在运行状态中,对于任意一个类,都能够知道这个类的所有属性和方法,对于任意一个对象,都能够调用它的任意方法和属性的方法。实现类实例是实现类代码实例化的结果。实例化具体是运行实现类代码的过程。实例方法是生成一个完整的实现类实例所需要的代码。
在其中一个具体的实施例中,测试服务器运行实现类代码,在运行实现类代码时识别该实现类代码所具有的方法,在根据实现类代码生成实现类实例时,获取到该实现类实例相应的实例方法。
S208,根据该实现类实例和相应的实例方法生成配置信息。
配置信息是配置数据库的信息。具体的,系统在更改数据库之后,需要 对更改后的数据库进行重新配置,而使用原有数据库的配置信息直接配置更改后的数据库有可能会导致数据库与系统的不兼容,因此在更改数据库后,需要对原有数据库的配置信息重新进行适配,使得重新适配的配置信息能够满足更改后的数据库和系统之间的兼容性。
S210,根据该配置信息配置更改后的数据库。
根据配置信息配置更改后的数据库,具体可以是在数据库的实现类代码中添加更改后的数据库的路径。
上述数据库配置信息适配方法中,查询与数据库操作相对应的实现类代码集合,由于查询到的实现类代码集合包含了与数据库操作相应的代码,所以运行实现类代码集合中所有的实现类代码后,通过反射机制获取的实现类实例和相应的实例方法可以完整地反映数据库出现的问题。根据实现类实例和相应的实例方法生成配置信息,再根据配置信息配置更改后的数据库时,就可以保证数据库中所有的问题都被测试出来。而且由于是通过反射机制直接获取代码集合中的实现类实例和实例方法,不需要测试人员手工进行测试,还可以节省花费在测试上的时间,从而减少更改数据库所花费的时间,进而体改更改数据库的效率。
在其中一个实施例中,步骤S206包括:S302,将事件监听器注册到监听器注册表中;S304,当该事件监听器接收到事件广播器发送的事件发布信息时,则根据该事件发布信息,确定相应事件的调用路径;S306,根据该事件监听器记录该调用路径下调用的代码;S308,从该代码中获取该实现类实例和相应的实例方法。
事件监听器是用于记录事件发生过程的计算机可读指令。事件具体可以是测试服务器运行实现类代码的过程,也就是测试服务器对数据库进行操作的操作信息。事件广播器是用于监测事件是否被触发并通知事件监听器的计算机可读指令。事件的调用路径,具体是触发事件的代码相应的路径,举例说明,一个删除历史记录的事件被触发时,调用了封装在页面上的DAO类代码,则页面上这个DAO类代码的路径就是事件的调用路径,而事件监听器所 记录的代码,就是这个DAO类代码被调用时所生成的,包括但不限于被封装的DAO类代码。
在其中一个具体的实施例中,测试服务器从与spring框架相关联的代码库中选取一个DAO类代码,再通过JAVA反射机制运行该DAO类代码,在测试服务器运行该DAO类代码时,通过事件广播器通知事件监听器进行监听。
本实施例中,使用事件监听器和事件广播器获取到事件的调用路径,再从事件的调用路径中获取被调用的代码,就可以获取到实现类实例和相应的实例方法,通过使用事件监听器和事件广播器来获取实现类实例和相应的实例方法,可以保证获取到的实现类实例和实例方法不被遗漏,从而保证了获取到的数据的完整性。
在其中一个实施例中,还包括:创建该事件监听器;将该事件监听器与事件广播器绑定;将与该事件广播器绑定的事件监听器存储到该监听器注册表中。
将事件监听器和事件广播器绑定,具体可以是将事件监听器的路径写入到事件广播器中。在其中一个具体的实施例中,事件广播器监测到事件被触发时,生成事件发布消息,并将事件发布信息发送到存储有路径的事件监听器中。
本实施例中,在创建事件监听器后,将事件监听器与事件广播器绑定后,再将绑定的事件监听器存储到监听器注册表中,通过将事件监听器和事件广播器绑定,可以保证事件监听器能够记录到每个事件相应的实现类实例和实例方法,从而保证了获取到的数据的完整性。
在其中一个实施例中,还包括:根据该事件发布信息,确定相应的功能点标识;在获取该实现类实例时,将该功能点标识与该实现类实例配对;根据该功能点标识、与功能点标识配的实现类实例和相应的实例方法生成配置信息。
功能点标识具体是事件在前端的标识。举例说明,一个事件是删除数据库中的一条数据,在前端的功能点可以是删除按键和选择按键,通过在选择 按键前端选取这条数据,并通过删除按键触发删除这条数据。
在其中一个具体的实施例中,测试服务器将功能点标识与实现类实例配对,在系统上根据功能点标识触发事件时,通过与功能点标识配对的实现类实例触发相应的事件。
在其中一个具体的实施例中,业务人员操作系统时触发系统上的功能点标识,系统向spring框架发送调用功能点标识相应功能点的指令。spring框架根据接收到的指令,选取与功能点标识相匹配的DAO类代码,根据选取的DAO类代码执行相应的功能,并向系统反馈执行DAO类代码后得到的结果。
本实施例中,通过将功能点标识和实现类实例配对,再根据功能点标识、与功能点标识配的实现类实例和相应的实例方法生成配置信息,可以保证生成的配置信息能够满足前端系统和数据库的兼容性。
在其中一个实施例中,还包括:运行该实例方法,得到运行结果;从该运行结果中确认运行正确的运行结果;获取该运行正确的运行结果相应的实现类实例;根据获取的实现类实例生成配置信息。
从运行结果中确认运行正确的运行结果,具体可以是通过运行结果中的结果标识进行确认。具体的,在运行实例方法后,若得到运行正确的运行结果,将显示表示运行正确的结果标识,若得到运行错误的运行结果,将显示表示运行错误的结果标识,举例说明,可以用红色图标表示运行错误,绿色图标表示运行正确,也可以用“正确”的文字表示运行正确,“错误”的文字表示运行错误。
在其中一个实施例中,测试服务器运行实例方法后,得到运行结果,从运行结果中选取结果标识为正确的运行结果,并查询选取的运行结果相应的DAO类实例,将选取的DAO类实例转换成MySQL配置信息。
本实施例中,在运行实例方法后,得到运行结果,从运行结果中确认运行正确的运行结果时,就直接根据运行正确的运行结果获取实现类实例,根据实现类实例生成配置信息,从而可以在保证生成的配置信息没有错误的情况下,快速地生成配置信息,减少测试花费的时间,进而提高更改数据库的 效率。
在其中一个实施例中,还包括:从该运行结果中确认运行错误的运行结果;获取该运行错误的运行结果相应的实例方法;修正获取的实例方法;根据修正后的实例方法,重新获取相应的实现类实例;通过重新获取的实现类实例生成配置信息。
修正获取的实例方法,具体可以是测试人员手工进行修正。根据修正后的实例方法,重新获取相应的实现类实例,具体可以是运行修正后的实例方法,将运行修正后的实例方法的过程记录下来,即可获取相应的实现类实例。
在其中一个具体的实施例中,在获取了运行错误的运行结果相应的实例方法后,检测运行结果的错误原因。若是语法错误导致运行错误时,则根据编译程序识别实例方法中语法错误所在的位置,并根据编译程序给出的正确提示进行修正。若是条件错误导致运行错误时,则修正运行实例方法时的条件。若是逻辑错误导致运行错误时,则根据调试工具重新进行逻辑计算,再得出正确的逻辑方式后,根据正确的逻辑方式修正实例方法。
在其中一个具体的实施例中,测试服务器将每次重新进行逻辑计算的过程输入逻辑校正模型中,对逻辑校正模型进行训练,在对逻辑校正模型训练3个月后,可以直接将实例方法输入逻校正准模型中,通过逻辑校正模型自动校正实例方法的逻辑方式。
本实施例中,从运行结果中确认了运行错误的运行结果后,通过修正实例方法,并重新获取修正后实例方法相应的实现类实例,从而保证根据重新获取的实现类实例生成的配置信息没有错误,进而保证了数据库的稳定性和安全性。
如图4所示,在其中一个实施例中,还提供了一种数据库配置信息适配方法,该方法具体包括以下的步骤:
S402,当检测到更改数据库时,则查询与数据库操作相对应的实现类代码集合。
S404,创建事件监听器。
S406,将该事件监听器与事件广播器绑定。
S408,将与该事件广播器绑定的事件监听器存储到该监听器注册表中。
S410,运行该实现类代码集合中所有的实现类代码。
S412,当该事件监听器接收到事件广播器发送的事件发布信息时,则通过该事件发布信息,确定相应事件的调用路径。
S414,通过该事件监听器记录该调用路径下调用的代码。
S416,从被记录的代码中获取该实现类实例和相应的实例方法。
S418,运行该实例方法,得到运行结果。
步骤S418之后,可以执行步骤S420和步骤S426。
S420,从该运行结果中确认运行正确的运行结果。
S422,获取该运行正确的运行结果相应的实现类实例。
S424,根据获取的实现类实例生成配置信息。
S426,从该运行结果中确认运行错误的运行结果。
S428,获取该运行错误的运行结果相应的实例方法。
S430,修正获取的实例方法。
S432,根据修正后的实例方法,重新获取相应的实现类实例。
S434,通过重新获取的实现类实例生成配置信息。
步骤S424和步骤S434之后,都可以执行步骤S436。
S436,根据该配置信息配置更改后的数据库。
上述数据库配置信息适配方法,查询与数据库操作相对应的实现类代码集合,由于查询到的实现类代码集合包含了与数据库操作相应的代码,所以运行实现类代码集合中所有的实现类代码后,通过反射机制获取的实现类实例和相应的实例方法可以完整地反映数据库出现的问题。根据实现类实例和相应的实例方法生成配置信息,再根据配置信息配置更改后的数据库时,就可以保证数据库中所有的问题都被测试出来。而且由于是通过反射机制直接获取代码集合中的实现类实例和实例方法,不需要测试人员手工进行测试,还可以节省花费在测试上的时间,从而减少更改数据库所花费的时间,进而 体改更改数据库的效率。
应该理解的是,虽然图2-4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-4中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在其中一个实施例中,如图5所示,提供了一种数据库配置信息适配装置500,包括:代码集合查询模块502、代码运行模块504、反射机制运行模块506、配置信息获取模块508和数据库配置模块510,其中:代码集合查询模块502,用于查询与数据库操作相对应的实现类代码集合;代码运行模块504,用于运行该实现类代码集合中所有的实现类代码;反射机制运行模块506,用于通过反射机制获取该实现类代码包含的实现类实例和相应的实例方法;配置信息获取模块508,用于根据该实现类实例和相应的实例方法生成配置信息;数据库配置模块510,用于根据该配置信息配置更改后的数据库。
上述数据库配置信息适配装置500,查询与数据库操作相对应的实现类代码集合,由于查询到的实现类代码集合包含了与数据库操作相应的代码,所以运行实现类代码集合中所有的实现类代码后,通过反射机制获取的实现类实例和相应的实例方法可以完整地反映数据库出现的问题。根据实现类实例和相应的实例方法生成配置信息,再根据配置信息配置更改后的数据库时,就可以保证数据库中所有的问题都被测试出来。而且由于是通过反射机制直接获取代码集合中的实现类实例和实例方法,不需要测试人员手工进行测试,还可以节省花费在测试上的时间,从而减少更改数据库所花费的时间,进而体改更改数据库的效率。
在其中一个实施例中,该装置还包括:监听器注册模块,用于将事件监听器注册到监听器注册表中;调用路径确定模块,用于当该事件监听器接收到事件广播器发送的事件发布信息时,则根据该事件发布信息,确定相应事件的调用路径;代码记录模块,用于根据该事件监听器记录该调用路径下调用的代码;代码解析模块,用于从该代码中获取该实现类实例和相应的实例方法。
在其中一个实施例中,该装置还包括:监听器创建模块,用于创建该事件监听器;监听器绑定模块,用于将该事件监听器与事件广播器绑定;监听器存储模块,用于将与该事件广播器绑定的事件监听器存储到该监听器注册表中。
在其中一个实施例中,该装置还包括:标识确定模块,用于根据该事件发布信息,确定相应的功能点标识;标识配对模块,用于在获取该实现类实例时,将该功能点标识与该实现类实例配对;该配置信息获取模块508,还用于根据该功能点标识、与功能点标识配的实现类实例和相应的实例方法生成配置信息。
在其中一个实施例中,该装置还包括:方法运行模块,用于运行该实例方法,得到运行结果;结果确认模块,用于从该运行结果中确认运行正确的运行结果;实例获取模块,用于获取该运行正确的运行结果相应的实现类实例;该配置信息获取模块508,还用于根据获取的实现类实例生成配置信息。
在其中一个实施例中,该结果确认模块,还用于从该运行结果中确认运行错误的运行结果;该装置还包括:方法获取模块,用于获取该运行错误的运行结果相应的实例方法;方法修正模块,用于修正获取的实例方法;该实例获取模块,还用于根据修正后的实例方法,重新获取相应的实现类实例;该配置信息获取模块508,还用于通过重新获取的实现类实例生成配置信息。
关于数据库配置信息适配装置的具体限定可以参见上文中对于数据库配置信息适配方法的限定,在此不再赘述。上述数据库配置信息适配装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬 件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储实现类代码集合和配置信息等中的至少一种。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种数据库配置信息适配方法。
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的数据库配置信息适配方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的数据库配置信息适配方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。本申请所提供的各实施例中 所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种数据库配置信息适配方法,包括:
    查询与数据库操作相对应的实现类代码集合;
    运行所述实现类代码集合中所有的实现类代码;
    通过反射机制获取所述实现类代码包含的实现类实例和相应的实例方法;
    根据所述实现类实例和相应的实例方法生成配置信息;及
    根据所述配置信息配置更改后的数据库。
  2. 根据权利要求1所述的方法,其特征在于,所述通过反射机制获取所述实现类代码包含的实现类实例和相应的实例方法,包括:
    将事件监听器注册到监听器注册表中;
    当所述事件监听器接收到事件广播器发送的事件发布信息时,则
    根据所述事件发布信息,确定相应事件的调用路径;
    根据所述事件监听器记录所述调用路径下调用的代码;及
    从所述代码中获取所述实现类实例和相应的实例方法。
  3. 根据权利要求2所述的方法,其特征在于,所述将事件监听器注册到监听器注册表中,包括:
    创建所述事件监听器;
    将所述事件监听器与事件广播器绑定;及
    将与所述事件广播器绑定的事件监听器存储到所述监听器注册表中。
  4. 根据权利要求2所述的方法,其特征在于,还包括:
    根据所述事件发布信息,确定相应的功能点标识;
    在获取所述实现类实例时,将所述功能点标识与所述实现类实例配对;及
    所述根据所述实现类实例和相应的实例方法,生成配置信息,包括:
    根据所述功能点标识、与功能点标识配的实现类实例和相应的实例方法生成配置信息。
  5. 根据权利要求1所述的方法,其特征在于,所述根据所述实现类实例和相应的实例方法生成配置信息,包括:
    运行所述实例方法,得到运行结果;
    从所述运行结果中确认运行正确的运行结果;
    获取所述运行正确的运行结果相应的实现类实例;及
    根据获取的实现类实例生成配置信息。
  6. 根据权利要求5所述的方法,其特征在于,所述运行所述实例方法,得到运行结果之后,所述方法还包括:
    从所述运行结果中确认运行错误的运行结果;
    获取所述运行错误的运行结果相应的实例方法;
    修正获取的实例方法;
    根据修正后的实例方法,重新获取相应的实现类实例;及
    通过重新获取的实现类实例生成配置信息。
  7. 一种数据库配置信息适配装置,包括:
    代码集合查询模块,用于查询与数据库操作相对应的实现类代码集合;
    代码运行模块,用于运行所述实现类代码集合中所有的实现类代码;
    反射机制运行模块,用于通过反射机制获取所述实现类代码包含的实现类实例和相应的实例方法;
    配置信息获取模块,用于根据所述实现类实例和相应的实例方法生成配置信息;及
    数据库配置模块,用于根据所述配置信息配置更改后的数据库。
  8. 根据权利要求7所述的装置,其特征在于,还包括:
    监听器注册模块,用于将事件监听器注册到监听器注册表中;
    调用路径确定模块,用于当所述事件监听器接收到事件广播器发送的事件发布信息时,则根据所述事件发布信息,确定相应事件的调用路径;
    代码记录模块,用于根据所述事件监听器记录所述调用路径下调用的代码;及
    代码解析模块,用于从所述代码中获取所述实现类实例和相应的实例方法。
  9. 一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    查询与数据库操作相对应的实现类代码集合;
    运行所述实现类代码集合中所有的实现类代码;
    通过反射机制获取所述实现类代码包含的实现类实例和相应的实例方法;
    根据所述实现类实例和相应的实例方法生成配置信息;及
    根据所述配置信息配置更改后的数据库。
  10. 根据权利要求9所述的计算机设备,其特征在于,所述通过反射机制获取所述实现类代码包含的实现类实例和相应的实例方法,包括:
    将事件监听器注册到监听器注册表中;
    当所述事件监听器接收到事件广播器发送的事件发布信息时,则
    根据所述事件发布信息,确定相应事件的调用路径;
    根据所述事件监听器记录所述调用路径下调用的代码;及
    从所述代码中获取所述实现类实例和相应的实例方法。
  11. 根据权利要求10所述的计算机设备,其特征在于,所述将事件监听器注册到监听器注册表中,包括:
    创建所述事件监听器;
    将所述事件监听器与事件广播器绑定;及
    将与所述事件广播器绑定的事件监听器存储到所述监听器注册表中。
  12. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    根据所述事件发布信息,确定相应的功能点标识;
    在获取所述实现类实例时,将所述功能点标识与所述实现类实例配对; 及
    所述根据所述实现类实例和相应的实例方法,生成配置信息,包括:
    根据所述功能点标识、与功能点标识配的实现类实例和相应的实例方法生成配置信息。
  13. 根据权利要求9所述的计算机设备,其特征在于,所述根据所述实现类实例和相应的实例方法生成配置信息,包括:
    运行所述实例方法,得到运行结果;
    从所述运行结果中确认运行正确的运行结果;
    获取所述运行正确的运行结果相应的实现类实例;及
    根据获取的实现类实例生成配置信息。
  14. 根据权利要求13所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器在执行所述运行所述实例方法,得到运行结果之后,还执行以下步骤:
    从所述运行结果中确认运行错误的运行结果;
    获取所述运行错误的运行结果相应的实例方法;
    修正获取的实例方法;
    根据修正后的实例方法,重新获取相应的实现类实例;及
    通过重新获取的实现类实例生成配置信息。
  15. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    查询与数据库操作相对应的实现类代码集合;
    运行所述实现类代码集合中所有的实现类代码;
    通过反射机制获取所述实现类代码包含的实现类实例和相应的实例方法;
    根据所述实现类实例和相应的实例方法生成配置信息;及
    根据所述配置信息配置更改后的数据库。
  16. 根据权利要求15所述的存储介质,其特征在于,所述通过反射机制获取所述实现类代码包含的实现类实例和相应的实例方法,包括:
    将事件监听器注册到监听器注册表中;
    当所述事件监听器接收到事件广播器发送的事件发布信息时,则
    根据所述事件发布信息,确定相应事件的调用路径;
    根据所述事件监听器记录所述调用路径下调用的代码;及
    从所述代码中获取所述实现类实例和相应的实例方法。
  17. 根据权利要求16所述的存储介质,其特征在于,所述将事件监听器注册到监听器注册表中,包括:
    创建所述事件监听器;
    将所述事件监听器与事件广播器绑定;及
    将与所述事件广播器绑定的事件监听器存储到所述监听器注册表中。
  18. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    根据所述事件发布信息,确定相应的功能点标识;
    在获取所述实现类实例时,将所述功能点标识与所述实现类实例配对;及
    所述根据所述实现类实例和相应的实例方法,生成配置信息,包括:
    根据所述功能点标识、与功能点标识配的实现类实例和相应的实例方法生成配置信息。
  19. 根据权利要求15所述的存储介质,其特征在于,所述根据所述实现类实例和相应的实例方法生成配置信息,包括:
    运行所述实例方法,得到运行结果;
    从所述运行结果中确认运行正确的运行结果;
    获取所述运行正确的运行结果相应的实现类实例;及
    根据获取的实现类实例生成配置信息。
  20. 根据权利要求19所述的存储介质,其特征在于,所述计算机可读指 令被所述处理器执行时,使得所述处理器在执行所述运行所述实例方法,得到运行结果之后,还执行以下步骤:
    从所述运行结果中确认运行错误的运行结果;
    获取所述运行错误的运行结果相应的实例方法;
    修正获取的实例方法;
    根据修正后的实例方法,重新获取相应的实现类实例;及
    通过重新获取的实现类实例生成配置信息。
PCT/CN2018/104760 2018-07-24 2018-09-10 数据库配置信息适配方法、装置、计算机设备和存储介质 WO2020019418A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810819235.1A CN109240906B (zh) 2018-07-24 2018-07-24 数据库配置信息适配方法、装置、计算机设备和存储介质
CN201810819235.1 2018-07-24

Publications (1)

Publication Number Publication Date
WO2020019418A1 true WO2020019418A1 (zh) 2020-01-30

Family

ID=65073023

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104760 WO2020019418A1 (zh) 2018-07-24 2018-09-10 数据库配置信息适配方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN109240906B (zh)
WO (1) WO2020019418A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966704A (zh) * 2020-07-09 2020-11-20 杭州传化智能制造科技有限公司 Orm框架实现方法、系统、计算机设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5550971A (en) * 1993-06-30 1996-08-27 U S West Technologies, Inc. Method and system for generating a user interface adaptable to various database management systems
US20040216068A1 (en) * 2003-04-28 2004-10-28 International Business Machines Corp. Method, system and program product for reducing a size of a configuration database utilized to configure a hardware digital system
CN103226478A (zh) * 2013-05-22 2013-07-31 北京金和软件股份有限公司 一种自动生成并使用代码的方法
CN105447051A (zh) * 2014-09-22 2016-03-30 普天信息技术有限公司 一种数据库操作的方法和装置
CN108304463A (zh) * 2017-12-26 2018-07-20 中国广核电力股份有限公司 一种用于数据库的数据管理方法及其数据库应用组件

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7421709B2 (en) * 2004-01-05 2008-09-02 Information Builders, Inc. Framework for adapter used in enterprise application integration
CN102760096B (zh) * 2011-04-27 2016-03-30 阿里巴巴集团控股有限公司 测试用数据的生成方法、单元测试方法以及单元测试系统
CN103309650B (zh) * 2012-03-14 2016-08-24 阿里巴巴集团控股有限公司 持久层代码的生成方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5550971A (en) * 1993-06-30 1996-08-27 U S West Technologies, Inc. Method and system for generating a user interface adaptable to various database management systems
US20040216068A1 (en) * 2003-04-28 2004-10-28 International Business Machines Corp. Method, system and program product for reducing a size of a configuration database utilized to configure a hardware digital system
CN103226478A (zh) * 2013-05-22 2013-07-31 北京金和软件股份有限公司 一种自动生成并使用代码的方法
CN105447051A (zh) * 2014-09-22 2016-03-30 普天信息技术有限公司 一种数据库操作的方法和装置
CN108304463A (zh) * 2017-12-26 2018-07-20 中国广核电力股份有限公司 一种用于数据库的数据管理方法及其数据库应用组件

Also Published As

Publication number Publication date
CN109240906B (zh) 2021-08-06
CN109240906A (zh) 2019-01-18

Similar Documents

Publication Publication Date Title
WO2020000706A1 (zh) 基于数据库比对的接口测试方法、系统、设备和存储介质
JP6720144B2 (ja) 条件付き検証規則
CN108459962B (zh) 代码规范性检测方法、装置、终端设备及存储介质
RU2565109C2 (ru) Способ и устройство для восстановления резервной базы данных
WO2018000607A1 (zh) 一种识别测试用例失败原因的方法及电子设备
US20210191845A1 (en) Unit testing of components of dataflow graphs
WO2019047480A1 (zh) 程序更新方法、计算机可读存储介质、终端设备及装置
WO2019056475A1 (zh) 测试任务自动化管理方法、装置、设备及存储介质
CN111078637B (zh) 脚本文件上线方法、装置、计算机设备及存储介质
CN108573019B (zh) 一种数据迁移方法、装置、电子设备及可读存储介质
CN111158741A (zh) 监控业务模块对第三方类库依赖关系变化的方法及装置
WO2019134287A1 (zh) 一种版本信息管理方法、电子设备及可读存储介质
CN111026568A (zh) 数据和任务关系构建方法、装置、计算机设备及存储介质
JP5179207B2 (ja) ソフトウェア開発支援の装置、そのプログラム、及び方法
CN111694612A (zh) 配置检查方法、装置、计算机系统及存储介质
WO2023236504A1 (zh) 一种数据库管理方法、系统、电子设备及存储介质
CN110647463B (zh) 一种恢复测试断点的方法、装置、电子设备
JP2011145824A (ja) 情報処理装置、障害解析方法及び障害解析プログラム
US10042743B2 (en) Computer system testing
WO2020019418A1 (zh) 数据库配置信息适配方法、装置、计算机设备和存储介质
CN114218193A (zh) 数据迁移方法、装置、计算机设备和可读存储介质
CN107092671B (zh) 一种元信息管理的方法及设备
CN116010283A (zh) 测试案例修复方法、装置、计算机设备和存储介质
CN110309149B (zh) 一种数据表处理方法、装置、电子设备及存储介质
CN114416689A (zh) 数据迁移方法、装置、计算机设备、存储介质

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

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

Country of ref document: EP

Kind code of ref document: A1