CN115328813A - Test case design method, device, equipment and storage medium - Google Patents

Test case design method, device, equipment and storage medium Download PDF

Info

Publication number
CN115328813A
CN115328813A CN202211237683.3A CN202211237683A CN115328813A CN 115328813 A CN115328813 A CN 115328813A CN 202211237683 A CN202211237683 A CN 202211237683A CN 115328813 A CN115328813 A CN 115328813A
Authority
CN
China
Prior art keywords
test case
test
tested
product
reusable
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.)
Granted
Application number
CN202211237683.3A
Other languages
Chinese (zh)
Other versions
CN115328813B (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.)
Chengdu Aircraft Industrial Group Co Ltd
Original Assignee
Chengdu Aircraft Industrial Group 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 Chengdu Aircraft Industrial Group Co Ltd filed Critical Chengdu Aircraft Industrial Group Co Ltd
Priority to CN202211237683.3A priority Critical patent/CN115328813B/en
Publication of CN115328813A publication Critical patent/CN115328813A/en
Application granted granted Critical
Publication of CN115328813B publication Critical patent/CN115328813B/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/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The application discloses a test case design method, a device, equipment and a storage medium, wherein a keyword library is introduced for judging the reusability of a test case, when the test case is designed, the reusable test case suitable for a to-be-tested product in a test case resource library is searched according to test requirements, if the reusable test case is available, the reusable test case is directly selected for reuse, and the test case of the to-be-tested product is obtained, so that the reusability of the test case of the tested product is improved; furthermore, the modeling of the tested object and the design of the test case are abstracted into two modules which can be developed in parallel at a user level through a preset tested object model, so that different operators are not limited by inherent time sequence, and the modeling of the tested object and the design work of the test case on different minimum measurable units are carried out according to specified standards, so that the design of the test case is relatively independent, the design speed of the test case is effectively improved, and the requirement on the programming level of developers is also reduced.

Description

Test case design method, device, equipment and storage medium
Technical Field
The present application relates to the field of test technologies, and in particular, to a method, an apparatus, a device, and a storage medium for designing a test case.
Background
Testing is an essential part of the whole life cycle of a product or system, and test case design and generation are one of the most basic and critical difficult tasks of the whole testing work, and for a complex system, designing a large number of test cases is extremely time-consuming work. The Test Case (Test Case) is a description of a Test task performed on a specific software product, embodies a Test scheme, a method, a technology and a strategy, is closely coupled with the requirements of a to-be-tested function, a to-be-tested performance, a Test scene and the like of a to-be-tested object, and has the characteristic of pertinence.
In an actual scene, a product or a system often has scene switching and a function or performance to be tested is changed, which all can cause that the generated test case needs to be designed and edited again, and the reusability of the test case generated by the existing design method is low.
Disclosure of Invention
The application mainly aims to provide a test case design method, a test case design device, test case design equipment and a test case design storage medium, and aims to solve the technical problem of low reusability of test cases.
In order to achieve the above object, the present application provides a test case design method, including:
obtaining a product to be tested;
establishing a test demand model according to a plurality of test standards of the product to be tested;
identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model; the test case resource library comprises a plurality of test cases of tested products, the test cases comprise reusable test cases and non-reusable test cases, and the reusable test cases and the non-reusable test cases are determined based on a preset keyword library;
if the target reusable test case exists, extracting the target reusable test case, and importing the target reusable test case into an editing interface;
and generating a test case of the product to be tested on the editing interface according to the test demand model and a preset tested object model.
Optionally, the step of generating a test case of the product to be tested on the editing interface according to the test requirement model and a preset model of the object to be tested includes:
and modifying the target reusable test case at the editing interface according to the test demand model and a preset tested object model to generate the test case of the product to be tested.
Optionally, after the step of identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model, the method further includes:
if not, newly building an initial test case in the editing interface;
the step of generating the test case of the product to be tested on the editing interface according to the test requirement model and a preset tested object model comprises the following steps:
and editing the initial test case on the editing interface according to the test requirement model to generate the test case of the product to be tested.
Optionally, after the step of obtaining the product to be tested, the method further includes:
modeling a tested object for the minimum measurable basic unit of the product to be tested to obtain a model of the tested object; the tested object model comprises to-be-tested product information and signal information, and the signal information comprises port information and target signal attributes.
Optionally, the test requirement model includes a product name, a product category, and a target product attribute; the step of identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model comprises the following steps:
and matching the product name and the product category in the test requirement model with the reusable test case in the test case resource library to obtain the target reusable test case.
Optionally, before the step of identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model, the method includes:
identifying product attributes in the keyword library; wherein the product attributes include public products and private products;
if the public product is the public product, marking the corresponding test case as the reusable test case;
if the private product is the private product, identifying a corresponding signal attribute; wherein the signal attributes comprise public signals and private signals;
if the test case is the common signal, marking the corresponding test case as the reusable test case;
and if the private signal is the private signal, marking the corresponding test case as an unreusable test case.
Optionally, before the step of obtaining the product to be tested, the method further includes:
obtaining a plurality of tested products;
generating the test case resource library according to the test case of the tested product;
and generating the keyword library according to the product attribute in the test demand model of the tested product and the signal attribute in the tested object model of the tested product.
In addition, to achieve the above object, the present application further provides a test case designing apparatus, including:
the acquisition module is used for acquiring a product to be tested;
the test demand model establishing module is used for establishing a test demand model according to various test standards of the product to be tested;
the reusable test case selection module is used for identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model; the test case resource library comprises a plurality of test cases of tested products, the test cases comprise reusable test cases and non-reusable test cases, and the reusable test cases and the non-reusable test cases are determined based on a preset keyword library;
the reusable test case importing module is used for extracting the target reusable test case and importing the target reusable test case into an editing interface if the target reusable test case exists;
and the test case generation module is used for generating a test case of the product to be tested on the editing interface according to the test demand model and a preset tested object model.
In addition, to achieve the above object, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above method.
In addition, to achieve the above object, the present application further provides a computer readable storage medium, where a computer program is stored, and a processor executes the computer program to implement the above method.
The beneficial effect that this application can realize.
According to the test case design method, the test case design device, the test case design equipment and the test case design storage medium, a product to be tested is obtained; establishing a test demand model according to a plurality of test standards of the product to be tested; identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model; the test case resource library comprises a plurality of test cases of tested products, the test cases comprise reusable test cases and non-reusable test cases, and the reusable test cases and the non-reusable test cases are determined based on a preset keyword library; if the target reusable test case exists, extracting the target reusable test case, and importing the target reusable test case into an editing interface; and generating a test case of the product to be tested on the editing interface according to the test demand model and a preset tested object model. The keyword library is introduced for reusability judgment of the test cases, when the test cases are designed, the reusable test cases suitable for the to-be-tested products in the test case resource library are searched according to test requirements, if the reusable test cases exist, the reusable test cases are directly selected for multiplexing, and editing and modifying are carried out according to the test requirements of the to-be-tested products to obtain new test cases, namely the test cases of the to-be-tested products, so that the reusability of the test cases of the tested products is improved, and the overall efficiency of test case design is improved; furthermore, the modeling of the tested object and the design of the test case are abstracted into two modules which can be developed in parallel at a user level through a preset tested object model, so that different operators are not limited by inherent time sequence, and the modeling of the tested object and the design work of the test case on different minimum measurable units are carried out according to specified standards, so that the design of the test case is relatively independent, the design speed of the test case is effectively improved, and the requirement on the programming level of developers is also reduced.
Drawings
FIG. 1 is a schematic diagram of a computer device in a hardware operating environment according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a test case design method provided in an embodiment of the present application;
fig. 3 is a functional module schematic diagram of a test case design apparatus according to an embodiment of the present disclosure.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The main solution of the embodiment of the application is as follows: according to the test case design method, the test case design device, the test case design equipment and the storage medium, a product to be tested is obtained; establishing a test demand model according to various test standards of the product to be tested; identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model; the test case resource library comprises a plurality of test cases of tested products, the test cases comprise reusable test cases and non-reusable test cases, and the reusable test cases and the non-reusable test cases are determined based on a preset keyword library; if the target reusable test case exists, extracting the target reusable test case, and importing the target reusable test case into an editing interface; and generating a test case of the product to be tested on the editing interface according to the test demand model and a preset tested object model.
In the prior art, testing is an essential ring in the whole life cycle of a product or a system, and test case design and generation are one of the most basic and critical difficult tasks of the whole testing work, and for a complex system, designing a large number of test cases is extremely time-consuming work. The Test Case (Test Case) is a description of a Test task performed on a specific software product, embodies a Test scheme, a method, a technology and a strategy, is closely coupled with the requirements of a to-be-tested function, a to-be-tested performance, a Test scene and the like of a to-be-tested object, and has the characteristic of pertinence.
In an actual scene, a product or a system often has scene switching and a function or performance to be tested is changed, which all can cause that the generated test case needs to be designed and edited again.
Therefore, the application provides a solution, a keyword library is introduced for reusability judgment of the test case, when the test case is designed, the reusable test case suitable for the product to be tested in the test case resource library is searched according to the test requirement, if the reusable test case is available, the reusable test case is directly selected for multiplexing, and editing and modifying are carried out according to the test requirement of the product to be tested to obtain a new test case, namely the test case of the product to be tested, so that the reusability of the test case of the tested product is improved, and the overall efficiency of the design of the test case is improved; furthermore, the modeling of the tested object and the design of the test case are abstracted into two modules which can be developed in parallel at a user level through a preset tested object model, so that different operators are not limited by inherent time sequence, and the modeling of the tested object and the design work of the test case on different minimum measurable units are carried out according to specified standards, so that the design of the test case is relatively independent, the design speed of the test case is effectively improved, and the requirement on the programming level of developers is also reduced.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a computer device in a hardware operating environment according to an embodiment of the present application.
As shown in fig. 1, the computer apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in FIG. 1 does not constitute a limitation of a computer device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a data storage module, a network communication module, a user interface module, and an electronic program.
In the computer device shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the computer device of the present invention may be disposed in the computer device, and the computer device calls the test case design apparatus stored in the memory 1005 through the processor 1001 and executes the test case design method provided in the embodiment of the present application.
Referring to fig. 2, based on the hardware device of the foregoing embodiment, an embodiment of the present application provides a test case design method, including:
s10: obtaining a test product to be tested;
in the specific implementation process, the product to be tested refers to a product to be tested, and the test case is firstly designed when the test is performed. The design of the test case is closely coupled with the requirements of the tested object such as the function to be tested, the performance and the test scene.
S20: establishing a test demand model according to a plurality of test standards of the product to be tested;
in the specific implementation process, the product to be tested has various test requirements in different aspects and corresponding test standards, and the basic information such as the name and the attribute of the product to be tested and the test standards are input into the system to obtain a test requirement model.
S30: identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model; the test case resource library comprises a plurality of test cases of tested products, the test cases comprise reusable test cases and non-reusable test cases, and the reusable test cases and the non-reusable test cases are determined based on a preset keyword library;
in the specific implementation process, because the test cases are closely coupled with the functions, performances, test scenes and the like of the products to be tested, the existing test cases can not meet the requirements due to simple scene switching and the change of the performances or the functions to be tested, and the redesign is needed. The test case resource library collects a large number of test cases of tested products, judges whether the test cases belong to reusable test cases or non-reusable test cases according to the keyword library, and when a certain test case is a reusable test case, can judge the correlation between the reusable test case and the tested products according to the content in the test requirement model of the tested products, if the correlation is high, the reusable test case is a target reusable test case, and can be directly edited and modified based on the target reusable test case to obtain a new test case of the tested products, so that the reusability and the utilization rate of the test cases are improved, the workload for designing the test cases is reduced, and the overall test working efficiency is improved.
As an optional implementation manner, after the step of obtaining the product to be tested, the method further includes: modeling a tested object for the minimum measurable basic unit of the product to be tested to obtain a model of the tested object; the tested object model comprises to-be-tested product information and signal information, and the signal information comprises port information and target signal attributes.
In the specific implementation process, the Unit Under Test (UUT) modeling relates to the basic information description and signal description of the product to be tested, the description specification of which conforms to the IEEE1671.3 standard and is stored in a text form, such as an XML format. The tested object model comprises information of the product to be tested, such as: the system comprises a product model, a product type, a manufacturer, an address, a contact way and the like, and also comprises signal information, namely port information and target signal attributes, wherein the port information comprises a port direction, a port type, a matching connector number, a signal table (pin number, signal name, signal type and signal definition), a matching connector type and a mounting position, and the target signal attributes comprise a common attribute and a private attribute. By obtaining the preset tested object model, the weak coupling effect between the test case design and the tested object is achieved to a certain extent, namely, the tested object modeling and the test case design are abstracted into two modules which can be developed in parallel at the user level, so that different operators can carry out the tested object modeling and test case design work on different minimum measurable units according to the specified standard without being limited by the inherent time sequence, the test case design is relatively independent, the test case design speed is effectively improved, and the requirement on the programming level of developers is also reduced. Meanwhile, the tested object model is modeled based on the minimum measurable basic unit, which means that a plurality of minimum measurable basic units can be selected to be randomly combined when a test case is designed, and a multi-level tested object model is abstractly constructed, so that the test case for multi-level integrated test is formed.
As an optional implementation, the test requirement model includes a product name, a product category, and a target product attribute; the step of identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model comprises the following steps: and matching the product name and the product category in the test requirement model with the reusable test case in the test case resource library to obtain the target reusable test case.
In the specific implementation process, the test requirement model includes a product name, a product category and a target product attribute in addition to the test requirement of the model to be tested. And selecting a reusable test case with the same type or the same type as the product to be tested in the test case resource library according to the product name and the product type as a target reusable test case. The test case of a new product to be tested can be obtained by directly and simply editing and modifying the target reusable test case, so that the reusability and the utilization rate of the test case are improved, the workload for designing the test case is reduced, and the overall test work efficiency is improved.
As an optional implementation manner, before the step of obtaining the product to be tested, the method further includes: obtaining a plurality of tested products; generating the test case resource library according to the test case of the tested product; and generating the keyword library according to the product attribute in the test demand model of the tested product and the signal attribute in the tested object model of the tested product.
In the specific implementation process, a plurality of tested products are obtained, and the test cases of the tested products are collected to generate a test case resource library. According to the method for generating the test demand model and the method for generating the tested object model, the test demand model comprises the product attribute of the product, the tested object model comprises the signal attribute of the product, and the keyword library is established according to the product attribute and the signal attribute of the test case of the tested product and is used for judging the reusability of the subsequent test case.
As an optional implementation manner, before the step of identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model, the method includes: identifying product attributes in the keyword library; wherein the product attributes include public products and private products; if the public product is the public product, marking the corresponding test case as the reusable test case; if the private product is the product, identifying a corresponding signal attribute; wherein the signal attributes comprise public signals and private signals; if the test case is the common signal, marking the corresponding test case as the reusable test case; and if the private signal is the private signal, marking the corresponding test case as an unreusable test case.
In the specific implementation process, the keyword library is used for judging the reusability of the test case. The test cases of the tested products in the keyword library are provided with product attribute and signal attribute labels, wherein the product attributes can be divided into public products and private products, and the signal attributes can be divided into public signals and private signals. The test cases with the product attribute being a public product are all reusable test cases, the test cases with the product attribute being a private product determine the reusability of the test cases according to the signal attribute of the test cases, the test cases are reusable test cases only when the signal attribute of the test cases is a public signal, and the test cases are non-reusable test cases when the signal attribute is a private signal.
S40: if the target reusable test case exists, extracting the target reusable test case, and importing the target reusable test case into an editing interface;
in the specific implementation process, if the target reusable test case suitable for the product to be tested exists in the test case resource library, the target reusable test case is imported to the editing page.
S50: and generating a test case of the product to be tested on the editing interface according to the test demand model and a preset tested object model.
In the specific implementation process, according to the product name, the signal name, the test standard and other related information in the test demand model and the tested object model, editing is carried out on the reusable test case in the editing page, and the test case of the product to be tested is obtained.
Before the newly generated test case is stored, the reusability of the newly generated test case is judged by searching the product and signal attributes related to the test case in the keyword library file. If the test case is a reusable test case, the test case can be stored in a test case resource library for subsequent test case design of a product to be tested, and the reusability of the test case is further improved.
As an optional implementation manner, the step of generating a test case of the product to be tested on the editing interface according to the test requirement model and a preset model of the object to be tested includes: and modifying the target reusable test case at the editing interface according to the test demand model and a preset tested object model to generate the test case of the product to be tested.
In the specific implementation process, according to the product name, the signal name and the actual test requirement of the test product waiting for the test standard in the test requirement model and the tested object model, the target reusable test case is edited and modified to obtain the test case of the tested product. The design of test cases, such as the selection of signals, the automatic allocation of signal attributes, the editing of specific contents such as the communication flow definition of the signals and the like, is completed by using basic tools in a tool tree and data storage containers in a step tree, wherein the tool tree mainly provides basic tools such as waiting, verification, if else, data sending, data receiving, popup window and the like to guarantee the step editing of the test cases, and the step tree displays detailed test steps.
As an optional implementation manner, after the step of identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model, the method further includes: if not, newly building an initial test case in the editing interface;
in the specific implementation process, if a target reusable test case suitable for the product to be tested does not exist in the test case resource library, an initial test case is newly established on the editing page.
At this time, the step of generating the test case of the product to be tested on the editing interface according to the test requirement model and a preset tested object model includes: and editing the initial test case on the editing interface according to the test requirement model to generate the test case of the product to be tested.
It can be understood that the test case of the product to be tested is directly edited from the initial test case according to the test case requirement model. And before the newly generated test case is stored, the reusability of the newly generated test case is judged by searching the product and signal attributes related to the test case in the keyword library file. If the test case is a reusable test case, the test case can be stored in a test case resource library for subsequent test case design of a product to be tested, and the reusability of the test case is further improved.
It should be understood that the above is only an example, and the technical solution of the present application is not limited in any way, and those skilled in the art can make the setting based on the actual application, and the setting is not limited herein.
As can be easily found from the above description, the present embodiment is a simplified technical solution, and the overall effect is achieved
Referring to fig. 3, based on the same inventive concept, an embodiment of the present application further provides a test case design apparatus, including:
the acquisition module is used for acquiring a product to be tested;
the test demand model establishing module is used for establishing a test demand model according to various test standards of the product to be tested;
the reusable test case selection module is used for identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model; the test case resource library comprises a plurality of test cases of tested products, the test cases comprise reusable test cases and non-reusable test cases, and the reusable test cases and the non-reusable test cases are determined based on a preset keyword library;
the reusable test case importing module is used for extracting the target reusable test case and importing the target reusable test case into an editing interface if the target reusable test case exists;
and the test case generation module is used for generating the test case of the product to be tested on the editing interface according to the test demand model and a preset tested object model.
It should be noted that, in the present embodiment, each module in the test case design apparatus corresponds to each step in the test case design method in the foregoing embodiment one to one, and therefore, the specific implementation of the present embodiment may refer to the implementation of the test case design method, which is not described herein again.
Furthermore, in an embodiment, an embodiment of the present application further provides a computer device, which includes a processor, a memory, and a computer program stored in the memory, and when the computer program is executed by the processor, the steps of the method in the foregoing embodiments are implemented.
Furthermore, in an embodiment, an embodiment of the present application further provides a computer storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the method in the foregoing embodiments.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories. The computer may be a variety of computing devices including intelligent terminals and servers.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., a rom/ram, a magnetic disk, an optical disk) and includes instructions for enabling a multimedia terminal (e.g., a mobile phone, a computer, a television receiver, or a network device) to execute the method according to the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all the equivalent structures or equivalent processes that can be directly or indirectly applied to other related technical fields by using the contents of the specification and the drawings of the present application are also included in the scope of the present application.

Claims (10)

1. A test case design method is characterized by comprising the following steps:
obtaining a product to be tested;
establishing a test demand model according to a plurality of test standards of the product to be tested;
identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model; the test case resource library comprises a plurality of test cases of tested products, the test cases comprise reusable test cases and non-reusable test cases, and the reusable test cases and the non-reusable test cases are determined based on a preset keyword library;
if the target reusable test case exists, extracting the target reusable test case, and importing the target reusable test case into an editing interface;
and generating a test case of the product to be tested on the editing interface according to the test demand model and a preset tested object model.
2. The method for designing test cases according to claim 1, wherein the step of generating the test cases of the products to be tested on the editing interface according to the test requirement model and a preset tested object model includes:
and modifying the target reusable test case at the editing interface according to the test demand model and a preset tested object model to generate the test case of the product to be tested.
3. The method for designing test cases according to claim 1, wherein after the step of identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model, the method further comprises:
if not, newly building an initial test case in the editing interface;
the step of generating the test case of the product to be tested on the editing interface according to the test requirement model and a preset tested object model comprises the following steps:
and editing the initial test case on the editing interface according to the test requirement model to generate the test case of the product to be tested.
4. The test case design method according to claim 1, wherein after the step of obtaining the product to be tested, the method further comprises:
modeling a tested object of the minimum measurable basic unit of the product to be tested to obtain a model of the tested object; the tested object model comprises to-be-tested product information and signal information, and the signal information comprises port information and target signal attributes.
5. The test case design method of claim 1, wherein the test requirement model comprises a product name, a product category, and a target product attribute; the step of identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model comprises the following steps:
and matching the product name and the product category in the test requirement model with the reusable test case in the test case resource library to obtain the target reusable test case.
6. The method for designing the test case according to claim 5, wherein before the step of identifying whether the target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model, the method comprises:
identifying product attributes in the keyword library; wherein the product attributes include public products and private products;
if the public product is the public product, marking the corresponding test case as the reusable test case;
if the private product is the private product, identifying a corresponding signal attribute; wherein the signal attributes comprise public signals and private signals;
if the test case is the common signal, marking the corresponding test case as the reusable test case;
and if the private signal is the private signal, marking the corresponding test case as an unreusable test case.
7. The method for designing test cases according to claim 6, wherein before the step of obtaining the product to be tested, the method further comprises:
obtaining a plurality of tested products;
generating the test case resource library according to the test case of the tested product;
and generating the keyword library according to the product attribute in the test demand model of the tested product and the signal attribute in the tested object model of the tested product.
8. A test case designing apparatus, comprising:
the acquisition module is used for acquiring a product to be tested;
the test demand model establishing module is used for establishing a test demand model according to various test standards of the product to be tested;
the reusable test case selection module is used for identifying whether a target reusable test case suitable for the product to be tested exists in a preset test case resource library according to the test requirement model; the test case resource library comprises a plurality of test cases of tested products, the test cases comprise reusable test cases and non-reusable test cases, and the reusable test cases and the non-reusable test cases are determined based on a preset keyword library;
the reusable test case importing module is used for extracting the target reusable test case and importing the target reusable test case into an editing interface if the target reusable test case exists;
and the test case generation module is used for generating the test case of the product to be tested on the editing interface according to the test demand model and a preset tested object model.
9. A computer device, characterized in that it comprises a memory in which a computer program is stored and a processor which executes said computer program implementing the method according to any one of claims 1-7.
10. A computer-readable storage medium, having a computer program stored thereon, which, when executed by a processor, performs the method of any one of claims 1-7.
CN202211237683.3A 2022-10-11 2022-10-11 Test case design method, device, equipment and storage medium Active CN115328813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211237683.3A CN115328813B (en) 2022-10-11 2022-10-11 Test case design method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211237683.3A CN115328813B (en) 2022-10-11 2022-10-11 Test case design method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115328813A true CN115328813A (en) 2022-11-11
CN115328813B CN115328813B (en) 2023-02-03

Family

ID=83913496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211237683.3A Active CN115328813B (en) 2022-10-11 2022-10-11 Test case design method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115328813B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302718A (en) * 2015-10-26 2016-02-03 浪潮电子信息产业股份有限公司 Reusable software-oriented test model design method
CN105993154A (en) * 2014-03-11 2016-10-05 罗德施瓦兹两合股份有限公司 Technique for testing lte-advanced carrier aggregation receiver characteristics
CN106326122A (en) * 2016-08-23 2017-01-11 北京精密机电控制设备研究所 Software unit test case management system
US20170024310A1 (en) * 2015-07-21 2017-01-26 International Business Machines Corporation Proactive Cognitive Analysis for Inferring Test Case Dependencies
US10037263B1 (en) * 2016-07-27 2018-07-31 Intuit Inc. Methods, systems, and articles of manufacture for implementing end-to-end automation of software services
CN109446104A (en) * 2018-11-16 2019-03-08 郑州云海信息技术有限公司 A kind of testing case management and device based on big data
CN110928783A (en) * 2019-11-20 2020-03-27 北京工业大学 RobotFramework-based automatic test datamation reconstruction platform
CN111708703A (en) * 2020-06-18 2020-09-25 深圳前海微众银行股份有限公司 Test case set generation method, device, equipment and computer readable storage medium
CN113220578A (en) * 2021-05-17 2021-08-06 上海中通吉网络技术有限公司 Method for generating function test case
CN113687826A (en) * 2021-08-10 2021-11-23 中国人民解放军陆军工程大学 Test case multiplexing system and method based on requirement item extraction
CN114911687A (en) * 2021-02-06 2022-08-16 河南许继仪表有限公司 Intelligent electric energy meter test case multiplexing system and multiplexing method
CN114996125A (en) * 2022-05-11 2022-09-02 中国银行股份有限公司 Test case generation method, device, equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105993154A (en) * 2014-03-11 2016-10-05 罗德施瓦兹两合股份有限公司 Technique for testing lte-advanced carrier aggregation receiver characteristics
US20170024310A1 (en) * 2015-07-21 2017-01-26 International Business Machines Corporation Proactive Cognitive Analysis for Inferring Test Case Dependencies
CN105302718A (en) * 2015-10-26 2016-02-03 浪潮电子信息产业股份有限公司 Reusable software-oriented test model design method
US10037263B1 (en) * 2016-07-27 2018-07-31 Intuit Inc. Methods, systems, and articles of manufacture for implementing end-to-end automation of software services
CN106326122A (en) * 2016-08-23 2017-01-11 北京精密机电控制设备研究所 Software unit test case management system
CN109446104A (en) * 2018-11-16 2019-03-08 郑州云海信息技术有限公司 A kind of testing case management and device based on big data
CN110928783A (en) * 2019-11-20 2020-03-27 北京工业大学 RobotFramework-based automatic test datamation reconstruction platform
CN111708703A (en) * 2020-06-18 2020-09-25 深圳前海微众银行股份有限公司 Test case set generation method, device, equipment and computer readable storage medium
CN114911687A (en) * 2021-02-06 2022-08-16 河南许继仪表有限公司 Intelligent electric energy meter test case multiplexing system and multiplexing method
CN113220578A (en) * 2021-05-17 2021-08-06 上海中通吉网络技术有限公司 Method for generating function test case
CN113687826A (en) * 2021-08-10 2021-11-23 中国人民解放军陆军工程大学 Test case multiplexing system and method based on requirement item extraction
CN114996125A (en) * 2022-05-11 2022-09-02 中国银行股份有限公司 Test case generation method, device, equipment and storage medium

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
L.C.BRIAND等: ""Automating regression test selection based on UML designs"", 《INFORMATION AND SOFTWARE TECHNOLOGY》 *
PRITAM ROY等: ""High Coverage Concolic Equivalence Checking"", 《2019 DESIGN, AUTOMATION & TEST IN EUROPE CONFERENCE & EXHIBITION (DATE)》 *
余久久: ""基于探索性测试思想的可复用测试用例设计过程研究"", 《计算机技术与发展》 *
周金陵等: "面向复用的测试信息描述关键技术研究与实现", 《计算机测量与控制》 *
王治国 等: ""基于测试数据深度解耦共享的继电保护测试系统研究"", 《广东电力》 *
高淑玲: "测试用例类库及其在软件工程中的应用", 《安阳师范学院学报》 *

Also Published As

Publication number Publication date
CN115328813B (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN106406844B (en) Method and device for realizing public number menu of communication interaction platform
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN110825619A (en) Automatic generation method and device of interface test case and storage medium
CN111181805B (en) Micro-service test baffle generation method and system based on test case
CN114546738B (en) Universal test method, system, terminal and storage medium for server
CN111258913A (en) Automatic algorithm testing method and device, computer system and readable storage medium
CN111475390A (en) Log collection system deployment method, device, equipment and storage medium
CN104679500B (en) Method and device for realizing automatic generation of entity class
CN111026670A (en) Test case generation method, test case generation device, and storage medium
CN110543427A (en) Test case storage method and device, electronic equipment and storage medium
CN113434396A (en) Interface test method, device, equipment, storage medium and program product
CN110750453B (en) HTML 5-based intelligent mobile terminal testing method, system, server and storage medium
CN108287720B (en) Software compiling method, device, equipment and storage medium
CN111679828B (en) Data processing method and device, electronic equipment and storage medium
CN117370203A (en) Automatic test method, system, electronic equipment and storage medium
CN115328813B (en) Test case design method, device, equipment and storage medium
CN111352668A (en) Device testing method and device based on plug-in and testing system based on plug-in
CN115757174A (en) Database difference detection method and device
CN111488286B (en) Method and device for independently developing Android modules
CN113485919A (en) Test method, test device and computer readable storage medium
CN114003484A (en) Log output method, device and equipment for interface test and storage medium
CN112084111A (en) Data processing method, system and device
CN111857752A (en) PostgreSQL database installation method, device and equipment
CN113608996B (en) Mirror image compiling test method, system, device and readable storage medium
CN112667491A (en) Function test method and device of virtual machine

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