CN109446060B - Method for generating server side test case suite, terminal device and storage medium - Google Patents

Method for generating server side test case suite, terminal device and storage medium Download PDF

Info

Publication number
CN109446060B
CN109446060B CN201811067433.3A CN201811067433A CN109446060B CN 109446060 B CN109446060 B CN 109446060B CN 201811067433 A CN201811067433 A CN 201811067433A CN 109446060 B CN109446060 B CN 109446060B
Authority
CN
China
Prior art keywords
server
test case
requirement
generating
item
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
CN201811067433.3A
Other languages
Chinese (zh)
Other versions
CN109446060A (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.)
PAX Computer Technology Shenzhen Co Ltd
Original Assignee
PAX Computer Technology Shenzhen 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 PAX Computer Technology Shenzhen Co Ltd filed Critical PAX Computer Technology Shenzhen Co Ltd
Priority to CN201811067433.3A priority Critical patent/CN109446060B/en
Publication of CN109446060A publication Critical patent/CN109446060A/en
Application granted granted Critical
Publication of CN109446060B publication Critical patent/CN109446060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application is applicable to the technical field of software testing, and provides a method for generating a server side test case suite, terminal equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring a demand item set of the server, wherein the demand item set comprises demand items of at least one of the following categories: the method comprises the steps of generating a test case subset corresponding to each type of demand item in an acquired demand item set by using an overall demand item of the server, a database demand item of the server, a local demand item of a sub-module of the server and a demand item marked in advance in the server, combining the test case subsets corresponding to all types of demand items to obtain the test case set of the server, and testing software of the server by using the test case generated by the method provided by the application.

Description

