Automatic use case generation method, product, storage medium and electronic equipment

By parsing and nesting natural language text, automated use cases are generated, which solves the problem of low generation efficiency caused by the strict format of requirement documents and realizes efficient automated use case generation for natural language documents.

CN120803898APending Publication Date: 2025-10-17BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410404985.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-03
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In the existing technology, due to the strict format requirements of the requirements document, the efficiency of automated use case generation is low and the flexibility of natural language text cannot be effectively utilized.

Method used

By parsing natural language text, extracting scenario requirement information and control rules, obtaining input signals and output signals, and nesting them in the use case expression format to generate automated use cases, avoiding special requirements for the requirement document format.

Benefits of technology

The efficiency of automatic use case generation has been improved, making it possible to directly generate automatic use cases without the need for natural language documents in a specific format, thereby improving generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803898A_ABST
    Figure CN120803898A_ABST
Patent Text Reader

Abstract

The invention provides an automatic use case generation method, a product, a storage medium and electronic equipment, and the method comprises the steps: obtaining a demand document, and extracting a natural language text in the demand document; the natural language text is a product demand text which is recorded in the demand document and is not limited by a specific rule; analyzing the natural language text, and extracting scene demand information and control rules contained in the natural language text; obtaining an input signal and an output signal corresponding to the scene demand information and a use case expression format corresponding to the control rule; and nesting the input signal and the output signal in the use case expression format to generate an automatic use case. By the adoption of the scheme, no special requirement for the format of the demand document exists, and the automatic use case can be automatically generated after the demand document formed by the natural language text can be directly obtained and analyzed. Therefore, the generation efficiency of the automatic use case is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software testing, in particular to an automatic case generation method, product, storage medium and electronic equipment. BACKGROUND

[0002] In the process of generating automatic cases, it is necessary to analyze the requirement document first, and generate test cases according to the functional requirements of the software in the requirement document. In order to facilitate the extraction of functional requirements, the existing technology requires that the document be implemented in a specific language format during writing, and key data such as product field name and field rule are explicitly identified through the specific language format. The specification requirement for the field in this process is very high. However, in the actual application process, the personnel who write the requirement document are not fixed, and different personnel usually use natural language when expressing functional requirements, and the expression habits are also not the same. In actual use, the personnel who write the requirement document are required to change the expression habits to adapt to the required language format, which affects the efficiency of writing the requirement document and leads to low efficiency of generating automatic cases. SUMMARY

[0003] The technical problem to be solved by the present application is that the strict format requirement of the requirement document in the prior art leads to low efficiency of generating automatic cases. To this end, the present application provides an automatic case generation method, product, storage medium and electronic equipment.

[0004] In a first aspect, the technical solution of the present application provides an automatic case generation method, comprising:

[0005] Obtaining a requirement document and extracting natural language text in the requirement document; the natural language text is product requirement text recorded in the requirement document without specific rule limitation;

[0006] Parsing the natural language text and extracting scene requirement information and control rules contained in the natural language text;

[0007] Obtaining input signals and output signals corresponding to the scene requirement information and a case expression format corresponding to the control rules;

[0008] Embedding the input signals and the output signals in the case expression format to generate automatic cases.

[0009] In some schemes, the automatic case generation method comprises:

[0010] Identifying special symbols in the natural language text and replacing the special symbols with standard symbols to obtain cleaned text;

[0011] identifying synonymous keywords in the cleaned text and replacing the synonymous keywords with the same expression to obtain a synonym-replaced text;

[0012] extracting a control statement in the synonym-replaced text and extracting a control condition keyword in the control statement;

[0013] integrating the control condition keyword to obtain the control rule.

[0014] In some embodiments of the method for automatically generating a use case, the extracting a control statement in the synonym-replaced text and extracting a control condition keyword in the control statement further comprises:

[0015] if the control statement is a special grammar statement, replacing the special grammar statement with a synonymous standard grammar statement.

