CN115904984A - System and method for determining test case, electronic device and storage medium - Google Patents

System and method for determining test case, electronic device and storage medium Download PDF

Info

Publication number
CN115904984A
CN115904984A CN202211535301.5A CN202211535301A CN115904984A CN 115904984 A CN115904984 A CN 115904984A CN 202211535301 A CN202211535301 A CN 202211535301A CN 115904984 A CN115904984 A CN 115904984A
Authority
CN
China
Prior art keywords
test case
keyword
module
text data
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211535301.5A
Other languages
Chinese (zh)
Inventor
董学瑞
胥斌
王彤
成灵芝
张广杰
李雨鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wangtai Technology Development Co ltd
Original Assignee
Beijing Wangtai Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wangtai Technology Development Co ltd filed Critical Beijing Wangtai Technology Development Co ltd
Priority to CN202211535301.5A priority Critical patent/CN115904984A/en
Publication of CN115904984A publication Critical patent/CN115904984A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a system, a method, electronic equipment and a storage medium for determining a test case. The system comprises a data acquisition module and a test case generation module, wherein the data acquisition module is connected with the test case generation module; the data acquisition module is used for acquiring text data and transmitting the text data to the test case generation module; the test case generation module is used for formatting the text data to generate a test case; and the formatting process comprises matching the text data according to a preset standard data structure normalized definition configuration file. The system acquires the text data through the data acquisition module and transmits the text data to the test case generation module, so that the test case is automatically generated by formatting the text data through the test case generation module, the compiling time of the test case can be shortened, and the compiling efficiency is improved.

Description

