WO2019165691A1 - 自动生成测试案例的方法、装置、设备及可读存储介质 - Google Patents

自动生成测试案例的方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2019165691A1
WO2019165691A1 PCT/CN2018/083934 CN2018083934W WO2019165691A1 WO 2019165691 A1 WO2019165691 A1 WO 2019165691A1 CN 2018083934 W CN2018083934 W CN 2018083934W WO 2019165691 A1 WO2019165691 A1 WO 2019165691A1
Authority
WO
WIPO (PCT)
Prior art keywords
test case
sql
structure table
table information
automatically generating
Prior art date
Application number
PCT/CN2018/083934
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 WO2019165691A1 publication Critical patent/WO2019165691A1/zh

Links

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/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Definitions

  • the present application relates to the field of software technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for automatically generating a test case.
  • the application software is generally composed of files that can be recognized by the hardware processing unit converted by the program code through the compiler.
  • Complex software requires the development of a large amount of complex program code, so program code management issues have become increasingly prominent.
  • the main purpose of the present application is to provide a method, a device, a device and a computer readable storage medium for automatically generating a test case, aiming at solving the existing test case writing method, high labor cost and time cost, resulting in reduced development efficiency and test efficiency. Low technical problems.
  • the present application provides a method for automatically generating a test case, the method comprising:
  • the method before the step of testing the JAVA entity class code according to the generated test case, the method further includes:
  • the generated test case is fed back to the customer, the test case selected by the user is received, and the test case selected by the user is taken as a case for performing JAVA entity class code test.
  • the step of extracting the preset fixed template and adding the sql test data and the database structure table information to the fixed template, and generating the corresponding test case includes:
  • the name of the table and the name of the table in the database structure table information are converted into a large hump or a small hump to form a JAVA entity class table name and/or a field name;
  • the database structure table information includes a row or column field type
  • the sql statement includes a preset sql field type.
  • the step of converting the structure table information into an sql statement by using the correspondence between the database structure table information and the sql statement, and forming the sql test data includes:
  • the method further includes:
  • the corresponding field type correspondence table is extracted, and the structure table information is converted into a JAVA entity class code according to the extracted field type correspondence table.
  • the step of extracting the corresponding field type correspondence table and converting the structure table information into the JAVA entity class code according to the extracted field type correspondence table includes:
  • the structure table information is converted into a JAVA entity class code according to the mapped JAVA type and the JAVA entity class name.
  • the method further includes:
  • the corresponding Chinese comment name is obtained through the correspondence between the structure table information, and the extracted Chinese comment name is added to the generated test case.
  • the present application further provides an apparatus for automatically generating a test case, the apparatus comprising:
  • An obtaining module configured to create a database structure table according to the received instruction, and obtain the database structure table information
  • a conversion module configured to convert the structure table information into an sql statement by using a correspondence between the database structure table information and the sql statement to form sql test data
  • An extraction module configured to extract a preset fixed template, and add sql test data and database structure table information to the fixed template to generate a corresponding test case;
  • the present application further provides an apparatus for automatically generating a test case, where the device for automatically generating a test case includes a processor, a network interface, a user interface, and a memory, where the automatically generated test case is stored in the memory. a program for executing the program for automatically generating a test case to implement the method of automatically generating a test case as described above.
  • the present application further provides a computer readable storage medium, where the program for automatically generating a test case is stored, and the program for automatically generating a test case is implemented by a processor. The steps of the method of automatically generating a test case as described above.
  • the method, device, device and computer readable storage medium for automatically generating a test case proposed by the present application firstly create a database structure table according to the received instruction, and obtain the database structure table information; and the database structure table information and the sql statement Corresponding relationship, converting the structure table information into sql statement, forming sql test data; extracting a preset fixed template, and adding sql test data and database structure table information to the fixed template to generate a corresponding test case; According to the generated test case, the JAVA entity class code is tested. According to the above manner, the test case can be generated according to the database structure table information, the sql test data and the fixed template, without requiring the user to manually write, thereby improving the code development efficiency and improving. Test code writing and the efficiency of code testing.
  • FIG. 1 is a schematic flowchart of a first embodiment of a method for automatically generating a test case according to the present application
  • FIG. 2 is a schematic diagram of a refinement process of a step of automatically generating a test case by extracting a preset fixed template, adding sql test data and database structure table information to the fixed template, and generating a corresponding test case;
  • FIG. 3 is a schematic diagram of a refinement process of the step of converting the structure table information into an sql statement by the correspondence between the database structure table information and the sql statement by the method for automatically generating a test case according to the present application;
  • FIG. 4 is a schematic flowchart of a second embodiment of a method for automatically generating a test case according to the present application
  • FIG. 5 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present application.
  • the main solution of the embodiment of the present application is: firstly, a database structure table is created according to the received instruction, and the database structure table information is obtained; and the structure table information is converted by the correspondence between the database structure table information and the sql statement. Forming sql test data for the sql statement; extracting the preset fixed template, adding the sql test data and the database structure table information to the fixed template, generating a corresponding test case; testing the JAVA entity class code according to the generated test case
  • the test case can be generated according to the database structure table information, the sql test data, and the fixed template, without requiring the user to manually write, thereby improving the code development efficiency, improving the test code writing, and the efficiency of the code test.
  • the present application provides a method of automatically generating a test case.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for automatically generating a test case according to the present application.
  • the method includes:
  • Step S10 creating a database structure table according to the received instruction, and acquiring the database structure table information
  • the test case is generated by using the database structure table, and the user is not required to manually write, thereby improving the efficiency of code writing, specifically through PowerDesigner.
  • Extensible Markup Language for Notes XML, Extensible MarkupLanguage
  • the format is created.
  • the extended query file name uniquely mapping a pre-created extended query file
  • the extended query file is a structured query language of the multi-table associated query (SQL Structured Query Language) Information file.
  • the table cust_test_info for testing obtains the database structure table information
  • the structure table information may include a table name, a field name, a Chinese comment name, a field type, and a field length;
  • the field name may be test_name , the field type is varchar(10), not null is not null, the Chinese comment is named "test name”.
  • Step S20 by converting the correspondence between the database structure table information and the sql statement, converting the structure table information into an sql statement to form sql test data;
  • the database structure table information includes a row or column field type
  • the sql statement includes a preset sql field type, and then according to the row or column field type in the database structure table information and the preset sql field type Correspondence relationship, find the corresponding row or column field value, and extract the default sql template, according to the found row or column field value and the preset sql template, convert the structure table information into sql statement to form a sql test data.
  • step S20 further includes:
  • Step S21 searching for a corresponding row or column field type according to the preset sql field type, and extracting the found row or column field value;
  • the corresponding row or column field type is searched according to the preset sql field type, and the found row or column field value is extracted, wherein the preset sql field type may be a database structure table name, and the database structure
  • the table name can be input by the user.
  • the corresponding row or column field type, field name and other field values can be found according to the received database structure table name;
  • Step S22 obtaining a preset sql template, and adding the found row or column field value to the obtained sql template, obtaining the converted sql statement, and forming sql test data.
  • the default sql template is sql statement General statement, such as DELETE FROM, WHERE, etc.
  • Step S30 extracting a preset fixed template, and adding sql test data and database structure table information to the fixed template to generate a corresponding test case;
  • the preset JAVA test fixed template may be further extracted, and the sql test data and the database structure table information are added to the fixed template to generate a corresponding test case.
  • the step S30 includes:
  • Step S31 performing name conversion on the table name and/or the field name in the database structure table information, converting into a large hump or a small hump form, forming a JAVA entity class table name and/or a field name;
  • the table name and/or the field name in the database structure table information are first converted into a large hump or a small hump, for example, the test_name is modified to a testName in the form of a hump to form a JAVA entity class table name and/or a field. name;
  • Step S32 adding the sql test data and the converted database structure table information to the extracted fixed template to generate a corresponding test case.
  • Adding the sql test data and the converted database structure table information to the extracted fixed template to generate a corresponding test case specifically, adding a title of the sql test data to a preset position in the fixed template.
  • the expression added to the fixed template is: @Sql("classpath:initdata/Test Cust Test InfoServiceInitData.sql"), where Test Cust Test InfoServiceInitData.sql is the file name of the sql test data.
  • the specific sql test data can be found by the sql file name, so in the process of adding, the sql file name can be added to the fixed template.
  • the fixed template is a general statement of the JAVA entity class code.
  • Step S40 testing the JAVA entity class code according to the generated test case.
  • test case After generating the test case, you can test the JAVA entity class code based on the generated test case.
  • the method for automatically generating a test case firstly creates a database structure table according to the received instruction, and obtains the database structure table information; and the structure table is obtained by the correspondence between the database structure table information and the sql statement.
  • the information is converted into a sql statement to form sql test data; the preset fixed template is extracted, and the sql test data and the database structure table information are added to the fixed template to generate a corresponding test case; the JAVA entity class is generated according to the generated test case.
  • Code test through the above method, the test case can be generated according to the database structure table information, the sql test data and the fixed template, without requiring the user to manually write, thereby improving the code development efficiency, improving the test code writing, and the code test. effectiveness.
  • a method for automatically generating a test case based on the present application provides a second embodiment of the method for automatically generating a test case according to the present application.
  • step before the step S40 further includes:
  • step S50 the generated test case is fed back to the client, the test case selected by the user is received, and the test case selected by the user is used as a case for performing JAVA entity class code test.
  • the generated test case may include multiple, the user may select the generated test case, and after receiving the test case selected by the user, the test case selected by the user may be used as the JAVA entity class code test. Case.
  • the method for automatically generating a test case based on the present application provides a third embodiment of the method for automatically generating a test case by the present application.
  • step after the step S10 further includes:
  • the corresponding field type correspondence table is extracted, and the structure table information is converted into a JAVA entity class code according to the extracted field type correspondence table.
  • the JAVA entity class code may be generated by using a database structure table. Specifically, when receiving the conversion instruction, the corresponding extended query file is first read according to the extended query file name, where the extended query is performed.
  • the file contains: update Statements and extended queries into the parameter fields. Conversion device in the above update Under the instruction of the statement, an input field field is generated according to the obtained structure table information and the above-mentioned extended query input parameter field: an update of the extended query is generated according to the input field field and the preset first update function template. Function.
  • the above extended query file may further include: select Statements, extended query result fields, and instructions for indicating single-record queries or multi-record queries.
  • An instruction output field field is generated according to the obtained structure table information and the extended query result field: if the indication information indicates a multi-record query, generating according to the output field field and the preset multi-record query function template
  • the multi-record query function of the extended query if the indication information indicates a single record query, the single record query function of the extended query is generated according to the output field field and the preset single record query field type correspondence table.
  • the above single record query means that the cursor is closed after the call is completed.
  • the above multi-record query refers to opening the cursor on the first call and reading the data to fill the given structure array.
  • the step of extracting the corresponding field type correspondence table and converting the structure table information into the JAVA entity class code according to the extracted field type correspondence table includes:
  • the structure table information may be mapped into a JAVA type by using the corresponding relationship table. For example, if the field type correspondence table is used, the structure table information type is BIGINT, and the corresponding JAVA type. If it is Long, when the structure table information is BIGINT, it is mapped to Long according to the field type correspondence table;
  • the database table name is further converted into a large hump or a small hump as a JAVA entity class name, for example, the test_name is modified to a hump form testName as a JAVA entity class. name.
  • the structure table information is converted into a JAVA entity class code according to the mapped JAVA type and the JAVA entity class name.
  • the converted JAVA type is sorted, and the structure table information can be converted into a JAVA entity class code.
  • the method for automatically generating a test case when receiving the conversion instruction, extracts a corresponding field type correspondence table, and converts the structure table information into a JAVA entity class according to the extracted field type correspondence table.
  • Code you can automatically generate code, without the need for users to manually write, thereby improving the efficiency of code development.
  • the method for automatically generating a test case based on the present application provides a fourth embodiment of the method for automatically generating a test case by the present application.
  • step after the step S30 further includes:
  • the corresponding Chinese comment name is obtained through the correspondence between the structure table information, and the extracted Chinese comment name is added to the generated test case.
  • the corresponding Chinese comment can be further added to the generated test case, so that the user can read the file, specifically, the correspondence relationship between the structure table information, for example, according to the table name.
  • Find the corresponding Chinese comment name, etc. obtain the corresponding Chinese comment name, and add the extracted Chinese comment name to the generated test case.
  • the corresponding Chinese comment name is obtained through the correspondence relationship of the structure table information, and the extracted Chinese comment name is added to the generated test case, thereby automatically and flexibly adding the Chinese comment. It does not require manual addition by users, which improves development efficiency and improves the accuracy of Chinese annotations, thereby reducing storage space and making it easier for users to read.
  • the application further provides an apparatus for automatically generating a test case, the apparatus comprising:
  • An obtaining module configured to create a database structure table according to the received instruction, and obtain the database structure table information
  • a conversion module configured to convert the structure table information into an sql statement by using a correspondence between the database structure table information and the sql statement to form sql test data
  • An extraction module configured to extract a preset fixed template, and add sql test data and database structure table information to the fixed template to generate a corresponding test case;
  • the specific embodiment of the device for automatically generating a test case in the present application is substantially the same as the embodiment of the method for automatically generating a test case, and is not described herein.
  • the embodiment of the present application further provides an apparatus for automatically generating a test case.
  • FIG. 5 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present application.
  • the device for automatically generating a test case may include a processor 1001, such as a CPU, a network interface 1002, a user interface 1003, and a memory 1004. Connection communication between these components can be achieved via a communication bus.
  • the network interface 1002 may optionally include a standard wired interface (for connecting to a wired network), a wireless interface (such as a WI-FI interface, a Bluetooth interface, an infrared interface, etc. for connecting to a wireless network).
  • the user interface 1003 can include a display, an input unit such as a keyboard, and the optional user interface 1003 can also include a standard wired interface (eg, for connecting a wired keyboard, a wired mouse, etc.) and/or a wireless interface (eg, Used to connect a wireless keyboard, wireless mouse).
  • the memory 1004 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
  • the memory 1004 can also optionally be a storage device independent of the aforementioned processor 1001.
  • the device for automatically generating the test case may further include a camera, RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
  • RF Radio
  • RF Radio
  • the device structure of the automatically generated test case shown in the figure does not constitute a limitation on the device that automatically generates the test case, and may include more or less components than the illustration, or combine some components. , or different parts layout.
  • a memory 1004 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a program for automatically generating Chinese comments.
  • the operating system is a program for managing and controlling device hardware and software resources for automatically generating test cases, supporting network communication modules, user interface modules, programs for automatically generating test cases, and other programs or software operations; network communication modules for management And a control network interface 1002; the user interface module is for managing and controlling the user interface 1003.
  • the network interface 1002 is mainly used for connecting to a database and performing data communication with the database;
  • the user interface 1003 is mainly used for connecting a client (which can be understood as a client), and performing with the client.
  • Data communication such as displaying information to the client through a window, or receiving operation information sent by the client;
  • the processor 1001 may be configured to execute a program for automatically generating a test case stored in the memory 1004 to implement an automatically generated test case as described above. Method of steps of various embodiments.
  • the application also provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the above Method of automatically generating a test case The steps of various embodiments.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods of various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请公开了一种自动生成测试案例的方法,所述方法包括以下步骤:根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;根据生成的测试案例对JAVA实体类代码测试。本申请还公开了一种自动生成测试案例的装置、设备及计算机可读存储介质。本申请能够简化开发人员编写代码的工作,减少代码开发时间,提高代码开发效率,提高测试代码的编写、以及代码测试效率。