[0016] In some embodiments of the method for automatically generating a use case, the parsing the natural language text and extracting scenario requirement information and a control rule contained in the natural language text comprises:

[0017] identifying signal definition information in the natural language text, the signal definition information comprising a signal name, a signal meaning, a signal value range, or a signal enumerated value;

[0018] converting the signal definition information expressed in a natural language into a signal definition information expression as the scenario requirement information.

[0019] In some embodiments of the method for automatically generating a use case, the converting the signal definition information expressed in a natural language into a signal definition information expression as the scenario requirement information comprises:

[0020] if the signal definition information expressed in a natural language comprises a logical description keyword, unifying an expression of the logical description keyword; the logical description keyword is used to represent a signal value changing according to a rule.

[0021] In some embodiments of the method for automatically generating a use case, the obtaining an input signal and an output signal corresponding to the scenario requirement information and a use case expression format corresponding to the control rule comprises:

[0022] parsing a correspondence between the control condition keyword and the signal definition information to determine the signal definition information of the input signal and the output signal;

[0023] calling a correspondence between a preset control rule and a standard use case expression format to determine the use case expression format matching the control rule.

[0024] The automation use case generation method in some solutions further includes:

[0025] Obtaining all the automation use cases and comparing input signals and output signals of different automation use cases;

[0026] If a plurality of automation use cases have the same input signals and output signals, the plurality of automation use cases are integrated into one.

[0027] The automation use case generation method in some solutions includes the following steps of obtaining a requirement document and extracting natural language text in the requirement document:

[0028] Sending request information of the requirement document through a third-party interface, the request information containing a key;

[0029] Receiving the requirement document fed back by an external system based on the request information.

[0030] In a second aspect, the technical solution of the present application provides a computer program product, including computer programs / instructions, characterized in that the computer programs / instructions are executed by a processor to realize the steps of the automation use case generation method in any one of the technical solutions of the first aspect.

[0031] In a third aspect, the technical solution of the present application provides a computer readable storage medium, in which program information is stored. After the program information is read by a computer, the automation use case generation method in any one of the first aspect is executed.

[0032] In a fourth aspect, the technical solution of the present application provides an electronic device, including at least one processor and at least one memory. Program information is stored in at least one of the memories. After the program information is read by at least one of the processors, the automation use case generation method in any one of the first aspect is executed.

[0033] The above technical solution has the following beneficial effects:

[0034] The automatic case generation method, device, storage medium and electronic equipment provided in the application can analyze the natural language text obtained from the requirement document, extract the scene requirement information and control rules contained in the natural language text, and determine the input signal and output signal corresponding to the scene requirement information and the case expression format corresponding to the control rules, and generate an automatic case by nesting the input signal and output signal in the case expression format. The scheme in the application has no special requirements for the format of the requirement document. As long as the requirement document is formed by natural language text, the automatic case can be directly obtained and analyzed to automatically generate the automatic case. Therefore, the generation efficiency of the automatic case is improved. BRIEF DESCRIPTION OF DRAWINGS

[0035] Figure 1 A flowchart of an automatic case generation method in an embodiment of the application;

[0036] Figure 2 A structural block diagram of an automatic case generation device in an embodiment of the application;

[0037] Figure 3 A structural block diagram of an automatic case generation device in another embodiment of the application;

[0038] Figure 4 A schematic diagram of the hardware connection relationship of an electronic device in an embodiment of the application. DETAILED DESCRIPTION

[0039] The specific embodiments of the application will be further described below with reference to the accompanying drawings.

[0040] It is easy to understand that, according to the technical scheme of the application, a person skilled in the art can replace various structural modes and implementation modes without changing the essential spirit of the application. Therefore, the following specific embodiments and drawings are only exemplary descriptions of the technical scheme of the application, and should not be regarded as the whole or as a limitation or restriction on the technical scheme of the application.

