CN113535565B - Interface use case generation method, device, equipment and medium - Google Patents

Interface use case generation method, device, equipment and medium Download PDF

Info

Publication number
CN113535565B
CN113535565B CN202110816309.8A CN202110816309A CN113535565B CN 113535565 B CN113535565 B CN 113535565B CN 202110816309 A CN202110816309 A CN 202110816309A CN 113535565 B CN113535565 B CN 113535565B
Authority
CN
China
Prior art keywords
interface
factor
packaging
use case
value
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
CN202110816309.8A
Other languages
Chinese (zh)
Other versions
CN113535565A (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.)
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
ICBC 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 Industrial and Commercial Bank of China Ltd ICBC, ICBC Technology Co Ltd filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110816309.8A priority Critical patent/CN113535565B/en
Publication of CN113535565A publication Critical patent/CN113535565A/en
Application granted granted Critical
Publication of CN113535565B publication Critical patent/CN113535565B/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
    • 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/3696Methods or tools to render software testable

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)
  • Stored Programmes (AREA)

Abstract

The invention provides an interface use case generation method, an interface use case generation device and a medium, wherein the interface use case generation method comprises the following steps: acquiring interface characteristic information; defining and packaging all data structures in the interface characteristic information to obtain a horizontal factor and a factor; calling and compiling an orthogonal table algorithm to obtain a two-dimensional orthogonal table according to the horizontal factor and the factor; obtaining a use case data set object according to the two-dimensional orthogonal table; and outputting the use case data set object. In the embodiment, the interface test case set can be generated after the interface definition design is completed, so that the labor cost and the time cost for constructing the interface test can be greatly reduced, and the application of the orthogonal test algorithm also ensures the flexibility, the science, the effectiveness and the sufficiency of the interface case.

Description

