CN112256591A - Test case generation method and device, test equipment and storage medium - Google Patents

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

Info

Publication number
CN112256591A
CN112256591A CN202011263752.9A CN202011263752A CN112256591A CN 112256591 A CN112256591 A CN 112256591A CN 202011263752 A CN202011263752 A CN 202011263752A CN 112256591 A CN112256591 A CN 112256591A
Authority
CN
China
Prior art keywords
service
state
states
test case
conversion relation
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.)
Pending
Application number
CN202011263752.9A
Other languages
Chinese (zh)
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.)
Beijing Udsafe Technology Co ltd
Original Assignee
Beijing Udsafe 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 Beijing Udsafe Technology Co ltd filed Critical Beijing Udsafe Technology Co ltd
Priority to CN202011263752.9A priority Critical patent/CN112256591A/en
Publication of CN112256591A publication Critical patent/CN112256591A/en
Pending legal-status Critical Current

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

Abstract

The invention discloses a test case generation method, a test case generation device, test equipment and a storage medium. The method comprises the following steps: determining the service state of the target service according to the service demand information and the service logic in the database; labeling a conversion relation among the service states, wherein the conversion relation comprises convertible and non-convertible; and generating a test case of the target service according to the conversion relation. The technical scheme comprehensively considers the service requirements and the service logic, comprehensively covers the service states of the target service and accurately combs the conversion relation among all the service states, and generates a comprehensive and reliable test case on the basis.

Description

Test case generation method and device, test equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of software testing, in particular to a test case generation method, a test case generation device, test equipment and a storage medium.
Background
With the increasing development of the internet, computer software has been involved in aspects of production and life of people and becomes an unavailable part, and software testing is the basis for providing guarantee for software quality and business service quality. With the diversification of services and the increase of software complexity, a service system is gradually huge, and the following problems exist in the design process of a software test case: due to the fact that the number of service scenes is large, the updating speed of service requirements is high, test cases are incomplete, and missing and neglected service scenes or service requirements are prone to occur; the service implementation complexity is high, the service states are various, and the relationship between the service states is difficult to be combed, so that the core service is not well mastered and the test is not in place.
The conventional test case generation method comprises equivalence class division, boundary value analysis, causal graphs, scene methods and the like, and although various service scenes can be covered, the comprehensive analysis on the preposed state and the postpositional trend of the service state is lacked, so that the corresponding test cases can not be generated for all the service states in different service scenes, and the reliability of a test result is influenced.
Disclosure of Invention
The invention provides a test case generation method, a test case generation device, test equipment and a storage medium, which are used for improving the comprehensiveness and the test reliability of a test case.
In a first aspect, an embodiment of the present invention provides a test case generation method, including:
determining the service state of the target service according to the service demand information and the service logic in the database;
labeling a conversion relation among the service states, wherein the conversion relation comprises convertible and non-convertible;
and generating a test case of the target service according to the conversion relation.
Optionally, labeling a conversion relationship between the service states, including:
generating a two-dimensional service state analysis table, wherein the header of the service state analysis table comprises each service state;
and according to the service logic, marking the conversion relation between any two service states in the service state analysis table.
Optionally, generating a test case of the target service according to the conversion relationship includes:
generating a corresponding use case tree based on the conversion relation in the service state analysis table as a convertible service state;
and generating a corresponding test case for each branch of the case tree.
Optionally, the service state of the target service includes: an initial state and at least one non-initial state;
the initial state corresponds to a parent node of the use case tree;
each of the non-initial states corresponds to a child node of the use case tree.
Optionally, the converting relationship includes: a transition condition between each of said traffic states.
Optionally, the converting relationship includes: and converting the weight value between the service states.
Optionally, labeling a conversion relationship between the service states, including:
under the condition of meeting a preset condition, marking a conversion relation among the service states;
wherein the preset conditions include:
and the corresponding service states in the service demand information all belong to the service states in the service logic.
In a second aspect, an embodiment of the present invention provides a test case generation apparatus, including:
the state determination module is used for determining the service state of the target service according to the service demand information and the service logic in the database;
the marking module is used for marking the conversion relation among the business states, and the conversion relation comprises convertible and non-convertible;
and the generating module is used for generating the test case of the target service according to the conversion relation.
In a third aspect, an embodiment of the present invention provides a server, including:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the test case generation method according to the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the test case generation method according to the first aspect.
The embodiment of the invention provides a test case generation method, a test case generation device, test equipment and a storage medium, wherein the method comprises the following steps: determining the service state of the target service according to the service demand information and the service logic in the database; labeling a conversion relation among the service states, wherein the conversion relation comprises convertible and non-convertible; and generating a test case of the target service according to the conversion relation. The technical scheme comprehensively considers the service requirements and the service logic, comprehensively covers the service states of the target service and accurately combs the conversion relation among all the service states, and generates a comprehensive and reliable test case on the basis.
Drawings
Fig. 1 is a flowchart of a test case generation method according to an embodiment of the present invention;
fig. 2 is a flowchart of a test case generation method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a service status analysis table according to a second embodiment of the present invention;
fig. 4 is a schematic diagram of a use case tree according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a test case generating device according to a third embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a testing apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a test case generation method according to an embodiment of the present invention. The embodiment can be applied to the condition of testing the service software. Specifically, the test case generation method may be executed by a test case generation device, and the test case generation device may be implemented in a software and/or hardware manner and integrated in the test equipment. Further, the test equipment includes, but is not limited to: the test case testing system comprises electronic equipment capable of storing and running test cases, such as a desktop computer, a notebook computer, a smart phone, a server, an upper computer and the like.
As shown in fig. 1, the method specifically includes the following steps:
s110, determining the service state of the target service according to the service demand information and the service logic in the database.
Specifically, the service requirement information may be obtained from a product specification, a technical description document, a service introduction document, and the like, and includes functions, processes, service states, and the like that the target service needs to be implemented in actual application, and the service state that the target service should have may be extracted according to the service requirement information. The service logic in the database comprises functions, processes, service states and the like realized by software or codes designed and developed aiming at the target service, and the service state actually realized by the software developed aiming at the target service can be extracted according to the service logic.
Illustratively, taking a software test scenario of a service for applying for borrowing from a bank by a user as an example, the service requirement information means that the developed software is applied to realize the following processes: a user initiates a loan application to a bank, the bank checks the loan application and releases the loan, the user repays from the bank and the like, and related business states comprise an initial state (or an application state), a checking state, a releasing state, a repaying state and the like; the service logic refers to a state in which the developed software is implemented in the service logic in order to make the developed software meet the service requirement, such as an initial state (or an application state), an audit state, a release state, a payment completion state, a pre-payment state, and an overdue payment state. In general, the service state corresponding to the service logic covers all service states involved in the service requirement information.
According to the embodiment, all the service states to be tested of the target service are determined according to the service demand information and the service logic, the influence on the normal realization of the service due to the inconsistency of the service demand and the service logic can be avoided, and the comprehensiveness and the reliability of the test are ensured by comprehensively analyzing the service states. In addition, if the service logic is inconsistent with the service state of the service requirement, that is, the service logic does not include one or more service states corresponding to the service requirement information, it indicates that the service logic is wrong or incomplete, and a developer needs to modify the service logic of the developed software; and if the test cases are consistent, performing the subsequent steps of generating the test cases.
And S120, marking a conversion relation among the service states, wherein the conversion relation comprises convertible and non-convertible.
Specifically, the conversion relationship between the service states can be visually and accurately displayed by using forms such as tables, graphs and the like, including whether any two service states are convertible, and for each convertible two service states, the functional flow of each convertible service state needs to be tested through the test case. Optionally, in some embodiments, the conversion relationship may also include whether the conversion is unidirectional or bidirectional, the direction of the conversion, whether a condition, probability, or weight is attached, and the like.
For example, the target traffic has four traffic states in total: traffic state 1, traffic state 2, traffic state 3, and traffic state 4, for example, the switching relationship of the four traffic states is that traffic state 1 can be switched to traffic state 2 and traffic state 3, traffic state 2 can be switched to traffic state 4, and traffic state 3 can be switched to traffic state 1. One implementation is to generate a table with 4 rows and 4 columns, and fill in the transition relationship between the service state i and the service state j in the ith (i is 1,2,3,4) row and jth (j is 1,2,3,4) column of the table, so as to indicate whether the service state i can transition to the service state j. Another way to implement this is to use the service state 1, the service state 2, the service state 3, and the service state 4 as four vertices of a square, and then draw the transition relationship between any two service states in a manner pointed by arrows.
And S130, generating a test case of the target service according to the conversion relation.
Specifically, the test case generated according to the conversion relationship between the service states includes test codes of each group of convertible service states, and is used for testing whether any one service state can be correctly converted to the next service state to complete the corresponding service function.
According to the test case generation method provided by the embodiment of the invention, the service state of the target service is fully covered and the conversion relation among all the service states is accurately combed by comprehensively considering the service requirement and the service logic, so that a full and reliable test case is generated on the basis, and the comprehensiveness and the test reliability of the test case are improved.
Example two
Fig. 2 is a flowchart of a test case generation method according to a second embodiment of the present invention, where this embodiment is optimized based on the above embodiment, and specifically describes a process of labeling a transformation relationship and generating a test case according to the transformation relationship. It should be noted that technical details that are not described in detail in the present embodiment may be referred to any of the above embodiments.
Specifically, as shown in fig. 2, the method specifically includes the following steps:
s210, determining the service state of the target service according to the service demand information and the service logic in the database.
Taking a software test scenario of a service for which a user applies for borrowing from a bank as an example, determining a service state of the service according to service demand information and service logic comprises:
initial state (raft): a user initiates a borrowing request;
cancellation state (rubbbish): the user cancels the borrowing request;
audit refund status (audioscreen): the bank refutes the borrowing request, and the borrowing request is not passed;
audit pass status (CONFIRM): the borrowing request passes the audit;
service OPEN state (OPEN): the borrowing service is started, an order is created, and a bank issues a borrowing;
deposit complete status (FULL): the loan is fully issued to the account of the user;
service off status (CLOSE): closing the borrowing service and completing the loan issuance;
repayment status (REPAYING): the user initiates advance payment;
advanced payment status (PREPAYMENT _ FINISH): the user completes payment in advance within a specified time limit;
payment due status (FINISH): the user completes payment on the day of reaching the specified time limit;
default repayment status (OVER _ DUE): the user does not complete all repayment within the specified time limit and is in a default state;
default payment completion status (OVER _ DUE _ FINISH): and after the specified time limit is exceeded, the user completes all payment.
Payment generation status (payment _ credit): the user does not complete all the repayment within the specified time limit, and other accounts replace the user to complete all the repayment.
S220, generating a two-dimensional service state analysis table, wherein the header of the service state analysis table comprises each service state.
In this embodiment, the conversion relationship of each service state is labeled in a form of a two-dimensional table.
Fig. 3 is a schematic diagram of a service status analysis table according to a second embodiment of the present invention. As shown in fig. 3, all the service states are listed in the horizontal header and the vertical header, respectively, starting from a2 cell, all the service states are listed, and there are N ═ 13 service states, and the transition relationship between the service state i and the service state j is filled in the ith (i ═ 1, 2.., N) column of the table, which is used to indicate whether the service state i can be transitioned to the service state j, so as to facilitate the analysis of the transition relationship and the transformation into a case tree, and provide a basis for generating a comprehensive test case.
And S230, according to the service logic, marking a conversion relation between any two service states in the service state analysis table.
Specifically, the transition trend of the service states is determined by combining the service logic, and the preposed state and the postpositional state of each service state are determined. For example, in the service state analysis table illustrated in fig. 3, the service state in the vertical header is used as the current service state, the service state in the horizontal header is used as the next service state, and for one current service state, a position corresponding to the reachable next service state is labeled "Y" to indicate that the conversion relationship between the two service states is convertible; and marking a position corresponding to the next service state which cannot be reached by the user with "-" to indicate that the conversion relation between the two service states is not convertible. On the basis, the conversion relation between any two service states can be clearly and intuitively displayed.
S240, generating a corresponding use case tree based on the conversion relation in the service state analysis table as a convertible service state.
Specifically, in the process of generating the case tree according to the conversion relationship in the service state analysis table, only the conversion relationship labeled "Y" may be concerned, and the conversion relationship labeled "-" does not need to be considered, so that the generation process of the case tree is simplified, unnecessary analysis and calculation are avoided, and the efficiency of generating the test case is improved.
Fig. 4 is a schematic diagram of a use case tree according to a second embodiment of the present invention. As shown in FIG. 4, the conversion relationship between the nodes connected in the use case tree is convertible, and the conversion direction is from the upper node to the lower node of the use case tree. The case tree shown in FIG. 4 has 7 branches, and each branch should have a corresponding test case.
Further, the service state of the target service includes: an initial state and at least one non-initial state; the initial state corresponds to a parent node of the use case tree; each non-initial state corresponds to a child node of the use case tree.
Specifically, the initial state refers to a state of triggering a target service, for example, a service state of a user initiating a loan application; the non-initial state refers to various service states after the target service is triggered, such as a cancel state, an audit pass state, an advance payment state and the like. The initial state corresponds to a parent node of the use case tree, e.g., the DRAFT in fig. 4; the non-initial state corresponds to a child node of the use case tree, such as RUBBISH, CONFIRM, PREPAYMENT _ FINISH, etc. in FIG. 4.
And S250, generating a corresponding test case for each branch of the case tree.
Specifically, a corresponding test case is generated for each branch of the case tree, so that the circulation trend of the whole service state is covered. Table 1 is a test case table generated from the case tree shown in fig. 4. As shown in table 1, 7 test cases are formed together corresponding to the branches of the case tree, for example, case3 is used to test whether order can be normally created, loan is issued, issuance is completed, advance payment is initiated by the user and payment is completed within a specified period if the audit is passed; the case7 is used to test whether the order can be normally created, the loan is issued, the issuance is completed if the audit is passed, and whether the payment can be substituted by another account if the user defaults the payment, etc.
TABLE 1 test example Table
Figure BDA0002775458910000101
Optionally, labeling a conversion relationship between service states, including: under the condition that a preset condition is met, marking a conversion relation among the service states; wherein the preset conditions include: the corresponding service states in the service demand information all belong to service states in the service logic.
In this embodiment, it is determined that the service state needs to satisfy a certain preset condition according to the service demand information and the service logic, and the corresponding service states in the service demand information all belong to service states in the service logic, that is, the service logic is guaranteed to be correct and complete; otherwise, the developer is required to correct the service logic in the database according to the service requirement information, and label the conversion relation under the condition of meeting the preset condition.
Optionally, the conversion relationship between the service states includes: transition conditions between the traffic states.
In this embodiment, a conversion condition is attached to a conversion relationship between service states. For example, the initial state can be converted to other possible business states only if the assets, wages, credit data, etc. of the user are all eligible for a debit. The conversion conditions can be marked in a service state analysis table or a case tree, and the generated test case is also generated aiming at the convertible branches meeting the preset conditions. If the current service state does not meet the conversion condition to the next service state, the current service state may be circularly in the current service state, or converted to the initial state again, or directly jumped to the final service completion state, etc. For example, the service state 1 is switched to the service state 2 when the condition a is satisfied, is switched to the service state 3 when the condition B is satisfied, and if neither the condition a nor the condition B is satisfied, the service state 1 is maintained until one of the conditions is satisfied and then is switched to the next service state.
Optionally, the converting relationship includes: transition weights between the traffic states.
Specifically, when one service state can be converted into a plurality of service states, the conversion into each service state corresponds to a certain conversion weight. For example, if the service state 1 can be randomly switched to the service state 2 and the service state 3, the weights for switching to the service state 2 and the service state 3 are 0.5 respectively; for another example, if the weight value for the transition to the service state 2 is 0.8, and the weight value for the transition to the service state 3 is 0.2, the probability of the transition to the service state 2 is greater.
The test case generation method provided by the second embodiment of the invention is optimized on the basis of the first embodiment, the preposed state and the postpositional state of each service state are determined by utilizing the service state analysis table and the case tree, and the conversion relation between any two service states is clearly and intuitively displayed, so that a comprehensive test case is generated, and the test case generation efficiency is improved; by attaching the conversion conditions and the conversion weight, the test case is generated more flexibly, has expandability and is suitable for various service scenes; and the service state is analyzed under the condition of meeting the preset condition, so that the correctness and perfection of service logic can be ensured, the quality of the test case is improved, and the reliability of the test is further improved.
EXAMPLE III
Fig. 5 is a schematic structural diagram of a test case generation apparatus according to a third embodiment of the present invention. As shown in fig. 5, the test case generating device provided in this embodiment includes:
a state determining module 310, configured to determine a service state of the target service according to the service demand information and the service logic in the database;
a labeling module 320, configured to label a conversion relationship between the service states, where the conversion relationship includes convertible and non-convertible;
and the generating module 330 is configured to generate a test case of the target service according to the conversion relationship.
In the test case generation device provided by the third embodiment of the present invention, the state determination module determines the service state of the target service according to the service requirement information and the service logic in the database; labeling the conversion relation among the service states through a labeling module; generating the test case of the target service according to the conversion relation by a generating module, comprehensively considering service requirements and service logic, comprehensively covering the service state of the target service and accurately combing the conversion relation among all the service states, and generating a comprehensive and reliable test case on the basis.
On the basis of the above embodiment, the labeling module 320 includes:
the analysis table generating unit is used for generating a two-dimensional service state analysis table, and the header of the service state analysis table comprises each service state;
and the marking unit is used for marking the conversion relation between any two service states in the service state analysis table according to the service logic.
Optionally, the generating module 330 includes:
the use case tree generating unit is used for generating a corresponding use case tree based on the conversion relation in the service state analysis table as a convertible service state;
and the case generating unit is used for generating a corresponding test case for each branch of the case tree.
Optionally, the service state of the target service includes: an initial state and at least one non-initial state;
the initial state corresponds to a parent node of the use case tree;
each of the non-initial states corresponds to a child node of the use case tree.
Optionally, the converting relationship includes: a transition condition between each of said traffic states.
Optionally, the converting relationship includes: and converting the weight value between the service states.
Optionally, the labeling module 320 is specifically configured to:
under the condition of meeting a preset condition, marking a conversion relation among the service states;
wherein the preset conditions include:
and the corresponding service states in the service demand information all belong to the service states in the service logic.
The test case generation device provided by the third embodiment of the invention can be used for executing the test case generation method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
Example four
Fig. 6 is a schematic diagram of a hardware structure of a testing apparatus according to a fourth embodiment of the present invention. Further, the test equipment includes, but is not limited to: the test case testing system comprises electronic equipment capable of storing and running test cases, such as a desktop computer, a notebook computer, a smart phone, a server and an upper computer. As shown in fig. 6, the present embodiment provides a test apparatus, including: a processor 410 and a storage 420. The number of the processors in the test device may be one or more, fig. 6 illustrates one processor 410, the processor 410 and the storage device 420 in the test device may be connected by a bus or in other ways, and fig. 6 illustrates the connection by a bus.
The one or more programs are executed by the one or more processors 410, so that the one or more processors implement the test case generation method described in any of the above embodiments.
The storage device 420 in the test equipment, as a computer-readable storage medium, may be used to store one or more programs, which may be software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the test case generation method in the embodiment of the present invention (for example, the modules in the test case generation device shown in fig. 5 include the state determination module 310, the labeling module 320, and the generation module 330). The processor 410 executes various functional applications and data processing of the test equipment by running software programs, instructions and modules stored in the storage device 420, that is, implements the test case generation method in the above-described method embodiment.
The storage device 420 mainly includes a storage program area and a storage data area, wherein the storage program area can store an operating system and an application program required by at least one function; the storage data area may store data or the like (service requirement information, service logic, and the like in the above-described embodiments) created according to the use of the test equipment. Further, the storage 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 420 may further include memory located remotely from the processor 410, which may be connected to the test equipment over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
And, when one or more programs included in the above-described test device are executed by the one or more processors 410, the following operations are performed: determining the service state of the target service according to the service demand information and the service logic in the database; labeling a conversion relation among the service states, wherein the conversion relation comprises convertible and non-convertible; and generating a test case of the target service according to the conversion relation.
The test device proposed by the present embodiment and the test case generation method proposed by the above embodiment belong to the same inventive concept, and technical details that are not described in detail in the present embodiment can be referred to any of the above embodiments, and the present embodiment has the same beneficial effects as the execution of the test case generation method.
On the basis of the foregoing embodiments, this embodiment further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a test case generation apparatus, implements a test case generation method in any of the foregoing embodiments of the present invention, where the method includes: determining the service state of the target service according to the service demand information and the service logic in the database; labeling a conversion relation among the service states, wherein the conversion relation comprises convertible and non-convertible; and generating a test case of the target service according to the conversion relation.
Of course, the storage medium provided by the embodiment of the present invention includes computer-executable instructions, and the computer-executable instructions are not limited to the operations of the test case generation method described above, and may also perform related operations in the test case generation method provided by any embodiment of the present invention, and have corresponding functions and advantages.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute the test case generation method according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A test case generation method is characterized by comprising the following steps:
determining the service state of the target service according to the service demand information and the service logic in the database;
labeling a conversion relation among the service states, wherein the conversion relation comprises convertible and non-convertible;
and generating a test case of the target service according to the conversion relation.
2. The method of claim 1, wherein labeling the transition relationships between the business states comprises:
generating a two-dimensional service state analysis table, wherein the header of the service state analysis table comprises each service state;
and according to the service logic, marking the conversion relation between any two service states in the service state analysis table.
3. The method of claim 2, wherein generating the test case of the target service according to the transformation relation comprises:
generating a corresponding use case tree based on the conversion relation in the service state analysis table as a convertible service state;
and generating a corresponding test case for each branch of the case tree.
4. The method of claim 3, wherein the traffic state of the target traffic comprises: an initial state and at least one non-initial state;
the initial state corresponds to a parent node of the use case tree;
each of the non-initial states corresponds to a child node of the use case tree.
5. The method of claim 1, wherein transforming the relationship comprises:
a transition condition between each of said traffic states.
6. The method of claim 1, wherein transforming the relationship comprises:
and converting the weight value between the service states.
7. The method according to any one of claims 1-6, wherein labeling the transition relationship between the service states comprises:
under the condition of meeting a preset condition, marking a conversion relation among the service states;
wherein the preset conditions include:
and the corresponding service states in the service demand information all belong to the service states in the service logic.
8. A test case generation apparatus, comprising:
the state determination module is used for determining the service state of the target service according to the service demand information and the service logic in the database;
the marking module is used for marking the conversion relation among the business states, and the conversion relation comprises convertible and non-convertible;
and the generating module is used for generating the test case of the target service according to the conversion relation.
9. A test apparatus, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the test case generation method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a test case generation method according to any one of claims 1 to 7.
CN202011263752.9A 2020-11-12 2020-11-12 Test case generation method and device, test equipment and storage medium Pending CN112256591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011263752.9A CN112256591A (en) 2020-11-12 2020-11-12 Test case generation method and device, test equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011263752.9A CN112256591A (en) 2020-11-12 2020-11-12 Test case generation method and device, test equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112256591A true CN112256591A (en) 2021-01-22