Method for generating server side test case suite, terminal device and storage medium
Technical Field
The application belongs to the technical field of software testing, and particularly relates to a method for generating a server side test case suite, a terminal device and a computer readable storage medium.
Background
The software system architecture is the C/S (Client/Server) structure or the B/S (Brower/Server) structure, and the Server side occupies an important position. The method not only provides data sharing and provides transfer for communication between users, but also can play a role of a firewall and provide safety for users.
Software testing is usually performed at the server using test cases to determine the quality of the server software. However, the current test case usually generates a test case in a random manner, and the generated test case cannot effectively test the server software.
Disclosure of Invention
In view of this, embodiments of the present application provide a method for generating a server-side test case set, a terminal device, and a computer-readable storage medium, so as to solve the problem that a currently generated test case cannot effectively test server-side software.
A first aspect of the embodiments of the present application provides a method for generating a server test case suite, including:
acquiring a demand item set of the server, wherein the demand item set comprises demand items of at least one of the following categories: the server comprises an overall demand item of the server, a database demand item of the server, a local demand item of a sub-module of the server and a demand item marked in advance in the server;
generating a test case subset corresponding to the requirement item of each category in the acquired requirement item set;
and combining the generated test case subsets corresponding to the requirement items of all categories to obtain the test case set of the server.
A second aspect of an embodiment of the present application provides a terminal device, including:
a requirement item set obtaining unit, configured to obtain a requirement item set of the server, where the requirement item set includes requirement items in at least one of the following categories: the server comprises an overall demand item of the server, a database demand item of the server, a local demand item of a sub-module of the server and a demand item marked in advance in the server;
the test case subset generating unit is used for generating a test case subset corresponding to each category of demand items in the acquired demand item set;
and the test case set generating unit is used for combining the test case subsets corresponding to the generated requirement items of all categories to obtain the test case set of the server.
A third aspect of an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method provided in the first aspect of the embodiment of the present application when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by one or more processors, performs the steps of the method provided by the first aspect of embodiments of the present application.
A fifth aspect of embodiments of the present application provides a computer program product comprising a computer program that, when executed by one or more processors, performs the steps of the method provided by the first aspect of embodiments of the present application.
The embodiment of the application provides a method for generating a server side test case set, which comprises the steps of firstly acquiring a demand item set of a server side, and generating a test case subset corresponding to each category of demand items in the acquired demand item set; and combining the generated test case subsets corresponding to the requirement items of all categories to obtain the test case set of the server. Because the test case subset that this application embodiment generated is based on the demand item of server-side is generated, can be effectual tests the server-side, and, is acquireing can go to acquireing the demand item from a plurality of categories when the demand item of server-side, can obtain the test case set like this based on different aspects, the demand item that chooses contains the whole demand item of server-side, the database demand item of server-side, the local demand item of sub-module in the server-side, when the demand item of pre-marking in the server-side, owing to be from the whole, local, database of server-side, the demand item that the persistence multi-angle was obtained all-round, consequently can obtain the test case set of comprehensive coverage to can effectually test the server-side.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a method for generating a server test case suite according to an embodiment of the present application;
FIG. 2(a) is a schematic diagram of a process for obtaining a first subset of test cases according to an embodiment of the present application;
FIG. 2(b) is a schematic diagram of a process for obtaining a second subset of test cases according to an embodiment of the present application;
FIG. 2(c) is a schematic diagram of a process for obtaining a third subset of test cases according to an embodiment of the present application;
FIG. 2(d) is a schematic diagram of a process for obtaining a fourth subset of test cases according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another method for generating a server test case suite according to an embodiment of the present application;
fig. 4 is a schematic block diagram of a terminal device provided in an embodiment of the present application;
fig. 5 is a schematic block diagram of another terminal device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Fig. 1 is a schematic flow chart of an implementation process of a method for generating a server test case suite, where as shown in the figure, the method may include the following steps:
step S101, acquiring a demand item set of the server, wherein the demand item set comprises at least one of the following categories of demand items: the system comprises an overall demand item of the server, a database demand item of the server, a local demand item of a sub-module of the server and a demand item marked in advance in the server.
In the embodiment of the application, the software system architecture comprises a C/S (Client/Server) structure and a B/S (Brower/Server) structure, wherein the C/S (Client/Server) structure is a Client and Server structure. The B/S (browser/Server) structure is a browser/Server structure. The server can be a server side or a server side.
In order to design a server side test case with high coverage rate and effectiveness, the test case can be written from multiple aspects. The server side mainly comprises a logic layer and a database layer, and can obtain a type of test case subset from the aspect of overall functions (ignoring integration, realizing each submodule specifically and the like); or separating each sub-module of the server, and paying attention to the specific implementation of each sub-module to obtain a type of test case subset; a type of test case subset can be obtained from the aspect of interaction between the database and each sub-module; and a test case subset can be obtained from the aspects of stability, expandability, compatibility, safety and the like of the server.
Correspondingly, a type of test case subset is obtained from the aspect of overall functions (neglecting integration, realizing each sub-module specifically, and the like), and then the overall requirement item of the server side needs to be obtained; separating each sub-module of the server, paying attention to the specific implementation of each sub-module to obtain a type of test case subset, and obtaining local demand items of the sub-modules in the server; obtaining a type of test case subset from the aspect of interaction between a database and each submodule, and obtaining a database requirement item of the server side; obtaining a test case subset from the aspects of stability, expandability, compatibility, security, etc. of the server needs to obtain the demand items marked in advance in the server. It should be noted that, the user may mark requirements related to stability, extensibility, compatibility, security, etc. of the server in the development document in advance.
How to obtain the test case subsets of 4 categories is described below from the 4 categories, respectively.
As another embodiment of the present application, when the requirement item set includes the whole requirement item of the server, the acquiring the requirement item set of the server includes:
and acquiring a requirement document of the server side, and extracting an integral requirement item in the requirement document.
In the embodiment of the application, the server side can be regarded as a whole, all requirement items in the requirement document are extracted by combining the requirement document of the server side, and the extracted requirement items are recorded as the whole requirement items.
As another embodiment of the present application, when the requirement item set includes a database requirement item of the server, the acquiring the requirement item set of the server includes:
acquiring a design document of a database of the server;
and extracting the database requirement items required to be realized by the database based on the design document of the database.
In the embodiment of the application, under the requirement that the record writing and reading of the database at the server side are consistent, the requirement item required to be realized by the database is extracted by combining the detailed design document of the database, and the requirement item is marked as the requirement item of the database.
As another embodiment of the present application, when the requirement item set includes a local requirement item of a sub-module in the server, the acquiring the requirement item set of the server includes:
separating each submodule of the logic layer of the server;
and acquiring the design document of each sub-module in the server, and extracting the local requirement item of each sub-module.
In the embodiment of the application, each sub-module of the server is respectively stripped, specific implementation of different sub-modules of the server is concerned, a detailed design document of each sub-module is combined, a requirement item of each sub-module of the server is extracted, and the requirement item is recorded as a local requirement item.
As another embodiment of the present application, when the requirement item set includes a requirement item pre-marked in the server, the acquiring the requirement item set of the server includes:
acquiring a development document of the server, and extracting a pre-marked demand item in the development document, wherein the pre-marked demand item is a pre-marked demand item related to the persistence of the server, and the persistence comprises at least one of the following items: scalability, compatibility, stability, security.
In the embodiment of the present application, the three mentioned test case subsets can provide multi-angle test for the software of the server, however, the server needs to test from the persistence, which includes the following aspects: scalability, compatibility, stability, security. The user can find the related demand items from the development document of the server based on expandability, compatibility, stability and safety, and can mark the development document of the server by the user so as to find the demand items marked in advance.
Step S102, generating a test case subset corresponding to the requirement item of each category in the acquired requirement item set.
In the embodiment of the application, the test cases are obtained based on the requirement items. The function test generation rule and the performance test generation rule may be preset. And generating a corresponding test case subset according to each demand item based on a preset functional test generation rule and a preset performance test generation rule.
In practical application, each category of requirement items may include multiple requirement items, a test case may be generated based on each requirement item, a test case may be generated based on multiple requirement items, and specifically, a corresponding test case may be generated according to a preset rule.
The following describes a process of generating a subset of test cases for each category, respectively for requirement items of 4 categories.
When the requirement item set includes the whole requirement item of the server, the generating a test case subset corresponding to the requirement item of each category in the acquired requirement item set includes:
and generating a first test case subset of the server side from both functional test and performance test based on the overall requirement item of the server side.
In the embodiment of the application, according to the overall requirement item, the relevant test case subset which is needed to be realized by the server integrally is designed from the two aspects of functions and performance, and the relevant test case subset can be named as a first test case subset.
When the requirement item set includes the database requirement item of the server, the generating the test case subset corresponding to the requirement item of each category in the acquired requirement item set includes:
and generating a second test case subset of the server side from both functional test and performance test based on the database requirement item of the server side.
In the embodiment of the application, according to the development requirement (database requirement item) of the database, the test case subset related to the database is designed from two aspects of functions and performance and is marked as the second test case subset.
When the requirement item set includes local requirement items of sub-modules in the server, the generating a test case subset corresponding to each category of requirement items in the acquired requirement item set includes:
and generating a third test case subset of the server side from both functional test and performance test based on the local requirement item of each submodule.
In the embodiment of the application, based on the local requirement item of each sub-module, the test case subset related to each sub-module is designed from the function and the performance of each sub-module, and is recorded as the third test case subset.
When the requirement item set includes a requirement item marked in advance in the server, the generating a test case subset corresponding to the requirement item of each category in the acquired requirement item set includes:
and generating a fourth test case subset of the server from the persistence test of the server based on the demand items marked in advance in the server.
In the embodiment of the application, based on the obtained pre-marked requirement item, a fourth test case subset of the server is generated from a persistence test of the server, where the persistence test may be some preset rules, and the fourth test case subset is generated based on the rules.
Step S103, combining the generated test case subsets corresponding to all the categories of demand items to obtain the test case set of the server.
In the embodiment of the application, the obtained test case subsets corresponding to the requirement items of all the categories form a union set, and the obtained union set is the test case set of the server.
The test case subset that this application embodiment generated is based on the demand item of server side and is generated, can be effectual tests the server side, and, is acquireing can go to acquireing the demand item from a plurality of categories during the demand item of server side, can obtain the test case set like this based on the aspect of difference, and the demand item when selecting contains the whole demand item of server side the database demand item of server side the local demand item of sub-module in the server side during demand item that marks in advance in the server side, owing to be from the demand item that the whole, part, database, the persistence multi-angle of server side obtained, consequently can obtain the test case set of comprehensive coverage to can effectually test the server side.
Fig. 2(a) corresponds to a process of obtaining a first subset of test cases, fig. 2(b) corresponds to a process of obtaining a second subset of test cases, fig. 2(c) corresponds to a process of obtaining a third subset of test cases, and fig. 2(d) corresponds to a process of obtaining a fourth subset of test cases. Fig. 2 shows an architecture diagram of 4 diagrams combined together to provide a method for generating a server test case suite according to an embodiment of the present application.
The database transaction is divided into 4 large features, and the four large features are divergently derived into four large angles of the design thinking of the test case at the server side. Transaction atomicity (a): according to the atomic inseparable thought, a server-side test case is designed from the perspective of taking a server side as a whole from the whole (ignoring integration, sub-module specific processing and the like). Transaction consistency (C): and designing a server-side test case from the angle that the interaction data of each submodule of the server side and the database need to be kept consistent according to the thought that the consistency data is not changed. Transaction isolation (I): according to the thought that the isolation performance is not interfered with each other, a server-side test case is designed from the perspective of paying attention to the specific implementation of the submodules from each submodule of the server side. Transaction durability (D): according to the concept of sustainability, a server-side test case is designed from the perspective of how to further maintain the sustainability (including stability, expandability, compatibility and the like) of the server side on the basis of ensuring the basic functions and basic performances.
Fig. 3 is a schematic flow chart of an implementation of another method for generating a server-side test case set according to an embodiment of the present application, and as shown in the drawing, fig. 3 describes how to perform redundancy removal processing and omission processing on an obtained test case set on the basis of the embodiment shown in fig. 1, and specifically may include the following steps:
step S301, obtaining the similarity between any two test cases in the test case set.
In the embodiment of the present application, a finally obtained test case set includes a plurality of test cases, however, there may be duplicates in the test cases, for example, in a process of obtaining a requirement item, there may be duplicates in an obtained requirement item, so that a test case set is too large, and in the embodiment of the present application, a similarity between any two test cases in the test case set may be calculated, where the test case set includes 4 test cases: A. b, C, D, then the similarity between AB, AC, AD, BC, BD, CD needs to be calculated.
And S302, selecting one test case from each group of test cases with similarity greater than a preset value from the test case set, and deleting the test cases.
In the embodiment of the present application, the similarity may be represented by a numerical value between 0 and 100, and a threshold (preset value) may be further set, and one test case is deleted and retained in each group of test cases with the similarity greater than the preset value, so that duplicate test cases may be deleted.
As an example, the degree of similarity between AB 98%, the degree of similarity between AC 99%, the degree of similarity between AD 60%, the degree of similarity between BC 95%, the degree of similarity between BD 30%, and the degree of similarity between CD 50%. The set threshold is 95%, then the similarity of three groups of AB, AC and BC exceeds the preset value, one is deleted between AB, A is deleted and B is reserved, then one is deleted between AC because A is deleted and C and BC are reserved, and then B is deleted and C is reserved, and finally the test case set obtained is as follows: C. and D, performing treatment.
Step S303, associating the test case set with the requirement item set.
In the embodiment of the present application, since some test cases are deleted, the remaining test cases may also cover all requirement items, or may not cover all requirement items, and therefore, the test case set needs to be associated with the requirement item set.
The process of generating the possible test case C is obtained based on the requirement item 3, the process of generating the test case B is obtained based on the requirement item 2, and because the similarity between the test case B and the test case C is very high, the possible test case C may also correspond to the requirement item 2 or may not correspond to the requirement item 2, and therefore, the remaining test cases C and D need to be respectively disassociated from the requirement items.
Step S304, if the requirement item of the unassociated test case exists, generating the test case based on the requirement item of the unassociated test case, and adding the test case generated based on the requirement item of the unassociated test case into the test case set.
In the embodiment of the application, if a requirement item of an unassociated test case exists, it indicates that the test case generated by the requirement item is deleted, or an error is generated in the generation process and the test case is not successfully generated, a test case needs to be generated based on the requirement item of the unassociated test case, and the test case generated based on the requirement item of the unassociated test case is added into a test case set.
Therefore, the test case set subjected to redundancy removal and leakage detection can fully cover the test angle and cannot be too large.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 4 is a schematic block diagram of a terminal device provided in an embodiment of the present application, and only a part related to the embodiment of the present application is shown for convenience of description.
The terminal device 4 may be a software unit, a hardware unit, or a combination of software and hardware connected to a conventional server, computer, or other terminal device, or may be a separate server, computer, or other terminal device.
The terminal device 4 includes:
a requirement item set obtaining unit 41, configured to obtain a requirement item set of the server, where the requirement item set includes requirement items in at least one of the following categories: the server comprises an overall demand item of the server, a database demand item of the server, a local demand item of a sub-module of the server and a demand item marked in advance in the server;
a test case subset generating unit 42, configured to generate a test case subset corresponding to the requirement item of each category in the acquired requirement item set;
and the test case set generating unit 43 is configured to combine the test case subsets corresponding to the generated requirement items of all categories to obtain the test case set of the server.
Optionally, when the requirement item set includes the whole requirement item of the server, the requirement item set obtaining unit 41 includes: the first obtaining module 411 is used for obtaining the first data,
the first obtaining module 411 is configured to obtain a requirement document of the server, and extract an overall requirement item in the requirement document;
correspondingly, the test case subset generating unit 42 includes: a first subset generation module 421;
the first subset generating module 421 is configured to generate a first test case subset of the server from both a functional test and a performance test based on the overall requirement item of the server.
Optionally, when the requirement item set includes a database requirement item of the server, the requirement item set obtaining unit 41 includes: the second obtaining module 412 is configured to obtain,
the second obtaining module 412 is configured to obtain a design document of the database of the server;
extracting database requirement items required to be realized by the database based on the design document of the database;
correspondingly, the test case subset generating unit 42 includes: a second subset generation module 422;
the second subset generating module 422 is configured to generate a second test case subset of the server from both functional tests and performance tests based on the database requirement items of the server.
Optionally, when the requirement item set includes a local requirement item of the sub-module in the server, the requirement item set obtaining unit 41 includes: the third obtaining module 413 is configured to obtain,
the third obtaining module 413 is configured to separate sub-modules of the logic layer of the server;
acquiring a design document of each sub-module in the server, and extracting local demand items of each sub-module;
correspondingly, the test case subset generating unit 42 includes: a third subset generation module 423;
the third subset generating module 423 is configured to generate a third test case subset of the server from both functional testing and performance testing based on the local requirement item of each sub-module.
Optionally, when the requirement item set includes a requirement item marked in advance in the server, the requirement item set obtaining unit 41 includes: a fourth obtaining module 414 for obtaining the data of the first group,
the fourth obtaining module 414 is configured to obtain a development document of the server, and extract a demand item marked in advance in the development document;
correspondingly, the test case subset generating unit 42 includes: a fourth subset generation module 424;
the fourth subset generating module 424 is configured to generate a fourth test case subset of the server from the persistence test of the server based on the requirement items marked in advance in the server.
Optionally, the terminal device 4 further includes:
the association unit 44 is configured to associate the test case set with the requirement item set after obtaining the test case set of the server;
and the leakage detection unit 45 is configured to generate a test case based on the requirement item of the unassociated test case if the requirement item of the unassociated test case exists, and add the test case generated based on the requirement item of the unassociated test case into the test case set.
Optionally, the terminal device 4 further includes:
a similarity obtaining unit 46, configured to obtain a similarity between any two test cases in the test case set before associating the test case set with the requirement item set;
and the redundancy removing unit 47 is configured to select one test case from each group of test cases with similarity greater than a preset value from the test case set and delete the test case.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is merely used as an example, and in practical applications, the foregoing function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the terminal device is divided into different functional units or modules to perform all or part of the above-described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the terminal device may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 5 is a schematic block diagram of a terminal device according to another embodiment of the present application. As shown in fig. 5, may include: one or more processors 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processors 50. The processor 50, when executing the computer program 52, implements the steps in the various method embodiments described above, such as the steps S101 to S103 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the terminal device embodiment described above, such as the functions of the modules 41 to 43 shown in fig. 4.
Illustratively, the computer program 52 may be partitioned into one or more modules/units, which are stored in the memory 51 and executed by the processor 50 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the terminal device 5. For example, the computer program 52 may be divided into a requirement item set acquisition unit, a test case subset generation unit, and a test case set generation unit.
A requirement item set obtaining unit, configured to obtain a requirement item set of the server, where the requirement item set includes requirement items in at least one of the following categories: the server comprises an overall demand item of the server, a database demand item of the server, a local demand item of a sub-module of the server and a demand item marked in advance in the server;
the test case subset generating unit is used for generating a test case subset corresponding to each category of demand items in the acquired demand item set;
and the test case set generating unit is used for combining the test case subsets corresponding to the generated requirement items of all categories to obtain the test case set of the server.
Other modules can refer to the description of the embodiment shown in fig. 4, and are not described again here.
The terminal device includes, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that fig. 5 is only one example of a terminal device 5 and does not constitute a limitation of the terminal device 5 and may include more or less components than those shown, or combine certain components, or different components, for example, the terminal device may also include input devices, output devices, network access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer program and other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed terminal device and method may be implemented in other ways. For example, the above-described terminal device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical function division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (9)

