CN110874326B - Test case generation method and device, computer equipment and storage medium - Google Patents

Test case generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110874326B
CN110874326B CN201911151349.4A CN201911151349A CN110874326B CN 110874326 B CN110874326 B CN 110874326B CN 201911151349 A CN201911151349 A CN 201911151349A CN 110874326 B CN110874326 B CN 110874326B
Authority
CN
China
Prior art keywords
information
test
data
user data
test case
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201911151349.4A
Other languages
Chinese (zh)
Other versions
CN110874326A (en
Inventor
陶金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wanghai Kangxin Beijing Technology Co ltd
Original Assignee
Wanghai Kangxin Beijing Technology Co ltd
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 Wanghai Kangxin Beijing Technology Co ltd filed Critical Wanghai Kangxin Beijing Technology Co ltd
Priority to CN201911151349.4A priority Critical patent/CN110874326B/en
Publication of CN110874326A publication Critical patent/CN110874326A/en
Application granted granted Critical
Publication of CN110874326B publication Critical patent/CN110874326B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

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)

Abstract

The embodiment of the application discloses a test case generation method, a device, computer equipment and a storage medium, comprising the following steps: acquiring test requirement information to be processed; searching user data with a preset association relation with the test requirement information in a preset information database; and generating at least one test case based on the user data according to a preset data template. And searching user data with an association relation with the test requirement information in a preset information database by setting the test requirement information, and converting the user data according to a set data template by taking the associated user data as a data source to generate a test case for testing. The method avoids the use of manpower to collect data and typeset the data, greatly simplifies the flow of test case data and improves the efficiency of data testing.

Description