Description

自动生成测试案例的方法、装置、设备及可读存储介质
本申请要求于2018年2月28日提交中国专利局、申请号为201810173069.2、发明名称为“自动生成测试案例的方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及软件技术领域,尤其涉及一种自动生成测试案例的方法、装置、设备及计算机可读存储介质。
背景技术
随着人类各种应用以及硬件芯片技术的发展,各种应用软件越来越复杂和庞大,应用软件一般是由程序代码经过编译器转化的硬件处理单元能够识别的文件组成。复杂的软件需要开发大量的复杂的程序代码,因此程序代码管理问题己经变得日益突出。
目前在程序代码测试过程中几乎都是人工撰写测试用例,以及人工进行用例测试,人工成本和时间成本高,从一定程度上导致人力资源浪费,并且会造成开发效率降低,测试效率低下。
发明内容
本申请的主要目的在于提出一种自动生成测试案例的方法、装置、设备及计算机可读存储介质,旨在解决现有的测试用例编写方法人工成本和时间成本高,造成开发效率降低,测试效率低下的技术问题。
为实现上述目的,本申请提供一种自动生成测试案例的方法,所述方法包括:
根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;
通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;
提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;
根据生成的测试案例对JAVA实体类代码测试。
可选地,所述根据生成的测试案例对JAVA实体类代码测试的步骤之前,还包括:
将生成的测试案例反馈至客户,接收用户挑选的测试案例,并将用户挑选的测试案例作为进行JAVA实体类代码测试的案例。
可选地,所述提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例的步骤包括:
将数据库结构表信息中的表名和\或字段名进行名称转换,转换成大驼峰或小驼峰的形式,形成JAVA实体类表名和\或字段名;
将所述sql测试数据及转换后数据库结构表信息添加至提取到的固定模板中,生成对应的测试案例。
可选地,所述数据库结构表信息包括行或列字段类型,所述sql语句包括预设sql字段类型,
所述通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据的步骤包括:
根据所述预设sql字段类型查找对应的行或列字段类型,提取查找到的行或列字段值;
获取预设的sql模板,并将查找到的行或列字段值添加至获取到的sql模板中,获得转换后的sql语句,形成sql测试数据。
可选地,所述根据接收到的指令创建数据库结构表,获取所述数据库结构表信息的步骤之后,还包括:
当接收到转换指令时,提取对应的字段类型对应关系表,并根据提取到的字段类型对应关系表将所述结构表信息转换为JAVA实体类代码。
可选地,所述提取对应的字段类型对应关系表,并根据提取到的字段类型对应关系表将所述结构表信息转换为JAVA实体类代码的步骤包括:
提取对应的字段类型对应关系表,并通过所述对应关系表将结构表信息映射成JAVA类型;
将数据库表名转换成大驼峰或小驼峰的形式,作为JAVA实体类名称;
根据映射的JAVA类型及JAVA实体类名称将所述结构表信息转换为JAVA实体类代码。
可选地,所述提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例的步骤之后,还包括:
通过所述结构表信息的对应关系,获取对应的中文注释名,并将提取到的中文注释名添加至生成的测试案例中。
此外,为实现上述目的,本申请还提供一种自动生成测试案例的装置,所述装置包括:
获取模块,用于根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;
转换模块,用于通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;
提取模块,用于提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;
生成模块,用于根据生成的测试案例对JAVA实体类代码测试。
此外,为实现上述目的,本申请还提供一种自动生成测试案例的设备,所述自动生成测试案例的设备包括处理器、网络接口、用户接口及存储器,所述存储器中存储有自动生成测试案例的程序;所述处理器用于执行所述自动生成测试案例的程序,以实现如上所述的自动生成测试案例的方法的步骤。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有自动生成测试案例的程序,所述自动生成测试案例的程序被处理器执行时实现如上所述的自动生成测试案例的方法的步骤。
本申请提出的自动生成测试案例的方法、装置、设备及计算机可读存储介质,首先根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;根据生成的测试案例对JAVA实体类代码测试,通过上述方式,即可根据数据库结构表信息、sql测试数据及所述固定模板生成测试案例,不需要用户手动进行编写,从而提高代码开发效率,提高测试代码的编写、以及代码测试的效率。
附图说明
图1为本申请自动生成测试案例的方法第一实施例的流程示意图;
图2为本申请自动生成测试案例的方法提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例的步骤的细化流程示意图;
图3为本申请自动生成测试案例的方法通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据的步骤的细化流程示意图;
图4为本申请自动生成测试案例的方法第二实施例的流程示意图;
图5为本申请实施例方案涉及的硬件运行环境的设备结构示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例的主要解决方案是:首先根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;根据生成的测试案例对JAVA实体类代码测试,通过上述方式,即可根据数据库结构表信息、sql测试数据及所述固定模板生成测试案例,不需要用户手动进行编写,从而提高代码开发效率,提高测试代码的编写、以及代码测试的效率。
本申请考虑到,目前在程序代码测试过程中几乎都是人工撰写测试用例,以及人工进行用例测试,人工成本和时间成本高,从一定程度上导致人力资源浪费,并且会造成开发效率降低,测试效率低下。
为此,本申请提供一种自动生成测试案例的方法。
参照图1,图1为本申请自动生成测试案例的方法第一实施例的流程示意图。
在本实施例中,该方法包括:
步骤S10,根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;
在本实施例中,采用通过数据库结构表的方式生成测试案例,不需要用户进行手动编写,提高代码编写的效率,具体可以通过PowerDesigner 的Notes 的可扩展标记语言(XML, Extensible MarkupLanguage) 格式进行创建。并建立拓展查询文件,该拓展查询文件名唯一映射一预先创建的拓展查询文件,该拓展查询文件为多表关联查询的结构化查询语言(SQL Structured Query Language) 信息文件。比如用于测试的表cust_test_info,获取所述数据库结构表信息,所述结构表信息可以包括表名、字段名、中文注释名、字段类型及字段长度等;比如假设字段名可以为test_name , 字段类型为varchar(10) , 不为空为not null, 中文注释名为“测试名称”。
步骤S20,通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;
具体地,所述数据库结构表信息包括行或列字段类型,所述sql语句包括预设sql字段类型,然后根据所述数据库结构表信息中的行或列字段类型与预设的sql字段类型的对应关系,查找对应的行或列字段值,并提取预设的sql模板,根据查找到的行或列字段值以及预设的sql模板,将所述结构表信息转换为sql语句,形成sql测试数据。
进一步地,参照图2,所述步骤S20还包括:
步骤S21,根据所述预设sql字段类型查找对应的行或列字段类型,提取查找到的行或列字段值;
具体地,根据所述预设sql字段类型查找对应的行或列字段类型,提取查找到的行或列字段值,其中所述预设的sql字段类型可以为数据库结构表名,所述数据库结构表名可以通过用户进行输入,在接收到用户输入的数据库结构表名之后,即可根据接收到的数据库结构表名查找对应的行或列字段类型、字段名称等字段值;
步骤S22,获取预设的sql模板,并将查找到的行或列字段值添加至获取到的sql模板中,获得转换后的sql语句,形成sql测试数据。
然后获取预设的sql模板,并将查找到的行或列字段值添加至获取到的sql模板中,即可获得转换后的sql语句,形成sql测试数据,其中预设的sql模板为sql语句的通用语句,比如DELETE FROM、WHERE等。
步骤S30,提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;
在生成测试数据之后,可以进一步提取预设的JAVA测试固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,即可生成对应的测试案例。
进一步地,参照图3,所述步骤S30包括:
步骤S31,将数据库结构表信息中的表名和\或字段名进行名称转换,转换成大驼峰或小驼峰的形式,形成JAVA实体类表名和\或字段名;
具体地,首先将数据库结构表信息中的表名和\或字段名进行名称转换,转换成大驼峰或小驼峰的形式,比如把test_name修改为驼峰形式的testName,形成JAVA实体类表名和\或字段名;
步骤S32,将所述sql测试数据及转换后数据库结构表信息添加至提取到的固定模板中,生成对应的测试案例。
将所述sql测试数据及转换后数据库结构表信息添加至提取到的固定模板中,生成对应的测试案例,具体地,将sql测试数据的标题添加至所述固定模板中的预设位置即可,比如添加至固定模板中的表现形式为:@Sql("classpath:initdata/Test Cust Test InfoServiceInitData.sql"),其中,Test Cust Test InfoServiceInitData.sql为sql测试数据的文件名,在执行测试案例过程中,通过所述sql文件名即可查找到具体的sql测试数据,因此在添加过程中,将sql文件名添加至固定模板即可,其实,所述固定模板为JAVA实体类代码的通用语句。
步骤S40,根据生成的测试案例对JAVA实体类代码测试。
在生成测试案例之后,即可根据生成的测试案例对JAVA实体类代码测试。
本实施例提出的自动生成测试案例的方法,首先根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;根据生成的测试案例对JAVA实体类代码测试,通过上述方式,即可根据数据库结构表信息、sql测试数据及所述固定模板生成测试案例,不需要用户手动进行编写,从而提高代码开发效率,提高测试代码的编写、以及代码测试的效率。
进一步地,参照图4,基于本申请自动生成测试案例的方法第一实施例提出本申请自动生成测试案例的方法第二实施例。
在本实施例中,所述步骤S40之前的步骤还包括:
步骤S50,将生成的测试案例反馈至客户,接收用户挑选的测试案例,并将用户挑选的测试案例作为进行JAVA实体类代码测试的案例。
在本实施例中,生成的测试案例可以包括多个,用户可以对生成的测试案例进行挑选,在接收到用户选择的测试案例之后,即可将用户挑选的测试案例作为进行JAVA实体类代码测试的案例。
进一步地,基于本申请自动生成测试案例的方法第一实施例提出本申请自动生成测试案例的方法第三实施例。
在本实施例中,所述步骤S10之后的步骤还包括:
当接收到转换指令时,提取对应的字段类型对应关系表,并根据提取到的字段类型对应关系表将所述结构表信息转换为JAVA实体类代码。
在本实施例中,可以采用通过数据库结构表的方式生成JAVA实体类代码,具体地,当接收到转化指令时,首先根据上述拓展查询文件名读取相应的拓展查询文件,其中,上述拓展查询文件中包含:update 语句和拓展查询入参字段。转换装置在上述update 语句的指示下,根据获取的结构表信息和上述拓展查询入参字段生成输入字段域:根据上述输入字段域和预设的第一update 函数模板,生成拓展查询的update 函数。进一步,上述拓展查询文件中还可以包含:select 语句、拓展查询结果字段以及用于指示单记录查询或多记录查询的指示信息。数据库操作代码生成装置在上述select 语句的指示下,根据获取的结构表信息和上述拓展查询结果字段生成输出字段域:若上述指示信息指示的是多记录查询,则根据上述输出字段域和预设的多记录查询函数模板,生成拓展查询的多记录查询函数:若上述指示信息指示的是单记录查询,则根据上述输出字段域和预设的单记录查询字段类型对应关系表,生成拓展查询的单记录查询函数。上述单记录查询是指在调用完成后游标即被关闭,上述多记录查询是指第一次调用时打开游标并读取数据装满给定的结构数组,如果该结构数组一次装不完,则循环调用直到装满该结构数组,最后一次取完数据将自动关闭游标,或者没有取完数据时显示关闭游标;通过查找到的字段域以及字段类型对应关系表,将数据库结构表中的字段名转换为JAVA实体类代码。
进一步地,所述提取对应的字段类型对应关系表,并根据提取到的字段类型对应关系表将所述结构表信息转换为JAVA实体类代码的步骤包括:
提取对应的字段类型对应关系表,并通过所述对应关系表将结构表信息映射成JAVA类型;
在提取得到对应的字段类型对应关系表之后,即可通过所述对应关系表将结构表信息映射成JAVA类型,比如,假设字段类型对应关系表中,结构表信息类型为BIGINT,对应的JAVA类型为Long,则当结构表信息为BIGINT时,根据所述字段类型对应关系表将其映射为Long即可;
将数据库表名转换成大驼峰或小驼峰的形式,作为JAVA实体类名称;
在将所有的结构表信息映射为对应的JAVA类型之后,进一步将数据库表名转换成大驼峰或小驼峰的形式,作为JAVA实体类名称,比如把test_name修改为驼峰形式的testName,作为JAVA实体类名称。
根据映射的JAVA类型及JAVA实体类名称将所述结构表信息转换为JAVA实体类代码。
然后按照结构表信息的顺序,将转换后的JAVA类型进行整理,即可将所述结构表信息转换为JAVA实体类代码。
本实施例提出的自动生成测试案例的方法,通过当接收到转换指令时,提取对应的字段类型对应关系表,并根据提取到的字段类型对应关系表将所述结构表信息转换为JAVA实体类代码,即可自动生成代码,不需要用户手动进行编写,从而提高代码开发效率。
进一步地,基于本申请自动生成测试案例的方法第一实施例提出本申请自动生成测试案例的方法第四实施例。
在本实施例中,所述步骤S30之后的步骤还包括:
通过所述结构表信息的对应关系,获取对应的中文注释名,并将提取到的中文注释名添加至生成的测试案例中。
在本实施例中,在生成测试案例之后,可以进一步对生成的测试案例添加对应的中文注释,从而便于用户进行阅读,具体地,通过所述结构表信息的对应关系,比如,根据表名,查找对应的中文注释名等,获取对应的中文注释名,并将提取到的中文注释名添加至生成的测试案例中,具体地,将提取到的中文注释名添加至生成的测试案例中的方法可以为,为生成的测试案例中每一句JAVA实体类代码添加对应提取到的中文注释名,或者遍历转换后的JAVA实体类代码,获得代码中的重复语句,然后在重复代码语句中首先出现的代码添加中文注释名即可,不需要为每一句代码添加中文注释,具体可以按照代码排列的先后,进行遍历,从而获取生成的JAVA实体类代码中的相同代码,不需要在重复代码语句中的每一句都添加中文注释,从而减少存储空间,或者在预设空间中遍历所有的JAVA实体类代码,比如每个显示页面中的JAVA实体类代码,具体可以按照各个页面中代码排列的先后,进行遍历,从而获取各个页面的JAVA实体类代码中的相同代码,从而获得预设空间中重复的代码语句,然后在预设空间中首次出现的重复代码语句添加中文注释名,从而减少存储空间,同时便于用户阅读,当然,还可以采用其他方式将中文注释名添加至JAVA实体类代码,在此不做限制。
本实施例提出的自动生成测试案例的,通过所述结构表信息的对应关系,获取对应的中文注释名,并将提取到的中文注释名添加至生成的测试案例中,实现自动灵活添加中文注释,不需要用户进行手动添加,从而提高开发效率,并且提高中文注释的准确性,从而减少存储空间,并且便于用户阅读。
本申请进一步提供一种自动生成测试案例的装置,所述装置包括:
获取模块,用于根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;
转换模块,用于通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;
提取模块,用于提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;
生成模块,用于根据生成的测试案例对JAVA实体类代码测试。
本申请自动生成测试案例的装置的具体实施例与上述自动生成测试案例的方法各实施例基本相同,在此不作赘述。
本申请实施例进一步提供一种自动生成测试案例的设备。
参照图5,图5为本申请实施例方案涉及的硬件运行环境的设备结构示意图。
如图5所示,该自动生成测试案例的设备可以包括:处理器1001,例如CPU,网络接口1002,用户接口1003,存储器1004。这些组件之间的连接通信可以通过通信总线实现。网络接口1002可选的可以包括标准的有线接口(用于连接有线网络)、无线接口(如WI-FI接口、蓝牙接口、红外线接口等,用于连接无线网络)。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口(例如用于连接有线键盘、有线鼠标等)和/或无线接口(例如用于连接无线键盘、无线鼠标)。存储器1004可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1004可选的还可以是独立于前述处理器1001的存储装置。
可选地,该自动生成测试案例的设备还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。
本领域技术人员可以理解,图中示出的自动生成测试案例的设备结构并不构成对自动生成测试案例的设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图5所示,作为一种计算机存储介质的存储器1004中可以包括操作系统、网络通信模块、用户接口模块以及自动生成中文注释的程序。其中,操作系统是管理和控制自动生成测试案例的设备硬件与软件资源的程序,支持网络通信模块、用户接口模块、自动生成测试案例的程序以及其他程序或软件的运行;网络通信模块用于管理和控制网络接口1002;用户接口模块用于管理和控制用户接口1003。
在图5所示的自动生成测试案例的设备中,网络接口1002主要用于连接数据库,与数据库进行数据通信;用户接口1003主要用于连接客户端(可以理解为用户端),与客户端进行数据通信,如通过窗口展示信息给客户端,或者接收客户端发送的操作信息;而处理器1001可以用于执行存储器1004中存储的自动生成测试案例的程序,以实现如上述的自动生成测试案例的方法各个实施例的步骤。
本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如上述的自动生成测试案例的方法各个实施例的步骤。
还需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种自动生成测试案例的方法,其特征在于,所述方法包括以下步骤:
    根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;
    通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;
    提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;
    根据生成的测试案例对JAVA实体类代码测试。
  2. 如权利要求1所述的自动生成测试案例的方法,其特征在于,所述根据生成的测试案例对JAVA实体类代码测试的步骤之前,还包括:
    将生成的测试案例反馈至客户,接收用户挑选的测试案例,并将用户挑选的测试案例作为进行JAVA实体类代码测试的案例。
  3. 如权利要求1所述的自动生成测试案例的方法,其特征在于,所述提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例的步骤包括:
    将数据库结构表信息中的表名和\或字段名进行名称转换,转换成大驼峰或小驼峰的形式,形成JAVA实体类表名和\或字段名;
    将所述sql测试数据及转换后数据库结构表信息添加至提取到的固定模板中,生成对应的测试案例。
  4. 如权利要求1所述的自动生成测试案例的方法,其特征在于,所述数据库结构表信息包括行或列字段类型,所述sql语句包括预设sql字段类型,所述通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据的步骤包括:
    根据所述预设sql字段类型查找对应的行或列字段类型,提取查找到的行或列字段值;
    获取预设的sql模板,并将查找到的行或列字段值添加至获取到的sql模板中,获得转换后的sql语句,形成sql测试数据。
  5. 如权利要求1所述的自动生成测试案例的方法,其特征在于,所述根据接收到的指令创建数据库结构表,获取所述数据库结构表信息的步骤之后,还包括:
    当接收到转换指令时,提取对应的字段类型对应关系表,并根据提取到的字段类型对应关系表将所述结构表信息转换为JAVA实体类代码。
  6. 如权利要求5所述的自动生成测试案例的方法,其特征在于,所述提取对应的字段类型对应关系表,并根据提取到的字段类型对应关系表将所述结构表信息转换为JAVA实体类代码的步骤包括:
    提取对应的字段类型对应关系表,并通过所述对应关系表将结构表信息映射成JAVA类型;
    将数据库表名转换成大驼峰或小驼峰的形式,作为JAVA实体类名称;
    根据映射的JAVA类型及JAVA实体类名称将所述结构表信息转换为JAVA实体类代码。
  7. 如权利要求1所述的自动生成测试案例的方法,其特征在于,所述提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例的步骤之后,还包括:
    通过所述结构表信息的对应关系,获取对应的中文注释名,并将提取到的中文注释名添加至生成的测试案例中。
  8. 一种自动生成测试案例的装置,其特征在于,所述装置包括:
    获取模块,用于根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;
    转换模块,用于通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;
    提取模块,用于提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;
    生成模块,用于根据生成的测试案例对JAVA实体类代码测试。
  9. 一种自动生成测试案例的设备,其特征在于,所述自动生成测试案例的设备包括处理器、网络接口、用户接口及存储器,所述存储器中存储有自动生成测试案例的程序;所述处理器用于执行所述自动生成测试案例的程序,以实现如下步骤:
    根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;
    通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;
    提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;
    根据生成的测试案例对JAVA实体类代码测试。
  10. 如权利要求9所述的自动生成测试案例的设备,其特征在于,所述处理器还用于执行所述自动生成测试案例的程序,以实现以下步骤:
    将生成的测试案例反馈至客户,接收用户挑选的测试案例,并将用户挑选的测试案例作为进行JAVA实体类代码测试的案例。
  11. 如权利要求9所述的自动生成测试案例的设备,其特征在于,所述处理器还用于执行所述自动生成测试案例的程序,以实现以下步骤:
    将数据库结构表信息中的表名和\或字段名进行名称转换,转换成大驼峰或小驼峰的形式,形成JAVA实体类表名和\或字段名;
    将所述sql测试数据及转换后数据库结构表信息添加至提取到的固定模板中,生成对应的测试案例。
  12. 如权利要求9所述的自动生成测试案例的设备,其特征在于,所述处理器还用于执行所述自动生成测试案例的程序,以实现以下步骤:
    根据所述预设sql字段类型查找对应的行或列字段类型,提取查找到的行或列字段值;
    获取预设的sql模板,并将查找到的行或列字段值添加至获取到的sql模板中,获得转换后的sql语句,形成sql测试数据。
  13. 如权利要求9所述的自动生成测试案例的设备,其特征在于,所述处理器还用于执行所述自动生成测试案例的程序,以实现以下步骤:
    当接收到转换指令时,提取对应的字段类型对应关系表,并根据提取到的字段类型对应关系表将所述结构表信息转换为JAVA实体类代码。
  14. 如权利要求13所述的自动生成测试案例的设备,其特征在于,所述处理器还用于执行所述自动生成测试案例的程序,以实现以下步骤:
    提取对应的字段类型对应关系表,并通过所述对应关系表将结构表信息映射成JAVA类型;
    将数据库表名转换成大驼峰或小驼峰的形式,作为JAVA实体类名称;
    根据映射的JAVA类型及JAVA实体类名称将所述结构表信息转换为JAVA实体类代码。
  15. 如权利要求9所述的自动生成测试案例的设备,其特征在于,所述处理器还用于执行所述自动生成测试案例的程序,以实现以下步骤:
    通过所述结构表信息的对应关系,获取对应的中文注释名,并将提取到的中文注释名添加至生成的测试案例中
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有自动生成测试案例的程序,所述自动生成测试案例的程序被处理器执行时实现如下步骤:
    根据接收到的指令创建数据库结构表,获取所述数据库结构表信息;
    通过所述数据库结构表信息与sql语句的对应关系,将所述结构表信息转换为sql语句,形成sql测试数据;
    提取预设的固定模板,并将sql测试数据以及数据库结构表信息添加至所述固定模板,生成对应的测试案例;
    根据生成的测试案例对JAVA实体类代码测试。
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述一个或者多个程序可被一个或者多个处理器执行,还实现以下步骤:
    将生成的测试案例反馈至客户,接收用户挑选的测试案例,并将用户挑选的测试案例作为进行JAVA实体类代码测试的案例。
  18. 如权利要求16所述的计算机可读存储介质,其特征在于,所述一个或者多个程序可被一个或者多个处理器执行,还实现以下步骤:
    将数据库结构表信息中的表名和\或字段名进行名称转换,转换成大驼峰或小驼峰的形式,形成JAVA实体类表名和\或字段名;
    将所述sql测试数据及转换后数据库结构表信息添加至提取到的固定模板中,生成对应的测试案例。
  19. 如权利要求16所述的计算机可读存储介质,其特征在于,所述一个或者多个程序可被一个或者多个处理器执行,还实现以下步骤:
    根据所述预设sql字段类型查找对应的行或列字段类型,提取查找到的行或列字段值;
    获取预设的sql模板,并将查找到的行或列字段值添加至获取到的sql模板中,获得转换后的sql语句,形成sql测试数据。
  20. 如权利要求16所述的计算机可读存储介质,其特征在于,所述一个或者多个程序可被一个或者多个处理器执行,还实现以下步骤:
    当接收到转换指令时,提取对应的字段类型对应关系表,并根据提取到的字段类型对应关系表将所述结构表信息转换为JAVA实体类代码。
