CN115437935A - Test case generation method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN115437935A
CN115437935A CN202211102642.3A CN202211102642A CN115437935A CN 115437935 A CN115437935 A CN 115437935A CN 202211102642 A CN202211102642 A CN 202211102642A CN 115437935 A CN115437935 A CN 115437935A
Authority
CN
China
Prior art keywords
test
test case
software
data
case file
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
CN202211102642.3A
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.)
Wuhan United Imaging Healthcare Co Ltd
Original Assignee
Wuhan United Imaging Healthcare 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 Wuhan United Imaging Healthcare Co Ltd filed Critical Wuhan United Imaging Healthcare Co Ltd
Priority to CN202211102642.3A priority Critical patent/CN115437935A/en
Publication of CN115437935A publication Critical patent/CN115437935A/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a test case generation method, a test case generation device, computer equipment and a storage medium. The method comprises the following steps: responding to a test case generation command, displaying a software test interface, and acquiring test environment data corresponding to the software to be tested; responding to the test operation of the software to be tested triggered in the software test interface, acquiring test operation information, and generating a test case file for the software to be tested according to the test operation information, a test result corresponding to the test operation information and test environment data; and responding to the storage operation aiming at the test case file, acquiring a prestored organizational structure dictionary, and storing the test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary. By adopting the method, more accurate test case files can be obtained, so that the accuracy of testing the software to be tested is improved.

Description