[0041] In this specification, the orientation terms such as up, down, left, right, front, back, front, back, top, bottom, etc. mentioned or possibly mentioned are defined with respect to the structure shown in the drawings, and they are relative concepts, so they may change accordingly according to their different positions, different use states. Therefore, these or other orientation terms should not be interpreted as limiting terms.

[0042] An automatic case generation method provided in an embodiment of the application is applied in an automatic test system, as shown in Figure 1 The method comprises the following steps:

[0043] S10: Obtain a requirement document and extract natural language text in the requirement document; the natural language text is product requirement text recorded in the requirement document without specific rule restrictions.

[0044] The requirement document can be written by a writer in natural language text according to the writer's own expression habits, without the need to follow special format requirements.

[0045] For example, a voice recognition module of a vehicle control module is tested, and it is assumed that it is necessary to identify whether the person to whom the voice belongs is a whitelist member recorded in the voice recognition module. At this time, a step of judging the correspondence between the person information is required, and some writers may define it as "whether the name of the voice owner is recorded in the whitelist", some writers may define it as "whether the voice owner has permission", and some writers may define it as "whether the voiceprint recognition result is successfully identified". Although different writers will write requirement documents according to their own language habits during writing, they are actually all testing the function of the voice recognition module for voice recognition and permission allocation. Through the scheme of the present application, the above natural language text can be parsed. Unlike the prior art scheme, the fields of sound, permission, etc. must be strictly specified when writing the document.

[0046] S20: Analyze the natural language text and extract scenario requirement information and control rules contained in the natural language text.

[0047] The natural language text is usually expressed in Chinese, and the natural language text can be parsed using Chinese word segmentation and sentence segmentation. For words or phrases with specific scenario requirements in the natural language text, words or phrases related to special control and rules can be extracted.

[0048] For example, "whether the name of the voice owner is recorded in the whitelist", the keyword "voice" can determine that it involves voice recognition scenario requirements, and "whether", "in", and "whitelist" can determine that it involves permission determination scenario requirements. In "whether the voice can be accurately recognized when the voice volume is lower than xx decibels", "lower than xx decibels" and "accurately recognized" involve the control rule of controlling the device that emits sound to reduce the volume. That is, in the present scheme, the control rule is determined based on the analysis and processing of the natural language text, and it is not required to write the description of the control rule part according to a certain requirement or format, without limiting the expression order, special nouns, or grammar.

[0049] S30: Obtain input signals and output signals corresponding to the scenario requirement information and use case expression formats corresponding to the control rules.

[0050] The data storage space can be pre-set, in which various scene requirement information and input signals and output signals corresponding relationship, and control rule corresponding use case expression format are pre-stored. It can also be determined according to the keywords parsed from the natural language text, and the related input signals and output signals.

[0051] For example, in "whether the name of the sound owner is recorded in the white list", it is clear that it is a voice recognition scene, then the input signal corresponds to "voice", and the output signal corresponds to "yes" or "no", that is, whether the personnel who can accurately identify the voice can execute the control function contained in the voice.

[0052] S40: nesting the input signal and the output signal in the use case expression format to generate an automated use case.

[0053] When the input signal and the output signal are determined, the existing use case expression format can be combined to determine the automated use case.

[0054] The automated use case generation method in the above scheme can parse the natural language text obtained from the requirement document, extract the scene requirement information and control rules contained in the natural language text, determine the input signal and output signal corresponding to the scene requirement information and the use case expression format corresponding to the control rule, and generate an automated use case by nesting the input signal and the output signal in the use case expression format. The scheme in the present application has no special requirements for the format of the requirement document. As long as the requirement document is formed by natural language text, the automated use case can be directly obtained and analyzed to automatically generate the automated use case. Therefore, the generation efficiency of the automated use case is improved.

[0055] In some schemes, in the step S20, the parsing of the natural language text and the extraction of the scene requirement information and the control rule contained in the natural language text can include:

[0056] S201: identifying special symbols in the natural language text and replacing the special symbols with standard symbols to obtain a cleaned text.