Interface case generation method, device, equipment and medium
Technical Field
The present invention relates to the field of information security, and in particular, to a method, an apparatus, a device, a medium, and a program product for generating an interface use case.
Background
The patent of the existing interface case generation method monitors interface parameters through ui automatic test, obtains interface definition information and then directly generates an interface test case; according to the interface test information directly input by a tester, and according to a case generation template designed in advance, generating an interface test case set; and directly generating a test case according to rules of effective parameter input and parameter output of the interface, such as equivalence classes and the like. The existing interface use case generation technology is emphasized, and some of the interface use case generation technologies are emphasized to obtain interface parameters; some emphasis interfaces use case generation templates; some interface use cases are designed; the following disadvantages exist: (1) The method has no universality, strong dependence on testers and high time cost input by the testers; (2) When the interface information designed by the developer changes, the generated interface use case set cannot be automatically and synchronously updated; (3) The sufficiency and comprehensiveness of the interface case design cannot be met; and (4) the generation of the interface use case is not flexible enough.
Disclosure of Invention
In view of the above problems, the present invention provides an interface use case generation method, apparatus, device, medium and program product, and aims to solve the problem that the interface use case generation method is not universal.
According to a first aspect of the present disclosure, a method for generating an interface use case is provided, including:
acquiring interface characteristic information;
defining and packaging all data structures in the interface characteristic information to obtain a horizontal factor and a factor;
calling and compiling an orthogonal table algorithm to obtain a two-dimensional orthogonal table according to the horizontal factor and the factor;
obtaining a use case data set object according to the two-dimensional orthogonal table;
and outputting the use case data set object.
According to the embodiment of the present disclosure, the step of defining and packaging all data structures in the interface feature information to obtain the level factor and the factor further includes:
defining and packaging all data structures in the interface characteristic information to obtain a data model;
extracting to obtain a service rule according to the interface characteristic information;
and according to the business rule, defining and filling the data model to obtain the level factor and the factor.
According to an embodiment of the present disclosure, the interface feature information includes a plurality of parameter names and a corresponding plurality of parameter types;
defining and packaging all data structures in the interface characteristic information to obtain a data model, wherein the step of obtaining the data model comprises the following steps:
defining and packaging each parameter name and any value of the corresponding parameter type to obtain an element;
packaging all the element sets to obtain a data set;
packaging the data set and the plurality of elements to obtain metadata;
and packaging the metadata, the plurality of elements and the data set to obtain the data model.
According to an embodiment of the present disclosure, the business rule includes at least one of a mandatory information business, a key field fault-tolerant processing business type, a legal and valid processing business type, and a boundary value business type.
According to an embodiment of the present disclosure, the interface characteristic information includes a plurality of interface parameters;
according to the business rules, the step of filling the data model definition to obtain the level factor and the factor comprises the following steps:
according to the business rule, filling the data model definition to obtain the value number of each interface parameter and each value of the interface parameter;
obtaining a horizontal number and a horizontal value according to the value number and the value;
and obtaining the level factor and the factor according to the data model, the level number and the level value.
A second aspect of the present disclosure provides an interface use case generating apparatus, including:
the input module is used for acquiring interface characteristic information;
the packaging module is used for defining and packaging all data structures in the interface characteristic information to obtain a horizontal factor and a factor;
the calculation module calls and compiles an orthogonal table algorithm to obtain a two-dimensional orthogonal table according to the horizontal factor and the factor;
the mapping module is used for obtaining a use case data set object according to the two-dimensional orthogonal table; and (c) a second step of,
and the output module is used for outputting the use case data set object.
According to an embodiment of the present disclosure, the encapsulation module includes:
the structure packaging unit is used for defining and packaging all data structures in the interface characteristic information to obtain a data model;
the rule encapsulation unit is used for extracting and obtaining a service rule according to the interface characteristic information; and the number of the first and second groups,
and the factor packaging unit is used for defining and filling the data model according to the business rule to obtain the level factor and the factor.
According to an embodiment of the present disclosure, the interface feature information includes a plurality of parameter names and a corresponding plurality of parameter types;
the structure package unit includes:
the element subunit is used for defining and packaging each parameter name and any value of the corresponding parameter type to obtain an element;
the data set subunit is used for packaging all the element sets to obtain a data set;
a metadata subunit, configured to encapsulate the data set and the plurality of elements to obtain metadata; and the number of the first and second groups,
and the data model subunit is used for packaging the metadata, the plurality of elements and the data set to obtain the data model.
According to an embodiment of the present disclosure, the interface characteristic information includes a plurality of interface parameters;
the factor packing unit includes:
the filling subunit is used for defining and filling the data model according to the service rule to obtain the value number of each interface parameter and each value of the interface parameter;
the value-taking subunit is used for obtaining a horizontal number and a horizontal value according to the value-taking number and the value-taking; and the number of the first and second groups,
and the result subunit is used for obtaining the level factor and the factor according to the data model, the level number and the level value.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the above-described interface use case generation method.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described interface use case generation method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program that, when executed by a processor, implements the above-described interface use case generation method.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 schematically shows a system architecture of an interface use case generation method and apparatus according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of an interface use case generation method according to an embodiment of the present disclosure;
FIG. 3 schematically shows a flowchart of an embodiment of step S20 in FIG. 2;
FIG. 4 schematically shows a flowchart of an embodiment of step S21 in FIG. 3;
FIG. 5 schematically shows a flowchart of an embodiment of step S23 in FIG. 3;
FIG. 6 is a block diagram schematically illustrating an interface use case generation apparatus according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of one embodiment of the packaging module of FIG. 6;
FIG. 8 schematically illustrates a block diagram of an embodiment of the structural packaging unit of FIG. 7;
FIG. 9 is a block diagram schematically illustrating the construction of one embodiment of the factor encapsulation unit of FIG. 7;
fig. 10 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that these descriptions are illustrative only and are not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
In those instances where a convention analogous to "at least one of A, B, and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, and C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.).
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, necessary security measures are taken, and the customs of the public order is not violated.
An embodiment of the present disclosure provides an interface case generation method, including:
acquiring interface characteristic information;
defining and packaging all data structures in the interface characteristic information to obtain a horizontal factor and a factor;
calling and compiling an orthogonal table algorithm to obtain a two-dimensional orthogonal table according to the horizontal factor and the factor;
obtaining a use case data set object according to the two-dimensional orthogonal table;
and outputting the use case data set object.
The embodiment of the disclosure provides an interface use case generation method, and aims to solve the problem that the interface use case generation method is not universal.
Fig. 1 schematically shows an application scenario diagram of an interface use case generation method and apparatus according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario according to this embodiment may include a financial service field. Network 102 is the medium used to provide communication links between terminal devices 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal device 101 to interact with server 103 over network 102 to receive or send messages or the like. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (for example only) may be installed on the terminal device 101.
The terminal device 101 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 103 may be a server that provides various services, such as a background management server (for example only) that provides support for websites browsed by users using the terminal devices 101. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the interface use case generation method provided by the embodiment of the present disclosure may be generally executed by the server 103. Accordingly, the interface use case generation apparatus provided by the embodiment of the present disclosure may be generally disposed in the server 103. The interface use case generation method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 103 and is capable of communicating with the terminal device 101 and/or the server 103. Accordingly, the interface use case generation apparatus provided in the embodiment of the present disclosure may also be disposed in a server or a server cluster that is different from the server 103 and is capable of communicating with the terminal device 101 and/or the server 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The interface use case generation method of the disclosed embodiment will be described in detail below with reference to fig. 2 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flowchart of an interface use case generation method according to an embodiment of the present disclosure.
As shown in fig. 2, the interface use case generating method of the embodiment includes operations S10 to S50, and the transaction processing method may be executed by the interface use case generating apparatus.
In operation S10, acquiring interface feature information;
in operation S20, defining and packaging all data structures in the interface feature information to obtain a level factor and a factor;
in operation S30, according to the horizontal factor and the factor, calling and writing an orthogonal table algorithm to obtain a two-dimensional orthogonal table;
in operation S40, a use case dataset object is obtained according to the two-dimensional orthogonal table;
in operation S50, a use case data set object is output.
In the embodiment provided by the disclosure, corresponding to different interfaces, various data structures of the interfaces are directly obtained by obtaining interface characteristic information, all data structures in the interface characteristic information are defined and encapsulated, a level factor and a factor are obtained according to the interface characteristic information, an orthogonal table algorithm is called, a use case dataset object is obtained through mapping, and the use case dataset object is transmitted to the outside; in the embodiment, the interface test case set can be generated after the interface definition design is completed, so that the labor cost and the time cost for constructing the interface test can be greatly reduced, and the application of the orthogonal test algorithm also ensures the flexibility, the science, the effectiveness and the sufficiency of the interface case.
Further, referring to fig. 3, step S20 further includes:
s21, defining and packaging all data structures in the interface characteristic information to obtain a data model;
s22, extracting and obtaining a service rule according to the interface characteristic information;
and S23, defining and filling the data model according to the business rule to obtain a level factor and a factor.
Encapsulating all data structures by definition; meanwhile, each parameter in the interface gives all possible values through a business rule when defining and packaging the element structure, so that horizontal factors and factors required by the orthogonal table algorithm are generated finally.
Specifically, referring to fig. 4, in the embodiment of the present disclosure, the interface feature information includes a plurality of parameter names and a plurality of corresponding parameter types; the step S21 includes:
s211, defining and packaging each parameter name and any value of the corresponding parameter type to obtain an element;
s212, packaging all the element sets to obtain a data set;
s213, encapsulating the data set and the plurality of elements to obtain metadata;
s214, packaging the metadata, the plurality of elements and the data set to obtain a data model.
Specifically, the present disclosure provides a specific embodiment:
in this embodiment, each parameter name and any value of the corresponding parameter type in the interface feature information are defined and encapsulated into one element; for example, comment is one of the parameter names of the interface feature information, the parameter type is string type, and possible values of the parameter comment of string type include a series of values such as minimum boundary value, maximum boundary value, no space, special characters, and the like, where each value corresponds to an element structure.
And encapsulating a set of all elements obtained according to the interface characteristic information in one interface into a data set, wherein each parameter consists of a plurality of elements.
And then, through the interface characteristic information, obtaining metadata, wherein the metadata is composed of data sets and elements.
And packaging the metadata and the rest data structures into a complete data model, wherein the data model is a complete data structure of an interface and consists of the metadata, a data set and elements.
In this embodiment, all data structures in the interface feature information are defined and encapsulated to obtain a data model.
Additionally, in embodiments provided by the present disclosure, the business rules include at least one of mandatory information business, critical field fault tolerance processing business type, legal and valid processing business type, and boundary value business type.
It should be noted that the mandatory information service is used for processing mandatory information fields defined in the interface information; the key field fault-tolerant processing service is used for carrying out the processing of error prevention on the mandatory field defined in the interface information; the legal valid processing service is used for processing the correct validity verification of fields defined in the interface information; the boundary value service is used for processing service parameters with the interface field type being String and for giving the Number type of the length range definition, all boundary values such as minimum boundary, maximum boundary and the like need to be given.
On the other hand, referring to fig. 5, the interface characteristic information includes a plurality of interface parameters; step S23 includes:
s231, filling the data model definition according to the service rule to obtain the value number of each interface parameter and each value of the interface parameter;
s232, obtaining a horizontal number and a horizontal value according to the value number and the value;
and S233, obtaining a level factor and a factor according to the data model, the level number and the level value.
In this embodiment, the above-mentioned result of defining the encapsulated data model, metadata, element, and data set is used to create and encapsulate a horizontal number and a horizontal value, where the number of values of the interface parameter is the horizontal number, each value of the interface parameter is the horizontal value, and the encapsulation of the horizontal number and the horizontal value requires the result of defining the data model, the metadata, the element, and the data set, and a service definition rule.
And utilizing the result of defining the data model, the metadata, the element, the data set and the level number of the package to create and package the factor, wherein the package of the factor needs the result of using the data model, the metadata, the element, the data set and the level value.
Based on the above interface use case generating method, the present disclosure also provides an interface use case generating device 200, which will be described in detail below with reference to fig. 6.
Fig. 6 schematically shows a block diagram of an interface use case generation apparatus 200 according to an embodiment of the present disclosure.
As shown in fig. 6, the interface use case generation apparatus 200 of the embodiment includes an input module 1, a packaging module 2, a calculation module 3, a mapping module 4, and an output module 5; the input module 1 is used for acquiring interface characteristic information; the packaging module 2 defines and packages all data structures in the interface characteristic information to obtain a horizontal factor and a factor; the calculation module 3 calls and compiles an orthogonal table algorithm to obtain a two-dimensional orthogonal table according to the horizontal factor and the factor; the mapping module 4 obtains a use case data set object according to the two-dimensional orthogonal table; the output module 5 outputs the use case data set object.
Further, referring to fig. 7, the package module 2 includes a structure package unit 21, a rule package unit 22, and a factor package unit 23;
the structure encapsulation unit 21 is used for defining and encapsulating all data structures in the interface feature information to obtain a data model;
the rule encapsulation unit 22 is used for extracting and obtaining a service rule according to the interface characteristic information;
the factor encapsulating unit 23 is used for filling the data model definition according to the business rule, and obtaining the level factor and the factor.
Further, referring to fig. 8, the interface feature information includes a plurality of parameter names and a plurality of corresponding parameter types; the structure packaging unit 21 includes an element subunit 211, a data set subunit 212, a metadata subunit 213, and a data model subunit 214;
the element subunit 211 is configured to define and encapsulate each parameter name and any value of the corresponding parameter type to obtain an element;
the data set subunit 212 is configured to encapsulate sets of all elements to obtain a data set;
the metadata subunit 213 is configured to encapsulate the data set and the plurality of elements to obtain metadata;
the data model subunit 214 is configured to encapsulate the metadata, the plurality of elements, and the data set to obtain a data model.
In addition, referring to fig. 9, the interface feature information includes a plurality of interface parameters; the factor packaging unit 23 includes a padding subunit 231, a value subunit 232, and a result subunit 233;
the padding subunit 231 is configured to pad the data model definition according to the service rule, so as to obtain the number of values of each interface parameter and each value of the interface parameter;
the value-taking subunit 232 is configured to obtain a horizontal number and a horizontal value according to the value-taking number and the value;
the result subunit 233 is used to obtain a level factor and a factor according to the data model, the level number and the level value.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
Fig. 10 schematically shows a block diagram of an electronic device adapted for an interface use case generation method according to an embodiment of the present disclosure.
As shown in fig. 10, the electronic device 300 according to the embodiment of the present disclosure includes a processor 3001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 3002 or a program loaded from a storage section 3008 into a Random Access Memory (RAM) 3003. The processor 3001 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 3001 may also include on-board memory for caching purposes. The processor 3001 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 3003, various programs and data necessary for the operation of the electronic apparatus 300 are stored. The processor 3001, the ROM3002, and the RAM 3003 are connected to each other by a bus 3004. The processor 3001 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM3002 and/or the RAM 3003. Note that the program may also be stored in one or more memories other than the ROM3002 and the RAM 3003. The processor 3001 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, electronic device 300 may also include an input/output (I/O) interface 3005, input/output (I/O) interface 3005 also connected to bus 3004. Electronic device 300 may also include one or more of the following components connected to I/O interface 3005: an input portion 3006 including a keyboard, a mouse, and the like; an output section 3007 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 3008 including a hard disk and the like; and a communication section 3009 including a network interface card such as a LAN card, a modem, or the like. The communication section 3009 performs communication processing via a network such as the internet. Drivers 3010 are also connected to I/O interface 3005 as needed. A removable medium 3011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 3010 as necessary, so that a computer program read out therefrom is mounted in the storage section 3008 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be embodied in the device/apparatus/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include one or more memories other than the ROM3002 and/or the RAM 3003 and/or the ROM3002 and the RAM 3003 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated by the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the interface use case generation method provided by the embodiment of the disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 3001. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, and the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via the communication section 3009, and/or installed from the removable medium 3011. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 3009, and/or installed from the removable medium 3011. The computer program performs the above-described functions defined in the system of the embodiment of the present disclosure when executed by the processor 3001. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. An interface use case generation method, comprising:
acquiring interface characteristic information;
defining and packaging all data structures in the interface characteristic information to obtain a horizontal factor and a factor;
calling and compiling an orthogonal table algorithm to obtain a two-dimensional orthogonal table according to the horizontal factor and the factor;
obtaining a use case data set object according to the two-dimensional orthogonal table;
outputting a use case data set object set;
defining and packaging all data structures in the interface characteristic information, and obtaining the level factor and the factor, wherein the step of obtaining the level factor and the factor further comprises the following steps:
defining and packaging all data structures in the interface characteristic information to obtain a data model;
extracting to obtain a service rule according to the interface characteristic information;
and according to the business rule, defining and filling the data model to obtain the level factor and the factor.
2. The interface use case generation method of claim 1, wherein the interface characteristic information comprises a plurality of parameter names and a corresponding plurality of parameter types;
defining and packaging all data structures in the interface characteristic information to obtain a data model, wherein the step of obtaining the data model comprises the following steps:
defining and packaging each parameter name and any value of the corresponding parameter type to obtain an element;
packaging all the element sets to obtain a data set;
packaging the data set and the plurality of elements to obtain metadata;
and packaging the metadata, the plurality of elements and the data set to obtain the data model.
3. The method for interface use case generation according to claim 1, wherein the service rule includes at least one of mandatory information service, key field fault tolerance handling service type, legal and valid handling service type, and boundary value service type.
4. The interface use case generation method of claim 1, wherein the interface characteristic information includes a plurality of interface parameters;
according to the business rules, the step of filling the data model definition to obtain the level factor and the factor comprises the following steps:
according to the business rules, filling the data model definition to obtain the value number of each interface parameter and each value of the interface parameters;
obtaining a horizontal number and a horizontal value according to the value number and the value;
and obtaining the level factor and the factor according to the data model, the level number and the level value.
5. An interface use case generation apparatus, comprising:
the input module is used for acquiring interface characteristic information;
the packaging module is used for defining and packaging all data structures in the interface characteristic information to obtain a horizontal factor and a factor;
the calculation module calls and compiles an orthogonal table algorithm to obtain a two-dimensional orthogonal table according to the horizontal factor and the factor;
the mapping module is used for obtaining a use case data set object according to the two-dimensional orthogonal table; and the number of the first and second groups,
the output module outputs a use case data set object set;
the package module includes:
the structure packaging unit is used for defining and packaging all data structures in the interface characteristic information to obtain a data model;
the rule packaging unit is used for extracting and obtaining a service rule according to the interface characteristic information; and the number of the first and second groups,
and the factor packaging unit is used for defining and filling the data model according to the business rule to obtain the level factor and the factor.
6. The interface use case generation apparatus of claim 5, wherein the interface characteristic information comprises a plurality of parameter names and a corresponding plurality of parameter types;
the structure packaging unit includes:
the element subunit is used for defining and packaging each parameter name and any value of the corresponding parameter type to obtain an element;
the data set subunit is used for packaging all the element sets to obtain a data set;
a metadata subunit, configured to encapsulate the data set and the plurality of elements to obtain metadata; and the number of the first and second groups,
and the data model subunit is used for packaging the metadata, the plurality of elements and the data set to obtain the data model.
7. The interface use case generation apparatus of claim 5, wherein the interface characteristic information includes a plurality of interface parameters;
the factor packing unit includes:
the filling subunit is used for defining and filling the data model according to the service rule to obtain the value number of each interface parameter and each value of the interface parameter;
a value taking subunit, configured to obtain a horizontal number and a horizontal value according to the value number and the value; and (c) a second step of,
a result subunit, configured to obtain the level factor and the factor according to the data model, the level number, and the level value.
8. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-4.
9. A computer-readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 4.
CN202110816309.8A 2021-07-19 2021-07-19 Interface use case generation method, device, equipment and medium Active CN113535565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110816309.8A CN113535565B (en) 2021-07-19 2021-07-19 Interface use case generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110816309.8A CN113535565B (en) 2021-07-19 2021-07-19 Interface use case generation method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN113535565A CN113535565A (en) 2021-10-22
CN113535565B true CN113535565B (en) 2022-10-04

Family

ID=78100336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110816309.8A Active CN113535565B (en) 2021-07-19 2021-07-19 Interface use case generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113535565B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117033249B (en) * 2023-10-08 2024-07-02 卓望数码技术(深圳)有限公司 Test case generation method and device, computer equipment and storage medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243608A (en) * 2010-05-13 2011-11-16 方兴 Software security test method based on global data structure description
CN103064788A (en) * 2012-12-24 2013-04-24 清华大学 Web service modeling and test method based on interface semantic contract model
CN103164330A (en) * 2011-12-14 2013-06-19 航天信息股份有限公司 Automatic generation method for software test case
CN108829395A (en) * 2018-06-19 2018-11-16 中国电子科技集团公司第四十研究所 A kind of signal-oriented driver code automatic generation method and device
CN109002391A (en) * 2018-06-28 2018-12-14 西南电子技术研究所(中国电子科技集团公司第十研究所) The method of automatic detection embedded software interface testing data
CN109614319A (en) * 2018-11-14 2019-04-12 金色熊猫有限公司 Automated testing method, device, electronic equipment and computer-readable medium
CN110134584A (en) * 2019-04-12 2019-08-16 深圳壹账通智能科技有限公司 A kind of generation method, device, storage medium and the server of interface testing use-case
CN110334009A (en) * 2019-05-28 2019-10-15 中国平安人寿保险股份有限公司 Automatic example generation method, device, terminal and storage medium
CN110879776A (en) * 2018-09-06 2020-03-13 北京京东尚科信息技术有限公司 Test case generation method and device
CN111290941A (en) * 2018-12-10 2020-06-16 北京京东尚科信息技术有限公司 Method and device for testing multiple interfaces, computing equipment and medium
CN111352846A (en) * 2020-03-06 2020-06-30 深圳前海微众银行股份有限公司 Test system number making method, device, equipment and storage medium
CN111679991A (en) * 2020-06-23 2020-09-18 武汉光庭信息技术股份有限公司 Method and system for generating test case by utilizing big data
CN111752846A (en) * 2020-06-30 2020-10-09 深圳前海微众银行股份有限公司 Interface testing method and device
CN112306855A (en) * 2019-08-02 2021-02-02 北大方正集团有限公司 Interface automation test method, device, terminal and storage medium
CN112597052A (en) * 2020-12-29 2021-04-02 深圳Tcl新技术有限公司 Interface testing method and device and computer readable storage medium
CN112783793A (en) * 2021-02-09 2021-05-11 中国工商银行股份有限公司 Automatic interface test system and method

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8221126B2 (en) * 2004-11-22 2012-07-17 Bravobrava L.L.C. System and method for performing programmatic language learning tests and evaluations
US7814075B2 (en) * 2004-12-30 2010-10-12 Oracle International Corporation Dynamic auditing
CN102073483A (en) * 2009-11-23 2011-05-25 中兴通讯股份有限公司 Method and device for generating orthogonal test cases
CN102096631B (en) * 2009-12-11 2013-09-25 华为技术有限公司 Interface testing method and device
US9412070B2 (en) * 2013-10-10 2016-08-09 International Business Machines Corporation Automatically deriving context when extracting a business rule
CN109558310A (en) * 2018-10-25 2019-04-02 北京仁科互动网络技术有限公司 Method for generating test case and device
CN110221975B (en) * 2019-05-28 2022-06-28 厦门美柚股份有限公司 Method and device for creating interface case automation test script
CN112181821A (en) * 2020-09-24 2021-01-05 浙江大搜车软件技术有限公司 Interface test coverage detection method and device, electronic device and storage medium
CN112231230A (en) * 2020-11-12 2021-01-15 腾讯科技(深圳)有限公司 Test case management method and device, electronic equipment and storage medium
CN112328419B (en) * 2020-11-27 2024-07-02 北京字节跳动网络技术有限公司 Test case generation method and device of remote procedure call interface, storage medium and electronic equipment
CN112363953B (en) * 2020-12-09 2023-12-05 中材邦业(杭州)智能技术有限公司 Interface test case generation method and system based on crawler technology and rule engine
CN112559364B (en) * 2020-12-23 2024-09-06 上海品顺信息科技有限公司 Test case generation method and device, computer equipment and storage medium
CN112882956B (en) * 2021-03-30 2024-04-16 中信银行股份有限公司 Method and device for automatically generating full-scene automatic test cases through data combination calculation, storage medium and electronic equipment

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243608A (en) * 2010-05-13 2011-11-16 方兴 Software security test method based on global data structure description
CN103164330A (en) * 2011-12-14 2013-06-19 航天信息股份有限公司 Automatic generation method for software test case
CN103064788A (en) * 2012-12-24 2013-04-24 清华大学 Web service modeling and test method based on interface semantic contract model
CN108829395A (en) * 2018-06-19 2018-11-16 中国电子科技集团公司第四十研究所 A kind of signal-oriented driver code automatic generation method and device
CN109002391A (en) * 2018-06-28 2018-12-14 西南电子技术研究所(中国电子科技集团公司第十研究所) The method of automatic detection embedded software interface testing data
CN110879776A (en) * 2018-09-06 2020-03-13 北京京东尚科信息技术有限公司 Test case generation method and device
CN109614319A (en) * 2018-11-14 2019-04-12 金色熊猫有限公司 Automated testing method, device, electronic equipment and computer-readable medium
CN111290941A (en) * 2018-12-10 2020-06-16 北京京东尚科信息技术有限公司 Method and device for testing multiple interfaces, computing equipment and medium
CN110134584A (en) * 2019-04-12 2019-08-16 深圳壹账通智能科技有限公司 A kind of generation method, device, storage medium and the server of interface testing use-case
CN110334009A (en) * 2019-05-28 2019-10-15 中国平安人寿保险股份有限公司 Automatic example generation method, device, terminal and storage medium
CN112306855A (en) * 2019-08-02 2021-02-02 北大方正集团有限公司 Interface automation test method, device, terminal and storage medium
CN111352846A (en) * 2020-03-06 2020-06-30 深圳前海微众银行股份有限公司 Test system number making method, device, equipment and storage medium
CN111679991A (en) * 2020-06-23 2020-09-18 武汉光庭信息技术股份有限公司 Method and system for generating test case by utilizing big data
CN111752846A (en) * 2020-06-30 2020-10-09 深圳前海微众银行股份有限公司 Interface testing method and device
CN112597052A (en) * 2020-12-29 2021-04-02 深圳Tcl新技术有限公司 Interface testing method and device and computer readable storage medium
CN112783793A (en) * 2021-02-09 2021-05-11 中国工商银行股份有限公司 Automatic interface test system and method

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
一种基于SWIG的接口自动化测试方法;刘存思;《计算机光盘软件与应用》;20130115(第02期);全文 *
一种改进的正交测试用例设计方法研究;杨翠清等;《微计算机信息》;20101125(第33期);全文 *
业务流程建模与测试方法研究;丁明等;《西安交通大学学报》;20160310(第03期);全文 *
基于正交法的软件测试用例生成;汤红霞等;《计算机工程与设计》;20080728(第14期);全文 *
银行管理系统测试工作量估算方法研究;黄新民;《金融科技时代》;20150310(第03期);全文 *

Also Published As

Publication number Publication date
CN113535565A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN110414989A (en) Method for detecting abnormality and device, electronic equipment and computer readable storage medium
CN113515271A (en) Service code generation method and device, electronic equipment and readable storage medium
CN110928571A (en) Business program development method and device
CN115982491A (en) Page updating method and device, electronic equipment and computer readable storage medium
CN112463729A (en) Data file storage method and device, electronic equipment and medium
CN115599386A (en) Code generation method, device, equipment and storage medium
CN113132400B (en) Business processing method, device, computer system and storage medium
CN113535565B (en) Interface use case generation method, device, equipment and medium
CN114116509A (en) Program analysis method, program analysis device, electronic device, and storage medium
CN113176907A (en) Interface data calling method and device, computer system and readable storage medium
CN112965916A (en) Page testing method, page testing device, electronic equipment and readable storage medium
CN114691527A (en) Unit test case generation method, apparatus, device, medium, and program product
CN115514632A (en) Resource template arranging method, device and equipment for cloud service and storage medium
CN114677114A (en) Approval process generation method and device based on graph dragging
CN114035864A (en) Interface processing method, interface processing device, electronic device, and storage medium
CN112860344A (en) Component processing method and device, electronic equipment and storage medium
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN113535568A (en) Verification method, device, equipment and medium for application deployment version
CN113377376A (en) Data packet generation method, data packet generation device, electronic device, and storage medium
CN112988604A (en) Object testing method, testing system, electronic device and readable storage medium
CN112068814A (en) Method, device, system and medium for generating executable file
CN113360417B (en) Test method, session modifier, electronic device and medium
CN114969059B (en) Method and device for generating order information, electronic equipment and storage medium
CN114385170A (en) Form generation method, device, equipment, medium and program product

Legal Events

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