Test case generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of software testing technologies, and in particular, to a method and an apparatus for generating a test case, a computer device, and a storage medium.
Background
Software testing is a process used to facilitate the verification of the correctness, safety and quality of software, and is a process of auditing or comparing between actual and expected outputs. The software program is tested under specified conditions to find out bugs, to measure software quality, and to evaluate whether it meets design requirements. The test case is the basis for executing the test, is the guidance of the test work, is the criterion that the software test must comply with, and is the fundamental guarantee of the software test quality.
The test cases are generally designed by software testers and relevant data of the test cases are manually filled in. Then, the method has the problem of low accuracy in the software testing process.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a test case generation method, device, computer device, and storage medium capable of improving software test accuracy.
In a first aspect, the present application provides a test case generation method, including:
responding to a test case generation command, displaying a software test interface, and acquiring test environment data corresponding to the software to be tested;
responding to the test operation of the software to be tested triggered in the software test interface, acquiring test operation information, and generating a test case file for the software to be tested according to the test operation information, a test result corresponding to the test operation information and test environment data;
and responding to the storage operation aiming at the test case file, acquiring a prestored organizational structure dictionary, and storing the test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary.
In one embodiment, acquiring test environment data corresponding to software to be tested includes:
responding to data editing operation aiming at software to be tested, and acquiring input first testing environment data;
acquiring second testing environment data corresponding to the software to be tested based on the software testing interface;
and obtaining test environment data corresponding to the software to be tested according to the first test environment data and the second test environment data.
In one embodiment, before responding to the storage operation for the test case file, the method further comprises:
displaying the test case file;
responding to modification operation aiming at the test case file, and acquiring modification data corresponding to the modification operation; modifying the test case file by utilizing the modification data;
storing the test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary, comprising:
and storing the modified test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary.
In one embodiment, the method for displaying the test case file comprises the following steps:
displaying version information of the test case file;
after the test case file is stored, the method comprises the following steps:
responding to the version updating operation aiming at the test case file, and generating test case updating data corresponding to the version updating operation according to the test case data contained in the test case file;
and updating data based on the test case to obtain the test case file with the updated version.
In one embodiment, obtaining a pre-stored organizational structure dictionary comprises:
acquiring construction data of the organization structure dictionary in response to construction operation aiming at the organization structure dictionary;
and generating a prestored organization structure dictionary based on the construction data of the organization structure dictionary.
In one embodiment, after storing the test case file, the method includes:
responding to modification operation aiming at the plurality of test case files, and acquiring the same data fields in the plurality of test case files;
modifying the plurality of test case files based on the same data field;
and responding to the secondary storage operation aiming at the plurality of test case files, acquiring a pre-stored organization structure dictionary, and respectively storing the plurality of modified test case files based on the hierarchical structure chain corresponding to the organization structure dictionary.
In one embodiment, the method further comprises:
acquiring modification data of the organization structure dictionary in response to a modification operation for the organization structure dictionary;
modifying the organization structure dictionary based on the modification data of the organization structure dictionary;
and storing the test case file by utilizing the hierarchical structure chain corresponding to the modified organizational structure dictionary.
In a second aspect, the present application further provides a test case generating device, where the device includes:
the data acquisition module is used for responding to a test case generation command, displaying a software test interface and acquiring test environment data corresponding to the software to be tested;
the file generating module is used for responding to the test operation triggered in the software test interface and aiming at the software to be tested, acquiring test operation information and generating a test case file aiming at the software to be tested according to the test operation information, a test result corresponding to the test operation information and test environment data;
and the file storage module is used for responding to the storage operation aiming at the test case file, acquiring a prestored organizational structure dictionary and storing the test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method described above when the processor executes the computer program.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method described above.
According to the test case generation method and device, the computer equipment and the storage medium, the software test interface is displayed by responding to the test case generation command, and the test environment data corresponding to the software to be tested is acquired; the method comprises the steps of responding to test operation of software to be tested triggered in a software test interface, obtaining test operation information, and generating a test case file aiming at the software to be tested according to the test operation information, a test result corresponding to the test operation information and test environment data; the pre-stored organization structure dictionary can be obtained in response to the storage operation aiming at the test case file, and the test case file can be stored on the basis of the hierarchy structure chain corresponding to the organization structure dictionary. Compared with the traditional test case generation method, the test case file is generated by acquiring the test environment data and recording the test operation information, and the automatically generated test case file is automatically stored, so that errors caused by manual batch compiling and test case processing can be avoided, and the more accurate test case file can be obtained by the method, and the accuracy of testing the software to be tested is improved.
Drawings
FIG. 1 is a diagram of an application environment of a test case generation method in one embodiment;
FIG. 2 is a flowchart illustrating a test case generation method according to an embodiment;
FIG. 3 is a flow chart illustrating test case generation according to another embodiment;
FIG. 4 is a diagram showing the structure of an organization structure dictionary in another embodiment;
FIG. 5 is a block diagram illustrating an exemplary embodiment of a test case generating apparatus;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The test case generation method provided by the embodiment of the application can be applied to an application environment as shown in fig. 1, and particularly can be applied to the terminal 102, wherein the terminal 102 communicates with the server 104 through a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104, or may be located on the cloud or other network server. The data storage system may store an organizational structure dictionary, test case files. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car-mounted devices, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The server 104 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
In an embodiment, as shown in fig. 2, a test case generation method is provided, which is described by taking the method as an example applied to the terminal 102 in fig. 1, and it is understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the steps of:
step S202, responding to the test case generation command, displaying the software test interface, and acquiring the test environment data corresponding to the software to be tested.
The test case generation command refers to a command for instructing generation of a test case. The test environment data refers to data of an environment where the software to be tested is located, and may be login environment data of a browser, for example, environment data of entering a login page to be tested.
Specifically, the user may perform an operation for generating a test case, and the terminal may respond to a generation command for the test case to obtain an interface for performing a software test and a test environment in which software to be tested is located. For example, when a login operation to be tested is tested, a login environment corresponding to software to be tested can be obtained, and test environment data corresponding to the login environment can be obtained.
Step S204, responding to the test operation aiming at the software to be tested triggered in the software test interface, obtaining test operation information, and generating a test case file aiming at the software to be tested according to the test operation information, the test result corresponding to the test operation information and the test environment data.
The test operation information may be a test operation step performed by a user on the software to be tested, and the test result corresponding to the test operation information may include an expected result of testing the software to be tested and an actual result of testing the software to be tested. The test case file refers to a test data record formed by performing a test case and related to test software, which may include test environment data, test operation information, and a test result.
Specifically, the test operation of the software to be tested is responded in the software test interface, the test operation steps of the user are recorded to obtain test operation information, and the test result generated by the software to be tested after the user performs the test operation is recorded. And generating a test case file of the software to be tested by using the recorded test operation information, the test result corresponding to the test operation information and the test environment data corresponding to the software to be tested. It is understood that the software under test is software that tests the software under test.
And step S206, responding to the storage operation aiming at the test case file, acquiring a prestored organizational structure dictionary, and storing the test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary.
The organizational structure dictionary refers to a dictionary file for guiding test case storage, and may contain hierarchical structure information for storing test cases. The hierarchy chain refers to hierarchical information for guiding the test case storage.
And acquiring an organization structure dictionary and a hierarchical structure chain contained in the organization structure dictionary based on a storage instruction triggered by a storage operation, and storing the test case file in a corresponding hierarchy according to the hierarchical structure chain.
In the embodiment, a software test interface is displayed by responding to a test case generation command, and test environment data corresponding to software to be tested is acquired; the method comprises the steps of responding to test operation of software to be tested triggered in a software test interface, obtaining test operation information, and generating a test case file aiming at the software to be tested according to the test operation information, a test result corresponding to the test operation information and test environment data; the pre-stored organization structure dictionary can be obtained in response to the storage operation aiming at the test case file, and the test case file can be stored on the basis of the hierarchy structure chain corresponding to the organization structure dictionary. Compared with the traditional test case generation method, the test case file is generated by acquiring the test environment data and recording the test operation information, and the automatically generated test case file is automatically stored, so that errors caused by manual batch compiling and test case processing can be avoided, and the more accurate test case file can be obtained by the method, and the accuracy of testing the software to be tested is improved.
In one embodiment, acquiring test environment data corresponding to software to be tested includes:
responding to data editing operation aiming at software to be tested, and acquiring input first testing environment data;
acquiring second testing environment data corresponding to the software to be tested based on the software testing interface;
and obtaining test environment data corresponding to the software to be tested according to the first test environment data and the second test environment data.
Wherein the first test environment data refers to test data input by a user. The second test environment data refers to data of the use environment of the software to be tested.
Specifically, the user may edit data of the software to be tested, and the terminal may obtain first environment test data input by the user, where the first environment test data may include a priority of the software test and a software test purpose. According to the interface for testing the software, second testing environment data of the software to be tested can be obtained, and the second testing environment data can contain testing conditions. Test environment data is formed using the first test environment data and the second test environment data.
In this embodiment, the test environment data is generated by automatically acquiring the second test environment data and acquiring the input first test environment data, so that the test environment data can be automatically acquired, a test case file can be automatically generated, and the accuracy of testing the software to be tested is improved.
In one embodiment, before responding to the storage operation for the test case file, the method further comprises the following steps:
displaying the test case file;
responding to modification operation aiming at the test case file, and acquiring modification data corresponding to the modification operation; modifying the test case file by utilizing the modification data;
storing the test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary, including:
and storing the modified test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary.
Specifically, the automatically generated test case file may be displayed on a software test interface, the user may edit and modify the displayed test case file, and the terminal may respond to the modification operation for the test case file to obtain modification data after the modification operation, and modify the automatically generated test case file by using the modification data to obtain the modified test case file. And storing the test case file in a corresponding hierarchy by using the hierarchy structure chain.
In the embodiment, the automatically generated test case file is modified by responding to the modification operation of the test case file, so that the accuracy of software test can be improved.
In one embodiment, exposing a test case file comprises:
displaying version information of the test case file;
after the test case file is stored, the method comprises the following steps:
responding to the version updating operation aiming at the test case file, and generating test case updating data corresponding to the version updating operation according to the test case data contained in the test case file;
and updating data based on the test case to obtain a test case file with an updated version.
The version information refers to a version used for generating the test case file.
Specifically, the version information corresponding to the test case file generated can be displayed on the software test interface. The user can select to update the version of the test case file, and the terminal responds to the updating operation to update the test case data contained in the test case file to obtain updated test case updating data; and generating a new test case file based on the test case update data.
In the embodiment, the version of the test case is updated, so that the file of the test case can be updated, and the accuracy of software testing can be improved.
In one embodiment, as shown in FIG. 3, retrieving a pre-stored organizational structure dictionary comprises:
step S302, responding to the construction operation aiming at the organization structure dictionary, and acquiring construction data of the organization structure dictionary;
step S304, generating a pre-stored organization structure dictionary based on the construction data of the organization structure dictionary.
The construction data refers to data for constructing the organizational structure dictionary, and may contain data corresponding to a hierarchical structure.
Specifically, a construction instruction for the organization structure dictionary is triggered, and construction data corresponding to construction operation of the organization structure dictionary is obtained. And generating an organization structure dictionary based on the construction data of the organization structure dictionary, and storing the organization structure dictionary.
In the embodiment, the organization structure dictionary is constructed and stored in advance, so that the efficiency of storing the test case file can be improved.
In one embodiment, after storing the test case file, the method includes:
responding to modification operation aiming at the plurality of test case files, and acquiring the same data fields in the plurality of test case files;
modifying the plurality of test case files based on the same data field;
and responding to the secondary storage operation aiming at the plurality of test case files, acquiring a prestored organizational structure dictionary, and respectively storing the plurality of modified test case files based on the hierarchical structure chains corresponding to the organizational structure dictionary.
Specifically, a user can select to modify the test case files in the storage, and under the condition of batch modification, the terminal can acquire the modified data fields, and acquire a plurality of test case files with the data fields in the plurality of test case files based on the data fields to modify the plurality of test case files.
And storing the corresponding hierarchies of the plurality of test case files by using the hierarchy structure chain corresponding to the organizational structure dictionary.
In the embodiment, the multiple test case files are modified through the same data field, so that the efficiency of modifying the test case files can be improved.
In one embodiment, the method further comprises:
acquiring modification data of the organization structure dictionary in response to a modification operation for the organization structure dictionary;
modifying the organizational structure dictionary based on the modification data of the organizational structure dictionary;
and storing the test case file by utilizing the hierarchical structure chain corresponding to the modified organizational structure dictionary.
Specifically, the user may select to modify the organization structure dictionary, trigger a modification instruction for the organization structure dictionary, and obtain modification data corresponding to a modification operation for the organization structure dictionary; and modifying the organization structure dictionary based on the modification data to obtain a modified organization structure dictionary. And updating the storage of the test case file by using the modified organization structure dictionary.
In the embodiment, the organizational structure dictionary is modified, and the storage of the test case file is updated based on the modified organizational structure dictionary, so that the accuracy of updating the test case file can be improved.
In one embodiment, a user can open a software test interface of software to be tested, trigger a test case automatic generation command, and a terminal can record a test case entry point module, automatically generate a test case number, and start to collect environment-related data such as a function module, a test environment, a precondition, input data, a writer and the like; the terminal records the testing operation steps performed by the user, after the automatic test case generation command is finished, the terminal records the expected result of the software to be tested, automatically generates a test case file, and displays the test case file; and modifying or confirming the test case file by the user. The data contained in the test case file may be as shown in table 1.
Table 1 test case file
Figure BDA0003841254370000091
Figure BDA0003841254370000101
In one embodiment, a user performs construction operation on the organization structure dictionary, and the terminal triggers a construction instruction for the organization structure dictionary to obtain construction data corresponding to the construction operation of the organization structure dictionary. Based on the constructed data of the organization structure dictionary, an organization structure dictionary is generated, and the organization structure dictionary may be a tree structure, as shown in fig. 4. And storing the corresponding levels of the software test case files of the modules of the software system. The terminal can query the organizational structure dictionary, obtain the hierarchical structure chain of the test case file, and store the database of the test case file according to the hierarchical structure chain. And when the user modifies the structure dictionary, the terminal automatically and synchronously modifies all the related test case files.
In one example, for a single test case file, modification and secondary storage can be performed on data of the test case file; and aiming at batch test cases, the same data fields in a plurality of test cases are automatically screened, and batch modification and secondary storage can be performed on the data fields. And when the existing and in-use test case templates are updated, the terminal automatically updates the templates of all test cases.
In one embodiment, the terminal manages the test case file according to the version corresponding to the test case file. The terminal can obtain the version information selected by the user, when the test case file is automatically generated, the terminal displays the default version, and the default version is modified in response to the modification aiming at the version information. The terminal can respond to the updating operation and update the test case data contained in the test case file to obtain updated test case updating data; and generating a new test case file based on the test case update data.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a test case generation apparatus for implementing the test case generation method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the method, so that specific limitations in one or more embodiments of the test case generation device provided below can be referred to the limitations of the test case generation method in the foregoing, and details are not described herein again.
In one embodiment, as shown in fig. 5, a test case generation apparatus 500 is provided, the apparatus including: a data acquisition module 510, a file generation module 520, and a file storage module 530. Wherein:
the data acquisition module 510 is configured to respond to a test case generation command, display a software test interface, and acquire test environment data corresponding to software to be tested;
the file generating module 520 is configured to obtain test operation information in response to a test operation for the software to be tested, which is triggered in the software test interface, and generate a test case file for the software to be tested according to the test operation information, a test result corresponding to the test operation information, and test environment data;
the file storage module 530 is configured to, in response to a storage operation for the test case file, obtain a pre-stored organization structure dictionary, and store the test case file based on a hierarchical structure chain corresponding to the organization structure dictionary.
In one embodiment, the data acquisition module is further configured to acquire input first test environment data in response to a data editing operation for the software to be tested; acquiring second testing environment data corresponding to the software to be tested based on the software testing interface; and obtaining test environment data corresponding to the software to be tested according to the first test environment data and the second test environment data.
In one embodiment, the device further comprises a file display module, wherein the file display module is used for displaying the test case file; responding to the modification operation aiming at the test case file, and acquiring modification data corresponding to the modification operation; and modifying the test case file by utilizing the modification data. And the file storage module is also used for storing the modified test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary.
In one embodiment, the device further comprises a version information presentation module and a version update module.
The version information display module is used for displaying the version information of the test case file. The version updating module is used for responding to the version updating operation aiming at the test case file and generating test case updating data corresponding to the version updating operation according to the test case data contained in the test case file; and updating data based on the test case to obtain a test case file with an updated version.
In one embodiment, the file storage module is further configured to obtain construction data of the organization structure dictionary in response to a construction operation for the organization structure dictionary; and generating a pre-stored organization structure dictionary based on the construction data of the organization structure dictionary.
In one embodiment, the apparatus further comprises a file modification module. The file modification module is used for responding to modification operation aiming at the test case files and acquiring the same data fields in the test case files; modifying the plurality of test case files based on the same data field; and responding to the secondary storage operation aiming at the plurality of test case files, acquiring a pre-stored organization structure dictionary, and respectively storing the plurality of modified test case files based on the hierarchical structure chain corresponding to the organization structure dictionary.
In one embodiment, the apparatus further comprises a dictionary modification module. The dictionary modification module is used for responding to modification operation aiming at the organizational structure dictionary and acquiring modification data of the organizational structure dictionary; modifying the organization structure dictionary based on the modification data of the organization structure dictionary; and storing the test case file by utilizing the hierarchical structure chain corresponding to the modified organizational structure dictionary.
The modules in the test case generation device may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer apparatus includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input device. The processor, the memory and the input/output interface are connected by a system bus, and the communication interface, the display unit and the input device are connected by the input/output interface to the system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The input/output interface of the computer device is used for exchanging information between the processor and an external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a test case generation method. The display unit of the computer device is used for forming a visual visible picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), for example. The databases involved in the embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A test case generation method, the method comprising:
responding to a test case generation command, displaying a software test interface, and acquiring test environment data corresponding to the software to be tested;
responding to the test operation of the software to be tested triggered in the software test interface, acquiring test operation information, and generating a test case file aiming at the software to be tested according to the test operation information, a test result corresponding to the test operation information and the test environment data;
and responding to the storage operation aiming at the test case file, acquiring a prestored organization structure dictionary, and storing the test case file based on a hierarchical structure chain corresponding to the organization structure dictionary.
2. The method of claim 1, wherein the obtaining test environment data corresponding to the software to be tested comprises:
responding to data editing operation aiming at the software to be tested, and acquiring input first testing environment data;
acquiring second testing environment data corresponding to the software to be tested based on the software testing interface;
and obtaining test environment data corresponding to the software to be tested according to the first test environment data and the second test environment data.
3. The method of claim 1, wherein the responding to the storage operation for the test case file is preceded by:
displaying the test case file;
responding to modification operation aiming at the test case file, and acquiring modification data corresponding to the modification operation; modifying the test case file by using the modification data;
the storing the test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary comprises:
and storing the modified test case file based on the hierarchical structure chain corresponding to the organizational structure dictionary.
4. The method of claim 3, wherein said exposing the test case file comprises:
displaying the version information of the test case file;
after the test case file is stored, the method includes:
responding to the version updating operation aiming at the test case file, and generating test case updating data corresponding to the version updating operation according to the test case data contained in the test case file;
and obtaining a test case file with an updated version based on the test case updating data.
5. The method of claim 1, wherein obtaining a pre-stored organizational structure dictionary comprises:
acquiring construction data of an organization structure dictionary in response to construction operation for the organization structure dictionary;
and generating the pre-stored organization structure dictionary based on the construction data of the organization structure dictionary.
6. The method according to claim 1, wherein after storing the test case file, the method comprises:
responding to modification operation aiming at a plurality of test case files, and acquiring the same data fields in the plurality of test case files;
modifying the plurality of test case files based on the same data field;
and responding to the secondary storage operation aiming at the plurality of test case files, acquiring the pre-stored organization structure dictionary, and respectively storing the plurality of modified test case files based on the hierarchical structure chains corresponding to the organization structure dictionary.
7. The method of claim 1, further comprising:
acquiring modification data of the organization structure dictionary in response to a modification operation for the organization structure dictionary;
modifying the organizational structure dictionary based on the modification data of the organizational structure dictionary;
and storing the test case file by utilizing the hierarchical structure chain corresponding to the modified organizational structure dictionary.
8. A test case generation apparatus, the apparatus comprising:
the data acquisition module is used for responding to a test case generation command, displaying a software test interface and acquiring test environment data corresponding to the software to be tested;
the file generation module is used for responding to the test operation of the software to be tested triggered in the software test interface, acquiring test operation information, and generating a test case file aiming at the software to be tested according to the test operation information, a test result corresponding to the test operation information and the test environment data;
and the file storage module is used for responding to the storage operation aiming at the test case file, acquiring a prestored organization structure dictionary and storing the test case file based on the hierarchical structure chain corresponding to the organization structure dictionary.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202211102642.3A 2022-09-09 2022-09-09 Test case generation method and device, computer equipment and storage medium Pending CN115437935A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211102642.3A CN115437935A (en) 2022-09-09 2022-09-09 Test case generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211102642.3A CN115437935A (en) 2022-09-09 2022-09-09 Test case generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115437935A true CN115437935A (en) 2022-12-06

Family

ID=84247478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211102642.3A Pending CN115437935A (en) 2022-09-09 2022-09-09 Test case generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115437935A (en)

Similar Documents

Publication Publication Date Title
CN109901834B (en) Document page generation method, device, computer equipment and storage medium
WO2021217846A1 (en) Interface data processing method and apparatus, and computer device and storage medium
CN114115844A (en) Page generation method and device, computer equipment and storage medium
CN110597552B (en) Configuration method, device, equipment and storage medium of project continuous integrated pipeline
CN111061475A (en) Software code generation method and device, computer equipment and storage medium
CN110727777A (en) Knowledge graph management method and device, computer equipment and storage medium
US20130326466A1 (en) Human Readable Software Program Test Step
CN108228611B (en) Document information copying method and device
CN114764296A (en) Machine learning model training method and device, electronic equipment and storage medium
CN116910405A (en) Page processing method, device, computer equipment and storage medium
CN115437935A (en) Test case generation method and device, computer equipment and storage medium
JP6717140B2 (en) Analysis program, analysis method, and analysis device
CN111428182B (en) Evaluation index processing method, device, computer equipment and storage medium
CN114327435A (en) Technical document generation method and device and computer readable storage medium
CN116541454B (en) Event configuration method, device, computer equipment and storage medium
CN116112377B (en) Interface simulation method, device, equipment and storage medium
CN115168779B (en) Form flow processing method and device, computer equipment and storage medium
CN114528198A (en) Software automation test method and device, electronic equipment and storage medium
CN117032631A (en) Test outline generation method, device, computer equipment and storage medium
CN117435651A (en) Test data processing method, device, computer equipment and storage medium
CN116304407A (en) Page rendering method, device, computer equipment and storage medium
CN117743443A (en) Data acquisition method and device, electronic equipment and storage medium
CN115718701A (en) Program testing method, program testing device, computer equipment and storage medium
CN117612192A (en) Electronic drawing information identification method, system, electronic equipment and storage medium
CN116701178A (en) Interface test method, device, computer equipment and storage 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