1. A method for generating a server side test case suite is characterized by comprising the following steps:
acquiring a demand item set of the server, wherein the demand item set comprises: the overall demand item of the server and the local demand item of the sub-module of the server;
generating a test case subset corresponding to the requirement item of each category in the acquired requirement item set;
combining the test case subsets corresponding to the generated requirement items of all categories to obtain the test case set of the server;
wherein the acquiring the requirement item set of the server comprises:
separating each submodule of the logic layer of the server;
acquiring a design document of each sub-module in the server, and extracting local demand items of each sub-module;
correspondingly, the generating of the test case subset corresponding to the requirement item of each category in the acquired requirement item set includes:
and generating a third test case subset of the server side from both functional test and performance test based on the local requirement item of each submodule.
2. The method for generating the server-side test case set according to claim 1, wherein the acquiring the requirement item set of the server side includes:
acquiring a requirement document of the server side, and extracting an integral requirement item in the requirement document;
correspondingly, the generating of the test case subset corresponding to the requirement item of each category in the acquired requirement item set includes:
and generating a first test case subset of the server side from both functional test and performance test based on the overall requirement item of the server side.
3. The method for generating a server-side test case set according to claim 1, wherein the requirement item set further includes: the acquiring the requirement item set of the server includes:
acquiring a design document of a database of the server;
extracting database requirement items required to be realized by the database based on the design document of the database;
correspondingly, the generating of the test case subset corresponding to the requirement item of each category in the acquired requirement item set includes:
and generating a second test case subset of the server side from both functional test and performance test based on the database requirement item of the server side.
4. The method for generating a server-side test case set according to claim 1, wherein the requirement item set further includes: the acquiring of the demand item set of the server includes:
acquiring a development document of the server, and extracting a demand item marked in advance in the development document;
correspondingly, the generating of the test case subset corresponding to the requirement item of each category in the acquired requirement item set includes:
and generating a fourth test case subset of the server from the persistence test of the server based on the demand items marked in advance in the server.
5. The method for generating the server-side test case suite according to any one of claims 1 to 4, wherein after obtaining the server-side test case suite, the method further includes:
associating the test case set with the requirement item set;
and if the requirement item of the unassociated test case exists, generating the test case based on the requirement item of the unassociated test case, and adding the test case generated based on the requirement item of the unassociated test case into the test case set.
6. The method for generating the server-side test case set according to claim 5, wherein before associating the test case set with the requirement item set, the method further comprises:
obtaining the similarity between any two test cases in the test case set;
and selecting one test case from each group of test cases with similarity greater than a preset value from the test case set to delete.
7. A terminal device, comprising:
a requirement item set obtaining unit, configured to obtain a requirement item set of a server, where the requirement item set includes: the overall demand item of the server and the local demand item of the sub-module of the server;
the test case subset generating unit is used for generating a test case subset corresponding to each category of demand items in the acquired demand item set;
the test case set generating unit is used for combining the test case subsets corresponding to the generated requirement items of all categories to obtain the test case set of the server;
wherein, the requirement item set acquisition unit is further configured to:
separating each submodule of the logic layer of the server;
acquiring a design document of each sub-module in the server, and extracting local demand items of each sub-module;
correspondingly, the test case subset generating unit is further configured to:
and generating a third test case subset of the server side from both functional test and performance test based on the local requirement item of each submodule.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by one or more processors, implements the steps of the method according to any one of claims 1 to 6.
CN201811067433.3A 2018-09-13 2018-09-13 Method for generating server side test case suite, terminal device and storage medium Active CN109446060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811067433.3A CN109446060B (en) 2018-09-13 2018-09-13 Method for generating server side test case suite, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811067433.3A CN109446060B (en) 2018-09-13 2018-09-13 Method for generating server side test case suite, terminal device and storage medium

