CN116225902A - Method, device and equipment for generating test cases - Google Patents

Method, device and equipment for generating test cases Download PDF

Info

Publication number
CN116225902A
CN116225902A CN202211686893.0A CN202211686893A CN116225902A CN 116225902 A CN116225902 A CN 116225902A CN 202211686893 A CN202211686893 A CN 202211686893A CN 116225902 A CN116225902 A CN 116225902A
Authority
CN
China
Prior art keywords
test
test case
module
input box
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211686893.0A
Other languages
Chinese (zh)
Inventor
朱泽
单酉
李凯丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Casicloud Co ltd
Original Assignee
Beijing Casicloud Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Casicloud Co ltd filed Critical Beijing Casicloud Co ltd
Priority to CN202211686893.0A priority Critical patent/CN116225902A/en
Publication of CN116225902A publication Critical patent/CN116225902A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application provides a method, a device and equipment for generating a test case, wherein a test case editing interface is provided through terminal equipment, the test case editing interface comprises a test name input box and a test module adding control, and the method comprises the following steps: determining a corresponding test product name in response to an input operation for the test name input box; responding to the touch operation of adding controls to the test module, and displaying test module editing items, wherein the test module editing items comprise a module name input box and test case adding controls; determining corresponding test module content in response to an operation for the test module editing item; and generating a corresponding test case according to the name of the test product and the content of the test module. The corresponding test case can be generated by simple input through the interactive operation with the test case editing interface without manually inputting various contents of the test case, and the efficiency and convenience for generating the test case are improved.

Description