System and method for determining test case, electronic device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of software testing, in particular to a system and a method for determining a test case, electronic equipment and a storage medium.
Background
With the continuous increase of the scale of the software system and the continuous increase of the service complexity, the complexity of the software test is increased.
When the software is tested, the software needs to be tested by adopting the test case, the test case is generally compiled by adopting a manual input mode in the prior art, a technician needs to spend a lot of time for compiling the test case, and human errors inevitably occur by manually compiling the test case.
Disclosure of Invention
The invention provides a system, a method, electronic equipment and a storage medium for determining a test case, which aim to solve the problems that the test case compiling in the prior art takes much time and human errors are inevitable.
According to one aspect of the invention, a system for determining test cases is provided, and the system comprises a data acquisition module and a test case generation module, wherein the data acquisition module is connected with the test case generation module;
the data acquisition module is used for acquiring text data and transmitting the text data to the test case generation module;
the test case generation module is used for formatting the text data to generate a test case;
and the formatting process comprises matching the text data according to a preset standard data structure normalized definition configuration file.
According to another aspect of the present invention, there is provided a method for determining a test case, the method including:
acquiring text data and transmitting the text data to a test case generation module;
formatting the text data to generate a test case;
and the formatting process comprises matching the text data according to a preset standard data structure normalized definition configuration file.
According to another aspect of the present invention, there is provided an electronic apparatus including: at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method of determining test cases according to any of the embodiments of the present invention.
According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to implement the method for determining test cases according to any embodiment of the present invention when executed.
The system for determining the test case comprises a data acquisition module and a test case generation module, wherein the data acquisition module is connected with the test case generation module; the data acquisition module is used for acquiring text data and transmitting the text data to the test case generation module; the test case generation module is used for formatting the text data to generate a test case; and the formatting process comprises matching the text data according to a preset standard data structure normalized definition configuration file. The system acquires the text data through the data acquisition module and transmits the text data to the test case generation module, so that the text data is formatted through the test case generation module to automatically generate the test case, the problems that time is consumed for compiling the test case in the prior art, and human errors are inevitable are solved, the compiling time of the test case can be shortened, and the compiling efficiency is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a system for determining test cases according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a system for determining test cases according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a system for determining a test case according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a system for determining a test case according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another system for determining test cases according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a method for determining a test case according to a fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device for determining a test sample according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It is noted that references to "a", "an", and "the" modifications in the present invention are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that reference to "one or more" unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present invention are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Example one
Fig. 1 is a flowchart of a system for determining a test case according to an embodiment of the present invention, where the system is applicable to writing a test case, where the system may be implemented by software and/or hardware, and may execute a method for determining a test case provided by the present application. As shown in fig. 1, the system includes a data obtaining module 10 and a test case generating module 20, where the data obtaining module 10 is connected to the test case generating module 20;
the data acquisition module 10 is configured to acquire text data and transmit the text data to the test case generation module 20;
the test case generating module 20 is configured to format the text data to generate a test case;
and the formatting process comprises matching the text data according to a preset standard data structure normalized definition configuration file.
The data obtaining module 10 may be a module for obtaining text data, and the text data may be obtained in a voice manner, or may be obtained directly in a text type, where the manner of obtaining text data is not particularly limited. The text data may be the relevant content of the test case that the user wishes to generate, i.e., the description of the test case.
The test case generation module 20 may be a module for generating test cases. The formatting process may be a process of formatting the text data, and the formatting process may include normalizing the definition profile according to a preset standard data structure and matching the text data. The standard data structure normalized definition configuration file may be a configuration file previously defined according to a standard data structure.
The test case is a description of a test task performed on a specific software product, and embodies a test scheme, a method, a technology and a strategy. The content of the test case may include a test target, a test environment, input data, test steps, expected results, test scripts, etc., which ultimately form a document. Simply considered, a test case is a set of test inputs, execution conditions, and expected results tailored for a particular purpose to verify whether a particular software requirement is met.
In this embodiment, the transmission mode between the data obtaining module 10 and the test case generating module 20 is not limited in this embodiment, and may be a wired and/or wireless mode.
In this embodiment, the data obtaining module 10 may generate text data according to the voice or text content input by the user, and the text data may be transmitted to the test case generating module 20. After the test case generating module 20 receives the text data, it can standardize and define the configuration file according to the preset standard data structure, and match the text data.
The system for determining the test case comprises a data acquisition module and a test case generation module, wherein the data acquisition module is connected with the test case generation module; the data acquisition module is used for acquiring text data and transmitting the text data to the test case generation module; the test case generation module is used for formatting the text data to generate a test case; and the formatting process comprises matching the text data according to a preset standard data structure normalized definition configuration file. The system acquires the text data through the data acquisition module and transmits the text data to the test case generation module, so that the text data is formatted through the test case generation module to automatically generate the test case, the problems that time is consumed for compiling the test case in the prior art, and human errors are inevitable are solved, the compiling time of the test case can be shortened, and the compiling efficiency is improved.
On the basis of the above-described embodiment, a modified embodiment of the above-described embodiment is proposed, and it is to be noted herein that, in order to make the description brief, only the differences from the above-described embodiment are described in the modified embodiment.
In one embodiment, the data acquisition module 10 includes a speech recognition sub-module 101,
the speech recognition sub-module 101 is configured to: and acquiring voice data, and recognizing text data according to the voice data.
The voice recognition sub-module 101 may be a module for recognizing voice data. The voice data may be voice content input by a user, the type of the voice data may include online voice, open source voice, and the like, and the voice data may be acquired through the voice input device.
In this embodiment, the data obtaining module 10 may further include a voice recognition sub-module 101, and when the user starts to input voice, the voice recognition sub-module 101 may obtain voice data input by the user, and may further process the voice data, recognize voice data related to the test case, and convert the voice data into text data.
In this embodiment, when the voice data is online voice, the voice recognition sub-module 101 may use an online voice recognition system to recognize the voice data, and when the voice data is open-source voice, the voice recognition sub-module 101 may use an open-source voice recognition system to recognize the voice data.
Example two
Fig. 2 is a schematic flow chart of a system for determining a test case according to a second embodiment of the present invention, where the second embodiment further defines a test case generation module on the basis of the second embodiment. As shown in fig. 2, the test case generation module 20 includes a setup sub-module 201 and a formatting sub-module 202,
the setup submodule 201 is used to: setting a standard data structure normalized definition configuration file according to a standard structure of a test case, wherein the standard data structure normalized definition configuration file comprises defined keyword attributes, keyword range delimitation identifications corresponding to the keyword attributes and execution operations corresponding to the keyword attributes;
the format sub-module 202 is configured to: transcoding the text data; sequentially reading key word attributes and range delimitation marks of the key words from the standard data structure normalized definition configuration file, and transcoding the read contents; converting the keyword range definition identification corresponding to the keyword attribute into a regular expression; and matching the transcoded text data by using the regular expression, and if the matching is successful, executing the execution operation corresponding to the key character attribute until the end character is matched to generate a test case.
The setting sub-module 201 may be a module for defining a configuration file according to a test case standard structure. The test case standard structure may be a structure that the test case specified in the standard case needs to include, and the test case standard structure may be set according to actual needs. For example, the test case standard structure may set that a test case needs to include the following elements: serial number, module, serial number, function point, name, operation step, expected result, test result, tester, etc.
The keywords may be keywords in a standard data structure programming definition configuration file, and the keywords may be defined in a format of a regular expression. The keyword attribute may be a type of keyword, which may be preset or user-defined, and may illustratively include a title, a step, an expected result, an end, or other user-defined characters. The keyword range delimiter identification may be a flag identifying a keyword range, and the keyword range delimiter identification may include a keyword start delimiter and a keyword end delimiter. The execution operation may be an operation to be executed corresponding to the keyword attribute, and the execution operations corresponding to different keyword attributes are different.
In this embodiment, after the test case generating module 20 obtains the text data, the setting sub-module 201 may set a standard data structure normalized definition configuration file according to the test case standard structure, where the content of the definition configuration file may include a keyword start delimiter, a keyword end delimiter, and a corresponding execution operation, and the setting sub-module 201 may send the configuration file to the formatting sub-module 202 after the configuration file is defined, or the formatting sub-module 202 obtains the configuration file from the setting sub-module 201.
The formatting sub-module 202 may be a module for formatting text data. The regular expression is a logic formula for operating on character strings, namely, a 'regular character string' is formed by using a plurality of specific characters defined in advance and a combination of the specific characters, and the 'regular character string' is used for expressing a filtering logic for the character strings.
In this embodiment, the method of transcoding the text data may be to transcode the text data in a Unicode method, which is not limited in this embodiment. The text data can be matched through a regular expression in a matching mode. It should be noted that, if the end character cannot be matched all the time, the test case may be regenerated after the matching time reaches the preset time. The ending character can be any character, and the ending character can be preset. Illustratively, "end" may be taken as an end character.
In this embodiment, after receiving the text data, the formatting submodule 202 may perform Unicode transcoding on the text data, may read attributes of the keywords and range delimitation identifiers of the keywords in sequence from the standard data structure normalized definition configuration file, and perform Unicode transcoding on the read content at the same time, where the keyword range delimitation identifiers may be converted into regular expressions, and after the conversion is completed, match the transcoded text data with the regular expressions again; and if the matching is successful, executing the execution operation corresponding to the key character attribute, and if the matching is not successful, continuing the matching. For example, when the matching is finished, the operation of generating a trigger result and calling the intelligent proofreading module to perform proofreading is executed.
In the system for determining a test case according to the embodiment of the present invention, the test case generation module 20 further includes a setting submodule 201 and a formatting submodule 202, and the setting submodule 201 is configured to: setting a standard data structure normalized definition configuration file according to a standard structure of a test case, wherein the standard data structure normalized definition configuration file comprises defined keyword attributes, keyword range delimitation marks corresponding to the keyword attributes and execution operations corresponding to the keyword attributes; the format sub-module 202 is configured to: transcoding the text data; sequentially reading key word attributes and range delimitation marks of the key words from the standard data structure normalized definition configuration file, and transcoding the read contents; converting the keyword range definition identification corresponding to the keyword attribute into a regular expression; and matching the transcoded text data by using the regular expression, and if the matching is successful, executing the execution operation corresponding to the key character attribute until the end character is matched to generate a test case. The problem of write test case take time much among the prior art, and can inevitable human error appears is solved, the write time of test case can be reduced, the efficiency of writing is improved.
In one embodiment, the keyword attributes include a title, a step, an expected result, and an end character, the expected result being an expected result of the step; the keyword range delimitation identification comprises a keyword start delimitation identification and a keyword end delimitation identification;
when the keyword attribute is a title, the execution operation corresponding to the keyword attribute comprises the step of taking data in the middle of a keyword start delimiter and a keyword end delimiter corresponding to the title as the title of the test case;
when the keyword attribute is the step, the execution operation corresponding to the keyword attribute comprises the step of taking data between the keyword start delimiter and the keyword end delimiter corresponding to the step as a test case;
and when the keyword attribute is an expected result, the execution operation corresponding to the keyword attribute comprises the step of taking data between a keyword start delimiter and a keyword end delimiter corresponding to the expected result as the expected result of the step in the test case.
Wherein the title may be a title of the keyword, the step may be a step of executing the keyword, the expected result may be a result desired to execute the keyword, and the end character may be the keyword indicating the end of the execution. The keyword start delimitation identifier may be an identifier of a start position of the keyword, and the keyword end delimitation identifier may be an identifier of an end position of the keyword.
In this embodiment, after the keyword is obtained, the corresponding execution operation and the corresponding content of the keyword in the text data may be determined according to the attribute type of the keyword.
For example, when the voice or text content input by the user is "start writing a test case, input a title, test the user login function, step one, input a user name and a password, expect result one, input successfully, step two, click to login, expect result two, login successfully, jump to the home page, and end of case input", the method for determining the execution operation may be as follows:
table 1 standard data structure normalized definition configuration file example table
Figure BDA0003972619140000111
/>
Figure BDA0003972619140000121
As shown in table 1, the test cases after the formatting of the formatting sub-module 202 are:
test case title: testing user login functionality
The method comprises the following steps: enter a user name and password
Expected result one: enter successfully, after
Step two: click to login
Expected result two: successfully logging in and jumping to the home page
EXAMPLE III
Fig. 3 is a schematic structural diagram of a system for determining a test case according to a third embodiment of the present invention, where the third embodiment is optimized based on the above embodiments. As shown in fig. 3, the system further includes an intelligent checking module 30, the intelligent checking module 30 is connected to the test case generating module 20,
the intelligent proof module 30 is configured to: and receiving the test case sent by the test case generating module 20, and verifying the test case according to the set keyword verification definition configuration file to obtain a final test case.
The intelligent proofreading module 30 may be a module for proofreading the test case, and words, sentences, symbols, and the like in the test case may be checked by the intelligent proofreading module 30. The keyword collation definition profile may be a profile for collating keywords. The final test case may be a proofread test case.
In this embodiment, the connection between the smart proofreading module 30 and the test case generating module 20 may be a wired and/or wireless connection.
In this embodiment, after the test case generation module 20 generates the test case, the test case may be sent to the intelligent verification module 30, and after the intelligent verification module 30 receives the test case, the test case may be verified through the set keyword verification definition configuration file, so as to obtain a final test case.
The system for determining the test case in the embodiment of the present invention further includes an intelligent proofreading module 30, the intelligent proofreading module 30 is connected to the test case generating module 20, and the intelligent proofreading module 30 is configured to: and receiving the test case sent by the test case generation module 20, and verifying the test case according to the set keyword verification definition configuration file to obtain a final test case. The problem of compile test case take time much among the prior art, and can inevitable human error appear is solved, the time of compiling of test case can be reduced, the efficiency of compiling is improved.
In one embodiment, the intelligent collation module 30 includes a collation file setting sub-module 301 and a collation sub-module 302,
the collation file setting sub-module 301 is configured to: setting a keyword proofreading definition configuration file according to a preset test case and a preset word pair, wherein the keyword proofreading definition configuration file comprises defined keywords, proofreading operation corresponding to the keywords and proofreading results corresponding to the keywords;
the collation sub-module 302 is used to: reading keywords from the keyword proofreading definition configuration file, and if the read keywords are retrieved from the test case, executing proofreading operation corresponding to the read keywords;
wherein the collation operation at least includes one or more of: a marking operation, a deleting operation, and a correcting operation.
The collation file setting sub-module 301 may be a module for setting a keyword collation definition configuration file. The proofreading sub-module 302 may be a module that proofreads test cases. The preset test case may be a preset test case, and the preset test case may be used to check whether the test case generated by the test case generation module 20 is correct. The preset word pair can be preset, can be preset and can also be set by a user in a self-defined manner.
The verification operation may be an operation of verifying the test case, and the verification operation may include at least one of a marking operation, a deleting operation, and a correcting operation. The marking operation may be an operation of marking a keyword, the deleting operation may be an operation of deleting the keyword, and the correcting operation may be an operation of correcting the keyword. The collation result may be the result of collating the test case.
In this embodiment, after the intelligent proofreading module 30 receives the test case to be proofread, the proofreading file setting sub-module 301 may set a keyword proofreading definition configuration file according to the preset test case and the preset word pair, where the keyword proofreading definition configuration file may include the defined keyword, the proofreading operation corresponding to the keyword, and the proofreading result corresponding to the keyword; the collation sub-module 302 may read a keyword from the keyword collation definition configuration file, and if the same keyword as the keyword in the keyword collation definition configuration file is detected in the test case, may perform the collation operation corresponding to the keyword.
For example, the keyword collation definition configuration file may be set as follows:
TABLE 2 keyword proofreading definition configuration file example Table
Figure BDA0003972619140000141
As shown in table 2, when a keyword "is detected, a marking operation of marking the keyword with red may be performed; when the keyword "Bbb" is detected, a deletion operation of filtering the keyword may be performed; when the keyword "cc" is detected, a correction operation for correcting the keyword may be performed.
In one embodiment, the system further includes a storage module 40, and the storage module 40 is respectively connected to the test case generation module 20 and the intelligent proofreading module 30;
the storage module 40 is configured to: storing the test case and/or the final test case;
wherein the storage format includes at least one or more of: text format, table format, and database.
The storage module 40 may be a module for storing test cases. In this embodiment, the connection between the storage module and the test case generation module 20 and the intelligent verification module 30 may include wired and/or wireless connection.
The text format may store the test case in a text data form, the table format may store the test case in a data table form, and the database may store the test case in a database.
In this embodiment, after the test case generating module 20 generates the test case, the test case may be directly transmitted to the storage module 40 for storage; after the intelligent proofreading module 30 proofreads the test cases, the proofread test cases may also be copied and transmitted to the storage module 40 for storage through the proofreading sub-module 302.
For example, if the storage format of the data storage module is set to a table format, the stored raw data is as follows:
Figure BDA0003972619140000151
the saved data after collation are as follows:
Figure BDA0003972619140000152
Figure BDA0003972619140000161
the embodiments of the present invention provide several specific implementation manners based on the technical solutions of the above embodiments.
As a specific implementation manner of this embodiment, fig. 4 is a schematic structural diagram of a system for determining a test case according to an embodiment of the present invention, as shown in fig. 4, the system includes a data input module 10, a test case generation module 20, an intelligent verification module 30, and a storage module 40, the data input module 10 is connected to the test case generation module 20, the intelligent verification module 30 is connected to the test case generation module 20 and the storage module 40, and the storage module 40 is connected to the test case generation module 20 and the intelligent verification module 30.
Fig. 5 is a schematic structural diagram of another system for determining a test case according to an embodiment of the present invention, as shown in the figure, the data input module further includes a voice input device, a third-party voice recognition system, and a data reading device, and the data input module sends the obtained text data to the test case generation module; the test case generation module defines a configuration file through the setting sub-module, generates a test case through the data formatting sub-module and sends the test case to the intelligent correction module; the intelligent proofreading module sets a sub-module definition configuration file through the proofreading file, and the data proofreading sub-module can send the test cases before and after proofreading to the storage module; the storage module can store the test cases before and after the proofreading in a text format, a table format, a database or other formats after receiving the test cases.
Example four
Fig. 6 is a flowchart of a method for determining a test case according to a fourth embodiment of the present invention, where the method is applicable to writing a test case, and the method can be executed by the system for determining a test case provided in the foregoing embodiment. As shown in fig. 6, the method includes:
and S410, acquiring text data and transmitting the text data to a test case generation module.
And S420, formatting the text data to generate a test case.
And the formatting process comprises matching the text data according to a preset standard data structure normalized definition configuration file.
The method for determining the test case comprises the steps of obtaining text data and transmitting the text data to a test case generation module; formatting the text data to generate a test case; and the formatting process comprises matching the text data according to a preset standard data structure normalized definition configuration file. The test case is automatically generated by acquiring the text data and transmitting the text data to the test case generation module to format the text data, so that the problems that time is consumed for compiling the test case in the prior art, and human errors can inevitably occur are solved, the compiling time of the test case can be shortened, and the compiling efficiency is improved.
In one embodiment, voice data is obtained and text data is identified based on the voice data.
In an embodiment, the formatting the text data to generate a test case further includes:
setting a standard data structure normalized definition configuration file according to a standard structure of a test case, wherein the standard data structure normalized definition configuration file comprises defined keyword attributes, keyword range delimitation marks corresponding to the keyword attributes and execution operations corresponding to the keyword attributes;
transcoding the text data; sequentially reading key word attributes and range delimitation marks of the key words from the standard data structure normalized definition configuration file, and transcoding the read contents; converting the keyword range definition identification corresponding to the keyword attribute into a regular expression; and matching the transcoded text data by using the regular expression, and if the matching is successful, executing the execution operation corresponding to the key character attribute until the end character is matched to generate a test case.
In one embodiment, the keyword attributes include a title, a step, an expected result, and an end character, the expected result being an expected result of the step; the keyword range delimitation identification comprises a keyword start delimitation identification and a keyword end delimitation identification;
when the keyword attribute is a title, the execution operation corresponding to the keyword attribute comprises the step of taking data in the middle of a keyword start delimiter and a keyword end delimiter corresponding to the title as the title of the test case;
when the keyword attribute is the step, the execution operation corresponding to the keyword attribute comprises the step of taking data in the middle of the keyword start delimiter and the keyword end delimiter corresponding to the step as a test case;
and when the keyword attribute is an expected result, the execution operation corresponding to the keyword attribute comprises the step of taking data between a keyword start delimiter and a keyword end delimiter corresponding to the expected result as the expected result of the step in the test case.
In one embodiment, the test case sent by the test case generation module is received, and the test case is verified according to the set keyword verification definition configuration file to obtain a final test case.
In one embodiment, a keyword proofreading definition configuration file is set according to a preset test case and a preset word pair, wherein the keyword proofreading definition configuration file comprises defined keywords, proofreading operations corresponding to the keywords and proofreading results corresponding to the keywords;
reading keywords from the keyword proofreading definition configuration file, and if the read keywords are retrieved from the test case, executing proofreading operation corresponding to the read keywords;
wherein the collation operation includes at least one or more of: a marking operation, a deleting operation, and a correcting operation.
In one embodiment, the test case and/or the final test case are/is stored;
wherein the storage format includes at least one or more of: text format, table format, and database.
EXAMPLE five
FIG. 7 illustrates a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the method of determining test cases.
In some embodiments, the method of determining test cases may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method of determining test cases described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured by any other suitable means (e.g., by means of firmware) to perform the method of determining test cases.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the Internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired result of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A system for determining test cases is characterized by comprising a data acquisition module and a test case generation module, wherein the data acquisition module is connected with the test case generation module;
the data acquisition module is used for acquiring text data and transmitting the text data to the test case generation module;
the test case generation module is used for formatting the text data to generate a test case;
and the formatting process comprises matching the text data according to a preset standard data structure normalized definition configuration file.
2. The method of claim 1, wherein the data acquisition module comprises a speech recognition sub-module,
the speech recognition sub-module is configured to: and acquiring voice data, and recognizing text data according to the voice data.
3. The method of claim 1, wherein the test case generation module comprises a setup sub-module and a formatting sub-module,
the setting submodule is used for: setting a standard data structure normalized definition configuration file according to a standard structure of a test case, wherein the standard data structure normalized definition configuration file comprises defined keyword attributes, keyword range delimitation marks corresponding to the keyword attributes and execution operations corresponding to the keyword attributes;
the formatting sub-module is configured to: transcoding the text data; sequentially reading key word attributes and range delimitation marks of the key words from the standard data structure normalized definition configuration file, and transcoding the read contents; converting the keyword range definition identification corresponding to the keyword attribute into a regular expression; and matching the transcoded text data by using the regular expression, and if the matching is successful, executing the execution operation corresponding to the key character attribute until the end character is matched to generate a test case.
4. The system of claim 3, wherein the keyword attributes include a title, a step, an expected result, and an end character, the expected result being an expected result of a step; the keyword range delimitation identification comprises a keyword start delimitation identification and a keyword end delimitation identification;
when the keyword attribute is a title, the execution operation corresponding to the keyword attribute comprises the step of taking data in the middle of a keyword start delimiter and a keyword end delimiter corresponding to the title as the title of the test case;
when the keyword attribute is the step, the execution operation corresponding to the keyword attribute comprises the step of taking data between the keyword start delimiter and the keyword end delimiter corresponding to the step as a test case;
and when the keyword attribute is an expected result, the execution operation corresponding to the keyword attribute comprises the step of taking data between a keyword start delimiter and a keyword end delimiter corresponding to the expected result as the expected result of the step in the test case.
5. The system according to any one of claims 1 to 4, further comprising an intelligent proof-reading module, said intelligent proof-reading module being connected to said test case generation module,
the intelligent proofreading module is used for: and receiving the test case sent by the test case generation module, and verifying the test case according to the set keyword verification definition configuration file to obtain a final test case.
6. The system of claim 5, wherein the intelligent collation module includes a collation file setting sub-module and a collation sub-module,
the proofreading file setting submodule is used for: setting a keyword proofreading definition configuration file according to a preset test case and a preset word pair, wherein the keyword proofreading definition configuration file comprises defined keywords, proofreading operation corresponding to the keywords and proofreading results corresponding to the keywords;
the proofreading submodule is used for: reading keywords from the keyword proofreading definition configuration file, and if the read keywords are retrieved from the test case, executing proofreading operation corresponding to the read keywords;
wherein the collation operation includes at least one or more of: a marking operation, a deleting operation, and a correcting operation.
7. The system according to claim 5, further comprising a storage module, wherein the storage module is respectively connected to the test case generation module and the intelligent proofreading module;
the storage module is used for: storing the test case and/or the final test case;
wherein the storage format includes at least one or more of: text format, table format, and database.
8. A method for determining test cases, the method comprising:
acquiring text data and transmitting the text data to a test case generation module;
formatting the text data to generate a test case;
and the formatting process comprises matching the text data according to a preset standard data structure normalized definition configuration file.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of determining test cases of claim 8.
10. A computer-readable storage medium having stored thereon computer instructions for causing a processor to execute the method for determining test cases of claim 8.
CN202211535301.5A 2022-11-30 2022-11-30 System and method for determining test case, electronic device and storage medium Pending CN115904984A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211535301.5A CN115904984A (en) 2022-11-30 2022-11-30 System and method for determining test case, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211535301.5A CN115904984A (en) 2022-11-30 2022-11-30 System and method for determining test case, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115904984A true CN115904984A (en) 2023-04-04