Publications (2)

Publication Number Publication Date
CN109446060A CN109446060A (en) 2019-03-08
CN109446060B true CN109446060B (en) 2021-09-24

Family

ID=65530558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811067433.3A Active CN109446060B (en) 2018-09-13 2018-09-13 Method for generating server side test case suite, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN109446060B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117331850B (en) * 2023-12-01 2024-03-15 云筑信息科技(成都)有限公司 Test method combining function test and interface automation test

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488482A (en) * 2013-09-16 2014-01-01 深圳市龙视传媒有限公司 Method and device for generating test cases
CN105988930A (en) * 2015-03-02 2016-10-05 阿里巴巴集团控股有限公司 Test case generation method and device
CN106095662A (en) * 2016-05-23 2016-11-09 浪潮电子信息产业股份有限公司 A kind of test suite reduction method based on program slice
CN107678951A (en) * 2017-09-21 2018-02-09 平安科技(深圳)有限公司 Test exemple automation management method, device, equipment and storage medium
CN107832229A (en) * 2017-12-03 2018-03-23 中国直升机设计研究所 A kind of system testing case automatic generating method based on NLP
CN107894952A (en) * 2017-11-08 2018-04-10 中国平安人寿保险股份有限公司 Generation method, device, equipment and the readable storage medium storing program for executing of interface testing use-case

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9111040B2 (en) * 2013-01-15 2015-08-18 International Business Machines Corporation Integration of a software content space with test planning and test case generation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488482A (en) * 2013-09-16 2014-01-01 深圳市龙视传媒有限公司 Method and device for generating test cases
CN105988930A (en) * 2015-03-02 2016-10-05 阿里巴巴集团控股有限公司 Test case generation method and device
CN106095662A (en) * 2016-05-23 2016-11-09 浪潮电子信息产业股份有限公司 A kind of test suite reduction method based on program slice
CN107678951A (en) * 2017-09-21 2018-02-09 平安科技(深圳)有限公司 Test exemple automation management method, device, equipment and storage medium
CN107894952A (en) * 2017-11-08 2018-04-10 中国平安人寿保险股份有限公司 Generation method, device, equipment and the readable storage medium storing program for executing of interface testing use-case
CN107832229A (en) * 2017-12-03 2018-03-23 中国直升机设计研究所 A kind of system testing case automatic generating method based on NLP

Also Published As

Publication number Publication date
CN109446060A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
US11605087B2 (en) Method and apparatus for identifying identity information
CN110447035B (en) User content obfuscation in structured user data files
CN117195307A (en) Configurable annotations for privacy-sensitive user content
CN111459982A (en) Data query method and device, terminal device and storage medium
CN111666186A (en) Data access abnormity detection method and device, storage medium and computer equipment
US20110264703A1 (en) Importing Tree Structure
CN110069827B (en) Layout and wiring method and device for FPGA (field programmable Gate array) online logic analyzer
CN107977504B (en) Asymmetric reactor core fuel management calculation method and device and terminal equipment
CN108121774B (en) Data table backup method and terminal equipment
CN111092880B (en) Network traffic data extraction method and device
CN115827903A (en) Violation detection method and device for media information, electronic equipment and storage medium
CN109446060B (en) Method for generating server side test case suite, terminal device and storage medium
WO2019138542A1 (en) Countermeasure formulation assistance device, countermeasure formulation assistance method, and countermeasure formulation assistance program
CN110427496B (en) Knowledge graph expansion method and device for text processing
CN109299613B (en) Database partition authority setting method and terminal equipment
CN110058995B (en) Database testing method and system capable of avoiding interference of database types
CN111459937A (en) Data table association method, device, server and storage medium
CN111143092A (en) Fault recording data processing method and system and terminal equipment
US9286349B2 (en) Dynamic search system
CN108230166A (en) A kind of computational methods, storage medium and terminal device for exempting premium
CN112035471B (en) Transaction processing method and computer equipment
CN111310166A (en) Authority management method, device, equipment and storage medium
CN110324236B (en) Event record sharing method and device and computer equipment
CN111142735A (en) Software page creating method and device, terminal equipment and storage medium
CN109088859B (en) Method, device, server and readable storage medium for identifying suspicious target object

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