Method, device and equipment for generating test cases
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for generating a test case.
Background
Test cases refer to descriptions of test tasks performed on a particular software product, and embody test schemes, methods, techniques and strategies, which are a set of test inputs, execution conditions and expected results tailored for a particular objective, for verifying whether a particular software requirement is met.
The writing of test cases is critical to software testing, and the writing of test cases mainly comprises a test method, test steps, expected results and the like. Currently, a tester designs a test case by using a table application (e.g., excel), i.e., a table is newly built in the table application, and various contents in the test case are input at corresponding positions of the table. The method is time-consuming in maintenance and update, tedious in review and low in writing efficiency.
Disclosure of Invention
The application provides a method, a device and equipment for generating test cases, which are used for solving the problem that the writing efficiency of the test cases is low in the existing manual test case writing process.
In a first aspect, the present application provides a method for generating a test case, where a test case editing interface is provided by a terminal device, where the test case editing interface includes a test name input box and a test module adding control, and the method includes:
determining a corresponding test product name in response to an input operation for the test name input box;
responding to the touch operation of adding controls to the test module, and displaying test module editing items, wherein the test module editing items comprise a module name input box and test case adding controls;
determining corresponding test module content in response to an operation for the test module editing item;
and generating a corresponding test case according to the name of the test product and the content of the test module.
In one possible implementation, the determining, in response to an operation for the test module editing item, corresponding test module content includes:
determining a corresponding test module name in response to an input operation for the module name input box;
responding to the touch operation of adding a control for the test case, and displaying a plurality of test case editing items corresponding to the test case;
and responding to the operation aiming at the plurality of test case editing items, determining corresponding test case contents, wherein the test module contents comprise the test module names and the test case contents.
In a possible implementation manner, the displaying, in response to a touch operation of adding a control to the test case, a plurality of test case editing items corresponding to the test case includes:
responding to the touch operation of adding a control for the test case, and displaying a test case name input box, at least one test step input box and an expected result input box corresponding to each test step input box;
the plurality of test case editing items include the test case name input box, the test step input box, and the expected result input box.
In one possible implementation manner, the determining, in response to the operation for the plurality of test case editing items, corresponding test case contents includes:
responding to the input operation of the test case name input box, and determining a corresponding test case name;
determining a corresponding test step in response to an input operation for the test step input box;
and responding to the input operation aiming at the expected result input box, determining a corresponding expected result, wherein the test case content comprises the test case name, the test step and the expected result.
In a possible implementation manner, the test case editing interface further comprises an annotation control; the method further comprises the steps of:
responding to the dragging operation of the annotation control, and displaying an annotation input box on the test case editing interface;
and responding to the input operation of the annotation input box, and displaying corresponding annotation information.
In a possible implementation manner, the test case editing interface further comprises a confirmation control; the generating a corresponding test case according to the test product name and the test module content includes:
responding to the touch operation of the confirmation control, and determining a second corresponding relation between each test step and each expected result according to the first corresponding relation between each test step input box and each expected result input box;
and generating the test case according to the test product name, each test step, each expected result and the second corresponding relation.
In one possible implementation manner, the generating the test case according to the test product name, each test step, each expected result, and the second correspondence includes:
determining a preset format to be converted;
and generating the test case according to the preset format, the test product name, each test step, each expected result and the second corresponding relation.
In a second aspect, the present application provides an apparatus for generating a test case, where a test case editing interface is provided by a terminal device, where the test case editing interface includes a test name input box and a test module adding control, and the apparatus includes:
the determining module is used for responding to the input operation aiming at the test name input box and determining the corresponding test product name;
the display module is used for responding to the touch operation of adding the control to the test module and displaying a test module editing item, wherein the test module editing item comprises a module name input box and a test case adding control;
the processing module is used for responding to the operation of the test module editing item and determining the corresponding test module content;
and the generating module is used for generating a corresponding test case according to the name of the test product and the content of the test module.
In a possible implementation manner, the processing module is specifically configured to:
determining a corresponding test module name in response to an input operation for the module name input box;
responding to the touch operation of adding a control for the test case, and displaying a plurality of test case editing items corresponding to the test case;
and responding to the operation aiming at the plurality of test case editing items, determining corresponding test case contents, wherein the test module contents comprise the test module names and the test case contents.
In a possible implementation manner, the processing module is specifically configured to:
responding to the touch operation of adding a control for the test case, and displaying a test case name input box, at least one test step input box and an expected result input box corresponding to each test step input box;
the plurality of test case editing items include the test case name input box, the test step input box, and the expected result input box.
In a possible implementation manner, the processing module is specifically configured to:
responding to the input operation of the test case name input box, and determining a corresponding test case name;
determining a corresponding test step in response to an input operation for the test step input box;
and responding to the input operation aiming at the expected result input box, determining a corresponding expected result, wherein the test case content comprises the test case name, the test step and the expected result.
In a possible implementation manner, the test case editing interface further comprises an annotation control; the processing module is further configured to:
responding to the dragging operation of the annotation control, and displaying an annotation input box on the test case editing interface;
and responding to the input operation of the annotation input box, and displaying corresponding annotation information.
In a possible implementation manner, the test case editing interface further comprises a confirmation control; the generating module is specifically configured to:
responding to the touch operation of the confirmation control, and determining a second corresponding relation between each test step and each expected result according to the first corresponding relation between each test step input box and each expected result input box;
and generating the test case according to the test product name, each test step, each expected result and the second corresponding relation.
In one possible implementation manner, the generating module is specifically configured to:
determining a preset format to be converted;
and generating the test case according to the preset format, the test product name, each test step, each expected result and the second corresponding relation.
In a third aspect, the present application provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of generating test cases according to any one of the first aspects when executing the program.
In a fourth aspect, the present application provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of generating test cases according to any of the first aspects.
According to the method, the device and the equipment for generating the test case, the terminal equipment is used for providing a test case editing interface, the test case editing interface comprises a test name input box and a test module adding control, the terminal equipment is used for determining a corresponding test product name in response to input operation aiming at the test name input box, then displaying a test module editing item in response to touch operation aiming at the test module adding control, and the test module editing item comprises a module name input box and the test case adding control; further, the terminal device responds to the operation aiming at the test module editing item to determine the corresponding test module content, and finally generates the corresponding test case according to the test product name and the test module content. According to the scheme, the contents of the test cases are not required to be manually input, the corresponding test cases can be generated by simple input through the interactive operation with the test case editing interface, and the efficiency and convenience for generating the test cases are improved.
Drawings
For a clearer description of the present application or of the prior art, the drawings that are used in the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for generating test cases according to an embodiment of the present application;
FIG. 2 is a diagram of a test case editing interface provided in an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a device for generating test cases according to an embodiment of the present application;
fig. 4 is a schematic entity structure diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application, and it is apparent that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Test cases refer to descriptions of test tasks performed on a particular software product, and embody test schemes, methods, techniques and strategies, which are a set of test inputs, execution conditions and expected results tailored for a particular objective, for verifying whether a particular software requirement is met.
The writing of the test cases is crucial to the software test, and currently, a tester designs the test cases by using a form application (e.g. excel), namely, a form is newly built in the form application, and various contents in the test cases are input at corresponding positions of the form. The method is time-consuming in maintenance and update, tedious in review and low in writing efficiency. However, the conventional test management tool such as TestLink is convenient to execute and manage, but still has the problems of high efficiency of writing use cases, high time cost in the iterative process and the like.
Based on the above, the embodiment of the application provides a method for generating test cases, so as to improve the efficiency of generating the test cases. The following describes the aspects of the present application with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for generating a test case according to an embodiment of the present application, where a test case editing interface is provided by a terminal device, and the test case editing interface includes a test name input box and a test module adding control, as shown in fig. 1, where the method may include:
s11, responding to the input operation of the test name input box, and determining the corresponding test product name.
The test case editing interface comprises a test name input box, wherein the test name input box is used for inputting a corresponding test product name. Accordingly, the user can determine the corresponding test product name by an input operation and then by the terminal device in response to the input operation for the test name input box.
The name of the test product in the embodiment of the application is the name of the product to be tested aiming at the test case. For a product to be tested, test cases can be designed for different functions or components of the product.
And S12, responding to touch operation of adding controls to the test module, and displaying test module editing items, wherein the test module editing items comprise a module name input box and test case adding controls.
The test case editing interface comprises a test module adding control, a user can click on the test module adding control, and then the terminal equipment responds to touch operation aiming at the test module adding control to display test module editing items.
In this embodiment, for a product to be tested, a plurality of test modules may be included, where each test module may set a corresponding test case, and the test case may be set according to an actual product and needs.
S13, corresponding test module content is determined in response to the operation of the test module editing item.
After the test module adding control is clicked, the terminal equipment displays a test module editing item, wherein the test module editing item comprises a module name input box and a test case adding control. The user may operate the test module editing item, and the terminal device determines the corresponding test module content in response to an operation for the test module editing item.
Specifically, the user may input the test module name through an operation directed to the module name input box, and the terminal device determines the corresponding test module name in response to the operation directed to the module name input box. The user can add test cases by aiming at the operation of the test case adding control.
S14, generating a corresponding test case according to the name of the test product and the content of the test module.
After the test product name and the test module content are obtained, a corresponding test case can be generated according to the test product name and the test module content. In the embodiment of the application, the test case comprises a corresponding test product, the test product is indicated by a test product name, the test case further comprises a corresponding test module, the test module is indicated by a test module name, the test case further comprises relevant content of a specific test case, and the relevant content of the test case is indicated by an operation of adding a control to the test case.
According to the method for generating the test case, the terminal equipment is used for providing a test case editing interface, the test case editing interface comprises a test name input box and a test module adding control, the terminal equipment is used for determining a corresponding test product name in response to input operation aiming at the test name input box, then displaying a test module editing item in response to touch operation aiming at the test module adding control, and the test module editing item comprises the module name input box and the test case adding control; further, the terminal device responds to the operation aiming at the test module editing item to determine the corresponding test module content, and finally generates the corresponding test case according to the test product name and the test module content. According to the scheme, the contents of the test cases are not required to be manually input, the corresponding test cases can be generated by simple input through the interactive operation with the test case editing interface, and the efficiency and convenience for generating the test cases are improved.
The following describes the scheme of the present application in detail with reference to the accompanying drawings.
Fig. 2 is a diagram of a test case editing interface provided in an embodiment of the present application, and as shown in fig. 2, the test case editing interface 20 includes a test name input box 21 and a test module adding control 22.
Alternatively, the test case editing interface diagram provided in the embodiments of the present application may be obtained based on a mind map generated by Xmind (an open source mind map), where the mind map generated by Xmind is in the form of an extension, but is essentially a ZIP (a computer compression algorithm) compressed file (ZIP is a rather simple archiving format that compresses each file separately, allowing separate files to be retrieved without having to read additional data; theoretically, this format allows different algorithms to be used for different files. After the mind map generated by Xmini is compressed, the inside is mainly composed of some extensible markup language (Extensible Markup Language, XML) files, and the structure and main text content of the mind map can be obtained by analyzing the XML files.
And the method comprises the steps of carrying out case design through the Xmini, analyzing and extracting basic information required by the test case on an Xmini file, synthesizing a case import file format required by a common test case management system, combining convenience of the Xmini design case with management of the common test case system, and providing a more efficient front-end case management flow. Specifically, the method comprises the steps of Xmini command line call, convenient operation can be carried out by adopting a webpage, then call of an application program interface (Application Programming Interface, API) is carried out, and then the Xmini file is converted into json (lightweight data exchange format) data.
The user can input a test product name in the test name input box 21, and the terminal device determines the test product name in response to an input operation for the test name input box 21. For example, in fig. 2, when nothing is entered in the test name input box 21, what is displayed in the test name input box 21 is "i am a product name" for prompting the user to input a test product name therein. When the user inputs "a product" in the test name input box 21, the text of "a product" is displayed in the test name input box 21, and the terminal device determines that the test product name is "a product".
The test module adding control 22 is used for adding a test module editing item, the user can click on the test module adding control 22, and the terminal device displays a module name input box 23 and a test case adding control 24 in response to a touch operation for the test module adding control 22.
The user may input a test module name in the module name input box 23, and the terminal device determines the test module name in response to an input operation to the module name input box 23. For example, in fig. 2, when nothing is input in the module name input box 23, displayed in the module name input box 23 is "test module 1" for prompting the user to input a test module name therein. When the user inputs "B module" in the module name input box 23, the text of "B module" is displayed in the module name input box 23, and the terminal device determines that the test module name is "B module".
The test case adding control 24 is used for adding test case editing items, and after the user clicks the test case adding control 24, the terminal device responds to the touch operation of the test case adding control 24 to display a plurality of test case editing items corresponding to the test case. For the plurality of test case editing items, the user can perform related operations, and the terminal equipment determines corresponding test case contents in response to the operations for the plurality of test case editing items.
Specifically, as shown in fig. 2, after the terminal device responds to the touch operation of adding a control to the test case, a test case name input box 25, at least one test step input box (such as the test step input box 26 in fig. 2), and an expected result input box (such as the expected result input box 27 in fig. 2) corresponding to each test step input box are displayed. Optionally, a test step adding control 28 may be further included, and by clicking on the test step adding control 28, a test step under the test case may be added.
The user can input the test case name in the test case name input box, and the terminal equipment responds to the input operation aiming at the test case name input box to determine the corresponding test case name. For example, in fig. 2, when no content is input in the test case name input box, displayed in the test case name input box is "test case 1" for prompting the user to input the test case name therein. When the user inputs the 'C test case' in the test case name input box, the text of the 'C test case' is displayed in the test case name input box, and the terminal equipment determines that the test case name is the 'C test case'.
The test step input boxes are in one-to-one correspondence with the expected result input boxes, the test step input boxes are used for inputting test steps in the test cases, and the expected result input boxes are used for inputting expected results corresponding to the test steps. The terminal device responds to the input operation aiming at the test step input box to determine the corresponding test step. In one test case, one or more test steps may be included. The terminal device may determine a corresponding expected result in response to an input operation for the expected result input box. The test case content consists of test case names, test steps and expected results.
In one possible implementation, the test case editing interface also includes an annotation control that the user can drag to add annotations. And the terminal equipment responds to the dragging operation for the annotation control, and an annotation input box is displayed on the test case editing interface. The user can then input comment information in the comment input box, and the terminal apparatus displays the corresponding comment information in response to the input operation for the comment input box.
In one possible implementation manner, the test case editing interface further includes a confirmation control, and the terminal device generates a corresponding test case according to the name of the test product and the content of the test module.
Then, the terminal equipment generates a corresponding test case according to the name of the test product, each test step, each expected result and the second corresponding relation, and the test case comprises a complete name of the test product, a module name of the product to be tested, a corresponding test step and an expected result aiming at any test case.
In one possible implementation, the preset format to be converted may be first determined, and then the test case may be generated according to the preset format, the test product name, each test step, each expected result, and the second correspondence. That is, the test case is converted into a test case in a predetermined format based on the original scheme, and the predetermined format may be, for example, a format corresponding to a computer programming language such as python (a computer programming language), so as to implement writing of the test case.
If the test case editing interface is obtained by using the mind map generated by Xmind, the default test name input box 21 is not converted, and the default test name input box 21 starts to be converted from the first-layer sub-theme (i.e., the module name input box 23), which is identified as a test suite (TestSuite), and the sub-theme of the test suite is identified as a test case (TestCase) corresponding to the test case name input box 25. The lower branches of the test case are the test step (TestStep) and the Expected Result (Expected Result), corresponding to the test step input box 26 and the Expected Result input box 27, respectively.
During editing, a test suite or test case may be annotated with an annotation that will be identified as a summary field. The test case may be annotated and may be identified as a look ahead field. Priorities may also be defined for each test case by numbers, and exclamation marks may be used to annotate any branches that are not intended to be imported.
After editing, one-key packaging can be performed, and the editing can be converted into a python format, so that the test case can be written.
The method comprises the steps of designing test cases through xmind, analyzing and extracting basic information required by the test cases on an xmind file, synthesizing a case import file format required by a common test case management system, combining convenience of the xmind design case with management of the common test case system, and providing a more efficient front-end case management flow.
The embodiment of the application uses the test case editing interface to design the case, so that a tester can be helped to comb the test points, and the test case execution priority is determined according to the test points; the test case conversion is performed by using a preset format (such as python), so that the test case has stronger readability, is more convenient for use case review, and the derived Comma Separated Values (CSVs) and XML format files can be used for importing common test management tools. The two are combined for use, so that the testing thinking can be dispersed, the working efficiency of the tester is improved, and the practical value is high.
In summary, according to the scheme of the embodiment of the application, each item of content of the test case is not required to be manually input, but the corresponding test case can be generated by simple input through the interaction operation with the test case editing interface, so that the efficiency and convenience for generating the test case are improved.
The device for generating the test case provided by the application is described below, and the device for generating the test case described below and the method for generating the test case described above can be referred to correspondingly.
Fig. 3 is a schematic structural diagram of an apparatus for generating a test case according to an embodiment of the present application, where a test case editing interface is provided by a terminal device, where the test case editing interface includes a test name input box and a test module adding control, and as shown in fig. 3, the apparatus includes:
a determining module 31, configured to determine a corresponding test product name in response to an input operation for the test name input box;
the display module 32 is configured to display a test module editing item in response to a touch operation for adding a control to the test module, where the test module editing item includes a module name input box and a test case adding control;
a processing module 33, configured to determine corresponding test module content in response to an operation for the test module editing item;
and the generating module 34 is configured to generate a corresponding test case according to the test product name and the test module content.
In one possible implementation, the processing module 33 is specifically configured to:
determining a corresponding test module name in response to an input operation for the module name input box;
responding to the touch operation of adding a control for the test case, and displaying a plurality of test case editing items corresponding to the test case;
and responding to the operation aiming at the plurality of test case editing items, determining corresponding test case contents, wherein the test module contents comprise the test module names and the test case contents.
In one possible implementation, the processing module 33 is specifically configured to:
responding to the touch operation of adding a control for the test case, and displaying a test case name input box, at least one test step input box and an expected result input box corresponding to each test step input box;
the plurality of test case editing items include the test case name input box, the test step input box, and the expected result input box.
In one possible implementation, the processing module 33 is specifically configured to:
responding to the input operation of the test case name input box, and determining a corresponding test case name;
determining a corresponding test step in response to an input operation for the test step input box;
and responding to the input operation aiming at the expected result input box, determining a corresponding expected result, wherein the test case content comprises the test case name, the test step and the expected result.
In a possible implementation manner, the test case editing interface further comprises an annotation control; the processing module 33 is further configured to:
responding to the dragging operation of the annotation control, and displaying an annotation input box on the test case editing interface;
and responding to the input operation of the annotation input box, and displaying corresponding annotation information.
In a possible implementation manner, the test case editing interface further comprises a confirmation control; the generating module 34 is specifically configured to:
responding to the touch operation of the confirmation control, and determining a second corresponding relation between each test step and each expected result according to the first corresponding relation between each test step input box and each expected result input box;
and generating the test case according to the test product name, each test step, each expected result and the second corresponding relation.
In one possible implementation, the generating module 34 is specifically configured to:
determining a preset format to be converted;
and generating the test case according to the preset format, the test product name, each test step, each expected result and the second corresponding relation.
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include: processor 410, communication interface (Communications Interface) 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420 and memory 430 communicate with each other via communication bus 440. The processor 410 may call logic instructions in the memory 430 to execute a method for generating a test case, and provide a test case editing interface through a terminal device, where the test case editing interface includes a test name input box and a test module adding control, and the method includes: determining a corresponding test product name in response to an input operation for the test name input box; responding to the touch operation of adding controls to the test module, and displaying test module editing items, wherein the test module editing items comprise a module name input box and test case adding controls; determining corresponding test module content in response to an operation for the test module editing item; and generating a corresponding test case according to the name of the test product and the content of the test module.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present application further provides a computer program product, where the computer program product includes a computer program, where the computer program may be stored on a non-transitory computer readable storage medium, where the computer program, when executed by a processor, is capable of executing the method for generating a test case provided in the foregoing embodiments, and providing, by using a terminal device, a test case editing interface, where the test case editing interface includes a test name input box and a test module adding control, and the method includes: determining a corresponding test product name in response to an input operation for the test name input box; responding to the touch operation of adding controls to the test module, and displaying test module editing items, wherein the test module editing items comprise a module name input box and test case adding controls; determining corresponding test module content in response to an operation for the test module editing item; and generating a corresponding test case according to the name of the test product and the content of the test module.
In still another aspect, the present application further provides a non-transitory computer readable storage medium, on which a computer program is stored, where the computer program is implemented when executed by a processor to perform the method for generating a test case provided in the foregoing embodiments, and a test case editing interface is provided by a terminal device, where the test case editing interface includes a test name input box and a test module adding control, and the method includes: determining a corresponding test product name in response to an input operation for the test name input box; responding to the touch operation of adding controls to the test module, and displaying test module editing items, wherein the test module editing items comprise a module name input box and test case adding controls; determining corresponding test module content in response to an operation for the test module editing item; and generating a corresponding test case according to the name of the test product and the content of the test module.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. The method for generating the test case is characterized in that a test case editing interface is provided through terminal equipment, the test case editing interface comprises a test name input box and a test module adding control, and the method comprises the following steps:
determining a corresponding test product name in response to an input operation for the test name input box;
responding to the touch operation of adding controls to the test module, and displaying test module editing items, wherein the test module editing items comprise a module name input box and test case adding controls;
determining corresponding test module content in response to an operation for the test module editing item;
and generating a corresponding test case according to the name of the test product and the content of the test module.
2. The method of claim 1, wherein the determining, in response to the operation for the test module edit item, the corresponding test module content comprises:
determining a corresponding test module name in response to an input operation for the module name input box;
responding to the touch operation of adding a control for the test case, and displaying a plurality of test case editing items corresponding to the test case;
and responding to the operation aiming at the plurality of test case editing items, determining corresponding test case contents, wherein the test module contents comprise the test module names and the test case contents.
3. The method of claim 2, wherein the displaying the plurality of test case editing items corresponding to the test case in response to the touch operation of the add control for the test case comprises:
responding to the touch operation of adding a control for the test case, and displaying a test case name input box, at least one test step input box and an expected result input box corresponding to each test step input box;
the plurality of test case editing items include the test case name input box, the test step input box, and the expected result input box.
4. The method of claim 3, wherein the determining corresponding test case content in response to the operation for the plurality of test case editing items comprises:
responding to the input operation of the test case name input box, and determining a corresponding test case name;
determining a corresponding test step in response to an input operation for the test step input box;
and responding to the input operation aiming at the expected result input box, determining a corresponding expected result, wherein the test case content comprises the test case name, the test step and the expected result.
5. The method of claim 4, further comprising an annotation control on the test case editing interface; the method further comprises the steps of:
responding to the dragging operation of the annotation control, and displaying an annotation input box on the test case editing interface;
and responding to the input operation of the annotation input box, and displaying corresponding annotation information.
6. The method of claim 4 or 5, further comprising a validation control on the test case editing interface; the generating a corresponding test case according to the test product name and the test module content includes:
responding to the touch operation of the confirmation control, and determining a second corresponding relation between each test step and each expected result according to the first corresponding relation between each test step input box and each expected result input box;
and generating the test case according to the test product name, each test step, each expected result and the second corresponding relation.
7. The method of claim 6, wherein generating the test case based on the test product name, each of the test steps, each of the expected results, and the second correspondence, comprises:
determining a preset format to be converted;
and generating the test case according to the preset format, the test product name, each test step, each expected result and the second corresponding relation.
8. The device for generating the test case is characterized in that a test case editing interface is provided through terminal equipment, the test case editing interface comprises a test name input box and a test module adding control, and the device comprises:
the determining module is used for responding to the input operation aiming at the test name input box and determining the corresponding test product name;
the display module is used for responding to the touch operation of adding the control to the test module and displaying a test module editing item, wherein the test module editing item comprises a module name input box and a test case adding control;
the processing module is used for responding to the operation of the test module editing item and determining the corresponding test module content;
and the generating module is used for generating a corresponding test case according to the name of the test product and the content of the test module.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of generating test cases according to any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a method of generating test cases according to any of claims 1 to 7.
CN202211686893.0A 2022-12-26 2022-12-26 Method, device and equipment for generating test cases Pending CN116225902A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211686893.0A CN116225902A (en) 2022-12-26 2022-12-26 Method, device and equipment for generating test cases

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211686893.0A CN116225902A (en) 2022-12-26 2022-12-26 Method, device and equipment for generating test cases

Publications (1)

Publication Number Publication Date
CN116225902A true CN116225902A (en) 2023-06-06

Family

ID=86583453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211686893.0A Pending CN116225902A (en) 2022-12-26 2022-12-26 Method, device and equipment for generating test cases

Country Status (1)

Country Link
CN (1) CN116225902A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093497A (en) * 2023-09-11 2023-11-21 苏州云体科技有限公司 Test report processing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093497A (en) * 2023-09-11 2023-11-21 苏州云体科技有限公司 Test report processing method and device, electronic equipment and storage medium
CN117093497B (en) * 2023-09-11 2024-05-07 苏州云体科技有限公司 Test report processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US20230385033A1 (en) Storing logical units of program code generated using a dynamic programming notebook user interface
US11093242B2 (en) Automatically mapping data while designing process flows
US8225288B2 (en) Model-based testing using branches, decisions, and options
US8434062B2 (en) Enhancing source code debugging and readability using visual symbols
US11361035B2 (en) Batch generation of links to documents based on document name and page content matching
WO2020235085A1 (en) Operation log visualization device, operation log visualization method, and operation log visualization program
CN104731588B (en) Page layout document generating method and page layout file creating apparatus
EP2869195A1 (en) Application coordination system, application coordination method, and application coordination program
CN107657150A (en) One kind visualization analysis of biological information instrument generation method and device
US8271867B2 (en) Program for displaying and operating table
CN116225902A (en) Method, device and equipment for generating test cases
US11663199B1 (en) Application development based on stored data
CA3012228C (en) Method of computerized presentation of a document set view for auditing information and managing sets of multiple documents and pages
JP6168206B2 (en) Information processing apparatus, information processing apparatus control method, and program
CN115469849B (en) Service processing system, method, electronic equipment and storage medium
CN114757157A (en) Method, apparatus, device and medium for generating aircraft work package
US20200302661A1 (en) Information processing apparatus, computer-readable recording medium, and drawing creation support method
CN114115831A (en) Data processing method, device, equipment and storage medium
Silvestre et al. A Usable MDE-based Tool for Software Process Tailoring.
US20150347182A1 (en) Computer product, execution-flow-creation aiding apparatus, and execution-flow-creation aiding method
US10268730B2 (en) Focus-driven user interface
CN106569785B (en) Method and device for generating job form
CN118151997A (en) Method, device, electronic equipment and medium for annotating files by software items
CN116450132A (en) Method and system for generating application through guide
CN116611399A (en) XML file generation method and device of tool book and electronic equipment

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