Test case generation method and device, computer equipment and storage medium
Technical Field
The embodiment of the application relates to the field of data testing, in particular to a test case generation method, a test case generation device, computer equipment and a storage medium.
Background
The data test is a method that the system finishes processing test data under the control or in-person operation of auditors, and then the output result is checked with the result which is calculated by the auditors independently in advance. The aim is to check whether the program of the system can accurately complete the predetermined data processing task.
In the prior art, a large amount of data is required to test the performance of the application system, a large amount of data is required to be prepared for a tester to meet the requirement of the data test, and the data preparation work consumes a large amount of manpower and material resources, so that the test efficiency is seriously affected.
Disclosure of Invention
The embodiment of the application provides a test case generation method, a device, computer equipment and a storage medium, which can quickly generate a test case according to test demand information.
In order to solve the technical problems, the embodiment of the application adopts the following technical scheme: the test case generation method comprises the following steps:
acquiring test requirement information to be processed;
searching user data with a preset association relation with the test requirement information in a preset information database;
and generating at least one test case based on the user data according to a preset data template.
Optionally, the user data includes material information and vendor information, and before generating at least one test case based on the user data, the method includes:
collecting provider information in the user data;
retrieving certificate information of a provider terminal according to the provider information;
and verifying the material information according to the certificate information, and confirming to use the user data to generate a test case when the verification passes.
Optionally, the verifying the material information according to the certificate information includes:
acquiring a material permission list in the certificate information;
searching a target field corresponding to the material information in the material permission list by taking the material information as a search condition;
if the target field is found, determining that the auditing verification is successful; otherwise, the verification fails.
Optionally, when the certificate information includes identification information characterizing the material permission list, the acquiring the material permission list in the certificate information includes:
identifying identification information in the certificate information;
and calling a material permission list corresponding to the identification information from a preset permission list database.
Optionally, after generating at least one test case based on the user data, the method includes:
calling a preset use case list;
writing the at least one test case into the case list;
and naming and storing the use case list according to the test requirement information.
Optionally, the test requirement information includes a plurality of requirement keywords, and searching the user data having a preset association relationship with the test requirement information in a preset information database includes:
grouping the plurality of demand keywords into a search type according to a preset combination strategy;
and searching the user data corresponding to the search formula in the information database.
Optionally, the test requirement information includes information of the number of user data, and before searching the information database for the user data corresponding to the search formula, the method further includes:
deleting at least one demand keyword from the search formula to generate a capacity expansion search formula;
the searching the user data corresponding to the search formula in the information database comprises the following steps:
and searching user data corresponding to the capacity expansion search expression in a preset information database.
In order to solve the above technical problem, an embodiment of the present application further provides a test case generating device, including:
the acquisition module is used for acquiring the test requirement information to be processed;
the processing module is used for searching user data with a preset association relation with the test requirement information in a preset information database;
and the execution module is used for generating at least one test case based on the user data according to a preset data template.
Optionally, the user data includes material information and vendor information, and the test case generating device includes:
the first acquisition sub-module is used for acquiring the supplier information in the user data;
the first processing sub-module is used for retrieving certificate information of the provider terminal according to the provider information;
and the first execution sub-module is used for carrying out audit verification on the material information according to the certificate information, and confirming to use the user data to generate a test case when the audit verification is passed.
Optionally, the test case generating device includes:
the first identification sub-module is used for acquiring a material permission list in the certificate information;
the second processing sub-module is used for searching a target field corresponding to the material information in the material permission list by taking the material information as a search condition;
the second execution sub-module is used for determining that the auditing verification is successful if the target field is found; otherwise, the verification fails.
Optionally, when the certificate information includes identification information characterizing the material license list, the test case generating device includes:
the second identification sub-module is used for identifying the identification information in the certificate information;
and the third processing sub-module is used for calling a material permission list corresponding to the identification information from a preset permission list database.
Optionally, the test case generating device includes:
the first calling sub-module is used for calling a preset use case list;
a fourth processing sub-module, configured to write the at least one test case into the case list;
and the third execution sub-module is used for naming and storing the use case list according to the test requirement information.
Optionally, the test requirement information includes a plurality of requirement keywords, and the test case generating device includes:
a fifth processing sub-module, configured to group the plurality of requirement keywords into a search type according to a preset combination policy;
and the fourth execution sub-module is used for searching the user data corresponding to the search formula in the information database.
Optionally, the test requirement information includes information of the number of user data, and when the number of the retrieved user data is smaller than the value represented by the number information, the test case generating device includes:
a sixth processing sub-module, configured to delete at least one requirement keyword from the search formula to generate a capacity expansion search formula;
and the fifth execution sub-module is used for searching the user data corresponding to the capacity expansion search formula in a preset information database.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, including a memory and a processor, where the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the processor is caused to execute the steps of the test case generating method.
To solve the above technical problem, an embodiment of the present application further provides a storage medium storing computer readable instructions, where the computer readable instructions when executed by one or more processors cause the one or more processors to execute the steps of the test case generating method described above.
The embodiment of the application has the beneficial effects that: and searching user data with an association relation with the test requirement information in a preset information database by setting the test requirement information, and converting the user data according to a set data template by taking the associated user data as a data source to generate a test case for testing. The method avoids the use of manpower to collect data and typeset the data, greatly simplifies the flow of test case data and improves the efficiency of data testing.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a basic flow diagram of a test case generation method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of auditing and verifying user data according to an embodiment of the present application;
FIG. 3 is a flow chart of checking and verifying material information through a material license list according to an embodiment of the present application;
FIG. 4 is a flowchart of searching a material license list according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of batch storage of test cases according to an embodiment of the present application;
FIG. 6 is a flowchart of a method for filtering user data according to an embodiment of the present application;
FIG. 7 is a flow chart of a method for expanding and retrieving according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a basic structure of a test case generating device according to an embodiment of the present application;
FIG. 9 is a block diagram showing the basic structure of a computer device according to the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings.
In some of the flows described in the specification and claims of the present application and in the foregoing figures, a plurality of operations occurring in a particular order are included, but it should be understood that the operations may be performed out of order or performed in parallel, with the order of operations such as 101, 102, etc., being merely used to distinguish between the various operations, the order of the operations themselves not representing any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
As used herein, a "terminal" includes both a device of a wireless signal receiver having no transmitting capability and a device of receiving and transmitting hardware having receiving and transmitting hardware capable of performing bi-directional communications over a bi-directional communication link, as will be appreciated by those skilled in the art. Such a device may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; a PCS (Personal Communications Service, personal communication system) that may combine voice, data processing, facsimile and/or data communication capabilities; a PDA (Personal Digital Assistant ) that can include a radio frequency receiver, pager, internet/intranet access, web browser, notepad, calendar and/or GPS (Global Positioning System ) receiver; a conventional laptop and/or palmtop computer or other appliance that has and/or includes a radio frequency receiver. As used herein, "terminal," "terminal device" may be portable, transportable, installed in a vehicle (aeronautical, maritime, and/or land-based), or adapted and/or configured to operate locally and/or in a distributed fashion, to operate at any other location(s) on earth and/or in space. The "terminal" and "terminal device" used herein may also be a communication terminal, a network access terminal, and a music/video playing terminal, for example, may be a PDA, a MID (Mobile Internet Device ), and/or a mobile phone with a music/video playing function, and may also be a smart tv, a set top box, and other devices.
Referring to fig. 1 specifically, fig. 1 is a basic flow chart of a test case generating method according to the present embodiment.
As shown in fig. 1, a test case generating method includes:
s1100, acquiring test requirement information to be processed;
when the test case is prepared, the test requirement information is obtained by collecting the text information input by the book.
In some embodiments, the test request information includes: and the plurality of requirement keywords are used for representing test categories required by the test cases. For example, when the test case is a medical order, the test categories include (without limitation): information such as user name, order number, drug name, purchase quantity, vendor name, shipping address, and contact. The types of the test categories are not limited to this, and the test categories can be set correspondingly according to different environments of the test cases according to different application scenes, and the test categories are not limited.
In some embodiments, the test request information is a sentence or a text, and the required keywords are obtained after the sentence or the text is segmented in a segmentation processing manner.
S1200, searching user data with a preset association relation with the test requirement information in a preset information database;
in this embodiment, an information database is provided, and the information database can be a self-built database, and is constructed by crawling required data in a network by a web crawler. In some embodiments, an external database can be used as the information database, for example, when the test case is a medical order, a hospital-side drug delivery database can be used as the information database. The types of the cited external databases are not limited thereto, and include (but are not limited to): a goods database of a hotel, a goods database of an electronic commerce platform or a goods database of an automobile accessory, etc.
When data screening is carried out, user data with association relation with the test requirement information is searched in an information database by taking the test requirement information as a search condition.
The association relationship in the present embodiment is: the data information comprises a requirement keyword recorded by the test requirement information. However, the association is not limited to this, and for example, when the test requirement information is a disease name, the association is a medicine having a therapeutic effect on the disease and order information for using the medicine. The setting of the association relationship can be different according to different specific application scenes, and a user can identify whether the data in the information database has the association relationship with the test requirement information through the established association relationship list, and can also establish the association relationship of the requirement in a custom mode.
And searching all user data with preset association with the test requirement information in the information database by taking the test requirement information as a search condition. In this embodiment, the user data is a medical order that has been completed. However, the type of the user data is not limited thereto, and the user data can be (but is not limited to) in some embodiments according to the specific application scenario: commodity orders, food orders, or service orders, etc.
S1300, generating at least one test case based on the user data according to a preset data template.
In order to make the generated test cases have uniform data formats and data types, in this embodiment, a data template is constructed, and data types required by the test cases, arrangement modes of the data types, and the like are recorded in the data template. For example, in some embodiments, the data templates are header portions in an Excel table, labeled with different data categories and the order in which the data categories are arranged.
And extracting the data similar to the data category in the data template from all the screened user data through the set data template, and writing the similar data into the corresponding position of the data template. And the data required by the test cases in the user data are extracted through the data template, and meanwhile, the data which are not required by the test cases in the user data are screened out, so that the data volume of the test cases is reduced. And arranging the extracted data according to the arrangement order of the data templates to generate test cases required by the test.
According to the embodiment, the user data with the association relation with the test requirement information is searched in the preset information database by setting the test requirement information, the associated user data is used as a data source, and the user data is converted according to the set data template to generate the test case for testing. The method avoids the use of manpower to collect data and typeset the data, greatly simplifies the flow of test case data and improves the efficiency of data testing.
In some embodiments, the user data includes material information and provider information, and when the user data is taken as a data source of a test case, it is required to determine that the provider has supply authority for the material information, so that audit verification needs to be performed on the user data. Referring to fig. 2, fig. 2 is a flow chart of auditing and verifying user data according to the present embodiment.
As shown in fig. 2, before S1300, the method includes:
s1211, collecting supplier information in the user data;
in this embodiment, the user data is a completed user order, and thus, the provider information is included in the user data. Vendor information includes (without limitation): vendor number, vendor name, or vendor abbreviation.
S1212, retrieving certificate information of the provider terminal according to the provider information;
the IP address of the provider terminal is further retrieved according to the information of the provider so as to facilitate data interaction with the provider terminal. Specifically, a provider database is established at the server side, the provider database has the IP address information of the provider terminal, and after obtaining the provider information, the IP address of the corresponding provider terminal can be found in the provider database.
After the IP address of the provider terminal is acquired, certificate information for calling the provider terminal is sent to the provider terminal. The certificate information refers to: when a provider supplies goods to a platform or a hospital, the goods or the lot number of the goods need to be licensed, and the platform party or the hospital party can issue a corresponding license certificate, namely certificate information, to the provider.
In some embodiments, the certificate information records the complete type of the supply and the lot number of the commodity. However, the certificate information is not limited thereto, and in other embodiments, the certificate information merely records the identification information of the license list, and the vendor type of the supply and the lot number of the commodity need to be checked after the corresponding license list is called.
S1213, carrying out audit verification on the material information according to the certificate information, and confirming to use the user data to generate a test case when the audit verification is passed.
Checking and verifying the material information according to the certificate information, wherein the verification mode is as follows: and identifying whether the commodity name or commodity category to which the material information belongs to the commodity or commodity category permitted by the certificate information.
And after comparison and verification, confirming that the commodity or commodity category represented by the material information belongs to the commodity or commodity category licensed by the certificate information, and if the commodity or commodity category passes the verification, failing the verification. When the material information auditing is passed, confirming that the user data is used for generating a test case; otherwise, discarding the user data and sending warning information to the provider terminal to warn that the product provided by the provider terminal is different from the permitted commodity category.
The authenticity of the user data is identified, the user data for generating the test case is screened according to the authenticity of the user data, the authenticity of the data for data testing is ensured, and the simulation degree of the testing is improved.
In some embodiments, the credential information is a credential image in which text information is recorded, and a list of material permissions for the vendor is recorded in the credential image. And identifying the material information of the user data according to the material permission list. Referring to fig. 3, fig. 3 is a flow chart illustrating a material information checking and verifying process through a material license list according to the present embodiment.
As shown in fig. 3, S1213 includes:
s1221, acquiring a material permission list in the certificate information;
the certificate information is a certificate image, and a list of material permissions permitted by the user is recorded in the certificate image. The certificate image is recognized by an OCR recognition program to obtain the list of material permissions. In some embodiments, the document image is font-identified by a font identification model, which is a neural network model trained to converge to identify text information.
The material license list records the commodity or commodity category that the supplier is licensed to supply.
S1222, searching a target field corresponding to the material information in the material permission list by taking the material information as a search condition;
and searching in the material permission list by taking the commodity name or commodity category in the material information as a search condition, and searching whether a target field corresponding to the material information exists in the material permission list, wherein the characters recorded in the target field are the same as the characters recorded in the material information.
S1223, if the target field is found, determining that the audit verification is successful; otherwise, the verification fails.
If the target field corresponding to the material information is found in the material permission list, the commodity in the material information is the permitted commodity, and the verification is successful at the moment; if the target field corresponding to the material information is not found in the material permission list, the commodity in the material information is the unlicensed commodity, and the verification is failed.
In some embodiments, the certificate information does not include a material license list, only identification information in the material license list is included in the material license list, and the material license list is stored in a license list database of the platform data or the test server, so that the identification information is required to search for the corresponding material license list. Referring to fig. 4, fig. 4 is a flowchart illustrating a process of searching a material permission list according to the present embodiment.
As shown in fig. 4, S1221 includes:
s1231, identifying identification information in the certificate information;
in the present embodiment, the document information is a document image, and the document image includes identification information of the document. The identification information is the number or the name of the material permission list in the certificate information. In the present embodiment, since the material license list corresponding to the certificate information is recorded in the local database, it is necessary to find the material license list corresponding to the certificate information from the identification information in the certificate information.
And identifying the certificate image through an OCR (optical character recognition) program to obtain identification information. In some embodiments, identification information is found in the document image by training to convergence, a neural network model for directional font finding.
S1232, calling a material permission list corresponding to the identification information from a permission list database.
In this embodiment, the identification information refers to the number or name of the material license list in the license information, and the material license list is recorded in the local database. Therefore, the material license list corresponding to the identification information can be retrieved by searching the identification information in the local license list database.
In the present embodiment, the license list database is a database which is built locally and stores a license list signed by a platform or a hospital in full.
In some embodiments, after the test cases are generated, in order to meet the requirement of batch test, the generated test cases need to be written into a case list for storage. When the batch test is performed, the case list is imported to generate batch test cases. Referring to fig. 5, fig. 5 is a schematic flow chart of batch storage of test cases according to the present embodiment.
As shown in fig. 5, after S1300, it includes:
s1311, calling a preset use case list;
in this embodiment, a use case list is preset, and the use case list is a blank document provided with a header. For example, in some embodiments, the use case list is an Excel document with a header set. The information recorded in the header position of the case list is the data type required by the test case.
And after the test case is generated, calling a pre-stored case list.
S1312, writing the at least one test case into the case list;
and writing the generated test cases into a case list. In some embodiments, the writing of test cases is performed in units of rows, each test case occupying a row of locations in the case list. And writing all test cases required by the test into a case list according to the test requirement information. For example, if 1 ten thousand test cases are required for the test, the generated 1 ten thousand test cases are sequentially written into the case list.
S1313, naming and storing the use case list according to the test requirement information.
After the test case is written, in order to facilitate the user to search and distinguish the case list, when detecting that the state of the case list is changed from the open state to the closed state, the system searches the test case according to the storage path information of the case list, and names the case list in a manner that the test requirement information of the user is used as the name of the case list.
The batch storage of the test cases is beneficial to importing the test cases into the test system when the batch test is carried out, and the importing efficiency is improved. And the case list is named by the test requirement information, so that a user can conveniently distinguish different case lists, and the user can conveniently find and identify the case list.
In some embodiments, the test requirement information is a plurality of requirement keywords, and in the process of screening the user data, the plurality of requirement keywords need to be grouped into a search formula, and then the search formula is used for searching the user data in the information database. Referring to fig. 6, fig. 6 is a flowchart illustrating a process of filtering user data by search according to the present embodiment.
As shown in fig. 6, S1200 includes:
s1241, grouping the plurality of requirement keywords into a search type according to a preset combination strategy;
in this embodiment, the test requirement information includes a plurality of requirement keywords, and the number of requirement keywords included in the test requirement information can be (but is not limited to): 2, 3, 4 or more.
In some embodiments, the combination strategy of the retrievals is: and combining the plurality of requirement keywords in parallel. For example, when the required test case is a medical order, and the user determines that the names of the medicines, the departments of selling the medicines and the sexes of the patients are three groups of requirement keywords, the search formula formed by grouping is as follows: the name of the drug and the sex of the patient. Only the user data meeting the three search conditions can be used as a data source of the test case.
In some embodiments, the combination strategy of the retrievals is: and identifying the synonymous keywords in the plurality of requirement keywords, and selectively combining the synonymous keywords. For example, when the required test case is a medical order, and the user determines that the medicine name 1, the medicine name 2 and the medicine sales department are three groups of required keywords, after the identification of the preset synonym mapping list, the user determines that the medicine name 1 and the medicine name 2 are different calling modes of the same medicine, and the compiled search formula is: ((definite drug name 1or drug name 2) and drug sales department).
S1242, searching user data corresponding to the search formula in the information database.
After the search expression is generated, user data corresponding to the search expression is searched for in the information database using the search expression as a search condition. User data satisfying the retrievals is determined as a data source for the test case.
In some embodiments, the test requirement information includes the quantity information of the user data, and when the quantity of the user data obtained by searching is smaller than the value represented by the quantity information, the searching range needs to be further enlarged to collect more test cases for generating the test cases. Referring to fig. 7, fig. 7 is a flow chart of the capacity expansion searching method in the present embodiment.
As shown in FIG. 7, S1232
S1251, deleting at least one demand keyword from the search formula to generate a capacity expansion search formula;
when the number of user data obtained by the search formula is smaller than the set number information, it is proved that the obtained user data cannot construct a test case required by the test, and therefore, the search result needs to be expanded, that is, the number of user data in the search result is increased.
The capacity expansion mode is to delete the required keywords in the search formula. For example, when the required test case is a medical order, and the user determines that the names of the medicines, the departments of selling the medicines and the sexes of the patients are three groups of requirement keywords, the search formula formed by grouping is as follows: the name of the drug and the sex of the patient. Through the above search formula, 5000 pieces of user data are obtained, but the set user data demand is 8000 pieces, and at this time, one of the demand keywords in the medicine name and the sex of the medicine sales department and the patient needs to be deleted in a manner of randomly selecting a group of demand keywords to be deleted. However, the deletion method is not limited thereto, and in some embodiments, the user defines the priority of each demand keyword when writing the demand keyword, and deletes the demand keyword with a lower priority when deleting the demand keyword.
In some embodiments, when one of the synonym keywords is deleted when the synonym keywords are stored in the retrievals, the other synonym keyword is also deleted.
In some embodiments, the number of the deleted requirement keywords is progressive, when one requirement keyword is deleted and the capacity expansion search is still unable to meet the number of requirements, the next requirement keyword is continuously deleted until all the requirement keywords are deleted or the number of the obtained user data is greater than or equal to the test requirement. When all the requirement keywords are deleted or the requirement of the test cannot be met, warning information needs to be sent to the user, and the data in the warning data information database cannot meet the requirement of the test.
1252. And searching user data corresponding to the capacity expansion search expression in a preset information database.
After the capacity expansion search formula is generated, the user data corresponding to the capacity expansion search formula is searched in the information database by taking the capacity expansion search formula as a search condition. User data satisfying the capacity expansion search formula is determined as a data source of the test case.
The expansion search type generation can expand the search result by loosening the search condition under the condition of insufficient test data source, thereby expanding the recall quantity of user data, ensuring that the test case has enough data source and improving the efficiency of test case generation.
In order to solve the technical problems, the embodiment of the application also provides a test case generating device.
Referring specifically to fig. 8, fig. 8 is a schematic diagram illustrating a basic structure of a test case generating apparatus according to the present embodiment.
As shown in fig. 8, a test case generating apparatus includes: an acquisition module 2100, a processing module 2200, and an execution module 2300. The acquiring module 2100 is configured to acquire test requirement information to be processed; the processing module 2200 is configured to search user data having a preset association relationship with the test requirement information in a preset information database; the execution module 2300 is configured to generate at least one test case based on user data according to a preset data template.
The test case generation device searches user data with an association relation with the test requirement information in a preset information database by setting the test requirement information, and converts the user data into test cases for testing according to a set data template by taking the associated user data as a data source. The method avoids the use of manpower to collect data and typeset the data, greatly simplifies the flow of test case data and improves the efficiency of data testing.
In some embodiments, the user data includes material information and vendor information, and the test case generating device includes: the system comprises a first acquisition sub-module, a first processing sub-module and a first execution sub-module. The first acquisition submodule is used for acquiring supplier information in the user data; the first processing sub-module is used for retrieving certificate information of the provider terminal according to the provider information; the first execution submodule is used for carrying out audit verification on the material information according to the certificate information, and when the audit verification is passed, the user data is confirmed to be used for generating the test case.
In some embodiments, the test case generating device includes: the system comprises a first identification sub-module, a second processing sub-module and a second execution sub-module. The first identification sub-module is used for acquiring a material permission list in the certificate information; the second processing sub-module is used for searching a target field corresponding to the material information in the material permission list by taking the material information as a retrieval condition; the second execution submodule is used for determining that the auditing verification is successful if the target field is found; otherwise, the verification fails.
In some embodiments, when identification information characterizing the material license list is included in the certificate information, the test case generating device includes: a second recognition sub-module and a third processing sub-module. The second identification sub-module is used for identifying identification information in the certificate information; the third processing sub-module is used for retrieving a material license list corresponding to the identification information from a preset license list database.
In some embodiments, the test case generating device includes: the system comprises a first calling sub-module, a fourth processing sub-module and a third executing sub-module. The first calling submodule is used for calling a preset use case list; the fourth processing submodule is used for writing at least one test case into the case list; and the third execution submodule is used for naming and storing the use case list according to the test requirement information.
In some embodiments, the test requirement information includes a plurality of requirement keywords, and the test case generating device includes: a fifth processing sub-module and a fourth execution sub-module. The fifth processing sub-module is used for grouping a plurality of requirement keywords into a search type according to a preset combination strategy; the fourth execution submodule is used for searching the user data corresponding to the search expression in the information database.
In some embodiments, the test requirement information includes quantity information of user data, and when the quantity of the retrieved user data is smaller than the value represented by the quantity information, the test case generating device includes: a sixth processing sub-module and a fifth execution sub-module. The sixth processing sub-module is used for deleting at least one requirement keyword from the search formula to generate a capacity expansion search formula; and the fifth execution submodule is used for searching the user data corresponding to the capacity expansion search formula in a preset information database.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 9, fig. 9 is a basic structural block diagram of a computer device according to the present embodiment.
As shown in fig. 9, the internal structure of the computer device is schematically shown. The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus. The nonvolatile storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store a control information sequence, and the computer readable instructions can enable the processor to realize a test case generation method when the computer readable instructions are executed by the processor. The processor of the computer device is used to provide computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, cause the processor to perform a test case generation method. The network interface of the computer device is for communicating with a terminal connection. It will be appreciated by persons skilled in the art that the architecture shown in fig. 9 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting as to the computer device to which the present inventive arrangements are applicable, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
The processor in this embodiment is configured to perform specific functions of the acquisition module 2100, the processing module 2200, and the execution module 2300 in fig. 8, and the memory stores program codes and various types of data required for executing the above modules. The network interface is used for data transmission between the user terminal or the server. The memory in this embodiment stores program codes and data required for executing all the sub-modules in the face image key point detection device, and the server can call the program codes and data of the server to execute the functions of all the sub-modules.
The computer equipment searches user data with an association relation with the test requirement information in a preset information database by setting the test requirement information, and converts the user data into test cases for testing according to a set data template by taking the associated user data as a data source. The method avoids the use of manpower to collect data and typeset the data, greatly simplifies the flow of test case data and improves the efficiency of data testing.
The present application also provides a storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of any of the embodiment test case generation methods described above.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.

Claims (10)

1. A test case generation method, comprising:
acquiring test requirement information to be processed; the test request information comprises a plurality of requirement keywords, wherein the requirement keywords are used for representing test categories required by test cases;
searching user data with preset association relation with the test requirement information in a preset information database through the established association relation list; the user data with the preset association relation comprises a requirement keyword recorded by the test requirement information;
generating at least one test case based on the user data according to a preset data template, wherein the data template records data types required by the test case and arrangement modes of the data types;
the generating at least one test case based on the user data according to the preset data template comprises the following steps:
extracting the data of the same kind as the data category in the data template in each user data, and writing the data of the same kind into the corresponding position of the data template;
and arranging the extracted data according to the arrangement order of the data templates to obtain the test cases required by the test.
2. The test case generating method according to claim 1, wherein the user data includes material information and vendor information, and before the at least one test case is generated based on the user data, the method comprises:
collecting provider information in the user data;
retrieving certificate information of a provider terminal according to the provider information;
and verifying the material information according to the certificate information, and confirming to use the user data to generate a test case when the verification passes.
3. The test case generating method according to claim 2, wherein the verifying the material information based on the certificate information includes:
acquiring a material permission list in the certificate information;
searching a target field corresponding to the material information in the material permission list by taking the material information as a search condition;
if the target field is found, determining that the auditing verification is successful; otherwise, the verification fails.
4. The test case generating method according to claim 3, wherein when the identification information characterizing the material license list is included in the certificate information, the acquiring the material license list in the certificate information includes:
identifying identification information in the certificate information;
and calling a material permission list corresponding to the identification information from a preset permission list database.
5. The test case generating method according to claim 1, wherein after the generating of the at least one test case based on the user data, comprising:
calling a preset use case list;
writing the at least one test case into the case list;
and naming and storing the use case list according to the test requirement information.
6. The test case generating method according to claim 1, wherein the searching the user data having the preset association relation with the test requirement information in the preset information database includes:
grouping the plurality of demand keywords into a search type according to a preset combination strategy;
and searching the user data corresponding to the search formula in the information database.
7. The test case generating method according to claim 6, wherein the test requirement information includes information of a number of user data, and when the number of user data retrieved is smaller than a value represented by the number information, before searching the information database for the user data corresponding to the retrievable formula, the method further includes:
deleting at least one demand keyword from the search formula to generate a capacity expansion search formula;
the searching the user data corresponding to the search formula in the information database comprises the following steps:
and searching user data corresponding to the capacity expansion search expression in a preset information database.
8. A test case generating apparatus, comprising:
the acquisition module is used for acquiring the test requirement information to be processed; the test request information comprises a plurality of requirement keywords, wherein the requirement keywords are used for representing test categories required by test cases;
the processing module is used for searching user data with preset association relation with the test requirement information in a preset information database through the established association relation list; the user data with the preset association relation comprises a requirement keyword recorded by the test requirement information;
the execution module is used for generating at least one test case based on the user data according to a preset data template, wherein the data template records data types required by the test case and arrangement modes of the data types;
the generating at least one test case based on the user data according to the preset data template comprises the following steps:
extracting the data of the same kind as the data category in the data template in each user data, and writing the data of the same kind into the corresponding position of the data template;
and arranging the extracted data according to the arrangement order of the data templates to obtain the test cases required by the test.
9. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the steps of the test case generation method of any of claims 1 to 7.
10. A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the test case generation method of any of claims 1 to 7.
CN201911151349.4A 2019-11-21 2019-11-21 Test case generation method and device, computer equipment and storage medium Active CN110874326B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911151349.4A CN110874326B (en) 2019-11-21 2019-11-21 Test case generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911151349.4A CN110874326B (en) 2019-11-21 2019-11-21 Test case generation method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110874326A CN110874326A (en) 2020-03-10
CN110874326B true CN110874326B (en) 2023-10-27

Family

ID=69717196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911151349.4A Active CN110874326B (en) 2019-11-21 2019-11-21 Test case generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110874326B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782541A (en) * 2020-07-10 2020-10-16 泰康保险集团股份有限公司 Test case generation method, device, equipment and computer readable storage medium
CN114463821A (en) * 2022-02-15 2022-05-10 平安科技(深圳)有限公司 Certificate data generation method and device, computer equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11306046A (en) * 1998-04-23 1999-11-05 Toshiba Corp Test case generation system and method
JP2006260390A (en) * 2005-03-18 2006-09-28 Nomura Research Institute Ltd Test case generating program and method
CN106528395A (en) * 2015-09-09 2017-03-22 阿里巴巴集团控股有限公司 Test case generation method and apparatus
CN107678951A (en) * 2017-09-21 2018-02-09 平安科技(深圳)有限公司 Test exemple automation management method, device, equipment and storage medium
CN107943695A (en) * 2017-11-21 2018-04-20 郑州云海信息技术有限公司 Testing case management, device, equipment and computer-readable recording medium
CN108255653A (en) * 2018-01-02 2018-07-06 深圳壹账通智能科技有限公司 The test method and its terminal of a kind of product
CN108319547A (en) * 2017-01-17 2018-07-24 阿里巴巴集团控股有限公司 Method for generating test case, device and system
CN108804548A (en) * 2018-05-21 2018-11-13 上海陆家嘴国际金融资产交易市场股份有限公司 Test data querying method, device, computer equipment and storage medium
CN110069397A (en) * 2019-03-15 2019-07-30 深圳壹账通智能科技有限公司 Function test method, device, computer equipment and storage medium
CN110083527A (en) * 2019-03-18 2019-08-02 平安普惠企业管理有限公司 A kind of generation method and device, electronic equipment of test case
CN110287095A (en) * 2019-05-20 2019-09-27 深圳壹账通智能科技有限公司 A kind of automated testing method, device and storage medium
CN110399294A (en) * 2019-06-26 2019-11-01 平安科技(深圳)有限公司 Method for generating test case, device, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9396098B2 (en) * 2014-03-26 2016-07-19 Mckesson Financial Holdings Apparatuses, methods, and computer program products for conducting automated tests

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11306046A (en) * 1998-04-23 1999-11-05 Toshiba Corp Test case generation system and method
JP2006260390A (en) * 2005-03-18 2006-09-28 Nomura Research Institute Ltd Test case generating program and method
CN106528395A (en) * 2015-09-09 2017-03-22 阿里巴巴集团控股有限公司 Test case generation method and apparatus
CN108319547A (en) * 2017-01-17 2018-07-24 阿里巴巴集团控股有限公司 Method for generating test case, device and system
CN107678951A (en) * 2017-09-21 2018-02-09 平安科技(深圳)有限公司 Test exemple automation management method, device, equipment and storage medium
CN107943695A (en) * 2017-11-21 2018-04-20 郑州云海信息技术有限公司 Testing case management, device, equipment and computer-readable recording medium
CN108255653A (en) * 2018-01-02 2018-07-06 深圳壹账通智能科技有限公司 The test method and its terminal of a kind of product
CN108804548A (en) * 2018-05-21 2018-11-13 上海陆家嘴国际金融资产交易市场股份有限公司 Test data querying method, device, computer equipment and storage medium
CN110069397A (en) * 2019-03-15 2019-07-30 深圳壹账通智能科技有限公司 Function test method, device, computer equipment and storage medium
CN110083527A (en) * 2019-03-18 2019-08-02 平安普惠企业管理有限公司 A kind of generation method and device, electronic equipment of test case
CN110287095A (en) * 2019-05-20 2019-09-27 深圳壹账通智能科技有限公司 A kind of automated testing method, device and storage medium
CN110399294A (en) * 2019-06-26 2019-11-01 平安科技(深圳)有限公司 Method for generating test case, device, computer equipment and storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
On the Evolution of Keyword-Driven Test Suites;Renaud Rwemalika∗ 等;《2019 12th IEEE Conference on Software Testing, Validation and Verification (ICST)》;335-345 *
基于领域Use+Case需求模型的测试用例生成;马建红 等;《计算机工程与设计》;第28卷(第19期);4589-4599 *
软件内建自测试中的测试数据生成方法;李文锋 等;《第十届全国容错计算机学术会议》;263-266 *
陈思民.一种支持用例自动生成的自动化测试系统设计与实现.《中国优秀硕士学位论文全文数据库(电子期刊)》.2019,I138-434. *
面向C_S结构的软件自动化测试工具的设计与实现;刘汉烨;《中国优秀硕士学位论文全文数据库》(第2009年07期期);I138-640 *

Also Published As

Publication number Publication date
CN110874326A (en) 2020-03-10

Similar Documents

Publication Publication Date Title
US9449271B2 (en) Classifying resources using a deep network
CN108804532B (en) Query intention mining method and device and query intention identification method and device
US8600980B2 (en) Consolidated information retrieval results
CN108509482B (en) Question classification method and device, computer equipment and storage medium
JP2013541793A (en) Multi-mode search query input method
CN110929125B (en) Search recall method, device, equipment and storage medium thereof
CN107085583B (en) Electronic document management method and device based on content
JP2013225319A (en) Visual multidimensional retrieval
CN110968800B (en) Information recommendation method and device, electronic equipment and readable storage medium
CN102272784A (en) Method, apparatus and computer program product for providing analysis and visualization of content items association
CN110874326B (en) Test case generation method and device, computer equipment and storage medium
CN109542956A (en) Report form generation method, device, computer equipment and storage medium
CN104750776A (en) Accessing information content in a database platform using metadata
CN113407785A (en) Data processing method and system based on distributed storage system
CN112084342A (en) Test question generation method and device, computer equipment and storage medium
CN110532229B (en) Evidence file retrieval method, device, computer equipment and storage medium
US6070169A (en) Method and system for the determination of a particular data object utilizing attributes associated with the object
CN112015762A (en) Case retrieval method and device, computer equipment and storage medium
CN103377199B (en) Information processor and information processing method
CN114637866A (en) Information management method and device for digital new media
CN110781213B (en) Multi-source mass data correlation searching method and system with personnel as center
JP6816621B2 (en) Discrimination method, discrimination program and discrimination device
Makkonen et al. Detecting events by clustering videos from large media databases
CN111597453A (en) User image drawing method and device, computer equipment and computer readable storage medium
CN113177116B (en) Information display method and device, electronic equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant