A test case processing method, device, equipment and medium
By performing format conversion and deduplication on tabular test case files, the problems of data redundancy and low readability during the conversion of test case files from tabular to mind map format are solved, achieving more efficient data processing and maintenance.
Patent Information
- Application Number
- CN202410226969.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-28
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2044-02-28
AI Technical Summary
In existing technologies, converting test cases from table format to mind map format results in data redundancy and low readability, leading to low maintenance efficiency.
By obtaining test case files in tabular format, converting them into a mind map data structure, and deduplicating and integrating the element node data of multiple test cases, the final test case files are converted into mind map format using a mind mapping tool.
This avoids data redundancy in mind map formats, improves data readability, and avoids repetitive work during subsequent maintenance, thus improving maintenance efficiency.
Smart Images

Figure CN118093401B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of communication, and particularly relates to a test case processing method and device, equipment and medium. BACKGROUND
[0002] In order to ensure the normal operation of an application program, the application program can be tested by a test case. The test case can be written in multiple formats, and mind maps are increasingly applied due to their stronger hierarchical advantages. In the related art, a test case in a table format can be converted into a mind map format for use, but there are defects of data redundancy, low readability and low maintenance efficiency during the conversion, which need to be improved. SUMMARY
[0003] In order to solve the above technical problems, the present disclosure provides a test case processing method, device, equipment and medium.
[0004] The present disclosure provides a test case processing method, which comprises the following steps:
[0005] obtaining a first test case file in a table format;
[0006] performing format conversion on first data corresponding to the first test case file to obtain second data in a mind map data structure;
[0007] performing deduplication and integration processing on element node data of multiple test cases in the second data to obtain third data;
[0008] converting the third data into a second test case file in a mind map format by using a mind map tool.
[0009] The present disclosure also provides a test case processing device, which comprises the following modules:
[0010] an obtaining module, configured to obtain a first test case file in a table format;
[0011] a conversion module, configured to perform format conversion on first data corresponding to the first test case file to obtain second data in a mind map data structure;
[0012] an integration module, configured to perform deduplication and integration processing on element node data of multiple test cases in the second data to obtain third data;
[0013] a file module, configured to convert the third data into a second test case file in a mind map format by using a mind map tool.
[0014] The embodiment of the present disclosure further provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used for reading the executable instructions from the memory and executing the instructions to realize the processing method of the test case provided by the embodiment of the present disclosure.
[0015] The embodiment of the present disclosure further provides a computer readable storage medium, which stores a computer program for executing the processing method of the test case provided by the embodiment of the present disclosure.
[0016] The technical scheme provided by the embodiment of the present disclosure has the following advantages compared with the prior art: the processing scheme of the test case provided by the embodiment of the present disclosure acquires a first test case file in table format; the first data corresponding to the first test case file is format-converted to obtain second data in the data structure of mind map; the element node data of multiple test cases in the second data is de-duplicated and integrated to obtain third data; and the third data is converted into a second test case file in the format of mind map by a mind map tool. By adopting the above technical scheme, the data in the format of mind map data structure is obtained by format-converting the data of the test case file in the table format, and the test case file in the format of mind map can be converted by the mind map tool after the de-duplication and integration processing of the element node data of the test case in the data. In the conversion process of the test case file from the table format to the format of mind map, the data redundancy problem existing in the converted test case file in the format of mind map is avoided through the de-duplication and integration processing, which can help users quickly find the required data, improve the readability of the data, and avoid repeated work in subsequent maintenance, thereby improving the maintenance efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0017] The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent by thoroughly examining the following detailed description, the accompanying drawings, and the appended claims taken in conjunction with the preceding summary. Identical or similar components are identified with identical or similar reference numerals throughout the various figures. It should be understood that the figures are diagrammatic and elements and features do not necessarily appear in proportion to one another.
[0018] Figure 1 A flowchart of the processing method of the test case provided by some embodiments of the present disclosure is shown in the figure;
[0019] Figure 2 A schematic diagram of the first test case file provided by some embodiments of the present disclosure is shown in the figure;
[0020] Figure 3 A schematic diagram of the second test case file provided by some embodiments of the present disclosure is shown in the figure;
[0021] Figure 4Another second test case file provided for some embodiments of the present disclosure;
[0022] Figure 5 A diagram after data splitting provided for some embodiments of the present disclosure;
[0023] Figure 6 Another first test case file provided for some embodiments of the present disclosure;
[0024] Figure 7 A diagram of a second test case file of a first structure type provided for some embodiments of the present disclosure;
[0025] Figure 8 A diagram of a second test case file of a second structure type provided for some embodiments of the present disclosure;
[0026] Figure 9 Another second test case file provided for some embodiments of the present disclosure;
[0027] Figure 10 A structural diagram of a test case processing apparatus provided for an embodiment of the present disclosure;
[0028] Figure 11 A structural diagram of an electronic device provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure will be described below in greater detail with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein, but rather, the embodiments are provided so that the present disclosure can be more thoroughly and completely understood. It should be understood that the drawings of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
[0030] It should be understood that the various steps of the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] The term "comprising" and variations thereof as used herein are open-ended, that is, "comprising but not limited to." The term "based on" is "based, at least in part, on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments." Related terms are defined in the description that follows.
[0032] It should be noted that the terms "first", "second", and the like in the present disclosure are only used to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the terms "one", "multiple" in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless otherwise explicitly indicated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between the plurality of devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0035] In order to solve the problems existing in the processing of test cases in the related art, the present disclosure provides a test case processing method, which will be introduced below in combination with specific embodiments.
[0036] Figure 1 The flowchart of the test case processing method provided by some embodiments of the present disclosure is shown in the figure. The method can be executed by a test case processing device, which can be implemented by software and / or hardware, and can be integrated in an electronic device. As shown in the figure, the method comprises the following steps. Figure 1
[0037] Step 101, obtaining a first test case file in table format.
[0038] A test case (TC) can be a specific description of testing the function or page of an application, and a test case can include multiple element data. Element data refers to data corresponding to an element, and an element refers to the attributes of a test case, which can include directory, title, precondition, step, expected result, priority, etc. For example, before an application goes online, it needs to test whether the login function is normal. The corresponding test case can include four element data, namely title: login function, precondition: enter login page, step: input account, password, click login, and expected result: successful login and jump to homepage.
[0039] The first test case file can be a file for managing multiple test cases in table format, which can include online tables, offline tables, etc.
[0040] The processing apparatus of the test case can obtain a first test case file in table format, and the specific obtaining manner is not limited. For example, the first test case file manually written and stored can be obtained, or a plurality of requirement contents can be input into a large language model to output a corresponding first test case file including a plurality of test cases by analysis. One requirement content can include requirement name, requirement background, function description, product design details and the like, and can be input in the form of a document.
[0041] In step 102, the first data corresponding to the first test case file is converted in format to obtain second data in the mind map data structure.
[0042] The first data can be data obtained by traversing and reading the first test case file, and the specific format is not limited, for example, it can be in array format or JSON format. The second data can be data converted from the first data to the mind map data structure from the previous format. The mind map data structure can be a data structure that can be recognized, converted and rendered into a mind map format by a mind map tool, and has a nested relationship.
[0043] The processing apparatus of the test case can obtain a first test case file in table format, and the specific obtaining manner is not limited. For example, the first test case file manually written and stored can be obtained, or a plurality of requirement contents can be input into a large language model to output a corresponding first test case file including a plurality of test cases by analysis. One requirement content can include requirement name, requirement background, function description, product design details and the like, and can be input in the form of a document.
[0044] In some embodiments, the first data corresponding to the first test case file is converted in format to obtain second data in the mind map data structure, including: reading the data of the cells of the multiple rows of the first test case file to obtain multiple test cases, and determining the array obtained by combining the multiple test cases as the first data, wherein one test case includes the data of the multiple cells of one row; setting the key element data in each test case in the first data as nested element node data, and storing in the mind map data structure to obtain the second data.
[0045] Each row in the first test case file corresponds to one test case, and each column corresponds to an element of the test case. Reading the data of the multiple cells of each row can obtain multiple element data of one test case. The key element data is the data corresponding to the key element. The key element can be an element necessary for the execution of a test case. A test case is incomplete without key element data. In the embodiments of the present disclosure, the key elements can at least include four kinds of title, precondition, step and expected result, and can also include directory, priority and the like, which can be set according to actual conditions. The element node data can be data representing that the element data can exist as a mind map node in the mind map format by nesting. One element node data includes a specific element and data corresponding to the element.
[0046] The processing apparatus of the test case can first read the multiple cells of the first row of the test case file, that is, the table header, to obtain multiple elements of the test case, and then traverse to read the data of each cell of each row after the first row as multiple element data of a test case, and further obtain multiple test cases. Combine to get an array, each element in the array is a test case, and the array is the first data; for each test case in the first data, extract the key element data therein, and adjust each key element data to nested element node data, that is, adjust the existing mode of each key element data in the data to a nested mode and retain specific elements to obtain corresponding element node data, and when the key element data or non-key element data includes multiple layers of data, cutting and integration can be performed, and finally integrated and stored according to the mind map data structure to obtain the second data.
[0047] Step 103, the element node data of the multiple test cases in the second data is processed by de-duplication and integration to obtain third data.
[0048] Among them, the third data can be data obtained by integrating the repeated data in the element node data in the second data, and the third data does not include repeated element node data after processing, avoiding data redundancy. The de-duplication and integration processing can be to integrate the repeated element node data into the same, and the processing mode of integrating the corresponding other data, which can avoid repeated data and further avoid data redundancy through de-duplication and integration processing.
[0049] In some embodiments, the element node data of the multiple test cases in the second data is processed by de-duplication and integration to obtain third data, which can include: comparing each element node data of the multiple test cases in the second data with each other to extract multiple repeated element node groups, wherein each repeated element node group includes at least two repeated element node data; integrating the at least two element node data included in each repeated element node group into one element node data, and integrating the sub-data of the at least two element node data to obtain the third data.
[0050] The repeated element node group can be obtained by extracting at least two repeated element node data into one data group. The processing device of the test case can compare the element node data of the plurality of test cases in the second data with each other to determine whether they are repeated, and then extract one or more repeated element node groups. For example, an already processed array can be constructed, and the element node data of one test case can be extracted into the already processed array. Then, the element node data of the remaining test cases can be compared with the element node data in the already processed array in sequence. If the element node data is repeated, at least two repeated element node data can be extracted into one repeated element node group. If there is no repetition, the element node data of the current test case can be extracted into the already processed array. This process is repeated until the element node data of all test cases is processed, and one or more repeated element node groups are obtained. Then, for each repeated element node group, at least two element node data included therein can be integrated into one element node data, and the sub-data of the at least two element node data can also be integrated, and finally the third data is obtained.
[0051] For example, two test cases have the same precondition corresponding element node data, and the two same element node data can be integrated into one. After integration, the precondition corresponding element node data is nested with the step and expected result corresponding element node data of the two test cases as sub-data. It can be understood that the two test cases can also have the same step and title corresponding element node data, which can also be integrated into one.
[0052] In step 104, the third data is converted into a second test case file in a mind map format by a mind map tool.
[0053] The mind map tool can be a tool that can convert data in a mind map data format into a mind map format. The mind map format can include pictures, documents, etc., and is not limited. For example, the data can be rendered into a mind map picture. The second test case file can be a file for organizing and managing a plurality of test cases in a mind map format, which is converted from the first test case file in the table format. The mind map format is used to manage test cases, which makes it easier to analyze test paths according to requirements, and facilitates quick positioning of test points and leakage and defect checking of functions. In addition, the maintenance and viewing of the mind map format are easier than those of the table format.
[0054] In some embodiments, converting the third data into a second test case file in a mind map format by a mind map tool includes rendering each element node data included in the third data into a mind map node by a mind map tool, and drawing a connection line between different mind map nodes according to the nesting relationship of the element node data, to obtain a second test case file in a mind map format.
[0055] The mind map node can be a basic node of the mind map, one mind map file can include multiple mind map nodes, and the different mind map nodes are connected through a connection line to represent the membership and hierarchical relationship between the different mind map nodes. After obtaining the third data, the test case processing device can call a mind map tool, identify the third data through the mind map tool, render each element node data in the third data into a mind map node, determine the membership and hierarchical relationship between the different mind map nodes according to the nesting relationship of each element node data in the third data, draw a connection line between the different mind map nodes according to the membership and hierarchical relationship between the different mind map nodes, and obtain a second test case file in a mind map format.
[0056] Next, the conversion of the test case file from the table format to the mind map format according to the embodiments of the present disclosure will be described through a specific example. The exemplary, Figure 2 The schematic diagram of the first test case file provided by some embodiments of the present disclosure is shown in FIG. 1. Figure 2 As shown in FIG. 1, an exemplary first test case file in a table format is shown, which includes two test cases. The above step 102 is performed on the first test case file. First, each cell of the first row of the first test case file is identified to identify the table header, and multiple elements of the test case are obtained, including a directory, a title, a precondition, a step, an expected result, and a priority. The multiple elements are converted into specific identifiers, as follows: directory: folder; title: title; precondition: preCondition; step: step; expected result: expect; and priority: priority. Then, each cell from the second row to the last row is traversed and read. According to the order of the cells, the data is mapped to the specific identifiers as the element data of the test case, for example, for the second row, the test case read can be represented in the JSON format as
[0057]
[0058]
[0059] After the first test case file is completely read, an array including multiple test cases can be obtained, each element in the array is a test case, and one test case includes multiple element data. The array is the first data, which can be represented as:
[0060]
[0061] The key element data in each test case in the first data is then set as nested element node data, for example, the key element data of the directory, title, precondition, step, and expected result in the second test case in the first data is set as nested element node data, and the elements are also reserved in the element node data through nodeType, which is converted into the following data:
[0062]
[0063] And the element node data of the directory in the second test case includes multiple layers of data, which can be cut according to " / ", integrated into multiple layers of directories, and stored in a mind map data structure, obtaining the following data:
[0064]
[0065] The element node data of the second test case is integrated to obtain complete data. The operation of the second test case is performed on each data in the second data, and the second data is obtained, which can be represented as:
[0066]
[0067]
[0068] For the above-mentioned second data, step 103 can be performed, which can specifically perform deduplication and integration processing on the element node data of multiple test cases in the second data, that is, the repeated element node data is integrated into one element node data, and the corresponding sub-data is integrated, to obtain third data, for example, for the second data of the above-mentioned example, the two test cases have the same first directory corresponding element node data, which can be integrated into the same, and the sub-data is integrated, and the third data obtained can be represented as:
[0069]
[0070]
[0071] Then the third data of the above-mentioned example is converted into a second test case file in the format of a mind map tool, which is specifically shown in Figure 3 . Exemplarily, Figure 3 a schematic diagram of the second test case file provided by some embodiments of the present disclosure is shown in Figure 3 , which shows the Figure 2The first test case file in the table format is processed to obtain the third data and the second test case file in the mind map format, the second test case file is processed by deduplication and integration, and there is no redundant data problem, and the readability is stronger, the two test cases share a first-level directory, and when the first-level directory needs to be adjusted, only one modification is needed, repeated modification is not needed, and the maintenance efficiency is higher.
[0072] The processing scheme of the test case provided in the embodiment of the disclosure includes: obtaining a first test case file in a table format; performing format conversion on first data corresponding to the first test case file to obtain second data in a mind map data structure; performing deduplication and integration processing on element node data of multiple test cases in the second data to obtain third data; and converting the third data into a second test case file in a mind map format by using a mind map tool. By performing format conversion on the data of the test case file in the table format to obtain the data in the mind map data structure, and by performing deduplication and integration processing on the element node data of the test case in the data and then converting the data into the test case file in the mind map format by using the mind map tool, the data redundancy problem existing in the converted test case file in the mind map format is avoided in the conversion process of the test case file from the table format to the mind map format, the user can quickly find the required data, the readability of the data is improved, and the maintenance efficiency is improved by avoiding repeated work of repeated contents in subsequent maintenance.
[0073] In some embodiments, each mind map node in the second test case file displays a corresponding element, and the processing method of the test case can further include: performing data splitting and conversion processing on the second test case file according to the elements displayed by each mind map node to obtain a first test case file in a table format.
[0074] For the second test case file in the mind map format, the element corresponding to the element node data of the corresponding mind map node can be marked and displayed on each mind map node. For example, referring to Figure 2 , for the first test case, the element corresponding to the mind map node of the mobile phone number login is the title, the elements corresponding to the mind map nodes of the user mobile phone number, the verification code and the password are the preconditions, the elements corresponding to the mind map nodes of the input mobile phone number and the verification code are the steps, and the element corresponding to the mind map node of the prompt password cannot be empty is the expected result.
[0075] The processing device of the test case is for the second test case file in the mind map format, if a conversion request in a table format is received, data splitting can be performed according to the elements displayed by each mind map node, multiple test cases are extracted, and the multiple test cases are converted and integrated by using the table format to obtain a first test case file in the table format.
[0076] For example, Figure 4 This is a schematic diagram of another second test case file provided in some embodiments of this disclosure, such as... Figure 4 As shown in the figure, this is a schematic diagram of a second test case file in another exemplary mind map format. Each mind map node in the figure represents a corresponding element: a test case group can be represented as "Group," a precondition as "pre-condition," a step as "TS," and an expected result as "Expect." Figure 4 The second test case file in the document is obtained by splitting the data according to the elements displayed by each mind map node, resulting in multiple test cases, such as... Figure 5 As shown.
[0077] For example, Figure 5 This is a schematic diagram of data splitting provided in some embodiments of this disclosure, such as... Figure 5 As shown in the figure, the figure illustrates the... Figure 4 The second test case file in the diagram is divided into four test cases after data splitting according to elements. The titles in the diagram can be represented by "Case". The title of each test case can be represented by the expected result. In the test case with title 2.1, the two mind map nodes "Expected Result 2" and "Expected Result 2.1" can share the same step -2. The test case with title -3 uses its own steps -3.1, -3.2, and -3.3 as steps and does not share steps from ancestor nodes.
[0078] For example, Figure 6 This is a schematic diagram of another first test case file provided in some embodiments of this disclosure. Figure 5 Based on this, Figure 5 The 5 test cases can be transformed and integrated to obtain Figure 6 The first test case file is in tabular format.
[0079] In the above solution, by displaying corresponding elements on the mind map nodes in the mind map format test case file, users can not only quickly distinguish the different elements of the test case, but also avoid conversion errors when converting the test case file to table format or other formats, effectively improving the accuracy of the conversion.
[0080] Optionally, the second test case file has two structural types: one where the element corresponding to the starting node is a title and the other where the element is a precondition. The mind map format of the second test case file described above has two structural types: one where the element corresponding to the starting node is a title, for example... Figure 7 This is a schematic diagram of a second test case file of a first structure type provided in some embodiments of this disclosure, such as... Figure 7As shown in FIG. 6, the second test case file of the structure type of the title corresponding to the starting node is displayed, and the ancestor nodes before the mind map node of the title can be used as a use case grouping; another is the pre-condition corresponding to the starting node, and the title of each test case is set as the expected result. Figure 8 As shown in FIG. 7, the second test case file of the structure type of the pre-condition corresponding to the starting node is displayed, and the title of each test case is set as the expected result. Figure 8 As shown in FIG. 7, the second test case file of the structure type of the pre-condition corresponding to the starting node is displayed, and the title of each test case is set as the expected result.
[0081] When the second test case file is of the above two fixed structure types, each test case includes complete element data, which is more accurate and efficient when converted to a table format or other formats.
[0082] Optionally, the second test case file in the mind map format can also be obtained by inputting multiple requirement contents into a large language model for analysis, and supports online editing. One requirement content can include requirement name, requirement background, function description, product design details, etc. and can be input in the form of a document.
[0083] Optionally, after the second test case file in the mind map format is generated, in response to a continuation operation on a selected node, such as triggering a continuation key after triggering the selected node, all information of the selected node and its ancestor nodes can be input into the large language model for analysis to continue writing the test case, and the continuation content can be highlighted, such as using a specific color box. After that, in response to an adoption operation on the continuation content, the continuation content can be added to the original test case, in response to an abandonment operation on the continuation content, the test case can be restored, and in response to a retry operation, new continuation content can be generated. If the test case corresponding to the selected node already includes complete element data, no continuation will be performed.
[0084] In some embodiments, the test case processing method can further include: in response to a selection operation on a target node of the second test case file, highlighting all mind map nodes of a target test case where the target node is located in a preset manner. In some embodiments, the test case processing method can further include: in response to a result marking operation on the second test case file, marking and displaying the test results of multiple test cases on the mind map node corresponding to the expected result.
[0085] The target node can be a mind map node triggered by the selection operation of the user in the second test case file. The target test case can be a test case corresponding to the target node. The preset manner can be a manner different from the display manner of other mind map nodes in the second test case file, and can be set according to actual conditions, for example, the preset manner can be bold, add an underline, and set a preset color box, etc. The result marking operation can be an operation of marking the test result of the test case. The process of marking the test result of the test case is also called executing a test plan.
[0086] After receiving the selection operation on the target node of the second test case file, the test case processing apparatus can determine all mind map nodes of the target test case in which the target node is located, and highlight all the mind map nodes in a preset manner to mark that all the data belong to the target test case, so that the user can quickly understand all the data of the target test case. Compared with the related art, the data acquisition efficiency is improved through a shorter data acquisition path. After receiving the result marking operation on the second test case file, the test case processing apparatus can mark and display the test results of the multiple test cases marked by the user in the mind map nodes corresponding to the expected results, so that the user can quickly understand the test results.
[0087] An exemplary Figure 9 Another second test case file diagram provided by some embodiments of the present disclosure is shown in FIG. 9. Figure 9 As shown in the figure, the mind map node 901 with the title is the target node corresponding to the selection operation. All the mind map nodes of the target test case corresponding to the target node are highlighted by setting a bold frame. The test results are displayed in the mind map nodes corresponding to the expected results. For example, the expected results 1, 2, 2.1, and 2.2 are not executed, which are only examples.
[0088] The present scheme can realize the mutual conversion between the table format and the mind map format of the test case file including multiple test cases, and has higher conversion accuracy and efficiency, avoids data redundancy, supports displaying more data in the mind map format, has a better interactive form, and improves the data acquisition efficiency.
[0089] Figure 10 A structural diagram of a test case processing apparatus provided by an embodiment of the present disclosure is shown in FIG. 10. The apparatus can be realized by software and / or hardware, and can be integrated in an electronic device. As shown in the figure, the apparatus includes: Figure 10
[0090] The acquisition module 1001 is configured to acquire a first test case file in a table format.
[0091] The conversion module 1002 is configured to perform format conversion on the first data corresponding to the first test case file to obtain second data in a mind map data structure.
[0092] The integration module 1003 is configured to perform deduplication processing on the element node data of the plurality of test cases in the second data to obtain third data.
[0093] The file module 1004 is configured to convert the third data into a second test case file in a mind map format by using a mind map tool.
[0094] Optionally, the conversion module 1002 is configured to:
[0095] read the data of the plurality of cells in each row of the first test case file to obtain a plurality of test cases, and determine an array obtained by combining the plurality of test cases as the first data, wherein one test case includes the data of the plurality of cells in one row.
[0096] set the key element data in each test case in the first data as nested element node data, and store the nested element node data in a mind map data structure to obtain the second data.
[0097] Optionally, one test case includes a plurality of element data, the key element data is data corresponding to a key element, and the key element at least includes a title, a precondition, a step, and an expected result.
[0098] Optionally, the integration module 1003 is configured to:
[0099] perform mutual repetition comparison on each element node data of the plurality of test cases in the second data, and extract a plurality of repeated element node groups, wherein each repeated element node group includes at least two element node data that are repeated.
[0100] integrate the at least two element node data included in each repeated element node group into one element node data, and integrate the sub-data of the at least two element node data to obtain the third data.
[0101] Optionally, the file module 1004 is configured to:
[0102] render each element node data included in the third data into a mind map node by using the mind map tool, and draw a connection line between different mind map nodes according to the nesting relationship of the element node data to obtain a second test case file in a mind map format.
[0103] Optionally, the apparatus further includes another conversion module configured to:
[0104] The second test case file is subjected to data splitting and conversion processing according to the elements exhibited by each of the mind map nodes, to obtain the first test case file in a table format.
[0105] Optionally, the second test case file has two structural types of elements corresponding to the start node, namely, a title and a precondition.
[0106] Optionally, the apparatus further comprises a first display module configured to:
[0107] In response to a selection operation on a target node of the second test case file, all mind map nodes of a target test case in which the target node is located are highlighted in a preset manner.
[0108] Optionally, the apparatus further comprises a second display module configured to:
[0109] In response to a result marking operation on the second test case file, test results of the plurality of test cases are marked and displayed on the mind map nodes corresponding to the expected results.
[0110] The processing apparatus for test cases provided in the embodiments of the present disclosure can execute the processing method for test cases provided in any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects of the execution method.
[0111] The embodiments of the present disclosure further provide a computer program product, which comprises computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the processing method for test cases provided in any of the embodiments of the present disclosure.
[0112] Figure 11 A structural schematic diagram of an electronic device provided in the embodiments of the present disclosure is shown in FIG. 1. Figure 11 FIG. 1 shows a structural schematic diagram of an electronic device 1100 used to implement the embodiments of the present disclosure. The electronic device 1100 in the embodiments of the present disclosure can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet Personal Computer), a PMP (Portable Multimedia Player), a vehicle terminal (for example, a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. Figure 11 The electronic device shown is only an example, and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.
[0113] As shown in FIG. 1, the electronic device 1100 can include a bus 1101, a processor 1102, a memory 1103, an input / output interface 1104, a display 1105, and the like. Figure 11As shown, the electronic device 1100 can include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1101 that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1102 or loaded into a random access memory (RAM) 1103 from a storage device 1108. Various programs and data required for the operation of the electronic device 1100 are also stored in the RAM 1103. The processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0114] Generally, the following devices can be connected to the I / O interface 1105: input devices 1106 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1108 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1109. The communication devices 1109 can allow the electronic device 1100 to communicate wirelessly or wired with other devices to exchange data. Although Figure 11 The electronic device 1100 is shown with various devices, but it should be understood that all of the illustrated devices are not required, and more or fewer devices can alternatively be implemented.
[0115] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 1109, or installed from the storage devices 1108, or installed from the ROM 1102. When the computer program is executed by the processing device 1101, the above-described functions defined in the processing method of the test case of embodiments of the present disclosure are performed.
[0116] It should be noted that the computer-readable medium described above can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer-readable program code is contained. Such a propagated data signal can take many forms, including but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium that can send, propagate or transfer the program for use by or in connection with the instruction execution system, apparatus or device. The program code contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to, wire, cable, RF (radio frequency), etc., or any suitable combination of the above.
[0117] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.
[0118] The computer-readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device, and is not assembled into the electronic device.
[0119] The computer readable medium carries one or more programs, when the one or more programs are executed by the electronic device, the electronic device is caused to: acquire a first test case file in a table format; perform format conversion on first data corresponding to the first test case file to obtain second data in a mind map data structure; perform deduplication and integration processing on element node data of a plurality of test cases in the second data to obtain third data; and convert the third data into a second test case file in a mind map format through a mind map tool.
[0120] Computer program code for carrying out operations of the present disclosure can be written in any one or more programming languages, including object oriented programming languages, such as Java, Smalltalk, C++, or conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0121] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in a different order than that noted in the figures. For example, two blocks noted in succession can in fact be executed substantially concurrently or in the opposite order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flow diagrams, and combinations of blocks in the block diagrams and / or flow diagrams, can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware-based systems and computer instructions.
[0122] The units described in the embodiments of the present disclosure can be implemented by software, or can be implemented by hardware. In some cases, the names of the units do not constitute a limitation on the units themselves.
[0123] The functionality described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, non- transitory machine-readable media can include RAM, ROM, programmable ROM (EPROM, EEPROM or flash memory), or any other storage device(s) through which program instructions can be stored and executed by a processing unit. The above described functions can be implemented as software modules or software functions using object oriented design methodology, among others.
[0124] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of a processor, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0125] It can be understood that, before using the technical solutions disclosed by the embodiments of the present disclosure, the type of information involved in the present disclosure, the use range, the use scenario, etc. should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.
[0126] The above description is merely preferred embodiments of the present disclosure and a description of the principles of the technology used. Those skilled in the art should understand that the scope of the disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the technical solutions formed by replacing the above features with the technical features disclosed in the present disclosure (but not limited to) having similar functions.
[0127] In addition, although each operation is described in a particular order, this should not be understood as requiring the operations to be performed in the specific order shown or in a sequential order. In certain circumstances, multitasking and parallel processing can be advantageous. Similarly, although several implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be combined in a single embodiment. Conversely, various features described in the context of a single embodiment can also be separated and implemented in multiple embodiments.
[0128] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. A method of processing test cases, characterized by, The method comprises: obtaining a first test case file in a table format; performing format conversion on first data corresponding to the first test case file to obtain second data in a mind map data structure; performing de-duplication and integration processing on element node data of multiple test cases in the second data to obtain third data; wherein the element node data is used to represent element data as a mind map node in a mind map format through a nesting manner, the element data is data corresponding to an element, the element is an attribute of a test case, and the de-duplication and integration processing comprises integrating duplicate element node data into one element node data; converting the third data into a second test case file in a mind map format through a mind map tool.
2. The method of claim 1, wherein, The method comprises: reading data of multiple cells of multiple rows of the first test case file to obtain multiple test cases, and determining an array obtained by combining the multiple test cases as the first data, wherein one test case comprises data of multiple cells of one row; setting key element data in each test case in the first data as nested element node data, and storing the key element data in a mind map data structure to obtain the second data.
3. The method of claim 2, wherein, One test case comprises multiple element data, the key element data is data corresponding to a key element, and the key element at least comprises a title, a precondition, a step, and an expected result.
4. The method of claim 1, wherein, The method comprises: comparing each element node data of multiple test cases in the second data with each other to extract multiple repeated element node groups, wherein each repeated element node group comprises at least two element node data; integrating the at least two element node data included in each repeated element node group into one element node data, and integrating sub-data of the at least two element node data to obtain the third data.
5. The method of claim 1, wherein, The method comprises: rendering each element node data included in the third data into a mind map node through the mind map tool, and drawing a connection line between different mind map nodes according to a nesting relationship of the element node data to obtain a second test case file in a mind map format.
6. The method of claim 1, wherein, Each mind map node in the second test case file displays a corresponding element, and the method further comprises: performing data splitting and conversion processing on the second test case file according to elements displayed by each mind map node to obtain the first test case file in a table format.
7. The method according to claim 1 or 6, characterized in that, The second test case file has two structure types corresponding to elements of a start node, namely a title and a precondition.
8. The method of claim 1, wherein, The method further comprises: in response to a selection operation on a target node of the second test case file, highlighting all mind map nodes of a target test case in which the target node is located in a preset manner.
9. The method of claim 1, wherein, The method further comprises: In response to the result marking operation on the second test case file, test results of the plurality of test cases are marked and displayed on the mind map node corresponding to the expected result.
10. A processing apparatus of a test case, characterized by, The method comprises the following steps: An acquisition module is configured to acquire a first test case file in a table format. A conversion module is configured to perform format conversion on first data corresponding to the first test case file to obtain second data in a mind map data structure. An integration module is configured to perform de-duplication and integration processing on element node data of a plurality of test cases in the second data to obtain third data. The element node data is used to represent element data as a mind map node in a mind map format through a nesting manner, the element data is data corresponding to an element, the element is an attribute of a test case, and the de-duplication and integration processing includes integrating duplicate element node data into one element node data.
11. An electronic device, comprising: A file module is configured to convert the third data into a second test case file in a mind map format through a mind map tool. The electronic device comprises: a processor; a memory for storing executable instructions of the processor; 12. A computer-readable storage medium, characterized in that, the processor is configured to read the executable instructions from the memory and execute the instructions to implement the test case processing method of any one of claims 1-9. The storage medium stores a computer program for executing the test case processing method of any one of claims 1-9.
Citation Information
Patent Citations
Test method and device based on knowledge graph
CN115827421A
Test case conversion method and device
CN116737594A