Family

ID=74265822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011263752.9A Pending CN112256591A (en) 2020-11-12 2020-11-12 Test case generation method and device, test equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112256591A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050160322A1 (en) * 2004-01-13 2005-07-21 West John R. Method and system for conversion of automation test scripts into abstract test case representation with persistence
CN103678138A (en) * 2014-01-03 2014-03-26 北京经纬恒润科技有限公司 Method and device for generating state conversion test samples
US20140130006A1 (en) * 2012-11-06 2014-05-08 Daegu National University Of Education Industry- Academic Cooperation Foundation Apparatus and method of generating multi-level test case from unified modeling language sequence diagram based on multiple condition control flow graph
CN104899136A (en) * 2015-05-15 2015-09-09 百度在线网络技术(北京)有限公司 Method and device used for generating test case
US20160124827A1 (en) * 2014-10-30 2016-05-05 The Mathworks, Inc. System and method for performing model verification
JP2017182379A (en) * 2016-03-30 2017-10-05 キャッツ株式会社 Test case extraction device, test case extraction method and program
CN108170613A (en) * 2018-03-08 2018-06-15 国家计算机网络与信息安全管理中心 A kind of software test case automatic generating method
CN109117363A (en) * 2018-06-28 2019-01-01 腾讯科技(深圳)有限公司 A kind of method for generating test case, device and server
CN109656801A (en) * 2017-10-10 2019-04-19 大连飞创信息技术有限公司 Business flow test case automatic generation system based on path adaptive technology
CN109753428A (en) * 2018-12-13 2019-05-14 浙江数链科技有限公司 Service test method, device, computer equipment and readable storage medium storing program for executing
CN111143205A (en) * 2019-12-19 2020-05-12 华东师范大学 Android platform-oriented test case automatic generation method and generation system
CN111506511A (en) * 2020-04-21 2020-08-07 腾讯科技(深圳)有限公司 Test case generation method and device, electronic equipment and medium
CN111538649A (en) * 2020-03-19 2020-08-14 南京邮电大学 Automatic testing method for web application system based on selenium testing tool

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050160322A1 (en) * 2004-01-13 2005-07-21 West John R. Method and system for conversion of automation test scripts into abstract test case representation with persistence
US20140130006A1 (en) * 2012-11-06 2014-05-08 Daegu National University Of Education Industry- Academic Cooperation Foundation Apparatus and method of generating multi-level test case from unified modeling language sequence diagram based on multiple condition control flow graph
CN103678138A (en) * 2014-01-03 2014-03-26 北京经纬恒润科技有限公司 Method and device for generating state conversion test samples
US20160124827A1 (en) * 2014-10-30 2016-05-05 The Mathworks, Inc. System and method for performing model verification
CN104899136A (en) * 2015-05-15 2015-09-09 百度在线网络技术(北京)有限公司 Method and device used for generating test case
JP2017182379A (en) * 2016-03-30 2017-10-05 キャッツ株式会社 Test case extraction device, test case extraction method and program
CN109656801A (en) * 2017-10-10 2019-04-19 大连飞创信息技术有限公司 Business flow test case automatic generation system based on path adaptive technology
CN108170613A (en) * 2018-03-08 2018-06-15 国家计算机网络与信息安全管理中心 A kind of software test case automatic generating method
CN109117363A (en) * 2018-06-28 2019-01-01 腾讯科技(深圳)有限公司 A kind of method for generating test case, device and server
CN109753428A (en) * 2018-12-13 2019-05-14 浙江数链科技有限公司 Service test method, device, computer equipment and readable storage medium storing program for executing
CN111143205A (en) * 2019-12-19 2020-05-12 华东师范大学 Android platform-oriented test case automatic generation method and generation system
CN111538649A (en) * 2020-03-19 2020-08-14 南京邮电大学 Automatic testing method for web application system based on selenium testing tool
CN111506511A (en) * 2020-04-21 2020-08-07 腾讯科技(深圳)有限公司 Test case generation method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN108595157B (en) Block chain data processing method, device, equipment and storage medium
CN108764674B (en) Risk control method and device based on rule engine
CN110442513A (en) Execution method, apparatus, computer equipment and the storage medium of functional test use-case
CN109614263B (en) Disaster tolerance data processing method, device and system
EP4138004A1 (en) Method and apparatus for assisting machine learning model to go online
CN112199715B (en) Object generation method based on block chain and cloud computing and digital financial service center
CN109785047A (en) Order method for pushing, device, computer equipment and the storage medium of financial product
CN109636178A (en) Screening technique, device, computer equipment and the storage medium of Power Project
CN109783381A (en) A kind of test data generating method, apparatus and system
CN112256591A (en) Test case generation method and device, test equipment and storage medium
El Fallah-Seghrouchni et al. A formal study of interactions in multi-agent systems
CN109213883A (en) Hazard model group's service chaining method of combination and device, terminal, storage medium
CN111640000A (en) Data source calling method based on real-time decision
Gonidis et al. Leveraging platform basic services in cloud application platforms for the development of cloud applications
CN110428342A (en) Data recovery method, server, customer side and storage medium
CN113220272B (en) Method, device and equipment for accessing open capability of service platform
CN115688495A (en) Distributed LVC simulation system collaborative planning method, server and storage medium
CN112184235B (en) Wind control data changing method and device
CN114371884A (en) Method, device, equipment and storage medium for processing Flink calculation task
Bar-Sinai et al. Provengo: A tool suite for scenario driven model-based testing
CN110533406A (en) A kind of payment call method, apparatus and system
CN111311395A (en) Management system, method, equipment and storage medium for public accumulation fund repayment business
CN110309848A (en) The method that off-line data and stream data real time fusion calculate
CN111210215B (en) Bank payment path selection processing method and device and electronic equipment
Kluza et al. Proposal of a hierarchical approach to formal verification of BPMN models using Alvis and XTT2 methods

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