[0057] This step is used for text cleaning of the natural language text, and the special symbols are replaced, for example, punctuation marks, Chinese full-width half-width, etc. The symbols are unified into standard symbols of the same format.

[0058] S202: identifying synonymous keywords in the cleaned text and replacing the synonymous keywords with the same expression to obtain a synonymous replaced text, and replacing Chinese operator symbols into mathematical symbols, etc.

[0059] This step is used to uniformly normalize the synonyms in the requirement document description. For example, synonyms such as "when | if" are replaced.

[0060] S203: Extract the control statement in the synonym-replaced text, and extract the control condition keywords in the control statement.

[0061] This step is used to extract the complete control statement in the requirement document. For example, "when signal1_value = 1 and signal2_value = 2, then signal3_value = 3". In specific implementation, punctuation marks can be used to divide the whole sentence, such as "." and ";", which are placed at the end of the complete expression sentence, and the complete sentence can be determined according to the above symbols. This step is also used to extract the condition statement in the control logic. For example, "signal1_value = 1 and signal2_value = 2" can be extracted.

[0062] S204: The control condition keywords are integrated to obtain the control rule.

[0063] According to the analysis result of the above steps, the input and output signals and the control rule can be determined. For example, the sentence "when signal1_value = 1 and signal2_value = 2, then signal3_value = 3", the control rule corresponds to "the input signal is signal1_value, signal2_value, the output signal is signal3_value, and the control rule is to let the two input signals be 1 and 2, and let the output signal be 3".

[0064] Further, in step S203, the extraction of the control statement in the synonym-replaced text and the extraction of the control condition keywords in the control statement further include: if the control statement is a special grammar statement, the special grammar statement is replaced by a synonymous standard grammar statement. For example, the special grammar is converted. For example, "the value of signal1_value is 1 or 2" can be converted to "signal1_value = 1 or signal1_value = 2".

[0065] Through the above scheme, the input and output signals and the control rule can be extracted after the natural language text is parsed, therefore, there is no special requirement for the process of writing the requirement document, as long as the natural language is used for writing, even if there are some different expression habits, different expressions for the same meaning in the natural language can be recognized, and the key information can be automatically recognized and extracted through synonym replacement of keywords.

[0066] In some schemes, the step S20 further comprises:

[0067] S205: identifying signal definition information in the natural language text, the signal definition information including a signal name, a signal meaning, a signal value range, or a signal enumerated value list.

[0068] In a specific implementation, a functional requirement is extracted from a requirement document of the natural language text, and the functional requirement includes signal definition, including a signal name, a signal meaning, a signal value range, or a signal enumerated value list.

[0069] For example, when a functional test case is generated for a function in a vehicle, the natural language text in the requirement document is as follows:

[0070] When RESts_Inner is 0 or 3, MSG_VehDrvMd is output as 1: pure electricity.

[0071] When RESts_Inner is not 0 and not 3, RESSCur is greater than 1A (configurable) and less than 4053.5A (configurable), MSG_VehDrvMd is output as 2: hybrid.

[0072] When RESts_Inner is not 0 and not 3, RESSCur is less than 0A (configurable), MSG_VehDrvMd is output as 3: fuel.

[0073] In other cases, the output of MSG_VehDrvMd remains the value at the previous moment.

[0074] The signal statement therein is: “RESts_Inner (M) extended range device working state (X platform)”; the signal name is RESts_Inner; RESSCur; the enumerated value is {0x0: Off, 0x1: Start, 0x2: Run, 0x3: Stop, 0x4: Stall}; and the value range is [-2500, 2500].

[0075] S206: converting the signal definition information expressed in the natural language into a signal definition information expression as the scenario requirement information. The assignment statement in the form of Chinese text is converted into a formal expression, and the signal definition is extracted to obtain the possible value of the signal. Some signal value ranges are data ranges, which are expressed in the form of intervals. The assignment statement in the above example can be summarized as:

[0076] # Condition: RESts_Inner == 0 || RESts_Inner == 3, action MSG_VehDrvMd = 1;

[0077] # Condition: RESts_Inner!= 0 && RESts_Inner!= 3 && RESSCur > 1 && RESSCur < 4053.5, Action MSG_VehDrvMd = 2;

[0078] # Condition: RESts_Inner!= 0 && RESts_Inner!= 3 && RESSCur < 0, Action MSG_VehDrvMd = 3;

[0079] # Else: MSG_VehDrvMd = Keep the last time.

[0080] Further, if the signal definition information of the natural language expression includes a logic description keyword, the expression of the logic description keyword is unified; the logic description keyword is used to represent that the signal value changes according to a rule. For example, there is an offset between input and output signal values, and the description logic is "offset minus one", and similar logic descriptions need to be specially processed.

[0081] In some schemes, in step S30, the input signal and the output signal corresponding to the scene requirement information and the use case expression format corresponding to the control rule are acquired, including:

[0082] S301: Analyzing the corresponding relationship between the control condition keyword and the signal definition information, and determining the signal definition information of the input signal and the output signal. The control condition keyword and the signal definition information have a corresponding relationship, and the input signal and the output signal also have a corresponding relationship with the control condition, so the signal definition information of the input signal and the output signal can be determined.

[0083] Input signal: RESts_Inner (M) range extender working state (X platform); 0x0: Off; 0x1: Start; 0x2: Run; 0x3: Stop; 0x4: Stalling; RESSCur power battery charging and discharging current; valid value: -2500-2500A; invalid value: 65535*0.1-2500=4053.5; output signal: MSG_VehDrvMd; 0x01: pure electricity; 0x02: hybrid; 0x03: fuel; 0xFE: indicating abnormality; 0xFF: indicating invalidity.

[0084] S302: retrieve the correspondence between the preset control rule and the standard case expression format, and determine the case expression format matched with the control rule. The correspondence between the control rule and the case expression format is stored in advance, and the case expression format can be determined as long as the control rule is determined. For example, "the value of xxx is 1 or 2 or 3" is converted into xxx==1||xxx==2||xxx==3; the Chinese operators such as "greater than or equal to" and "less than or equal to" are converted into standard operators; "when, if" is uniformly converted into "if"; "not" is converted into "not equal to"; "not satisfying the above conditions" is converted into "otherwise"; in this way, the rules corresponding to different expression modes can be converted into a unified expression format.

[0085] Specifically, the text form expression is converted into a symbolic representation, based on the signal conditions and signal value domains contained in the expression, the entire valid input combination situation is derived, in some cases, the signal name exists the hump and the underscore conversion situation, based on the input and output value combination situation, the complete case is determined.

[0086] In some schemes, the above method can further include:

[0087] S50: obtaining all the automation cases, and comparing the input signals and the output signals of different automation cases.

[0088] This step is used to compare the input and output signals of any two automation cases, and determine whether the input signals and the output signals are the same.

[0089] S60: if a plurality of automation cases have the same input signals and output signals, the plurality of automation cases are integrated into one.

[0090] For the cases with the same signal input and output, the merging processing is performed to reduce the number of case files.

[0091] In some schemes, in the step S10, the requirement document is obtained, and the natural language text in the requirement document is extracted, including: sending request information of the requirement document through a third-party interface, the request information containing a key; receiving the requirement document fed back by an external system based on the request information. In this step, the third-party interface is mainly responsible for the connection with the knowledge management system. The main function is to extract the requirement document from the knowledge management system, support to obtain the tenant Token using the key, replace the application Token using the tenant Token, and further call the interface to obtain the requirement document using the application Token.

[0092] The embodiment of the application further provides an automation case generation device, as shown in Figure 2 and Figure 3 The device includes:

[0093] The data receiving module 10 is configured to obtain a requirement document and extract natural language text in the requirement document. The requirement document can be written by a writer in natural language text according to the writer's own expression habit, without the need to follow a special format requirement.

[0094] The parsing module 20 is configured to parse the natural language text and extract scene requirement information and control rules contained in the natural language text. The natural language text is usually in Chinese expression form, which can be parsed by using Chinese word segmentation and sentence segmentation. For words or phrases with specific scene requirements in the natural language text, or words or phrases related to special control and rules, they can be extracted.

[0095] The information obtaining module 30 is configured to obtain input signals and output signals corresponding to the scene requirement information and use case expression formats corresponding to the control rules. A data storage space can be pre-set, in which various scene requirement information and input signals and output signals corresponding relationship and use case expression formats corresponding to the control rules are pre-stored. Alternatively, the relevant input signals and output signals can be determined according to the key words parsed from the natural language text.

[0096] The use case generation module 40 is configured to nest the input signals and the output signals in the use case expression format to generate an automated use case. When the input signals and the output signals are determined, the automated use case can be determined in combination with the existing use case expression format. As shown in the figure, it includes expression parsing, signal value derivation, signal name conversion, use case generation and use case merging sub-modules. Figure 3

[0097] The automated use case generation device in the above scheme can parse the natural language text in the obtained requirement document, extract scene requirement information and control rules contained in the natural language text, determine input signals and output signals corresponding to the scene requirement information and use case expression formats corresponding to the control rules, and nest the input signals and the output signals in the use case expression format to generate an automated use case. The scheme in the present application has no special requirement for the format of the requirement document. As long as the requirement document is formed by natural language text, the automated use case can be directly obtained and analyzed to generate the automated use case. Therefore, the generation efficiency of the automated use case is improved.

[0098] ​In some schemes, the above analysis module 20 is used to identify special symbols in the natural language text and replace the special symbols with standard symbols to obtain a cleaned text; identify synonymous keywords in the cleaned text and replace the synonymous keywords with the same expression to obtain a synonymous replaced text; extract control statements in the synonymous replaced text, and extract control condition keywords in the control statements; and integrate the control condition keywords to obtain the control rule. The natural language text is subjected to text cleaning, and special symbols are replaced, such as punctuation marks, Chinese full-width and half-width, etc. The symbols are all unified into standard symbols of the same format. Chinese operator symbols are replaced with mathematical symbols, etc. Synonymous words in the requirement document description are standardized. Synonymous words such as "when | if" are replaced. Complete control statements in the requirement document are extracted. For example, "when signal1_value = 1 and signal2_value = 2, then signal3_value = 3". In specific implementation, the complete sentence can be divided according to punctuation marks, such as "." and ";", which are placed at the end of the complete expression sentence, and the complete sentence can be determined according to the above symbols. This step is also used to extract the condition statement in the control logic. The example can extract "signal1_value = 1 and signal2_value = 2". According to the above analysis result, the input and output signals and the control rule can be determined, for example, the sentence "when signal1_value = 1 and signal2_value = 2, then signal3_value = 3", the control rule corresponds to: the input signal is signal1_value, signal2_value, the output signal is signal3_value, and the control rule is to let the two input signals be 1 and 2, and let the output signal be 3. Specifically, as shown in Figure 3 The analysis module can include a scene requirement analysis and a control rule extraction two units, and the scene requirement analysis includes a requirement extraction, a signal definition analysis, an assignment logic analysis, an enumeration value extraction, a data range extraction, a special logic compatibility, etc. sub-modules. In the control rule extraction, there are text cleaning, synonymous word replacement, symbol replacement, statement extraction, condition extraction and grammar conversion, etc. sub-modules.

[0099] Further, the parsing module 20 is further configured to: if the control statement is a special grammar statement, replace the special grammar statement with a synonymous standard grammar statement. For example, convert the special grammar. For example, if the value of signal1_value is 1 or 2, it can be converted to signal1_value = 1 or signal1_value = 2. Through the above scheme, the input and output signals and control rules can be extracted after the natural language text is parsed, and therefore, there is no special requirement for the process of writing the requirement document. As long as the natural language is used for writing, even if there are some different expression habits, the key information can be automatically recognized and extracted according to the synonymous replacement of the key words.

[0100] In some schemes, the parsing module 20 is further configured to identify signal definition information in the natural language text, the signal definition information including a signal name, a signal meaning, a signal value range, or a signal enumeration value list; and convert the signal definition information expressed in the natural language into a signal definition information expression as the scene requirement information. In specific implementation, the functional requirements are extracted from the requirement document of the natural language text, and the functional requirements include signal definition, including signal name, signal meaning, signal value range, or signal enumeration value list. The assignment statement in Chinese text form is converted into a formal expression, and the signal definition is extracted. Further, the parsing module 20 is further configured to: if the signal definition information expressed in the natural language includes a logic description keyword, unify the expression of the logic description keyword; and the logic description keyword is used to represent that the signal value changes according to a rule. For example, there is an offset between the input and output signal values, and the description logic is “decrease by one offset”, and similar logic descriptions need to be specially processed.

[0101] In some schemes, the information acquisition module 30 is further configured to parse a corresponding relationship between the control condition keyword and the signal definition information, and determine the signal definition information of the input signal and the output signal. The corresponding relationship between the control rule and the standard use case expression format is stored in advance, and the use case expression format matching the control rule is determined. The control condition keyword and the signal definition information have a corresponding relationship, and the input signal and the output signal also have a corresponding relationship with the control condition, so that the signal definition information of the input signal and the output signal can be determined. The corresponding relationship between the control rule and the use case expression format is stored in advance, and the use case expression format can be determined as long as the control rule is determined. Specifically, the text expression is converted into a symbolic representation, and based on the signal condition and the signal value range contained in the expression, the entire valid input combination is derived. In some cases, the signal name is converted between camel case and underscore, and based on the input and output value combination, the complete use case is determined.

[0102] In some embodiments, the device further comprises an integration module configured to obtain all the automation use cases and compare input signals and output signals of different automation use cases. If a plurality of automation use cases have the same input signals and output signals, the plurality of automation use cases are integrated into one. The input and output signals of any two automation use cases are compared to determine whether the input signals and the output signals are the same. For use cases with the same signal input and output, merging processing is performed to reduce the number of use case files.

[0103] In some embodiments, a third-party interface is further included, through which request information of the demand document is sent, and the request information includes a key; and the demand document fed back by an external system based on the request information is received. The third-party interface is mainly responsible for interfacing with the knowledge management system. As shown in Figure 3 The third-party interface part includes three functional units of obtaining a user token, obtaining an application token, and obtaining a document block. The main function is to extract the demand document from the knowledge management system, support the use of the key to obtain the tenant Token, use the tenant Token to replace the application Token, and use the application Token to further call the interface to obtain the demand document.

[0104] The embodiments of the present application further provide a computer program product, including computer programs / instructions, characterized by the computer programs / instructions being executed by a processor to implement the steps of the automation use case generation method in any one of the above method embodiments.

[0105] The embodiments of the present application further provide a computer readable storage medium, which stores program information, and a computer reads the program information to execute the automation use case generation method in any one of the above method embodiments.

[0106] The embodiments of the present application further provide an electronic device, such as Figure 4As shown, the electronic device includes at least one processor 41 and at least one memory 42, at least one of the memories 42 stores program information, and at least one of the processors 41 reads the program information and executes the automated use case generation method described in any of the above method embodiments. The device can also include an input device 43 and an output device 44. The processor 41, memory 42, input device 43 and output device 44 can be communicatively connected. The memory 42, as a non-volatile computer readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The processor 41 executes various functional applications and data processing by running the non-volatile software programs, instructions and modules stored in the memory 42, that is, implements the automated use case generation method provided in any of the above schemes. The memory 42 can include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function; the data storage area can store data created according to the use of the automated use case generation method, etc. In addition, the memory 42 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 42 can optionally include a memory remotely arranged with respect to the processor 41, which can be connected to the device executing the automated use case generation method through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof. The input device 43 can receive input user clicks and generate signal inputs related to user settings and function controls of the automated use case generation method. The output device 44 can include a display device such as a display screen. When the one or more modules are stored in the memory 42 and run by the one or more processors 41, the automated use case generation method in any of the above method embodiments is executed.

[0107] According to the needs, the above technical solutions can be combined to achieve the best technical effect.

[0108] The above is only the principles and preferred embodiments of the present application. It should be noted that for those skilled in the art, on the basis of the principles of the present application, a number of other variations can also be made, which should be considered as the protection scope of the present application.

Claims

1. An automated use case generation method, characterized in that: include: Obtaining a requirements document and extracting natural language text from the requirements document; The natural language text is the product requirement text recorded in the requirement document without any specific rule restrictions; Parsing the natural language text to extract scenario requirement information and control rules contained in the natural language text; Acquire an input signal and an output signal corresponding to the scenario requirement information and a use case expression format corresponding to the control rule; The input signal and the output signal are nested in the use case expression format to generate an automated use case.

2. The automated use case generation method according to claim 1, wherein: The parsing of the natural language text to extract the scenario requirement information and control rules contained in the natural language text includes: Identifying special symbols in the natural language text and replacing the special symbols with standard symbols to obtain a cleaned text; Identifying synonymous keywords in the cleaned text and replacing the synonymous keywords with the same expressions to obtain a synonym-replaced text; Extracting the control statement in the text after synonym replacement, and extracting the control condition keywords in the control statement; The control rule is obtained by integrating the control condition keywords.

3. The method for generating an automated use case according to claim 2, wherein: The step of extracting the control statement from the text after synonymous replacement and extracting the control condition keywords from the control statement also includes: If the control statement is a special grammar statement, the special grammar statement is replaced with a synonymous standard grammar statement.

4. The method for generating an automated use case according to claim 1, wherein: The parsing of the natural language text to extract the scenario requirement information and control rules contained in the natural language text includes: Identifying signal definition information in the natural language text, the signal definition information including a signal name, a signal meaning, a signal value range, or a signal enumeration value; The signal definition information expressed in natural language is converted into a signal definition information expression as the scenario requirement information.

5. The method for generating an automated use case according to claim 4, wherein: The signal definition information expressed in natural language is converted into a signal definition information expression as the scenario requirement information: If the signal definition information in the natural language expression includes logic description keywords, the expression of the logic description keywords is unified; the logic description keywords are words indicating that signal values ​​change according to a rule.

6. The method for generating an automated use case according to claim 5, wherein: The obtaining of the input signal and the output signal corresponding to the scenario requirement information and the use case expression format corresponding to the control rule includes: parsing the correspondence between the control condition keywords and the signal definition information to determine the signal definition information of the input signal and the output signal; The correspondence between the preset control rules and the standard use case expression format is retrieved to determine the use case expression format that matches the control rules.

7. The method for generating an automated use case according to any one of claims 4 to 6, wherein: Also includes: Obtaining all the automation use cases, and comparing input signals and output signals of different automation use cases; If multiple automation use cases have the same input signal and the same output signal, the multiple automation use cases are integrated into one test case.

8. The method for generating an automated use case according to claim 1, wherein: The step of obtaining a requirement document and extracting natural language text from the requirement document includes: Sending a request message for a demand document through a third-party interface, wherein the request message includes a key; The requirement document fed back by the external system based on the request information is received.

9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method for automatic use case generation according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium, characterized in that The storage medium stores program information, and the computer reads the program information and executes the automatic use case generation method according to any one of claims 1 to 8.

11. An electronic device, characterized in that: The electronic device includes at least one processor and at least one memory, at least one of the memories stores program information, and at least one of the processors reads the program information and executes the automatic use case generation method according to any one of claims 1 to 8.