Family

ID=86483690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211535301.5A Pending CN115904984A (en) 2022-11-30 2022-11-30 System and method for determining test case, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115904984A (en)

Similar Documents

Publication Publication Date Title
US8745641B1 (en) Automatic verification and anomaly detection in a representational state transfer (REST) application programming interface
WO2020108063A1 (en) Feature word determining method, apparatus, and server
CN108628748B (en) Automatic test management method and automatic test management system
CN111176996A (en) Test case generation method and device, computer equipment and storage medium
EP4322009A1 (en) Test case generation method, apparatus and device
US20220414463A1 (en) Automated troubleshooter
CN112416778A (en) Test case recommendation method and device and electronic equipment
WO2023142451A1 (en) Workflow generation methods and apparatuses, and electronic device
CN112328489A (en) Test case generation method and device, terminal equipment and storage medium
CN113657088A (en) Interface document analysis method and device, electronic equipment and storage medium
CN109947651B (en) Artificial intelligence engine optimization method and device
CN112989797B (en) Model training and text expansion methods, devices, equipment and storage medium
CN111492364B (en) Data labeling method and device and storage medium
CN114461665B (en) Method, apparatus and computer program product for generating a statement transformation model
CN111078529A (en) Client write-in module testing method and device and electronic equipment
CN116340172A (en) Data collection method and device based on test scene and test case detection method
CN115904984A (en) System and method for determining test case, electronic device and storage medium
CN116049370A (en) Information query method and training method and device of information generation model
CN115309706A (en) Method, device, equipment, medium and product for updating multi-language configuration file
CN113886748A (en) Method, device and equipment for generating editing information and outputting information of webpage content
CN114239562A (en) Method, device and equipment for identifying program code blocks in document
CN112560466A (en) Link entity association method and device, electronic equipment and storage medium
CN115965018B (en) Training method of information generation model, information generation method and device
US11893048B1 (en) Automated indexing and extraction of multiple information fields in digital records
CN113705206B (en) Emotion prediction model training method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination