CN117493217A - Test case generation method and device, readable medium and electronic equipment - Google Patents

Test case generation method and device, readable medium and electronic equipment Download PDF

Info

Publication number
CN117493217A
CN117493217A CN202311737774.8A CN202311737774A CN117493217A CN 117493217 A CN117493217 A CN 117493217A CN 202311737774 A CN202311737774 A CN 202311737774A CN 117493217 A CN117493217 A CN 117493217A
Authority
CN
China
Prior art keywords
test case
page
target
displaying
test
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
CN202311737774.8A
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.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202311737774.8A priority Critical patent/CN117493217A/en
Publication of CN117493217A publication Critical patent/CN117493217A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The disclosure relates to a test case generation method, a device, a readable medium and an electronic device, wherein the method comprises the following steps: displaying a test case page, wherein the test case page is used for a user to configure the test case in a brain diagram mode; responding to triggering operation of the intelligent object in the test case page, displaying an intelligent object page, wherein the intelligent object page is used for displaying the test case according to the input information; and responding to target information input in the intelligent object page and used for generating the test case, and displaying test case nodes in the test case page, wherein the test case nodes are used for displaying the test cases obtained based on the target information according to a preset case structure. Through the technical scheme, when the test case is configured on the test case page, the intelligent object is utilized to carry out auxiliary configuration of the test case, so that the configuration threshold of the test case is reduced, the configuration efficiency of the test case is improved, and meanwhile, the accuracy of the test case is improved.

Description

Test case generation method and device, readable medium and electronic equipment
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a test case generation method, a device, a readable medium and electronic equipment.
Background
To improve the service quality of application software, it is generally necessary to test the application software before the application software is brought online. In the related art, the application software is tested based on the test cases, so that the corresponding test cases need to be written according to the functions of the application software to be tested before the application software is tested.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a test case generating method, the method including:
displaying a test case page, wherein the test case page is used for a user to configure a test case in a brain graph form;
responding to triggering operation of the intelligent object in the test case page, displaying an intelligent object page, wherein the intelligent object page is used for displaying the test case according to the input information;
and responding to target information which is input in the intelligent object page and used for generating the test case, and displaying test case nodes in the test case page, wherein the test case nodes are used for displaying the test cases obtained based on the target information according to a preset case structure.
In a second aspect, the present disclosure provides a test case generating apparatus, the apparatus comprising:
the first display module is used for displaying a test case page, and the test case page is used for a user to configure the test case in a brain diagram mode;
the second display module is used for responding to the triggering operation of the intelligent object in the test case page, displaying an intelligent object page, and displaying the test case according to the input information;
and the third display module is used for responding to target information which is input in the intelligent object page and used for generating the test case, and displaying test case nodes in the test case page, wherein the test case nodes are used for displaying the test cases obtained based on the target information according to a preset case structure.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of any of the first aspects.
In a fourth aspect, the present disclosure provides an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of the first aspects.
According to the technical scheme, the intelligent object page can be displayed by triggering the intelligent object in the test case page, and the test case node corresponding to the test case is displayed on the test case page according to the target information which is input in the intelligent object page and is used for generating the test case. Therefore, when the test case page is used for configuring the test case, the intelligent object can be utilized for carrying out auxiliary configuration of the test case, the configuration threshold of the test case is reduced, and the accuracy of the test case is improved while the configuration efficiency of the test case is improved. In addition, the test case nodes are used for displaying the test cases according to the preset case structure, so that the generated test cases are more standard, and the readability and reproducibility of the test cases are improved.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flowchart illustrating a test case generation method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a default use case configuration according to an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic diagram showing a display test case node, according to an exemplary embodiment of the present disclosure;
FIG. 4 is a schematic diagram of another display test case node, shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an uploaded document, shown according to an exemplary embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a display interactive control, shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a display editing panel shown according to an exemplary embodiment of the present disclosure;
FIG. 8 is a block diagram illustrating a test case generating device according to an exemplary embodiment of the present disclosure;
fig. 9 is a schematic structural view of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
Meanwhile, it can be understood that the data (including but not limited to the data itself, the acquisition or the use of the data) related to the technical scheme should conform to the requirements of the corresponding laws and regulations and related regulations.
As described in the background art, to improve the service quality of application software, it is generally necessary to test the application software before the application software is put on line. In the related art, the application software is tested based on the test cases, so that the corresponding test cases need to be written according to the functions of the application software to be tested before the application software is tested.
When the related technology is used for compiling test cases, personnel with related test knowledge are required to compile the test cases according to the test requirements of the application software to be tested, so that the compiling threshold of the test cases is high, and the compiling efficiency of the test cases is affected.
In view of the above, the present disclosure provides a method and apparatus for generating test cases, a readable medium and an electronic device, so as to solve the above technical problems.
The test case generation method provided by the disclosure can be applied to a test management platform. The test management platform can provide functional modules related to product testing, such as test plans, test schemes, use case management, test execution, report output and the like. The test case generation method is realized by entering the case management function module.
Embodiments of the present disclosure are further explained below with reference to the drawings.
FIG. 1 is a flowchart of a test case generation method, according to an exemplary embodiment of the present disclosure, and referring to FIG. 1, the method may include the steps of:
s101: and displaying a test case page, wherein the test case page is used for a user to configure the test case in the form of a brain graph.
The test case page may be a page configured with a test case, or may be a page not configured with a test case, which is not limited in the embodiment of the present disclosure.
By way of example, the test case management function module in the test management platform may be clicked to switch to a management page of the test case, and the case management page may display a generated test case list, and by clicking a target test case in the test case list, the test case is entered into the test case page, and the target test case is displayed in the test case page in the form of a brain chart. Or, clicking a new test case control in the case management page to switch to the test case page.
S102: and responding to triggering operation of the intelligent object in the test case page, displaying an intelligent object page, wherein the intelligent object page is used for displaying the test case according to the input information.
It should be appreciated that the smart object may be an agent that integrates at least one test case generation model. The intelligent agent can receive target information in the formats of text, voice, document or image and the like input from the outside, and process the received target information of the text, voice, document or image and the like by utilizing the integrated test case generation model to generate a test case corresponding to the target information.
For example, a smart object page may be displayed by clicking on a smart object. The smart object page may include a content input box, and the test case corresponding to the target information is generated and displayed by inputting the target information in the content input box.
S103: and responding to target information which is input in the intelligent object page and used for generating the test case, and displaying test case nodes in the test case page, wherein the test case nodes are used for displaying the test cases obtained based on the target information according to a preset case structure.
It should be appreciated that when test cases are configured in the form of brain graphs, the configured test cases may generally include case titles, preconditions, operational steps, expected results, and the like. The case structures of the test cases composed of case titles, preconditions, operation steps and expected results may be the same or different according to the application scenes. Therefore, according to different application scenarios, the preset use case structure may be set according to actual situations, which is not limited in the embodiments of the present disclosure. The preset use case structure may be as shown in fig. 2, for example.
According to the technical scheme, the intelligent object page can be displayed by triggering the intelligent object in the test case page, and the test case node corresponding to the test case is displayed on the test case page according to the target information which is input in the intelligent object page and is used for generating the test case. Therefore, when the test case page is used for configuring the test case, the intelligent object can be utilized for carrying out auxiliary configuration of the test case, the configuration threshold of the test case is reduced, and the accuracy of the test case is improved while the configuration efficiency of the test case is improved. In addition, the test case nodes are used for displaying the test cases according to the preset case structure, so that the generated test cases are more standard, and the readability and reproducibility of the test cases are improved.
In a possible manner, the displaying, in the test case page, the test case node in response to the target information for generating the test case, which is input in the smart object page, may include:
responding to target information input in the intelligent object page and used for generating test cases, and displaying at least one test case obtained based on the target information in the intelligent object page; and responding to the interactive operation of the at least one test case, and displaying the test case node corresponding to the test case in the test case page.
It should be appreciated that the number of test cases displayed in the smart object page that are derived based on the target information may be determined based on the currently entered target information or in combination with the previously and subsequently entered target information. The more the information in the target information is helpful to generating the test cases, the fewer the generated test cases are, and the more the user requirements can be met. The less information in the target information that is helpful to generating test cases, the more test cases are generated, and the user may need to screen from the information to find the test cases meeting the requirements.
For example, when the target information is "help me write test cases of a login scenario", the smart object page may display several test cases. When the target information is "help me write test cases of the login scene under the a scene", the smart object page may display 1 test case.
It should be further understood that the test cases displayed on the smart object page may be displayed in text, in test case nodes, or in other manners, which are not limited in any way by the embodiments of the present disclosure.
In a possible manner, the displaying, in the test case page, the test case node corresponding to the test case in response to the interaction of the at least one test case may include:
responding to a drag operation of a target test case in the at least one test case, and displaying a content card along with the drag operation, wherein the content card is used for displaying the content of the target test case; and responding to dragging the target test case to a target position of the test case page, and updating the content card to a test case node at the target position for display.
It should be understood that the number of the target test cases may be one or more, and the target test cases are determined according to practical situations. When the target test cases are multiple, one content card can be displayed, and multiple content cards can be displayed. When one content card is displayed, the content card may contain the content of all target test cases. When a plurality of content cards are displayed, each content card may display the content of one target test case. Meanwhile, when a plurality of content cards are displayed, the plurality of content cards may be partially or entirely displayed in an overlapping manner, or may be displayed in a non-overlapping manner, which is not limited in any way by the embodiments of the present disclosure.
It should also be appreciated that the display content in the content card may or may not be the same as the display content in the smart object page. When the display content in the content card is different from the display content in the smart object page, the display modes can be different, the semantics can be the same, but the expression modes are different, and the embodiment of the disclosure does not limit the display modes at all.
For example, as shown in fig. 3, 1 test case is displayed in the smart object page, and the content card of the test case is always displayed in the process of dragging the test case. When the test case is dragged to the target position of the test case page, namely below the test case node 3, the content card is updated to be displayed by the test case node 4.
It should be understood that the interaction manner in this embodiment is merely illustrative, and does not limit the present solution. The interactive operation may also be a click operation or a shortcut operation, etc., as possible.
For example, when the interaction operation is a clicking operation, the target test case in the smart object page may be clicked first, and then the target position of the test case page is clicked, so that the test case node corresponding to the test case is displayed at the target position.
When the interaction operation is a shortcut key operation, a shortcut instruction can be input into the external device, so that the test case node corresponding to the target test case in the intelligent object page is displayed at the target position of the test case page. For example, by inputting alt+1 in the keyboard, the test case node corresponding to the first test case in the smart object page is displayed at the position of the mouse cursor.
In a possible manner, the target test case includes a plurality of test cases, and the responding to the drag operation on the target test case in the at least one test case, following the drag operation, displaying the content card may include:
and responding to the drag operation of the target test case in the at least one test case, and displaying target content cards formed by partially or completely overlapping content cards corresponding to a plurality of test cases along with the drag operation, wherein each content card is used for displaying the content of one test case, and the target content card is provided with application identification information corresponding to each content card.
The case identification information is used for identifying the test cases, so that in the dragging process, the display content in the content card can be determined to correspond to which test case according to the case identification information. In addition, the case identification information may be a case name of the test case, an arrangement order of the test case in the smart object page, or other cases, which is not limited in any way by the embodiments of the present disclosure.
For example, as shown in fig. 4, the smart object page displays 3 test cases, where the target test case is a first test case and a second test case. And displaying a first content card and a second content card in the process of dragging the first test case and the second test case, wherein the first content card is used for displaying the content of the first test case, and the second content card is used for displaying the content of the second test case. During the drag, the first content card and the second content card partially overlap, and the useful case arrangement order, that is, 1 and 2 above the content cards, is displayed in the non-overlapping region. When the first test case and the second test case are dragged to the target position, namely the right side of the compatible test node, the first content card is updated to the test case node 3 for display, and the second content card is updated to the test case node 4 for display.
In a possible manner, the test case page displays the configured target case node in a brain graph mode, and the updating the content card to the test case node at the target position for display in response to dragging the target test case to the target position of the test case page may include:
and in response to dragging the target test case to a preset hot spot area around the target case node, updating the content card to the next node of the target case node for display.
The hot spot areas are some specific areas or specific positions set by pointers to the target use case nodes. When the target test case is dragged to the specific area or the specific position, the association relationship between the target test case and the target case node can be established, and the content card is automatically updated to be displayed as the next node of the target case node. Therefore, the drag quantity can be reduced, and the generation efficiency of the test case is improved.
In a possible manner, the displaying, in the smart object page, at least one test case obtained based on the target information in response to the target information input in the smart object page and used for generating the test case may include:
Responding to the test scene information input in the intelligent object page and used for generating test cases, and displaying the test cases in the intelligent object page in the form of test case sets, wherein each test case set is used for displaying at least one test case matched in the same preset test case set based on the test scene information;
the displaying, in the test case page, the test case node corresponding to the test case in response to the interaction of the at least one test case may include:
and responding to the interactive operation of the target test case set in the test case set, and displaying the test case node corresponding to each test case in the target test case set in the test case page.
The test scene information may be login scene information, modification scene information, or logout scene information, which is not limited in any way by the embodiments of the present disclosure.
The preset test case set may be a test case set generated in a history manner, and the logic relationship between the test case sets is relatively similar to that between the test case nodes in the current test case page, or may be a test case set which is relatively similar to that between the test case nodes in the current test case page and has the highest historical reference frequency, and the embodiment of the present disclosure does not limit the above.
The interaction operation of the target test case set refers to the interaction operation of the target test case set, and is not described herein.
In a possible manner, the test case generating method may further include:
and when the test cases are displayed in the intelligent object page in the form of test case sets, displaying recommendation degree information of each test case set, wherein the recommendation degree information is obtained by the test scene information and the test case nodes displayed on the test case page.
The recommendation degree information is used for representing the recommendation degree or the suggestion degree of the test case set. The expression manner of the recommendation degree information can be determined according to actual situations, and the embodiment of the present disclosure does not limit this. For example, the recommendation level information may be represented by a score, and the higher the score, the higher the recommendation level.
By adopting the mode, the recommendation degree information of each test case set can be displayed when the test case set is displayed, so that the test cases can be selected according to the recommendation degree information. In addition, the recommendation degree information is obtained according to the test scene information and the test case nodes displayed on the test case page. Therefore, the test case set conforming to the current writing scene can obtain higher recommended degree or recommended degree, and further the test quality of the test case is improved.
It should be noted that, in order to avoid that a plurality of test scenario information exists in the content display frame, so that the recommended test case cannot be suitable for the current writing environment, display information in the content display frame may be cleared or a new session page may be created when the test scenario information needs to be updated. Illustratively, as shown in fig. 3, a new session control is displayed at the bottom of the content display frame, and by clicking on the new session control, display information in the content display frame or a new session page is emptied.
In a possible manner, the displaying, in the test case page, the test case node in response to the target information for generating the test case, which is input in the smart object page, may include:
and responding to the document uploading operation in the intelligent object page, analyzing a target document corresponding to the document uploading operation to obtain target information for generating a test case, and displaying a test case node in the test case page according to the target information.
The target document refers to a document related to the generation of the test case. For example, it may be a product demand document (Product Requirements Document, PRD), a test plan document, a design document of the software to be tested, or a description document of the function to be tested, etc.
Illustratively, as shown in FIG. 5, the smart object page includes a content input box and a content display box, with a document upload control displayed on top of the content input box. And clicking a document uploading control to display a document uploading page, displaying a document uploading area on the document uploading page, and dragging the target document to the document uploading area to realize uploading operation of the document.
By adopting the scheme, the target document related to the generation of the test case can be uploaded on the intelligent object page, the uploaded target document is automatically analyzed, the target information for generating the test case is generated, and the test case node is displayed in the test case page according to the target information. Therefore, when the user generates the test case, the user does not need to manually analyze the target information in the target document, the speed of generating the test case is improved, the working intensity of the user is reduced, and the user experience is improved.
It should be understood that, in the above embodiment, the input manner of the target information is merely schematic, and does not constitute a limitation of the scheme. In a possible embodiment, the target information may also be input by means of speech. For example, as shown in fig. 3, a voice control may be displayed at the bottom of the content display frame, during clicking the voice control, an audio signal may be input, and when the voice control is released, the input audio signal is parsed to obtain target information for generating a test case, and a test case node is displayed in the test case page according to the target information.
In a possible manner, the test case generating method may further include:
displaying at least one of the following interactive controls in the test case node: a picture control, a label control and a comment control; responding to triggering operation of a target interaction control in the at least one interaction control, and displaying an interaction page corresponding to the target interaction control; and responding to the interaction information configured in the interaction page, displaying the interaction information in the test case node and/or updating information of a target editing item in an editing panel corresponding to the test case node so as to synchronously display the interaction information in the target editing item, wherein the target editing item is an editing item with the same function as the target interaction control.
Wherein the picture control can be used to add pictures related to the test case. For example, if a test case is for login testing, the picture may be a picture of a login page. The label control may be used to add labels related to test cases. For example, if a test case is a test case that is not tested frequently, then the tag may be a low frequency tag that is used to characterize the test that is not tested frequently. The comment control is used for adding comments on the test case.
The interaction control can be displayed after the test case node is selected, or can be displayed after the test case node is added to the test case page, and the embodiment of the disclosure does not limit the test case node. For example, as shown in FIG. 6, the interaction control may be displayed after clicking on the test case node.
The editing panel may be an attribute configuration panel of the test case node, and may be displayed when the test case node is selected, as shown in fig. 7. The attribute configuration page is used for configuring attribute information of the test case node, and may include labels, priorities, comments, pictures, rights and the like of the test case node. Therefore, after the interactive information is configured through the interactive control, the information in the attribute configuration page can be synchronously changed. For example, after adding the picture 4 through the interactive control, the picture 4 may be displayed in a picture attribute column of the attribute configuration panel.
Based on the same concept, the embodiment of the present disclosure further provides a test case generating device, as shown in fig. 8, the test case generating device 800 may include:
the first display module 801 is configured to display a test case page, where the test case page is used for a user to configure a test case in a brain diagram form;
A second display module 802, configured to respond to a triggering operation on an intelligent object in the test case page, and display an intelligent object page, where the intelligent object page is used to display a test case according to input information;
and a third display module 803, configured to respond to target information input in the smart object page and used to generate a test case, and display a test case node in the test case page, where the test case node is configured to display a test case obtained based on the target information according to a preset case structure.
By the test case generating device, the intelligent object page can be displayed by triggering the intelligent object in the test case page, and the test case node corresponding to the test case is displayed on the test case page according to the target information for generating the test case input in the intelligent object page. Therefore, when the test case page is used for configuring the test case, the intelligent object can be utilized for carrying out auxiliary configuration of the test case, the configuration threshold of the test case is reduced, and the accuracy of the test case is improved while the configuration efficiency of the test case is improved. In addition, the test case nodes are used for displaying the test cases according to the preset case structure, so that the generated test cases are more standard, and the readability and reproducibility of the test cases are improved.
In a possible implementation manner, the third display module 803 may include:
the first display sub-module is used for responding to target information input in the intelligent object page and used for generating test cases, and displaying at least one test case obtained based on the target information in the intelligent object page;
and the second display sub-module is used for responding to the interactive operation of the at least one test case and displaying the test case node corresponding to the test case in the test case page.
In a possible implementation manner, the second display sub-module may include:
the first display unit is used for responding to the drag operation of the target test case in the at least one test case, displaying a content card along with the drag operation, wherein the content card is used for displaying the content of the target test case;
and the updating unit is used for responding to dragging the target test case to the target position of the test case page, and updating the content card to the test case node at the target position for display.
In a possible implementation manner, the target test case includes a plurality of test cases, and accordingly, the first display unit may be configured to: and responding to the drag operation of the target test case in the at least one test case, and displaying target content cards formed by partially or completely overlapping content cards corresponding to a plurality of test cases along with the drag operation, wherein each content card is used for displaying the content of one test case, and the target content card is provided with application identification information corresponding to each content card.
In a possible implementation manner, the test case page displays the configured target case node in a brain graph mode, and accordingly, the updating unit may be configured to: and in response to dragging the target test case to a preset hot spot area around the target case node, updating the content card to the next node of the target case node for display.
In a possible implementation manner, the first display sub-module may be configured to respond to the test scenario information input in the smart object page and used for generating test cases, and display the test cases in the smart object page in the form of test case sets, where each test case set is configured to display at least one test case matched in the same preset test case set based on the test scenario information; accordingly, the second display sub-module may be configured to: and responding to the interactive operation of the target test case set in the test case set, and displaying the test case node corresponding to each test case in the target test case set in the test case page.
In a possible implementation manner, the test case generating device 800 may further include:
And the fourth display module is used for displaying recommendation degree information of each test case set when the test cases are displayed in the intelligent object page in the form of the test case set, wherein the recommendation degree information is obtained by the test scene information and the test case nodes displayed on the test case page.
In a possible implementation manner, the third display module 803 may include:
and the third display sub-module is used for responding to the document uploading operation in the intelligent object page, analyzing a target document corresponding to the document uploading operation to obtain target information for generating the test case, and displaying the test case node in the test case page according to the target information.
In a possible implementation manner, the test case generating device 800 may further include:
a fifth display module, configured to display, in the test case node, at least one of the following interaction controls: a picture control, a label control and a comment control;
the sixth display module is used for responding to the triggering operation of the target interaction control in the at least one interaction control and displaying an interaction page corresponding to the target interaction control;
and the seventh display module is used for responding to the interaction information configured in the interaction page, displaying the interaction information in the test case node and/or updating the information of the target editing item in the editing panel corresponding to the test case node so as to synchronously display the interaction information in the target editing item, wherein the target editing item is an editing item with the same function as the target interaction control.
Based on the same conception, the embodiments of the present disclosure also provide a computer readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of any of the first aspects.
Based on the same concept, the embodiments of the present disclosure also provide an electronic device, which may include:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of the first aspects.
Referring now to fig. 9, a schematic diagram of an electronic device 900 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 9 is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 9, the electronic device 900 may include a processing means (e.g., a central processor, a graphics processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage means 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
In general, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. The communication means 909 may allow the electronic device 900 to communicate wirelessly or by wire with other devices to exchange data. While fig. 9 shows an electronic device 900 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 909, or installed from the storage device 908, or installed from the ROM 6902. When executed by the processing device 901, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, communications may be made using any currently known or future developed network protocol, such as HTTP (HyperText TransferProtocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: displaying a test case page, wherein the test case page is used for a user to configure a test case in a brain graph form; responding to triggering operation of the intelligent object in the test case page, displaying an intelligent object page, wherein the intelligent object page is used for displaying the test case according to the input information; and responding to target information which is input in the intelligent object page and used for generating the test case, and displaying test case nodes in the test case page, wherein the test case nodes are used for displaying the test cases obtained based on the target information according to a preset case structure.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. The name of a module does not in some cases define the module itself.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims. The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.

Claims (12)

1. A method for generating test cases, the method comprising:
displaying a test case page, wherein the test case page is used for a user to configure a test case in a brain graph form;
responding to triggering operation of the intelligent object in the test case page, displaying an intelligent object page, wherein the intelligent object page is used for displaying the test case according to the input information;
and responding to target information which is input in the intelligent object page and used for generating the test case, and displaying test case nodes in the test case page, wherein the test case nodes are used for displaying the test cases obtained based on the target information according to a preset case structure.
2. The method of claim 1, wherein the displaying test case nodes in the test case page in response to target information input in the smart object page for generating test cases comprises:
responding to target information input in the intelligent object page and used for generating test cases, and displaying at least one test case obtained based on the target information in the intelligent object page;
and responding to the interactive operation of the at least one test case, and displaying the test case node corresponding to the test case in the test case page.
3. The method of claim 2, wherein the displaying, in the test case page, the test case node corresponding to the test case in response to the interoperation with the at least one test case, comprises:
responding to a drag operation of a target test case in the at least one test case, and displaying a content card along with the drag operation, wherein the content card is used for displaying the content of the target test case;
and responding to dragging the target test case to a target position of the test case page, and updating the content card to a test case node at the target position for display.
4. The method of claim 3, wherein the target test case comprises a plurality of test cases, wherein the displaying the content card following the drag operation in response to the drag operation on the target test case in the at least one test case comprises:
and responding to the drag operation of the target test case in the at least one test case, and displaying target content cards formed by partially or completely overlapping content cards corresponding to a plurality of test cases along with the drag operation, wherein each content card is used for displaying the content of one test case, and the target content card is provided with application identification information corresponding to each content card.
5. The method of claim 3, wherein the test case page has a configured target case node displayed in brain pattern, and wherein the updating the content card to the test case node at the target location for display in response to dragging the target test case to the target location of the test case page comprises:
and in response to dragging the target test case to a preset hot spot area around the target case node, updating the content card to the next node of the target case node for display.
6. The method according to any one of claims 2-5, wherein the displaying in the smart object page, in response to target information entered in the smart object page for generating test cases, at least one test case derived based on the target information, comprises:
responding to the test scene information input in the intelligent object page and used for generating test cases, and displaying the test cases in the intelligent object page in the form of test case sets, wherein each test case set is used for displaying at least one test case matched in the same preset test case set based on the test scene information;
the responding to the interactive operation of the at least one test case displays the test case node corresponding to the test case in the test case page, and comprises the following steps:
and responding to the interactive operation of the target test case set in the test case set, and displaying the test case node corresponding to each test case in the target test case set in the test case page.
7. The method of claim 6, wherein the test case generation method further comprises:
And when the test cases are displayed in the intelligent object page in the form of test case sets, displaying recommendation degree information of each test case set, wherein the recommendation degree information is obtained by the test scene information and the test case nodes displayed on the test case page.
8. The method of any of claims 1-5, wherein the displaying test case nodes in the test case page in response to target information entered in the smart object page for generating test cases comprises:
and responding to the document uploading operation in the intelligent object page, analyzing a target document corresponding to the document uploading operation to obtain target information for generating a test case, and displaying a test case node in the test case page according to the target information.
9. The method of any of claims 1-5, wherein the test case generation method further comprises:
displaying at least one of the following interactive controls in the test case node: a picture control, a label control and a comment control;
responding to triggering operation of a target interaction control in the at least one interaction control, and displaying an interaction page corresponding to the target interaction control;
And responding to the interaction information configured in the interaction page, displaying the interaction information in the test case node and/or updating information of a target editing item in an editing panel corresponding to the test case node so as to synchronously display the interaction information in the target editing item, wherein the target editing item is an editing item with the same function as the target interaction control.
10. A test case generating device, the device comprising:
the first display module is used for displaying a test case page, and the test case page is used for a user to configure the test case in a brain diagram mode;
the second display module is used for responding to the triggering operation of the intelligent object in the test case page, displaying an intelligent object page, and displaying the test case according to the input information;
and the third display module is used for responding to target information which is input in the intelligent object page and used for generating the test case, and displaying test case nodes in the test case page, wherein the test case nodes are used for displaying the test cases obtained based on the target information according to a preset case structure.
11. A computer readable medium on which a computer program is stored, characterized in that the program, when being executed by a processing device, carries out the steps of the method according to any one of claims 1-9.
12. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 1-9.
CN202311737774.8A 2023-12-15 2023-12-15 Test case generation method and device, readable medium and electronic equipment Pending CN117493217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311737774.8A CN117493217A (en) 2023-12-15 2023-12-15 Test case generation method and device, readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311737774.8A CN117493217A (en) 2023-12-15 2023-12-15 Test case generation method and device, readable medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117493217A true CN117493217A (en) 2024-02-02

Family

ID=89680243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311737774.8A Pending CN117493217A (en) 2023-12-15 2023-12-15 Test case generation method and device, readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117493217A (en)

Similar Documents

Publication Publication Date Title
CN111367516B (en) Application interface generation method and device and electronic equipment
CN114491349B (en) Page display method, page display device, electronic device, storage medium and program product
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN114489896B (en) Content display method and device, storage medium and electronic equipment
CN112954056B (en) Method and device for processing monitoring data, electronic equipment and storage medium
CN109976857B (en) Display control method and device of terminal interface, storage medium and electronic equipment
CN113377365B (en) Code display method, apparatus, device, computer readable storage medium and product
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN117493217A (en) Test case generation method and device, readable medium and electronic equipment
CN115470292B (en) Block chain consensus method, device, electronic equipment and readable storage medium
CN111292329B (en) Training method and device of video segmentation network and electronic equipment
CN111367517B (en) Information generation method and device
CN117851438A (en) Data analysis method and device, readable medium and electronic equipment
CN117667983A (en) Data interaction method and device, readable medium and electronic equipment
CN117708110A (en) Data generation method, device, medium and electronic equipment
CN116166251A (en) Media file display method and device, media and electronic equipment
CN117687923A (en) Test case management method and device, readable medium and electronic equipment
CN116401173A (en) Test case generation method and device, medium and electronic equipment
CN117032532A (en) Test case editing method and device, computer readable medium and electronic equipment
CN116594630A (en) File generation method, device, medium and electronic equipment
CN117473950A (en) Data display method and device, readable medium and electronic equipment
CN116521175A (en) Dependency introduction method, apparatus, medium and electronic device
CN116795339A (en) Service interface generation method, device, equipment and storage medium
CN114706645A (en) Interface information transmission method, device, medium and electronic equipment
CN117407365A (en) Content processing method and device, electronic 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