PCT/CN2018/083934 2018-02-28 2018-04-20 自动生成测试案例的方法、装置、设备及可读存储介质 WO2019165691A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810173069.2A CN108399130A (zh) 2018-02-28 2018-02-28 自动生成测试案例的方法、装置、设备及可读存储介质
CN201810173069.2 2018-02-28

Publications (1)

Publication Number Publication Date
WO2019165691A1 true WO2019165691A1 (zh) 2019-09-06

Family

ID=63091583

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/083934 WO2019165691A1 (zh) 2018-02-28 2018-04-20 自动生成测试案例的方法、装置、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN108399130A (zh)
WO (1) WO2019165691A1 (zh)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716869A (zh) * 2019-09-18 2020-01-21 平安科技(深圳)有限公司 测试用例生成方法、装置、电子设备及计算机可读存储介质
CN110781074A (zh) * 2019-09-18 2020-02-11 平安银行股份有限公司 自动化测试方法、装置及存储介质
CN110825638A (zh) * 2019-11-08 2020-02-21 中国农业银行股份有限公司 一种测试案例生成方法、装置、服务器及存储介质
CN110837471A (zh) * 2019-11-06 2020-02-25 中国农业银行股份有限公司 一种测试方法、装置、服务器及存储介质
CN111143221A (zh) * 2019-12-28 2020-05-12 中国银行股份有限公司 一种测试方法及装置
CN111240967A (zh) * 2020-01-03 2020-06-05 北京字节跳动网络技术有限公司 一种代码生成方法及装置
CN111522748A (zh) * 2020-04-26 2020-08-11 中国农业银行股份有限公司 一种自动化测试案例生成方法、装置、服务器及存储介质
CN111782193A (zh) * 2020-07-03 2020-10-16 紫光云技术有限公司 一种基于java语言代码自动生成方法
CN111831561A (zh) * 2020-06-28 2020-10-27 许昌开普检测研究院股份有限公司 一种插件式测试案例库系统
CN111881220A (zh) * 2020-06-22 2020-11-03 北京城市网邻信息技术有限公司 列表存储下的数据操作方法、装置、电子设备和存储介质
CN111930623A (zh) * 2020-08-10 2020-11-13 中国工商银行股份有限公司 一种测试案例构建方法、装置及电子设备
CN112860774A (zh) * 2021-01-06 2021-05-28 宝能(西安)汽车研究院有限公司 信号接口匹配方法及装置、计算机设备和可读存储介质
CN113515454A (zh) * 2021-07-01 2021-10-19 深圳创维-Rgb电子有限公司 测试用例生成方法、装置、设备及存储介质
CN113569547A (zh) * 2020-04-28 2021-10-29 北京国双科技有限公司 警务系统测试方法及相关装置
CN114153911A (zh) * 2021-12-21 2022-03-08 浪潮软件集团有限公司 基于vba技术自定义生成数据库测试数据的方法与系统

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968591A (zh) * 2018-09-30 2020-04-07 北京国双科技有限公司 查询语句的生成方法、装置、存储介质及处理器
CN109582563B (zh) * 2018-10-26 2024-04-05 平安科技(深圳)有限公司 测试案例的测试方法、装置、计算机设备及存储介质
CN109614315B (zh) * 2018-11-06 2021-11-23 武汉达梦数据库股份有限公司 一种数据同步测试用例的自动生成方法及系统
CN109992508A (zh) * 2019-03-22 2019-07-09 恒生电子股份有限公司 测试用例自动化生成方法、装置和电子设备
CN110162459A (zh) * 2019-04-15 2019-08-23 深圳壹账通智能科技有限公司 测试案例生成方法、装置及计算机可读存储介质
CN110750442B (zh) * 2019-09-06 2022-08-19 深圳平安医疗健康科技服务有限公司 测试用例的生成方法、装置、设备及存储介质
CN111078205B (zh) * 2019-11-22 2024-01-26 北京锐安科技有限公司 一种模块化编程方法、装置、存储介质及电子设备
CN110955600B (zh) * 2019-11-27 2023-11-10 中国银行股份有限公司 接口测试方法及装置
CN111459830B (zh) * 2020-04-07 2024-03-08 建信金融科技有限责任公司 测试案例生成方法及装置
US11392487B2 (en) * 2020-11-16 2022-07-19 International Business Machines Corporation Synthetic deidentified test data
CN112860580A (zh) * 2021-03-17 2021-05-28 厦门极致互动网络技术股份有限公司 一种基于Erlang的数据探测方法
CN112988595A (zh) * 2021-04-25 2021-06-18 深圳壹账通智能科技有限公司 动态同步测试方法、装置、设备及存储介质
CN113609128A (zh) * 2021-07-21 2021-11-05 深圳市元征未来汽车技术有限公司 生成数据库实体类的方法、装置、终端设备及存储介质
CN114416727A (zh) * 2021-12-21 2022-04-29 北京达佳互联信息技术有限公司 数据处理方法、装置、电子设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473325A (zh) * 2013-09-13 2013-12-25 中国工商银行股份有限公司 一种实现生成测试案例数据的系统及方法
CN103838672A (zh) * 2014-03-04 2014-06-04 中国工商银行股份有限公司 一种通用报表的自动化测试方法及装置
CN105373472A (zh) * 2015-10-10 2016-03-02 北京中创信测信息技术有限公司 一种基于数据库的统计准确性的测试方法及测试系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473325A (zh) * 2013-09-13 2013-12-25 中国工商银行股份有限公司 一种实现生成测试案例数据的系统及方法
CN103838672A (zh) * 2014-03-04 2014-06-04 中国工商银行股份有限公司 一种通用报表的自动化测试方法及装置
CN105373472A (zh) * 2015-10-10 2016-03-02 北京中创信测信息技术有限公司 一种基于数据库的统计准确性的测试方法及测试系统

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110781074A (zh) * 2019-09-18 2020-02-11 平安银行股份有限公司 自动化测试方法、装置及存储介质
CN110716869A (zh) * 2019-09-18 2020-01-21 平安科技(深圳)有限公司 测试用例生成方法、装置、电子设备及计算机可读存储介质
CN110716869B (zh) * 2019-09-18 2024-05-14 平安科技(深圳)有限公司 测试用例生成方法、装置、电子设备及计算机可读存储介质
CN110837471A (zh) * 2019-11-06 2020-02-25 中国农业银行股份有限公司 一种测试方法、装置、服务器及存储介质
CN110837471B (zh) * 2019-11-06 2023-06-09 中国农业银行股份有限公司 一种测试方法、装置、服务器及存储介质
CN110825638B (zh) * 2019-11-08 2023-06-09 中国农业银行股份有限公司 一种测试案例生成方法、装置、服务器及存储介质
CN110825638A (zh) * 2019-11-08 2020-02-21 中国农业银行股份有限公司 一种测试案例生成方法、装置、服务器及存储介质
CN111143221A (zh) * 2019-12-28 2020-05-12 中国银行股份有限公司 一种测试方法及装置
CN111143221B (zh) * 2019-12-28 2024-01-30 中国银行股份有限公司 一种测试方法及装置
CN111240967A (zh) * 2020-01-03 2020-06-05 北京字节跳动网络技术有限公司 一种代码生成方法及装置
CN111240967B (zh) * 2020-01-03 2023-09-15 北京字节跳动网络技术有限公司 一种代码生成方法及装置
CN111522748B (zh) * 2020-04-26 2023-06-13 中国农业银行股份有限公司 一种自动化测试案例生成方法、装置、服务器及存储介质
CN111522748A (zh) * 2020-04-26 2020-08-11 中国农业银行股份有限公司 一种自动化测试案例生成方法、装置、服务器及存储介质
CN113569547A (zh) * 2020-04-28 2021-10-29 北京国双科技有限公司 警务系统测试方法及相关装置
CN111881220A (zh) * 2020-06-22 2020-11-03 北京城市网邻信息技术有限公司 列表存储下的数据操作方法、装置、电子设备和存储介质
CN111831561A (zh) * 2020-06-28 2020-10-27 许昌开普检测研究院股份有限公司 一种插件式测试案例库系统
CN111831561B (zh) * 2020-06-28 2024-01-12 许昌开普检测研究院股份有限公司 一种插件式测试案例库系统
CN111782193A (zh) * 2020-07-03 2020-10-16 紫光云技术有限公司 一种基于java语言代码自动生成方法
CN111930623A (zh) * 2020-08-10 2020-11-13 中国工商银行股份有限公司 一种测试案例构建方法、装置及电子设备
CN111930623B (zh) * 2020-08-10 2023-07-25 中国工商银行股份有限公司 一种测试案例构建方法、装置及电子设备
CN112860774A (zh) * 2021-01-06 2021-05-28 宝能(西安)汽车研究院有限公司 信号接口匹配方法及装置、计算机设备和可读存储介质
CN113515454A (zh) * 2021-07-01 2021-10-19 深圳创维-Rgb电子有限公司 测试用例生成方法、装置、设备及存储介质
CN114153911A (zh) * 2021-12-21 2022-03-08 浪潮软件集团有限公司 基于vba技术自定义生成数据库测试数据的方法与系统

Also Published As

Publication number Publication date
CN108399130A (zh) 2018-08-14

Similar Documents

Publication Publication Date Title
WO2019165691A1 (zh) 自动生成测试案例的方法、装置、设备及可读存储介质
WO2019169814A1 (zh) 自动生成中文注释的方法、装置、设备及存储介质
WO2019174375A1 (zh) 接口测试方法、装置、设备及计算机可读存储介质
WO2019127837A1 (zh) 建表脚本生成方法、装置、设备及计算机可读存储介质
WO2019223070A1 (zh) 应用测试方法、装置、设备及可读存储介质
WO2019100638A1 (zh) 数据同步方法、装置、设备及存储介质
WO2018107610A1 (zh) 业务数据处理方法、系统、设备及计算机可读存储介质
WO2019041832A1 (zh) 修改源数据库表结构的方法、服务器、系统及存储介质
WO2017041538A1 (zh) 终端用户界面的受控显示方法及装置
WO2018227880A1 (zh) 数据比对方法、装置、设备及可读存储介质
WO2017028601A1 (zh) 智能终端的语音控制方法、装置及电视机系统
WO2019192085A1 (zh) 银企直联通信方法、装置、设备及计算机可读存储介质
WO2020224247A1 (zh) 基于区块链的数据溯源方法、装置、设备及可读存储介质
WO2019119624A1 (zh) 基于Excel表的计算方法、装置、设备及存储介质
WO2018120430A1 (zh) 一种页面构建方法、终端、计算机可读存储介质及页面构建设备
WO2015144089A1 (en) Application recommending method and apparatus
WO2019024219A1 (zh) 文档自动生成方法、装置、文档自动生成器及介质
WO2013143341A1 (zh) 一种更新移动终端的应用信息的方法及装置
WO2019075973A1 (zh) 应用程序的测试方法及装置
WO2019161615A1 (zh) 账单录入方法、系统、光学字符识别服务器和存储介质
WO2015131803A1 (en) Application recommending method and system
WO2017036208A1 (zh) 显示界面中的信息提取方法及系统
WO2018098880A1 (zh) 网站信息下载方法及装置
WO2018188342A1 (zh) 脚本文件生成方法、装置、设备和计算机可读存储介质
WO2019127869A1 (zh) 漏洞信息收集方法、装置、设备及可读存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 20/10/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18908006

Country of ref document: EP

Kind code of ref document: A1