CN115328813B - Test case design method, device, equipment and storage medium - Google Patents
Test case design method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN115328813B CN115328813B CN202211237683.3A CN202211237683A CN115328813B CN 115328813 B CN115328813 B CN 115328813B CN 202211237683 A CN202211237683 A CN 202211237683A CN 115328813 B CN115328813 B CN 115328813B
- Authority
- CN
- China
- Prior art keywords
- test case
- test
- product
- tested
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
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)
- Debugging And Monitoring (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
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 tested object modeling and the test case design are abstracted into two modules which can be developed in parallel at a user level through a preset tested object model, different operators can be free from inherent time sequence limitation, and the tested object modeling and test case design work on different minimum testable units is carried out according to a specified standard, so that 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.
Description
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 is often subjected to scene switching and a function or performance to be tested is changed, which all cause that the generated test case needs to be designed and edited again, and the reusability of the test case generated by the conventional 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 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.
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 on 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 the test case does not exist, 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, where the memory stores a computer program, and the processor executes the computer program, so as 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 tested object modeling and the test case design are abstracted into two modules which can be developed in parallel at a user level through a preset tested object model, different operators can be free from inherent time sequence limitation, and the tested object modeling and test case design work on different minimum testable units is carried out according to a specified standard, so that 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.
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 according to 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 object of the present application will be further explained with reference to the embodiments, and with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present 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 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.
In the prior art, testing is an essential part of the whole life cycle of a product or a system, while test case design and generation are one of the most basic and most 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 keyword library is introduced for reusability judgment of the test cases, when the test cases are designed, the reusable test cases suitable for the products to be tested in the test case resource library are searched according to the test requirements, if the reusable test cases are available, the reusable test cases are directly selected for reuse, and editing and modifying are carried out according to the test requirements of the products to be tested to obtain new test cases, namely the test cases of the products to be tested, 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.
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. The communication bus 1002 is used to implement connection communication among 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 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 invention.
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 product to be tested;
in the specific implementation process, the product to be tested refers to a product to be tested, and the design of a test case is needed firstly when the test is carried out. 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, the test scene and the like.
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 and corresponding test standards in different aspects, 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 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 the 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 and the like. 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 mating connector number, a signal table (pin number, signal name, signal type and signal definition), a mating connector type and an installation 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 units, 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 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.
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 relevant information such as product names, signal names, test standards and the like in the test demand model and the tested object model, editing is carried out on the reusable test cases in the editing page, and the test cases of the tested products are 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 the test case resource library and used 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 on 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 product to be tested. 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 the test case does not exist, newly building an initial test case in the editing interface;
in the specific implementation process, if the 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 built 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 by 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 set the solution based on the needs in practical application, and the solution 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, the present application further provides a computer storage medium, on which a computer program is stored, and 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 phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements 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 description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as a rom/ram, a magnetic disk, and an optical disk), and includes instructions for enabling a multimedia terminal device (which may be 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 modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.
Claims (9)
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 product attributes in a 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 a 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 public signal is the public signal, marking the corresponding test case as the reusable test case; if the private signal is the private signal, marking the corresponding test case as an unreusable test case;
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 demand 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 method for designing test cases according to claim 1, wherein after the step of obtaining the product to be tested, the method further comprises:
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.
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 test cases according to claim 1, 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.
7. 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 test case attribute marking module is used for identifying the 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 a 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; if the private signal is the private signal, marking the corresponding test case as an irreversible test case;
the reusable test case selecting 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.
8. A computer arrangement, characterized in that the computer arrangement comprises a memory in which a computer program is stored and a processor which executes the computer program for implementing the method as claimed in any one of claims 1-6.
9. 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-6.
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 CN115328813A (en) | 2022-11-11 |
CN115328813B true 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 (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105302718A (en) * | 2015-10-26 | 2016-02-03 | 浪潮电子信息产业股份有限公司 | Design method of multiplexing software-oriented test model |
CN106326122A (en) * | 2016-08-23 | 2017-01-11 | 北京精密机电控制设备研究所 | Software unit test case management system |
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 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10091677B2 (en) * | 2014-03-11 | 2018-10-02 | Rohde & Schwarz Gmbh & Co. Kg | Technique for testing LTE-advanced carrier aggregation receiver characteristics |
US10007594B2 (en) * | 2015-07-21 | 2018-06-26 | International Business Machines Corporation | Proactive cognitive analysis for inferring test case dependencies |
CN114996125A (en) * | 2022-05-11 | 2022-09-02 | 中国银行股份有限公司 | Test case generation method, device, equipment and storage medium |
-
2022
- 2022-10-11 CN CN202211237683.3A patent/CN115328813B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105302718A (en) * | 2015-10-26 | 2016-02-03 | 浪潮电子信息产业股份有限公司 | Design method of multiplexing software-oriented test model |
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 |
Non-Patent Citations (4)
Title |
---|
"Automating regression test selection based on UML designs";L.C.Briand等;《Information and Software Technology》;20081117;第51卷(第1期);第16-30页 * |
"High Coverage Concolic Equivalence Checking";Pritam Roy等;《2019 Design, Automation & Test in Europe Conference & Exhibition (DATE)》;20190516;第462-467页 * |
"基于探索性测试思想的可复用测试用例设计过程研究";余久久;《计算机技术与发展》;20150721;第25卷(第09期);第187-193页 * |
"基于测试数据深度解耦共享的继电保护测试系统研究";王治国 等;《广东电力》;20190307;第32卷(第02期);第100-106页 * |
Also Published As
Publication number | Publication date |
---|---|
CN115328813A (en) | 2022-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114546738B (en) | Universal test method, system, terminal and storage medium for server | |
CN110647471A (en) | Interface test case generation method, electronic device and storage medium | |
CN112052169A (en) | Test management method, system, device and computer readable storage medium | |
CN113505073B (en) | Performance test method, device, equipment and medium of database | |
CN112241360A (en) | Test case generation method, device, equipment and storage medium | |
CN111181805B (en) | Micro-service test baffle generation method and system based on test case | |
CN108446224B (en) | Performance analysis method of application program on mobile terminal and storage medium | |
CN113434396A (en) | Interface test method, device, equipment, storage medium and program product | |
CN110543427A (en) | Test case storage method and device, electronic equipment and storage medium | |
CN111026670A (en) | Test case generation method, test case generation device, and storage medium | |
CN115757014A (en) | Power consumption testing method and device | |
CN110750453A (en) | HTML 5-based intelligent mobile terminal testing method, system, server and storage medium | |
CN116401113B (en) | Environment verification method, device and medium for heterogeneous many-core architecture acceleration card | |
CN115328813B (en) | Test case design method, device, equipment and storage medium | |
CN112084108A (en) | Test script generation method and device and related components | |
CN111857752A (en) | PostgreSQL database installation method, device and equipment | |
CN111352668A (en) | Device testing method and device based on plug-in and testing system based on plug-in | |
CN112597040B (en) | Interface automatic testing method and device and electronic equipment | |
CN113946509A (en) | Buried point searching and comparing method and device, computing device and readable storage medium | |
CN114238091A (en) | Resident interactive service cluster testing method and system | |
CN113806231A (en) | Code coverage rate analysis method, device, equipment and medium | |
CN113407441A (en) | Software testing method, device, equipment and storage medium | |
CN113485919A (en) | Test method, test device and computer readable storage medium | |
CN113608996B (en) | Mirror image compiling test method, system, device and readable storage medium | |
CN112835803B (en) | Tool generation method, test data construction method, device, equipment and medium |
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 |