A method, device, equipment and storage medium for generating a use case
By dividing attribute areas and generating use case tiles in the use case generation interface, the problem of low efficiency of use case attribute annotation and conversion in mind maps is solved, unified annotation and efficient conversion of use case attributes are realized, and the sharing and management of use cases is simplified.
Patent Information
- Application Number
- CN202111250748.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-26
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2041-10-26
AI Technical Summary
In the process of creating use cases through mind maps, it is necessary to pre-plan the attribute identification of each use case attribute, and add attribute identification to each node in the use case, resulting in large workload of attribute identification, low form conversion efficiency, complex sharing and management, and high understanding cost.
Provide a use case generation method, by displaying the use case generation interface, divide multiple attribute areas, each attribute area corresponds to the use case attributes of the use case to be generated, generate use case tiles and contents in response to user input operations, generate use cases based on the logical relationship between the tiles, and export the use cases into a spreadsheet format when needed.
It realizes unified default annotation of use case attributes, reduces the difficulty of use case analysis and form conversion, facilitates sharing and management of multi-person teams, and improves the efficiency and quality of use case form conversion.
Smart Images

Figure CN113971129B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a use case generation method, apparatus, device and storage medium. Background Art
[0002] Mind mapping is an effective graphic thinking tool for expressing divergent thinking. It uses both text and graphics to express the relationship between topics at all levels through mutually subordinate and related hierarchical diagrams. Use cases are a technology that obtains requirements through user usage scenarios, such as software testing, work order approval, process review, etc. The use of mind mapping to create use cases has become one of the main ways to create use cases because its structure format is not restricted and there are many ways to annotate use case attributes. Use case creation is simple and free.
[0003] However, in the process of making use cases through mind maps, it is necessary to plan the attribute identifiers of each use case attribute in advance and add attribute identifiers in each node in the use case to obtain a complete use case. Especially when multiple people need to work together to make use cases, different production personnel need to plan in advance or unify afterwards to unify the use cases. However, the marking method of use case attributes in each node is different. When parsing and converting the use case into a use case file, it is difficult to identify the true attributes of each node in the use case. The workload of attribute identification is large, the efficiency of form conversion of use cases is low, and the sharing and management of use cases are more complex and cumbersome, and the cost of understanding is high. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a use case generation method, apparatus, device and storage medium.
[0005] The present disclosure provides a method for generating a use case, the method comprising:
[0006] Displaying a use case generation interface, the use case generation interface including a plurality of divided attribute areas, each attribute area corresponding to a use case attribute of a use case to be generated;
[0007] In response to an input operation of a user, generating a plurality of use case diagram blocks in the plurality of attribute areas, and generating use case content in each use case diagram block;
[0008] Generate a use case based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents;
[0009] In the case where the generated use case needs to be exported in a spreadsheet format, the use case attributes corresponding to each use case block in the use case are used as column attributes of each use case block in the file to be exported;
[0010] Export the use case according to the position of each use case block corresponding to the column attribute in the file to be exported, and generate a use case file in a spreadsheet format.
[0011] In an optional implementation manner, the display use case generation interface includes:
[0012] In response to a user's selection of a target use case template, displaying a use case generation interface corresponding to the target use case template; or
[0013] Based on the user's interface configuration for the use case generation interface, generating a use case generation interface adapted to the interface configuration; or
[0014] Based on the use case scenario information of the use case to be generated, a use case generation interface matching the use case scenario information is generated.
[0015] In an optional implementation, in response to the user's input operation, generating multiple use case diagram blocks in the multiple attribute areas, and generating use case content in each use case diagram block, includes:
[0016] In response to a first preset operation of a user on a first target attribute area among the multiple attribute areas, generating a first use case diagram block in the first target attribute area;
[0017] Displaying a block addition mark at a position corresponding to the first use case block in each other attribute area of the plurality of attribute areas except the first target attribute area, wherein each of the block addition marks is directly connected to the first use case block or is indirectly connected to the first use case block through the block addition mark in an adjacent attribute area;
[0018] In response to a second preset operation of adding a mark to the block by the user, generating a second use case block at a position corresponding to the block adding mark in the other attribute area, wherein the plurality of use case blocks include the first use case block and the second use case block;
[0019] In response to a first content input operation by a user, use case content is added to the first use case diagram block and the second use case diagram block.
[0020] In an optional implementation manner, the first target attribute area is any one of the multiple attribute areas; or
[0021] The first target attribute region is a region among the multiple attribute regions that belongs to the first logical layer according to a logical relationship.
[0022] In an optional implementation, the generating of the use case based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents includes:
[0023] Determining a connection relationship between any two use case diagram blocks in the process of generating each of the first use case diagram blocks and a plurality of the second use case diagram blocks;
[0024] Determine the logical relationship between the multiple use case blocks based on the use case attribute corresponding to the attribute area where each use case block is located and the connection relationship between every two use case blocks;
[0025] A use case is generated based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0026] In an optional implementation, in response to a user input operation, multiple use case diagram blocks are generated in the multiple attribute areas, and use case content is generated in each use case diagram block, including:
[0027] In response to a third preset operation of the user on any of the plurality of attribute areas, generating a use case diagram block at an operation position corresponding to the third preset operation in the attribute area, thereby obtaining a plurality of use case diagram blocks in the plurality of attribute areas;
[0028] In response to the second content input operation of the user, corresponding use case contents are respectively added to the generated multiple use case diagram blocks.
[0029] In an optional implementation, the generating of the use case based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents includes:
[0030] In response to a fourth preset operation of the user on any two use case diagram blocks among the plurality of use case diagram blocks, determining a connection relationship between the any two use case diagram blocks;
[0031] Determine the logical relationship between the multiple use case blocks based on the use case attribute corresponding to the attribute area where each use case block is located and the connection relationship between every two use case blocks;
[0032] A use case is generated based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0033] In an optional implementation manner, after displaying the use case generation interface, the method further includes:
[0034] Determine the attribute identification information of the use case attribute corresponding to each attribute area;
[0035] The corresponding attribute identification information is displayed in each attribute area.
[0036] In an optional implementation manner, after displaying the use case generation interface, the method further includes:
[0037] Determine a second target attribute area among the multiple attribute areas, wherein the second target attribute area includes a plurality of use case diagram blocks;
[0038] If the area width of the second target attribute area is smaller than the arrangement width of the multiple use case diagram blocks in the second target attribute area, providing a content scrolling control in the second target attribute area;
[0039] In response to an operation on the content scroll control, the displayed content of the second target attribute area is adjusted within the area width.
[0040] In an optional implementation, after generating a plurality of use case diagram blocks in the plurality of attribute areas in response to the user's input operation and generating use case content in each use case diagram block, the method includes:
[0041] Displaying a tile collapse control at a location corresponding to each use case tile;
[0042] In response to a first operation of a tile folding control on a target use case tile among the multiple use case tiles, a plurality of use case tiles following the target use case tile according to a logical relationship are hidden to cancel display of the plurality of use case tiles following the target use case tile, and a tile quantity is displayed at a position corresponding to the tile folding control corresponding to the target use case tile, wherein the tile quantity is the quantity of use case tiles belonging to leaf nodes among the plurality of use case tiles following the target use case tile;
[0043] In response to a second operation on a tile folding control of a target use case tile among the multiple use case tiles, multiple use case tiles that are hidden and follow the target use case tile are expanded to display the multiple use case tiles follow the target use case tile.
[0044] The present disclosure also provides a use case generation device, the device comprising:
[0045] An interface display module, used to display a use case generation interface, wherein the use case generation interface includes a plurality of divided attribute areas, each attribute area corresponding to a use case attribute of a use case to be generated;
[0046] A block generation module, configured to generate a plurality of blocks in the plurality of attribute areas in response to an input operation of a user, and to generate use case content in each block;
[0047] A use case generation module, configured to generate a use case based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents;
[0048] A use case export module, used for, when it is necessary to export the generated use case in a spreadsheet format, using the use case attribute corresponding to each use case block in the use case as a column attribute of each use case block in a file to be exported;
[0049] The file generation module is used to export the use case according to the position corresponding to the column attribute of each use case block in the file to be exported, and generate a use case file in a spreadsheet format.
[0050] In an optional implementation manner, the interface display module is specifically used for:
[0051] In response to a user's selection of a target use case template, displaying a use case generation interface corresponding to the target use case template; or
[0052] Based on the user's interface configuration for the use case generation interface, generating a use case generation interface adapted to the interface configuration; or
[0053] Based on the use case scenario information of the use case to be generated, a use case generation interface matching the use case scenario information is generated.
[0054] In an optional implementation manner, the block generation module is specifically used to:
[0055] In response to a first preset operation of a user on a first target attribute area among the multiple attribute areas, generating a first use case diagram block in the first target attribute area;
[0056] Displaying a block addition mark at a position corresponding to the first use case block in each other attribute area of the plurality of attribute areas except the first target attribute area, wherein each of the block addition marks is directly connected to the first use case block or is indirectly connected to the first use case block through the block addition mark in an adjacent attribute area;
[0057] In response to a second preset operation of adding a mark to the block by the user, generating a second use case block at a position corresponding to the block adding mark in the other attribute area, wherein the plurality of use case blocks include the first use case block and the second use case block;
[0058] In response to a first content input operation by a user, use case content is added to the first use case diagram block and the second use case diagram block.
[0059] In an optional implementation manner, the first target attribute area is any one of the multiple attribute areas; or
[0060] The first target attribute region is a region among the multiple attribute regions that belongs to the first logical layer according to a logical relationship.
[0061] In an optional implementation manner, the use case generation module is specifically used to:
[0062] Determining a connection relationship between any two use case diagram blocks in the process of generating each of the first use case diagram blocks and a plurality of the second use case diagram blocks;
[0063] Determine the logical relationship between the multiple use case blocks based on the use case attribute corresponding to the attribute area where each use case block is located and the connection relationship between every two use case blocks;
[0064] A use case is generated based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0065] In an optional implementation manner, the block generation module is used to:
[0066] In response to a third preset operation of the user on any of the plurality of attribute areas, generating a use case diagram block at an operation position corresponding to the third preset operation in the attribute area, thereby obtaining a plurality of use case diagram blocks in the plurality of attribute areas;
[0067] In response to the second content input operation of the user, corresponding use case contents are respectively added to the generated multiple use case diagram blocks.
[0068] In an optional implementation manner, the use case generation module is used to:
[0069] In response to a fourth preset operation of the user on any two use case diagram blocks among the plurality of use case diagram blocks, determining a connection relationship between the any two use case diagram blocks;
[0070] Determine the logical relationship between the multiple use case blocks based on the use case attribute corresponding to the attribute area where each use case block is located and the connection relationship between every two use case blocks;
[0071] A use case is generated based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0072] In an optional implementation, the device further includes an information determination module, wherein the information determination module is configured to:
[0073] Determine the attribute identification information of the use case attribute corresponding to each attribute area;
[0074] The corresponding attribute identification information is displayed in each attribute area.
[0075] In an optional implementation, the device further includes an adjustment module, wherein the adjustment module is configured to:
[0076] Determine a second target attribute area among the multiple attribute areas, wherein the second target attribute area includes a plurality of use case diagram blocks;
[0077] If the area width of the second target attribute area is smaller than the arrangement width of the multiple use case diagram blocks in the second target attribute area, providing a content scrolling control in the second target attribute area;
[0078] In response to an operation on the content scroll control, the displayed content of the second target attribute area is adjusted within the area width.
[0079] In an optional embodiment, the device further comprises a folding module, wherein the folding module is used to:
[0080] Displaying a tile collapse control at a location corresponding to each use case tile;
[0081] In response to a first operation of a tile folding control on a target use case tile among the multiple use case tiles, a plurality of use case tiles following the target use case tile according to a logical relationship are hidden to cancel display of the plurality of use case tiles following the target use case tile, and a tile quantity is displayed at a position corresponding to the tile folding control corresponding to the target use case tile, wherein the tile quantity is the quantity of use case tiles belonging to leaf nodes among the plurality of use case tiles following the target use case tile;
[0082] In response to a second operation on a tile folding control of a target use case tile among the multiple use case tiles, multiple use case tiles that are hidden and follow the target use case tile are expanded to display the multiple use case tiles follow the target use case tile.
[0083] An embodiment of the present disclosure also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned use case generation method are performed.
[0084] The embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the use case generation method are executed.
[0085] The use case generation method, apparatus, device and storage medium provided by the embodiments of the present disclosure can display a use case generation interface, wherein the use case generation interface includes a plurality of divided attribute areas, each attribute area corresponding to a use case attribute of a use case to be generated; in response to a user's input operation, a plurality of use case diagram blocks are generated in the plurality of attribute areas, and use case content is generated in each use case diagram block; a use case is generated based on the logical relationship between the plurality of use case diagram blocks, the plurality of use case diagram blocks and the corresponding plurality of use case contents; when the generated use case needs to be exported in a spreadsheet format, the use case attributes corresponding to each use case diagram block in the use case are used as column attributes of each use case diagram block in the file to be exported; the use case is exported according to the position corresponding to the column attribute of each use case diagram block in the file to be exported, and a use case file in a spreadsheet format is generated.
[0086] In this way, by dividing the attribute areas in the interface, a unified default labeling of the use case attributes can be achieved. In the subsequent analysis and form conversion of the use case, it is easy to identify the attributes of the use case, reduce the difficulty of parsing the use case, facilitate the subsequent sharing and management of the use case by a multi-person team, reduce the cost of understanding, improve the efficiency of the use case form conversion, and ensure the quality of the use case form conversion.
[0087] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0089] Figure 1 A flowchart of a use case generation method provided by an embodiment of the present disclosure is shown;
[0090] Figure 2 One of the schematic diagrams of the use case generation interface provided by the embodiment of the present disclosure is shown;
[0091] Figure 3 The second schematic diagram of the use case generation interface provided by the embodiment of the present disclosure is shown;
[0092] Figure 4 A flowchart of another use case generation method provided by an embodiment of the present disclosure is shown;
[0093] Figure 5 The third schematic diagram of the use case generation interface provided by the embodiment of the present disclosure is shown;
[0094] Figure 6 A fourth schematic diagram of a use case generation interface provided in an embodiment of the present disclosure is shown;
[0095] Figure 7 The fifth schematic diagram of the use case generation interface provided by the embodiment of the present disclosure is shown;
[0096] Figure 8 One of the schematic diagrams of a use case generating device provided by an embodiment of the present disclosure is shown;
[0097] Fig. 9 A second schematic diagram of a use case generating device provided by an embodiment of the present disclosure is shown;
[0098] Fig.10 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0099] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0100] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0101] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0102] Research has found that in the process of making use cases through mind maps, it is necessary to pre-plan the attribute identifiers of each use case attribute and add attribute identifiers in each node in the use case to obtain a complete use case. Especially when multiple people need to work together to make use cases, different production personnel need to plan in advance or unify afterwards to unify the use cases. However, the marking method of use case attributes in each node is different. When parsing and converting the use case into a use case file, it is difficult to identify the true attributes of each node in the use case. The workload of attribute identification is large, the efficiency of form conversion of use cases is low, and the sharing and management of use cases are more complex and cumbersome, and the cost of understanding is high.
[0103] Based on the above research, the present disclosure provides a use case generation method. In the process of generating a use case, multiple attribute areas can be divided in the use case generation interface, each attribute area corresponds to the use case attribute of the use case to be generated, and then a use case block is generated in each attribute area and the use case content is generated in the use case block to realize the generation of the use case, and when the use case form conversion is required, the use case attribute corresponding to each use case block in the use case is used as the column attribute in the file to be exported, and then a use case file in a spreadsheet format is generated. In this way, by dividing the attribute areas in the interface, a unified default labeling of the use case attributes can be achieved. In the subsequent analysis and form conversion of the use case, it is easy to identify the attributes of the use case, reduce the difficulty of parsing the use case, facilitate the subsequent sharing and management of the use case by a multi-person team, improve the efficiency of the use case form conversion, and ensure the quality of the use case form conversion.
[0104] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0105] To facilitate understanding of this embodiment, a use case generation method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the use case generation method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example, a terminal device or a server or other processing device. In some possible implementations, the use case generation method can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0106] See also Figure 1 , Figure 1 A flowchart of a use case generation method provided by an embodiment of the present disclosure. Figure 1 As shown in , the use case generation method provided by the embodiment of the present disclosure includes:
[0107] S101: Displaying a use case generation interface, wherein the use case generation interface includes a plurality of divided attribute areas, each attribute area corresponding to a use case attribute of a use case to be generated.
[0108] In this step, during the use case generation process, after opening the tool for generating the use case, the use case generation interface is displayed, and when the use case generation interface is displayed, it can be seen that the use case generation interface includes multiple attribute areas, and each attribute area corresponds to the use case attribute of the use case to be generated.
[0109] The division of the multiple attribute areas may be distinguished by different background colors of the canvas of the use case generation interface, by different patterns of the canvas of the use case generation interface, by setting dividing lines in the use case generation interface, or by other features, and no limitation is made here.
[0110] Each attribute area corresponds to a use case attribute of the use case to be generated, which may mean that each attribute area is bound to a corresponding use case attribute to present specific content of the corresponding use case attribute.
[0111] The use case attributes show the properties of various aspects of the use case and the relationship between the use cases, including the functions of certain aspects of the use case. Through the correspondence between the use case attributes and the attribute areas, the attributes of the use case content in each attribute area can be clarified, and there is no need to infer based on the logical order or process order of the use case to determine whether the use case content in the attribute area specifically belongs to a certain aspect of the use case.
[0112] Exemplarily, a test case can be divided into several aspects, including use case title, use case classification, use case steps, preconditions and use case description. Then, the use case title, use case classification, use case steps, preconditions and use case description are the use case attributes of the test case.
[0113] Furthermore, after displaying the use case generation interface, the method further includes:
[0114] Determine the attribute identification information of the use case attribute corresponding to each attribute area;
[0115] The corresponding attribute identification information is displayed in each attribute area.
[0116] In this step, when the use case generation interface is displayed and the use case generation interface includes a plurality of divided attribute areas, the attribute identification information of the use case attribute corresponding to each attribute area can be determined, and then the corresponding attribute identification information can be displayed in each attribute area.
[0117] The attribute identification information may be presented in the form of a name, a brief introduction, or a keyword, and no limitation is made here.
[0118] For example, please also see Figure 2 , Figure 2 This is one of the schematic diagrams of the use case generation interface. In the actual application scenario of the use case generation method, the display interface of a terminal such as a smart phone, a tablet computer, or a wearable device may display a use case generation interface. The use case generation interface can be triggered by a user's operation and generates a use case in response to the operation. Figure 2 As shown in , on the use case generation interface, a plurality of divided attribute areas are displayed, and each attribute area displays attribute identification information “condition”, “step”, and “result” corresponding to the use case attribute.
[0119] S102: In response to an input operation of a user, a plurality of use case diagram blocks are generated in the plurality of attribute areas, and use case content is generated in each use case diagram block.
[0120] In this step, during the use case generation process, it can be detected whether an input operation applied by the user is received. When the user's input operation is detected, multiple use case diagram blocks can be generated in the multiple attribute areas in response to the user's input operation, and use case content can be generated in each of the use case diagram blocks.
[0121] The input operation may be performed by the same user or by different users, or part of the operation may be performed by the same user and the rest by different users. In addition, the input operation may be a physical operation, such as a touch operation performed by a touch screen, a key, a mouse or other entities of the terminal, or a voice control operation performed by a voice component of the terminal, and no limitation is made here.
[0122] The use case diagram block may be created at any position in the property area, and the shape and size of the use case diagram block may also be flexibly adjusted according to actual conditions, and no limitation is made here.
[0123] The use case content is obtained through the conditions, steps, descriptions, etc. specifically included in the use case.
[0124] For example, please also see Figure 3 , Figure 3 Generate the second interface diagram for the use case, such as Figure 3As shown in the figure, taking the use case of "following an account" as an example, on the use case generation interface, multiple attribute areas are displayed, and each attribute area displays attribute identification information corresponding to the use case attribute, and multiple use case blocks are displayed in the multiple attribute areas, and each use case block displays the use case content.
[0125] S103: Generate a use case based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0126] In this step, when multiple use case diagram blocks are generated in the multiple attribute areas, the attribute area where each use case diagram block is located is determined, and then the use case attribute corresponding to the attribute area where each use case diagram block is located is determined. In this way, the logical relationship between the multiple use case diagram blocks can be determined according to the use case attribute corresponding to the attribute area where each use case diagram block is located. After obtaining the logical relationship, the multiple use case diagram blocks and the corresponding multiple use case contents, the multiple use case diagram blocks can be sorted out based on the logical relationship, so as to display the final generated use case on the use case generation interface.
[0127] The logical relationship between the multiple use case diagram blocks may be from cause to effect, from whole to part, or from primary to secondary, and no limitation is made here.
[0128] The logical relationship between the multiple use case diagram blocks may be presented by connecting lines or by adding logical sequence identifiers, and no limitation is made here.
[0129] Among them, determining the logical relationship between the multiple use case diagram blocks can be done by traversing all the use case diagram blocks generated in the use case generation interface, extracting each use case diagram block separately, and determining the logical relationship between the use case diagram block and other use case diagram blocks; or it can be done by grouping the use case diagram blocks in each two adjacent attribute areas of all the use case diagram blocks generated in the use case generation interface into a group, and then determining the logical relationship between the use case diagram blocks in the two adjacent attribute areas, and then extracting the use case diagram blocks in an attribute area, so as to determine the logical relationship between the use case diagram blocks in an attribute area, and no limitation is made here.
[0130] S104: When the generated use case needs to be exported in a spreadsheet format, the use case attributes corresponding to each use case block in the use case are used as column attributes of each use case block in the file to be exported.
[0131] In this step, after the use case is generated, when the generated use case needs to be exported in a spreadsheet format, it is necessary to determine the column attributes of the file to be exported in the spreadsheet format. To this end, the use case attributes corresponding to each use case block in the use case can be obtained, and the use case attributes corresponding to each use case block in the use case can be used as the column attributes of each use case block in the file to be exported.
[0132] S105: Export the use case according to the position corresponding to the column attribute of each use case block in the file to be exported, and generate a use case file in a spreadsheet format.
[0133] In this step, when the use case attributes of the use case diagram block are determined as the column attributes in the file to be exported, the positions of each use case diagram block and the column attributes in the file to be exported are matched accordingly, so that the use cases are exported according to the positions corresponding to the column attributes of each use case diagram block in the file to be exported, thereby generating a use case file in a spreadsheet format.
[0134] The use case generation method provided by the embodiment of the present disclosure can display a use case generation interface, wherein the use case generation interface includes a plurality of attribute areas divided, each attribute area corresponds to the use case attribute of the use case to be generated; in response to the user's input operation, a plurality of use case blocks are generated in the plurality of attribute areas, and use case content is generated in each use case block; a use case is generated based on the logical relationship between the plurality of use case blocks, the plurality of use case blocks and the corresponding plurality of use case contents; in the case where the generated use case needs to be exported in the format of a spreadsheet, the use case attribute corresponding to each use case block in the use case is used as the column attribute of each use case block in the file to be exported; the use case is exported according to the position corresponding to the column attribute of each use case block in the file to be exported, and a use case file in the format of a spreadsheet is generated. In this way, by dividing the attribute areas in the interface, a unified default annotation of the use case attribute can be realized, and in the subsequent use case analysis and form conversion process, the attributes of the use case can be easily identified, the difficulty of analyzing the use case can be reduced, and the subsequent multi-person team can share and manage the use case, improve the efficiency of the use case form conversion, and ensure the quality of the use case form conversion.
[0135] Please also see Figure 4 , Figure 4 A flowchart of another use case generation method provided by an embodiment of the present disclosure. Figure 4 As shown in , the use case generation method provided by the embodiment of the present disclosure includes:
[0136] S401: Displaying a use case generation interface, wherein the use case generation interface includes a plurality of divided attribute areas, each attribute area corresponding to a use case attribute of a use case to be generated.
[0137] S402: In response to an input operation of a user, a plurality of use case diagram blocks are generated in the plurality of attribute areas, and use case content is generated in each use case diagram block.
[0138] S403: Generate a use case based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0139] S404: Determine a second target attribute area among the multiple attribute areas, wherein the second target attribute area includes multiple use case diagram blocks.
[0140] In this step, when the plurality of attribute areas are determined, the second target attribute area including a plurality of use case diagram blocks is obtained therefrom.
[0141] The second target attribute area is any one of the multiple attribute areas.
[0142] S405: If the area width of the second target attribute area is smaller than the arrangement width of the multiple use case diagram blocks in the second target attribute area, provide a content scrolling control in the second target attribute area.
[0143] In this step, when the second target attribute area is determined, the area width of the second target attribute area and the arrangement width of the multiple use case diagram blocks in the second target attribute area are compared. When the area width of the second target attribute area is smaller than the arrangement width of the multiple use case diagram blocks in the second target attribute area, a content scrolling control is provided for viewing content that cannot be displayed in the visual interface of the second target attribute area or outside the visual interface.
[0144] S406: In response to an operation on the content scrolling control, adjusting the displayed content of the second target attribute area within the area width.
[0145] In this step, when the content scrolling control is provided, it can be detected whether an operation applied by the user to the content scrolling control is received. When the operation applied by the user to the content scrolling control is detected, in response to the operation to the content scrolling control, the display content of the second target attribute area is adjusted within the area width to facilitate the user to view the display content of the second target attribute area.
[0146] The operation applied by the user to the content scrolling control may be a drag operation on the content scrolling control or a sliding operation on the content scrolling control, which is not limited here.
[0147] S407: When the generated use case needs to be exported in a spreadsheet format, the use case attributes corresponding to each use case block in the use case are used as column attributes of each use case block in the file to be exported.
[0148] S408: Export the use case according to the position corresponding to the column attribute of each use case block in the file to be exported, and generate a use case file in a spreadsheet format.
[0149] Among them, the description of steps S401 to S403 and steps S407 to S408 can refer to the description of steps S101 to S105, and can achieve the same technical effects and solve the same technical problems, which will not be repeated here.
[0150] Next, this embodiment will be further described in conjunction with some specific implementation methods.
[0151] In some possible implementations, step S401 includes:
[0152] In response to a user's selection of a target use case template, displaying a use case generation interface corresponding to the target use case template; or
[0153] Based on the user's interface configuration for the use case generation interface, generating a use case generation interface adapted to the interface configuration; or
[0154] Based on the use case scenario information of the use case to be generated, a use case generation interface matching the use case scenario information is generated.
[0155] In this step, the display of the use case generation interface can be realized based on the user's operation, or based on the system's provision. Specifically, it can be that in the case of determining the use scenario of the use case to be generated, it can be detected whether a selection operation for the target use case template imposed by the user is received, and in the case of detecting the user's selection operation for the target use case template, in response to the user's selection of the target use case template, the use case generation interface corresponding to the target use case template can be displayed in the use case generation interface; it can also be detected whether an interface configuration operation for the use case generation interface imposed by the user is received, and in the case of detecting the user's interface configuration operation for the use case generation interface, in response to the user's interface configuration for the use case generation interface, a use case generation interface adapted to the interface configuration can be generated in the use case generation interface; it can also be based on the use case scenario information of the use case to be generated, and a use case generation interface matching the use case scenario information is generated.
[0156] The target use case template includes a plurality of fixed modes for generating use cases, and the user can select a suitable target use case template based on the use case scenario information of the use case to be generated.
[0157] Among them, the user's interface configuration for the use case generation interface can be that the user customizes to create a blank use case generation interface, then divides the use case generation interface into multiple attribute areas and sets the attribute identification information in each attribute area; or the user selects the target use case template and then changes the use case generation interface corresponding to the selected target use case template according to personal needs, and no limitation is made here.
[0158] In some possible implementations, step S402 includes:
[0159] In response to a first preset operation of a user on a first target attribute area among the multiple attribute areas, generating a first use case diagram block in the first target attribute area;
[0160] Displaying a block addition mark at a position corresponding to the first use case block in each other attribute area of the plurality of attribute areas except the first target attribute area, wherein each of the block addition marks is directly connected to the first use case block or is indirectly connected to the first use case block through the block addition mark in an adjacent attribute area;
[0161] In response to a second preset operation of adding a mark to the block by the user, generating a second use case block at a position corresponding to the block adding mark in the other attribute area, wherein the plurality of use case blocks include the first use case block and the second use case block;
[0162] In response to a first content input operation by a user, use case content is added to the first use case diagram block and the second use case diagram block.
[0163] In this step, during the use case generation process, it can be detected whether a first preset operation applied by the user to the first target attribute area among the multiple attribute areas is received. When the first preset operation applied by the user to the first target attribute area among the multiple attribute areas is detected, a first use case diagram block can be generated in the first target attribute area in response to the user's first preset operation for the first target attribute area among the multiple attribute areas. When the first use case diagram block is generated, other attribute areas other than the target attribute area among the multiple attribute areas are determined, and a block addition mark is displayed at a position corresponding to the first use case diagram block in each other attribute area. Specifically, each of the block addition marks is directly connected to the first use case diagram block or is indirectly connected to the first use case diagram block through the block addition mark in the adjacent attribute area.
[0164] When the tile adding mark is displayed, it can be detected whether a second preset operation of the user for adding a mark to the tile is received. When the second preset operation of the user for adding a mark to the tile is detected, in response to the second preset operation of the user for adding a mark to the tile, a second use case block can be generated at a position corresponding to the tile adding mark in the other attribute area. At this time, the multiple use case blocks include the first use case block and the second use case block.
[0165] When generating the first use case diagram block and the second use case diagram block, it can be detected whether a first content input operation applied by the user is received. When the first content input operation applied by the user is detected, use case content is added to the first use case diagram block and the second use case diagram block in response to the first content input operation of the user.
[0166] The first target attribute area and the second target attribute area may be the same attribute area or different attribute areas.
[0167] The input operation may include the first preset operation, the second preset operation and the first content operation.
[0168] For example, please also see Figure 5 , Figure 5 Generate the third interface diagram for the use case, such as Figure 5 As shown in , taking the use case of "following an account" as an example, after generating the first use case block with the use case content "Account A does not follow Account B" in the attribute area with the attribute identification information being "Condition", a block addition mark 510 is displayed at a position corresponding to the first use case block with the use case content "Account A does not follow Account B" in the attribute area with the attribute identification information being "Step", and the block addition mark 510 is directly connected to the first use case block, and a block addition mark 520 is displayed at a position corresponding to the first use case block with the use case content "Account A does not follow Account B" in the attribute area with the attribute identification information being "Result", and the block addition mark 520 is indirectly connected to the first use case block through the block addition mark 510.
[0169] In some possible implementation manners, the first target attribute area is any one of the multiple attribute areas; or
[0170] The first target attribute region is a region among the multiple attribute regions that belongs to the first logical layer according to a logical relationship.
[0171] In some possible implementations, step S403 includes:
[0172] Determining a connection relationship between any two use case diagram blocks in the process of generating each of the first use case diagram blocks and a plurality of the second use case diagram blocks;
[0173] Determine the logical relationship between the multiple use case blocks based on the use case attribute corresponding to the attribute area where each use case block is located and the connection relationship between every two use case blocks;
[0174] A use case is generated based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0175] In this step, in the process of generating multiple use case diagram blocks, the connection relationship between any two use case diagram blocks in the process of generating each of the first use case diagram blocks and multiple of the second use case diagram blocks is determined, and then, the use case attributes corresponding to the attribute area where each use case diagram block is located can be determined, and then, based on the use case attributes corresponding to the attribute area where each use case diagram block is located and the connection relationship between every two user blocks, the logical relationship between the multiple use case diagram blocks is determined. After obtaining the logical relationship, the multiple use case diagram blocks and the corresponding multiple use case contents, the multiple use case diagram blocks can be sorted out based on the logical relationship, so as to display the final generated use case on the use case generation interface.
[0176] Exemplarily, the logical relationship between the multiple use case diagram blocks can be presented in the form of connecting lines.
[0177] The blocks may be connected by straight lines, right-angled lines, or rounded-angled lines, and there is no limitation on this.
[0178] After connecting the blocks, the multiple blocks may be arranged according to a certain rule.
[0179] Exemplarily, the positional relationship between the tiles in the same vertical column includes but is not limited to left alignment, horizontal centerline alignment, and right alignment; the positional relationship between the tiles in the same horizontal row includes but is not limited to top alignment, vertical centerline alignment, and bottom alignment, and no limitation is made here.
[0180] In some possible implementations, step S402 includes:
[0181] In response to a third preset operation of the user on any of the plurality of attribute areas, generating a use case diagram block at an operation position corresponding to the third preset operation in the attribute area, thereby obtaining a plurality of use case diagram blocks in the plurality of attribute areas;
[0182] In response to the second content input operation of the user, corresponding use case contents are respectively added to the generated multiple use case diagram blocks.
[0183] In this step, during the use case generation process, it can be detected whether a third preset operation applied by the user to any of the multiple attribute areas is received. In the case of detecting the third preset operation applied by the user to any of the multiple attribute areas, in response to the third preset operation of the user to any of the multiple attribute areas, a use case diagram block can be generated at the operation position corresponding to the third preset operation in the attribute area, thereby obtaining multiple use case diagram blocks in the multiple attribute areas. In the case of obtaining multiple use case diagram blocks in the multiple attribute areas, it can be detected whether a second content input operation applied by the user is received. In the case of detecting the second content input operation applied by the user, corresponding use case contents can be added to the generated multiple use case diagram blocks in response to the second content input operation of the user.
[0184] The input operation may include the third preset operation and the second content input operation.
[0185] In some possible implementations, step S403 includes:
[0186] In response to a fourth preset operation of the user on any two use case diagram blocks among the plurality of use case diagram blocks, determining a connection relationship between the any two use case diagram blocks;
[0187] Determine the logical relationship between the multiple use case blocks based on the use case attribute corresponding to the attribute area where each use case block is located and the connection relationship between every two use case blocks;
[0188] A use case is generated based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0189] In this step, when multiple use case diagram blocks are generated, it can be detected whether a fourth preset operation applied by the user for any two use case diagram blocks among the multiple use case diagram blocks is received. When the fourth preset operation applied by the user for any two use case diagram blocks among the multiple use case diagram blocks is detected, in response to the fourth preset operation of the user for any two use case diagram blocks among the multiple use case diagram blocks, the connection relationship between the any two use case diagram blocks can be determined, and then, the use case attributes corresponding to the attribute area where each use case diagram block is located can be determined, so as to determine the logical relationship between the multiple use case diagram blocks based on the use case attributes corresponding to the attribute area where each use case diagram block is located and the connection relationship between each two user blocks. After obtaining the logical relationship, the multiple use case diagram blocks and the corresponding multiple use case contents, the multiple use case diagram blocks can be sorted out based on the logical relationship, so as to display the finally generated use case on the use case generation interface.
[0190] In some possible implementations, the method further includes:
[0191] Displaying a tile collapse control at a location corresponding to each use case tile;
[0192] In response to a first operation of a tile folding control on a target use case tile among the multiple use case tiles, a plurality of use case tiles following the target use case tile according to a logical relationship are hidden to cancel display of the plurality of use case tiles following the target use case tile, and a tile quantity is displayed at a position corresponding to the tile folding control corresponding to the target use case tile, wherein the tile quantity is the quantity of use case tiles belonging to leaf nodes among the plurality of use case tiles following the target use case tile;
[0193] In response to a second operation on a tile folding control of a target use case tile among the multiple use case tiles, multiple use case tiles that are hidden and follow the target use case tile are expanded to display the multiple use case tiles follow the target use case tile.
[0194] In this step, when there are too many use case blocks in a certain attribute area, resulting in that the attribute area occupies a relatively large proportion of the use case generation interface, the text in the use case generation interface can be reduced by hiding the use case blocks and only displaying the number of the hidden use case blocks, so that the use case generation interface is more concise. Specifically, it can be determined first to display a block folding control at a position corresponding to each use case block, and it can be detected whether a first operation of a block folding control applied by a user to a target use case block among the multiple use case blocks is received. When the first operation of a block folding control applied by a user to a target use case block among the multiple use case blocks is detected, in response to the first operation of a block folding control applied by the user to a target use case block among the multiple use case blocks, multiple use case blocks after the target use case block according to a logical relationship are hidden to cancel the display of the multiple use case blocks after the target use case block, and the number of blocks is displayed at a position corresponding to the block folding control corresponding to the target use case block, and the number of blocks is the number of use case blocks belonging to leaf nodes among the multiple use case blocks after the target use case block.
[0195] Further, in the case of hiding the multiple use case diagram blocks, it can be detected whether a second operation of the tile folding control applied by the user to the target use case diagram block among the multiple use case diagram blocks is received. Upon detecting the second operation of the tile folding control applied by the user to the target use case diagram block among the multiple use case diagram blocks, in response to the second operation of the tile folding control to the target use case diagram block among the multiple use case diagram blocks, the hidden multiple use case diagram blocks after the target use case diagram block can be expanded to display the multiple use case diagram blocks after the target use case diagram block.
[0196] Among them, the first operation of the tile folding control for the target use case block among the multiple use case blocks, and the second operation of the tile folding control for the target use case block among the multiple use case blocks, are operations applied to the same tile folding control, and the specific user-applied actions may be the same action or different actions. In addition, the user-applied actions include but are not limited to click, long press, and double-click actions on the tile folding control. Specifically, when the state of the use case block is displayed, the operation applied to the tile folding control is the first operation, and when the state of the use case block is hidden, the operation applied to the tile folding control is the second operation.
[0197] Among them, the multiple use case diagram blocks that follow the target use case diagram block according to the logical relationship refer to all the use case diagram blocks on the use case generation interface that are arranged in order according to the logical relationship to form a logical chain, and according to the logical chain, the use case diagram blocks that are sequentially located behind the target use case diagram block.
[0198] For example, please also see Figure 6 and Figure 7 ,like Figure 6 As shown in , this example takes the use case of "following an account" as an example, and two use case tiles are displayed in the attribute area with the attribute identification information of "result". When the first operation applied by the user to the tile folding control 610 is detected, as shown in Figure 7 As shown in , the two use case diagram blocks in the attribute area with the attribute identification information of “result” are hidden, and only the number “2” of the hidden use case diagram blocks is displayed.
[0199] Further, such as Figure 7 As shown in , the two use case diagram blocks in the attribute area with the attribute identification information of "result" are hidden, and only the number "2" of the hidden use case diagram blocks is displayed. When the second operation applied by the user to the tile folding control 610 is detected, as shown in Figure 6 As shown in the figure, the two hidden use case blocks corresponding to the quantity "2" are expanded.
[0200] In some possible implementations, when the content of a use case needs to change its corresponding use case attributes, the attribute area where the block needs to be moved can be determined, and then the block that needs to be moved in the attribute area can be moved to other attribute areas except the attribute area where the block is currently located. Based on the movement of the block, the use case content of the moved block remains unchanged, and the attributes of the moved block are adjusted from the use case attributes corresponding to the attribute area where the moved block was originally located to the use case attributes corresponding to the attribute area after the move.
[0201] For example, the use case content in a certain block is "Return to Home Page". Currently, the block is in the attribute area whose attribute identification information is "Expected Result". If, during the use case generation process, it is found that the use case content of "Return to Home Page" does not actually belong to the expected result, but to the use case step, then the block with the use case content of "Return to Home Page" can be directly moved from the attribute area with the attribute identification information of "Expected Result" to the attribute area with the attribute identification information of "Use Case Step". This can achieve the adjustment of the use case attributes corresponding to the block with the use case content of "Return to Home Page".
[0202] The movement of the blocks may be along the lines between the blocks, or may be without any limitation on the movement route, which is not limited here.
[0203] In some possible implementations, since the concept of the root node is not applied in the process of generating use cases, but the content at the root node level is needed in the subsequent use case form conversion, it is necessary to supplement a root node and its content. Specifically, based on the use case attributes of the use case to be generated, the name of the use case in the use case generation interface is determined, so that the name of the use case is used as the content of the root node of the use case, thereby achieving the correspondence between the name of the current use case and the use case after the conversion of the display form.
[0204] In some possible implementations, the width of the attribute area can be adjusted, so as to flexibly set the width ratio of each attribute area in the use case generation interface.
[0205] The use case generation method provided by the embodiment of the present disclosure can divide the use case generation interface into multiple attribute areas during the process of generating use cases, each attribute area corresponds to the use case attribute of the use case to be generated, and then generate a use case block in each attribute area and generate the use case content in the use case block to realize the generation of the use case, and when the use case form conversion is required, the use case attribute corresponding to each use case block in the use case is used as the column attribute in the file to be exported, and then generate the use case file in the spreadsheet format. In this way, by dividing the attribute areas in the interface, a unified default labeling of the use case attributes can be achieved, and in the subsequent use case analysis and form conversion process, it is easy to identify the attributes of the use case, reduce the difficulty of parsing the use case, facilitate the subsequent sharing and management of the use case by a multi-person team, improve the efficiency of the use case form conversion, and ensure the quality of the use case form conversion.
[0206] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0207] Based on the same inventive concept, the embodiment of the present disclosure also provides a use case generation device corresponding to the use case generation method. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned use case generation method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0208] See also Figure 8 , Fig. 9 , Figure 8 This is one of the schematic diagrams of a use case generation device provided in an embodiment of the present disclosure, Fig. 9 The second schematic diagram of a use case generation device provided in an embodiment of the present disclosure.
[0209] like Figure 8 As shown in , the use case generation device 800 provided in the embodiment of the present disclosure includes:
[0210] The interface display module 810 is used to display a use case generation interface, wherein the use case generation interface includes a plurality of divided attribute areas, each attribute area corresponding to a use case attribute of a use case to be generated.
[0211] The block generation module 820 is used to generate a plurality of blocks in the plurality of attribute areas in response to a user input operation, and to generate use case content in each of the blocks.
[0212] The use case generation module 830 is used to generate a use case based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0213] The use case export module 840 is used to use the use case attributes corresponding to each use case block in the use case as the column attributes of each use case block in the file to be exported when the generated use case needs to be exported in a spreadsheet format.
[0214] The file generation module 850 is used to export the use cases according to the position corresponding to the column attribute of each use case block in the file to be exported, and generate a use case file in a spreadsheet format.
[0215] In an optional implementation manner, the display module 810 is specifically used for:
[0216] In response to a user's selection of a target use case template, displaying a use case generation interface corresponding to the target use case template; or
[0217] Based on the user's interface configuration for the use case generation interface, generating a use case generation interface adapted to the interface configuration; or
[0218] Based on the use case scenario information of the use case to be generated, a use case generation interface matching the use case scenario information is generated.
[0219] In an optional implementation manner, the block generation module 820 is specifically used to:
[0220] In response to a first preset operation of a user on a first target attribute area among the multiple attribute areas, generating a first use case diagram block in the first target attribute area;
[0221] Displaying a block addition mark at a position corresponding to the first use case block in each other attribute area of the plurality of attribute areas except the first target attribute area, wherein each of the block addition marks is directly connected to the first use case block or is indirectly connected to the first use case block through the block addition mark in an adjacent attribute area;
[0222] In response to a second preset operation of adding a mark to the block by the user, generating a second use case block at a position corresponding to the block adding mark in the other attribute area, wherein the plurality of use case blocks include the first use case block and the second use case block;
[0223] In response to a first content input operation by a user, use case content is added to the first use case diagram block and the second use case diagram block.
[0224] In an optional implementation manner, the first target attribute area is any one of the multiple attribute areas; or
[0225] The first target attribute region is a region among the multiple attribute regions that belongs to the first logical layer according to a logical relationship.
[0226] In an optional implementation manner, the use case generation module 830 is specifically used to:
[0227] Determining a connection relationship between any two use case diagram blocks in the process of generating each of the first use case diagram blocks and a plurality of the second use case diagram blocks;
[0228] Determine the logical relationship between the multiple use case blocks based on the use case attribute corresponding to the attribute area where each use case block is located and the connection relationship between every two use case blocks;
[0229] A use case is generated based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0230] In an optional implementation manner, the block generation module 820 is used to:
[0231] In response to a third preset operation of the user on any of the plurality of attribute areas, generating a use case diagram block at an operation position corresponding to the third preset operation in the attribute area, thereby obtaining a plurality of use case diagram blocks in the plurality of attribute areas;
[0232] In response to the second content input operation of the user, corresponding use case contents are respectively added to the generated multiple use case diagram blocks.
[0233] In an optional implementation manner, the use case generation module 830 is used to:
[0234] In response to a fourth preset operation of the user on any two use case diagram blocks among the plurality of use case diagram blocks, determining a connection relationship between the any two use case diagram blocks;
[0235] Determine the logical relationship between the multiple use case blocks based on the use case attribute corresponding to the attribute area where each use case block is located and the connection relationship between every two use case blocks;
[0236] A use case is generated based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
[0237] In an optional implementation, if Fig. 9 As shown in , the use case generating device further includes an information determining module 860 , an adjusting module 870 , and a folding module 880 .
[0238] The information determination module 860 is used to:
[0239] Determine the attribute identification information of the use case attribute corresponding to each attribute area;
[0240] The corresponding attribute identification information is displayed in each attribute area.
[0241] The adjustment module 870 is used to:
[0242] Determine a second target attribute area among the multiple attribute areas, wherein the second target attribute area includes a plurality of use case diagram blocks;
[0243] If the area width of the second target attribute area is smaller than the arrangement width of the multiple use case diagram blocks in the second target attribute area, providing a content scrolling control in the second target attribute area;
[0244] In response to an operation on the content scroll control, the displayed content of the second target attribute area is adjusted within the area width.
[0245] The folding module 880 is used for:
[0246] Displaying a tile collapse control at a location corresponding to each use case tile;
[0247] In response to a first operation of a tile folding control on a target use case tile among the multiple use case tiles, a plurality of use case tiles following the target use case tile according to a logical relationship are hidden to cancel display of the plurality of use case tiles following the target use case tile, and a tile quantity is displayed at a position corresponding to the tile folding control corresponding to the target use case tile, wherein the tile quantity is the quantity of use case tiles belonging to leaf nodes among the plurality of use case tiles following the target use case tile;
[0248] In response to a second operation on a tile folding control of a target use case tile among the multiple use case tiles, multiple use case tiles that are hidden and follow the target use case tile are expanded to display the multiple use case tiles follow the target use case tile.
[0249] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0250] The use case generation device provided by the embodiment of the present disclosure can divide the use case generation interface into multiple attribute areas during the process of generating use cases, each attribute area corresponds to the use case attribute of the use case to be generated, and then generate a use case block in each attribute area and generate the use case content in the use case block to realize the generation of the use case, and when the use case form conversion is required, the use case attribute corresponding to each use case block in the use case is used as the column attribute in the file to be exported, and then generate the use case file in the spreadsheet format. In this way, by dividing the attribute areas in the interface, a unified default labeling of the use case attributes can be achieved, and in the subsequent use case analysis and form conversion process, it is easy to identify the attributes of the use case, reduce the difficulty of parsing the use case, facilitate the subsequent sharing and management of the use case by a multi-person team, improve the efficiency of the use case form conversion, and ensure the quality of the use case form conversion.
[0251] Corresponding to the above-mentioned use case generation method, the embodiment of the present disclosure further provides an electronic device 1000, such as Fig.10 FIG. 1 is a schematic diagram of the structure of an electronic device 1000 provided in an embodiment of the present disclosure, including:
[0252] Processor 1010, memory 1020, and bus 1030; memory 1020 is used to store execution instructions, including internal memory 1021 and external memory 1022; the internal memory 1021 here is also called internal memory, which is used to temporarily store the calculation data in the processor 1010, as well as the data exchanged with the external memory 1022 such as the hard disk. The processor 1010 exchanges data with the external memory 1022 through the internal memory 1021. When the electronic device 1000 is running, the processor 1010 communicates with the memory 1020 through the bus 1030, so that the processor 1010 can execute the steps of the above-mentioned use case generation method.
[0253] The specific execution process of the above instructions can refer to the steps of the use case generation method described in the embodiment of the present disclosure, which will not be repeated here.
[0254] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the use case generation method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0255] The present disclosure also provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the steps of the use case generation method described in the above method embodiment can be executed. For details, please refer to the above method embodiment, which will not be repeated here.
[0256] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0257] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0258] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0259] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0260] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0261] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A use case generation method, characterized in that: The method comprises: Displaying a use case generation interface, the use case generation interface includes a plurality of divided attribute areas, each attribute area is correspondingly bound to a use case attribute of a use case to be generated, and attribute identification information of a corresponding use case attribute is displayed in each attribute area; In response to input operations of the user in the plurality of attribute areas, generating a plurality of use case diagram blocks in the plurality of attribute areas, and generating use case content in each use case diagram block; Determine the logical relationship between the multiple use case diagram blocks according to the use case attribute corresponding to the attribute area where each use case diagram block is located, and generate a use case based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents; In the case where the generated use case needs to be exported in a spreadsheet format, the use case attributes corresponding to each use case block in the use case are used as column attributes of each use case block in the file to be exported; Export the use case according to the position of each use case block in the column attribute of the file to be exported, and generate a use case file in spreadsheet format. The step of generating a plurality of use case diagram blocks in the plurality of attribute areas in response to the user's input operation in the plurality of attribute areas, and generating use case content in each use case diagram block includes: In response to a first preset operation of a user on a first target attribute area among the multiple attribute areas, generating a first use case diagram block in the first target attribute area; Displaying a block addition mark at a position corresponding to the first use case block in each other attribute area of the plurality of attribute areas except the first target attribute area, wherein each of the block addition marks is directly connected to the first use case block or is indirectly connected to the first use case block through the block addition mark in an adjacent attribute area; In response to a second preset operation of adding a mark to the block by the user, generating a second use case block at a position corresponding to the block adding mark in the other attribute area, wherein the plurality of use case blocks include the first use case block and the second use case block; In response to a first content input operation by a user, use case content is added to the first use case diagram block and the second use case diagram block.
2. The method according to claim 1, characterized in that The display use case generation interface includes: In response to a user's selection of a target use case template, displaying a use case generation interface corresponding to the target use case template; or Based on the user's interface configuration for the use case generation interface, generating a use case generation interface adapted to the interface configuration; or Based on the use case scenario information of the use case to be generated, a use case generation interface matching the use case scenario information is generated.
3. The method according to claim 1, characterized in that The first target attribute area is any one of the multiple attribute areas; or The first target attribute region is a region among the multiple attribute regions that belongs to the first logical layer according to a logical relationship.
4. The method according to claim 1, characterized in that: The generating of the use case based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents includes: Determining a connection relationship between any two use case diagram blocks in the process of generating each of the first use case diagram blocks and a plurality of the second use case diagram blocks; Determine the logical relationship between the multiple use case blocks based on the use case attribute corresponding to the attribute area where each use case block is located and the connection relationship between every two use case blocks; A use case is generated based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
5. The method according to claim 1, characterized in that In response to the user's input operation in the multiple attribute areas, multiple use case diagram blocks are generated in the multiple attribute areas, and use case content is generated in each use case diagram block, including: In response to a third preset operation of the user on any of the plurality of attribute areas, generating a use case diagram block at an operation position corresponding to the third preset operation in the attribute area, thereby obtaining a plurality of use case diagram blocks in the plurality of attribute areas; In response to the second content input operation of the user, corresponding use case contents are respectively added to the generated multiple use case diagram blocks.
6. The method according to claim 1, characterized in that The generating of the use case based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents includes: In response to a fourth preset operation of the user on any two use case diagram blocks among the plurality of use case diagram blocks, determining a connection relationship between the any two use case diagram blocks; Determine the logical relationship between the multiple use case blocks based on the use case attribute corresponding to the attribute area where each use case block is located and the connection relationship between every two use case blocks; A use case is generated based on the logical relationship between the multiple use case diagram blocks, the multiple use case diagram blocks and the corresponding multiple use case contents.
7. The method according to claim 1, characterized in that After displaying the use case generation interface, the method further includes: Determine a second target attribute area among the multiple attribute areas, wherein the second target attribute area includes a plurality of use case diagram blocks; If the area width of the second target attribute area is smaller than the arrangement width of the multiple use case diagram blocks in the second target attribute area, providing a content scrolling control in the second target attribute area; In response to an operation on the content scroll control, the displayed content of the second target attribute area is adjusted within the area width.
8. The method according to claim 1, characterized in that After generating a plurality of use case diagram blocks in the plurality of attribute areas in response to the user's input operation in the plurality of attribute areas, and generating use case content in each use case diagram block, the method includes: Displaying a tile collapse control at a location corresponding to each use case tile; In response to a first operation of a tile folding control on a target use case tile among the multiple use case tiles, a plurality of use case tiles following the target use case tile according to a logical relationship are hidden to cancel display of the plurality of use case tiles following the target use case tile, and a tile quantity is displayed at a position corresponding to the tile folding control corresponding to the target use case tile, wherein the tile quantity is the quantity of use case tiles belonging to leaf nodes among the plurality of use case tiles following the target use case tile; In response to a second operation on a tile folding control of a target use case tile among the multiple use case tiles, multiple use case tiles that are hidden and follow the target use case tile are expanded to display the multiple use case tiles follow the target use case tile.
9. A use case generation device, characterized in that: The device comprises: An interface display module, used to display a use case generation interface, wherein the use case generation interface includes a plurality of divided attribute areas, each attribute area is bound to a use case attribute of a use case to be generated, and attribute identification information of a corresponding use case attribute is displayed in each attribute area; A block generation module, configured to generate a plurality of use case blocks in the plurality of attribute areas in response to an input operation of a user in the plurality of attribute areas, and to generate use case content in each use case block; A use case generation module, configured to determine the logical relationship between the multiple use case blocks according to the use case attributes corresponding to the attribute area where each use case block is located, and generate a use case based on the logical relationship between the multiple use case blocks, the multiple use case blocks and the corresponding multiple use case contents; A use case export module, used for, when it is necessary to export the generated use case in a spreadsheet format, using the use case attribute corresponding to each use case block in the use case as a column attribute of each use case block in a file to be exported; The file generation module is used to export the use case according to the position corresponding to the column attribute of each use case block in the file to be exported, and generate a use case file in a spreadsheet format. Wherein, the block generation module is further configured as follows: In response to a first preset operation of a user on a first target attribute area among the multiple attribute areas, generating a first use case diagram block in the first target attribute area; Displaying a block addition mark at a position corresponding to the first use case block in each other attribute area of the plurality of attribute areas except the first target attribute area, wherein each of the block addition marks is directly connected to the first use case block or is indirectly connected to the first use case block through the block addition mark in an adjacent attribute area; In response to a second preset operation of adding a mark to the block by the user, generating a second use case block at a position corresponding to the block adding mark in the other attribute area, wherein the plurality of use case blocks include the first use case block and the second use case block; In response to a first content input operation by a user, use case content is added to the first use case diagram block and the second use case diagram block.
10. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the use case generation method as described in any one of claims 1 to 8 are performed.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the use case generation method according to any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Test case management method, device and system, and computer readable storage medium
CN108874671A
Menu visualization configuration method, device, and computer-readable storage medium
CN109284152A