WO2023236114A1 - Industrial test script generation method and apparatus, and storage medium - Google Patents

Industrial test script generation method and apparatus, and storage medium Download PDF

Info

Publication number
WO2023236114A1
WO2023236114A1 PCT/CN2022/097686 CN2022097686W WO2023236114A1 WO 2023236114 A1 WO2023236114 A1 WO 2023236114A1 CN 2022097686 W CN2022097686 W CN 2022097686W WO 2023236114 A1 WO2023236114 A1 WO 2023236114A1
Authority
WO
WIPO (PCT)
Prior art keywords
sequence
word
natural language
test script
words
Prior art date
Application number
PCT/CN2022/097686
Other languages
French (fr)
Chinese (zh)
Inventor
刘宁
Original Assignee
西门子股份公司
西门子(中国)有限公司
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 西门子股份公司, 西门子(中国)有限公司 filed Critical 西门子股份公司
Priority to PCT/CN2022/097686 priority Critical patent/WO2023236114A1/en
Publication of WO2023236114A1 publication Critical patent/WO2023236114A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • the present application relates to the field of computers, and in particular to an industrial test script generation method, device and computer-readable storage medium.
  • Testing is an important part of ensuring product quality in the industrial product development process.
  • test engineers want to generate test cases that cover all combinations of each input variable of the equipment, verifying that a specific industrial application works as expected. This is a huge project.
  • embodiments of the present application provide, on the one hand, an industrial test script generation method, and on the other hand, an industrial test script generation device and a computer-readable storage medium, which can realize automatic generation of industrial test scripts and improve industrial testing. flexibility and efficiency.
  • An industrial test script generation method including: receiving a natural language test case written in natural language for testing an industrial application; the natural language test case includes a natural language describing an operation of testing the industrial application in natural language command; perform sentence segmentation on the natural language test case to obtain multiple natural language commands, and represent each natural language command as a sequence of words to be processed; for each sequence of words to be processed, use it as a pre-trained Good sequence-to-sequence model input, and obtain the target word sequence output by the sequence-to-sequence model associated with an industrial test script function; the sequence-to-sequence model takes a word sequence corresponding to a historical natural language command as an input sample , obtained by training with the word sequence of the industrial test script function corresponding to the historical natural language command as the output sample; determining the corresponding industrial test script function based on the target word sequence; using the obtained industrial test script function corresponding to each natural language command Connect in a sequence consistent with the ordering of each natural language command to obtain an industrial test script corresponding to the natural language test case.
  • An industrial test script generation device including: a first module for receiving natural language test cases written in natural language for testing an industrial application; the natural language test cases include testing the industrial application described in natural language The natural language command of the application operation; the second module is used to segment the natural language test case into sentence segments, obtain multiple natural language commands, and represent each natural language command as a sequence of words to be processed; the third module A module configured to use each word sequence to be processed as an input to a pre-trained sequence-to-sequence model, and obtain a target word sequence output by the sequence-to-sequence model that is associated with an industrial test script function; The sequence-to-sequence model is trained using the word sequence corresponding to the historical natural language command as an input sample and the word sequence of the industrial test script function corresponding to the historical natural language command as the output sample; the fourth module is used to train based on the The target word sequence determines the corresponding industrial test script function; the fifth module is used to connect the obtained industrial test script functions corresponding to each natural language command in an order consistent with the
  • An industrial test script generation device includes at least one memory and at least one processor, wherein: the at least one memory is used to store a computer program; the at least one processor is used to call the computer program stored in the at least one memory, Execute the industrial test script generation method as described in any of the above embodiments.
  • a computer-readable storage medium has a computer program stored thereon; the computer program can be executed by a processor and implement the industrial test script generation method as described in any of the above embodiments.
  • a sequence-to-sequence model capable of deep learning is obtained by pre-training by using historical natural language commands and their corresponding industrial test script functions.
  • the test cases can be segmented into statements, and we get For each natural language command, the corresponding industrial test script function can then be obtained based on the sequence-to-sequence model reasoning.
  • the obtained industrial test script functions can be connected according to the order of each natural language command in the test case, and the corresponding industrial test script function can be obtained.
  • the industrial test script for test cases realizes a fully automatic workflow from test cases to test scripts, saving the workload of test engineers.
  • Figure 1 is an exemplary flow chart of an industrial test script generation method in an embodiment of the present application.
  • Figure 2 is a schematic structural diagram of a sequence-to-sequence model in the embodiment of the present application.
  • Figure 3 is an exemplary structural diagram of an industrial test script generating device in an embodiment of the present invention.
  • Figure 4 is an exemplary structural diagram of another industrial test script generation device in an embodiment of the present application.
  • Figure 1 is an exemplary flow chart of an industrial test script generation method in an embodiment of the present application. As shown in Figure 1, the method may include the following steps:
  • Step 101 Receive natural language test cases written in natural language for testing an industrial application.
  • the natural language test cases include natural language commands describing operations of the industrial application described in natural language.
  • an example of a natural language test case for panel alarm LED light inspection includes the following:
  • Test Case-Panel Alarm LED Check Test Case-Panel Alarm LED Check
  • step 1 includes two natural language commands, namely: 1.1 Check the panel is normal (check whether the panel is normal), 1.2 Check the panel Alarm LED is off (check whether the panel alarm LED light is off).
  • step 2 includes two natural language commands, namely: 2.1 Make an alarm from any type of device (issue an alarm from any type of device), 2.2 Check the panel Alarm LED should be kept on (check whether the panel alarm LED light should be stay lit).
  • Step 3 includes four natural language commands, namely: 3.1 Remove the alarm event (remove the alarm event), 3.2 Reset panel (reset the panel); 3.3 Check the panel is normal (check whether the panel is normal), 3.4 Check the Alarm LED is off (check whether the alarm LED light is off).
  • Step 102 Segment the natural language test case into sentence segments to obtain multiple natural language commands, and represent each natural language command as a sequence of words to be processed.
  • the natural language command "Check the panel is normal” as an example, the corresponding word sequence to be processed is ⁇ Check,the,panel,is,normal ⁇ .
  • the "word” here refers to the smallest component unit in the sentence of that language.
  • the "word” here refers to each Chinese character.
  • Step 103 For each word sequence to be processed, use it as the input of a pre-trained sequence-to-sequence model, and obtain the target word sequence output by the sequence-to-sequence model associated with an industrial test script function; so The sequence-to-sequence model is trained by taking the word sequence corresponding to the historical natural language command as an input sample, and using the word sequence of the industrial test script function corresponding to the historical natural language command as the output sample.
  • Figure 2 shows a schematic structural diagram of a sequence-to-sequence model in an embodiment of the present invention.
  • the sequence-to-sequence model is a sequence-to-sequence model with a bidirectional long short-term memory network (LSTM, Long Short-Term Memory) encoder and LSTM decoder.
  • LSTM long short-term memory network
  • all words in the word sequence to be processed are input into the sequence-to-sequence model in order.
  • all words in the word sequence to be processed are input into the LSTM encoder of the model at each timestamp, and the LSTM encoder is embedded
  • a context-aware representation vector is obtained.
  • the LSTM decoder selects a word w i at time t.
  • the hidden layer state h i at time i will be fed into the LSTM decoder at time t+1.
  • the sequence-to-sequence model then outputs a target word sequence associated with an industrial test script function.
  • the degree of attention paid to the j-th word of the input word sequence to be processed (hereinafter referred to as the input sequence) at the moment when the second word is generated; is the value of the hidden layer of the j-th word in the input sequence; J is the length of the input sequence word; is the value of the hidden layer of the second word in the output sequence; is the value of the hidden layer of the second word in the output sequence after adding the attention mechanism.
  • is the vector splicing symbol
  • W and b are learnable parameters.
  • the sequence-to-sequence model can extract target words from a vocabulary based on inference results.
  • the vocabulary list may include all words obtained by deduplicating all words in the function name (or function name and parameters) of each industrial test script function. If the inference result indicates that the required target word is not in the vocabulary, the target word can be directly copied from the input sequence (ie, the input sequence of words to be processed). That is to say, the words composing the target word sequence may be words extracted from a vocabulary, or may be words copied from the word sequence to be processed.
  • sequence-to-sequence model determines the words output at each moment in the target word sequence based on the following operations:
  • p gen,t is the choice at time t whether to generate a word from the vocabulary or select a word from the input sequence.
  • is the sigmoid function; It is the weighted sum of the attention and hidden layer values of all words in the input sequence at the moment when the t-th word is generated; is the value of the hidden layer of the t-th word in the output sequence; E y,t-1 is the value of the hidden layer that produced the word at the previous moment (t-1), W s,z , W s,h , W s, E , b s are learnable parameters.
  • the output probability distribution P g (y t ) of each word in the vocabulary at time t and the attention distribution P c (y t ) of each word in the input sequence at time t are determined according to the following formulas (2) and (3) respectively. :
  • y t is the word that needs to be output generated at time t
  • P vocab,t (y t ) is the probability of generating y t from the vocabulary at time t
  • is the vocabulary
  • is the union symbol
  • unk is the defined unknown character symbol
  • is the vocabulary of the input sequence.
  • the target word sequence output by the sequence-to-sequence model may include: function name words, or include function names. words and parameter words.
  • the target word sequence output by the sequence-to-sequence model may include function name words, parameter words, and The delimiter between the function name word and the argument word.
  • the word sequence of the industrial test script function as the output sample also includes: function name words, parameter words, and words between the function name words and the parameter words. separator.
  • Step 104 Determine the corresponding industrial test script function based on the target word sequence.
  • the target word sequence it outputs will be close enough to the word sequence of the industrial test script function or even the same as the industrial test.
  • the word sequence of the script function is consistent.
  • the corresponding industrial test script function can be determined directly according to the target word sequence.
  • the target word sequence can be matched with the stored word sequence of each industrial test script function to obtain the corresponding Industrial test script functions.
  • the function name list W gen generated by ROUGE metric* can be used to search for the most similar W ground,i .
  • the word-level number of single-word overlaps, the number of two-word overlaps, and the longest common sequence between the generated W gen and W ground,i can be measured using the weighted sum of ROUGE-1, ROUGE-2, and ROUGE-L, respectively.
  • the most similar funcNamet can be found through the following formula (4):
  • ⁇ and ⁇ are preset experience values
  • FC30_AI_Normal check For example, for the natural language command "Check the panel is normal", the industrial test script function FC30_AI_Normal check can be obtained, and its parameters can be shown in Table 1 below:
  • Step 105 Connect the obtained industrial test script functions corresponding to each natural language command in an order consistent with the order of each natural language command to obtain an industrial test script corresponding to the natural language test case.
  • the industrial test script generating method in the embodiment of the present invention has been described in detail above, and the industrial test script generating device in the embodiment of the present invention will be described in detail below.
  • the industrial test script generation device in the embodiment of the present invention can be used to implement the industrial test script generation method in the embodiment of the present invention.
  • details not disclosed in the device embodiment of the present invention please refer to the corresponding description in the method embodiment of the present invention.
  • Figure 3 is an exemplary structural diagram of an industrial test script generating device in an embodiment of the present invention.
  • the device may include: a first module 301 , a second module 302 , a third module 303 , a fourth module 304 and a fifth module 305 .
  • the first module 301 is used to receive a natural language test case written in natural language for testing an industrial application;
  • the natural language test case includes a natural language command described in natural language to test the operation of the industrial application.
  • the second module 302 is used to segment the natural language test case into sentence segments, obtain multiple natural language commands, and represent each natural language command as a sequence of words to be processed.
  • the third module 303 is configured to use each to-be-processed word sequence as an input to a pre-trained sequence-to-sequence model, and obtain the target word output by the sequence-to-sequence model associated with an industrial test script function.
  • Sequence the sequence-to-sequence model is trained by taking the word sequence corresponding to the historical natural language command as an input sample, and using the word sequence of the industrial test script function corresponding to the historical natural language command as the output sample.
  • the sequence-to-sequence model is a sequence-to-sequence model with a bidirectional long short-term memory network LSTM encoder and LSTM decoder.
  • the target word sequence output by the sequence-to-sequence model may include: function name words, parameter words, and words between the function name words and the parameter words. separator between.
  • the target word sequence may include: words extracted from a vocabulary and/or words copied from the word sequence to be processed; wherein, the words in the vocabulary include: words related to each industrial test The word associated with the script function.
  • the fourth module 304 is used to determine the corresponding industrial test script function based on the target word sequence. During specific implementation, the fourth module 304 may match the target word sequence with the stored word sequence of each industrial test script function to obtain the corresponding industrial test script function.
  • the fifth module 305 is used to connect the obtained industrial test script functions corresponding to each natural language command in an order consistent with the order of each natural language command, to obtain an industrial test script corresponding to the natural language test case.
  • the industrial test script generation device provided by this embodiment of the present application can be implemented in various ways.
  • the industrial test script generation device can be compiled into a plug-in installed in a smart terminal by using an application programming interface that conforms to specific rules, or it can be packaged into an application program for users to download and use.
  • the industrial test script generation device can be implemented in a variety of plug-in forms, such as ocx, dll and cab.
  • the industrial test script generation device provided by this implementation of the present application can also be implemented by using specific technologies, such as Flash plug-in technology, RealPlayer plug-in technology, MMS plug-in technology, MIDI plug-in technology or ActiveX plug-in technology.
  • the industrial test script generation method provided by this implementation of the present application can be stored in various storage media in an instruction storage mode or an instruction set storage mode.
  • These storage media include but are not limited to: floppy disk, optical disk, DVD, hard disk, flash memory, USB flash memory, CF card, SD card, MMC card, SM card, memory stick and xD card.
  • the industrial test script generation method provided by this embodiment of the present application can also be applied to flash memory (Nand-flash)-based storage media, such as USB flash drives, CF cards, SD cards, SDHC cards, MMC cards, SM cards , memory stick and xD card.
  • flash memory Nand-flash-based storage media
  • USB flash drives such as USB flash drives, CF cards, SD cards, SDHC cards, MMC cards, SM cards , memory stick and xD card.
  • the operating system operating in the computer can not only implement the program code read by the computer from the storage medium, but also implement part or all of the actual operations by using instructions based on the program code to implement the above embodiments. function of any embodiment.
  • FIG. 4 is an exemplary structural diagram of another industrial test script generating device in an embodiment of the present application.
  • the device can be used to perform the method shown in Figure 1, or to implement the device in Figure 3.
  • the device may include at least one memory 41 and at least one processor 42 .
  • some other components can be included, such as communication ports, input/output controllers, network communication interfaces, etc. These components communicate via bus 43 and so on.
  • At least one memory 41 is used to store computer programs.
  • the computer program can be understood as including various modules of the device shown in FIG. 3 .
  • at least one memory 41 may store an operating system and the like.
  • Operating systems include but are not limited to: Android operating system, Symbian operating system, windows operating system, Linux operating system, etc.
  • At least one processor 42 is used to call a computer program stored in at least one memory 41 to execute the industrial test script generation method described in the example of this application.
  • the processor 42 may be a CPU, a processing unit/module, an ASIC, a logic module or a programmable gate array, etc., and it may receive and send data through a communication port.
  • the input/output controller has a display and an input device for inputting, outputting and displaying relevant data as a human-computer interaction module.
  • a sequence-to-sequence model capable of deep learning is obtained by pre-training by using historical natural language commands and their corresponding industrial test script functions.
  • the test cases can be segmented into statements, and we get For each natural language command, the corresponding industrial test script function can then be obtained based on the sequence-to-sequence model reasoning.
  • the obtained industrial test script functions can be connected according to the order of each natural language command in the test case, and the corresponding industrial test script function can be obtained.
  • Industrial test scripts for test cases realize a fully automated workflow from test cases to test scripts, saving the workload of test engineers.
  • the technical solution based on deep learning in the embodiment of the present invention has higher accuracy than the rule-based method.
  • the technical solution in the embodiment of the present invention can save the work of rule summary.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Provided in the embodiments of the present application are an industrial test script generation method and apparatus, and a storage medium. The method comprises: receiving a natural language test case, which is written in a natural language and is used for testing an industrial application; performing sentence segmentation on the natural language test case, so as to obtain a plurality of natural language commands, and representing each natural language command as a word sequence to be processed; by taking each word sequence to be processed as an input of a pre-trained sequence-to-sequence model, obtaining a target word sequence, which is output by the sequence-to-sequence model and is associated with an industrial test script function; determining corresponding industrial test script functions on the basis of target word sequences; and according to an order consistent with the sorting of the natural language commands, connecting the obtained industrial test script functions corresponding to the natural language commands, so as to obtain an industrial test script corresponding to the natural language test case. By means of the technical solution in the embodiments of the present application, an industrial test script can be automatically generated.

Description

工业测试脚本生成方法、装置和存储介质Industrial test script generation method, device and storage medium 技术领域Technical field
本申请涉及计算机领域,特别涉及一种工业测试脚本生成方法、装置和计算机可读存储介质。The present application relates to the field of computers, and in particular to an industrial test script generation method, device and computer-readable storage medium.
发明背景Background of the invention
测试是工业产品开发过程中保证产品质量的一个重要环节。在工业设备的系统测试中,测试工程师希望生成测试用例,以覆盖设备每个输入变量的所有组合,验证特定工业应用程序是否按预期工作。这是一项巨大的工程。Testing is an important part of ensuring product quality in the industrial product development process. In system testing of industrial equipment, test engineers want to generate test cases that cover all combinations of each input variable of the equipment, verifying that a specific industrial application works as expected. This is a huge project.
为此,目前工业技术领域内有通过图形化方法辅助生成测试用例的方法,其可以通过在场景图视图中拖放输入变量按钮来生成测试用例。该自动测试基础结构虽然可以减少一些编码工作,但其仍然需要测试工程师来编写测试脚本,而且测试脚本的质量在很大程度上取决于工程师的经验。此外,从测试的更广泛角度来看,目前存在一些用于单元测试的自动化测试用例生成工具,如EvoSuite、Randoop和Agitar。但显然,这些单元测试方法不适合工业设备的系统级别测试。To this end, there are currently methods in the field of industrial technology that assist in generating test cases through graphical methods, which can generate test cases by dragging and dropping input variable buttons in the scene graph view. Although this automated testing infrastructure can reduce some coding work, it still requires test engineers to write test scripts, and the quality of test scripts depends largely on the experience of the engineers. Furthermore, from a broader perspective of testing, there are currently some automated test case generation tools for unit testing, such as EvoSuite, Randoop, and Agitar. But obviously, these unit testing methods are not suitable for system level testing of industrial equipment.
因此,本领域内的技术人员还在致力于寻找其它的工业测试脚本生成方案。Therefore, those skilled in the art are still working on finding other industrial test script generation solutions.
发明内容Contents of the invention
有鉴于此,本申请实施例中一方面提供一种工业测试脚本生成方法,另一方面提供一种工业测试脚本生成装置和计算机可读存储介质,能够实现工业测试脚本的自动生成,提高工业测试的灵活性和效率。In view of this, embodiments of the present application provide, on the one hand, an industrial test script generation method, and on the other hand, an industrial test script generation device and a computer-readable storage medium, which can realize automatic generation of industrial test scripts and improve industrial testing. flexibility and efficiency.
为解决上述技术问题,本申请的技术方案是这样实现的:In order to solve the above technical problems, the technical solution of this application is implemented as follows:
一种工业测试脚本生成方法,包括:接收用于测试一工业应用的以自然语言编写的自然语言测试用例;所述自然语言测试用例包括以自然语言描述的测试所述工业应用的操作的自然语言命令;对所述自然语言测试用例进行语句分段,得到多个自然语言命令,并将每个自然语言命令表示为一个待处理单词序列;针对每个待处理单词序列,将其作为一预先训练好的序列到序列模型的输入,并得到所述序列到 序列模型输出的与一工业测试脚本函数相关联的目标单词序列;所述序列到序列模型以对应历史自然语言命令的单词序列作为输入样本,以所述历史自然语言命令对应的工业测试脚本函数的单词序列作为输出样本训练得到;基于所述目标单词序列确定对应的工业测试脚本函数;将得到的对应各自然语言命令的工业测试脚本函数按照与各自然语言命令的排序一致的顺序进行连接,得到对应所述自然语言测试用例的工业测试脚本。An industrial test script generation method, including: receiving a natural language test case written in natural language for testing an industrial application; the natural language test case includes a natural language describing an operation of testing the industrial application in natural language command; perform sentence segmentation on the natural language test case to obtain multiple natural language commands, and represent each natural language command as a sequence of words to be processed; for each sequence of words to be processed, use it as a pre-trained Good sequence-to-sequence model input, and obtain the target word sequence output by the sequence-to-sequence model associated with an industrial test script function; the sequence-to-sequence model takes a word sequence corresponding to a historical natural language command as an input sample , obtained by training with the word sequence of the industrial test script function corresponding to the historical natural language command as the output sample; determining the corresponding industrial test script function based on the target word sequence; using the obtained industrial test script function corresponding to each natural language command Connect in a sequence consistent with the ordering of each natural language command to obtain an industrial test script corresponding to the natural language test case.
一种工业测试脚本生成装置,包括:第一模块,用于接收用于测试一工业应用的以自然语言编写的自然语言测试用例;所述自然语言测试用例包括以自然语言描述的测试所述工业应用的操作的自然语言命令;第二模块,用于对所述自然语言测试用例进行语句分段,得到多个自然语言命令,并将每个自然语言命令表示为一个待处理单词序列;第三模块,用于针对每个待处理单词序列,将其作为一预先训练好的序列到序列模型的输入,并得到所述序列到序列模型输出的与一工业测试脚本函数相关联的目标单词序列;所述序列到序列模型以对应历史自然语言命令的单词序列作为输入样本,以所述历史自然语言命令对应的工业测试脚本函数的单词序列作为输出样本训练得到;第四模块,用于基于所述目标单词序列确定对应的工业测试脚本函数;第五模块,用于将得到的对应各自然语言命令的工业测试脚本函数按照与各自然语言命令的排序一致的顺序进行连接,得到对应所述自然语言测试用例的工业测试脚本。An industrial test script generation device, including: a first module for receiving natural language test cases written in natural language for testing an industrial application; the natural language test cases include testing the industrial application described in natural language The natural language command of the application operation; the second module is used to segment the natural language test case into sentence segments, obtain multiple natural language commands, and represent each natural language command as a sequence of words to be processed; the third module A module configured to use each word sequence to be processed as an input to a pre-trained sequence-to-sequence model, and obtain a target word sequence output by the sequence-to-sequence model that is associated with an industrial test script function; The sequence-to-sequence model is trained using the word sequence corresponding to the historical natural language command as an input sample and the word sequence of the industrial test script function corresponding to the historical natural language command as the output sample; the fourth module is used to train based on the The target word sequence determines the corresponding industrial test script function; the fifth module is used to connect the obtained industrial test script functions corresponding to each natural language command in an order consistent with the order of each natural language command to obtain the corresponding natural language command. Industrial test scripts for test cases.
一种工业测试脚本生成装置,包括至少一个存储器和至少一个处理器,其中:所述至少一个存储器用于存储计算机程序;所述至少一个处理器用于调用所述至少一个存储器中存储的计算机程序,执行如上任一实施方式中所述的工业测试脚本生成方法。An industrial test script generation device includes at least one memory and at least one processor, wherein: the at least one memory is used to store a computer program; the at least one processor is used to call the computer program stored in the at least one memory, Execute the industrial test script generation method as described in any of the above embodiments.
一种计算机可读存储介质,其上存储有计算机程序;所述计算机程序能够被一处理器执行并实现如上任一实施方式中所述的工业测试脚本生成方法。A computer-readable storage medium has a computer program stored thereon; the computer program can be executed by a processor and implement the industrial test script generation method as described in any of the above embodiments.
由上面的技术方案可知,本申请中由于利用历史自然语言命令及其对应的工业测试脚本函数预先训练得到一能够进行深度学习的序列到序列模型,之后,便可对测试用例进行语句分割,得到各个自然语言命令,之后便可基于该序列到序列模型推理得到对应的工业测试脚本函数,然后对得到的各工业测试脚本函数按照各自然语言命令在测试用例中的排序进行连接,便可得到对应测试用例的工业测试脚本, 实现了从测试用例到测试脚本的全自动工作流,节省了测试工程师的工作量。It can be seen from the above technical solution that in this application, a sequence-to-sequence model capable of deep learning is obtained by pre-training by using historical natural language commands and their corresponding industrial test script functions. After that, the test cases can be segmented into statements, and we get For each natural language command, the corresponding industrial test script function can then be obtained based on the sequence-to-sequence model reasoning. Then, the obtained industrial test script functions can be connected according to the order of each natural language command in the test case, and the corresponding industrial test script function can be obtained. The industrial test script for test cases realizes a fully automatic workflow from test cases to test scripts, saving the workload of test engineers.
附图简要说明Brief description of the drawings
为了更好地理解本申请,下面将通过参照附图详细描述本申请的实施例,使本领域的普通技术人员更清楚本申请的上述及其它特征和优点,附图中:In order to better understand the present application, the embodiments of the present application will be described in detail below with reference to the accompanying drawings, so that the above and other features and advantages of the present application will be clearer to those of ordinary skill in the art. In the accompanying drawings:
图1为本申请实施例中一种工业测试脚本生成方法的示例性流程图。Figure 1 is an exemplary flow chart of an industrial test script generation method in an embodiment of the present application.
图2为本申请实施例中一个序列到序列模型的结构示意图Figure 2 is a schematic structural diagram of a sequence-to-sequence model in the embodiment of the present application.
图3为本发明实施例中的工业测试脚本生成装置的示例性结构图。Figure 3 is an exemplary structural diagram of an industrial test script generating device in an embodiment of the present invention.
图4为本申请实施例中另一种工业测试脚本生成装置的示例性结构图。Figure 4 is an exemplary structural diagram of another industrial test script generation device in an embodiment of the present application.
其中,附图标记如下:Among them, the reference signs are as follows:
标号label 含义meaning
101~105101~105 步骤 step
301301 第一单元The first unit
302302 第二单元 Second unit
303303 第三单元Unit 3
304304 第四单元Unit 4
305305 第五单元Unit 5
4141 存储器 memory
4242 处理器 processor
4343 总线bus
实施本申请的方式How to implement this application
本申请实施例中,为了进一步减少编码工作,提高工业测试脚本生成的效率,考虑提供一种工业测试脚本的自动生成方案。In the embodiment of the present application, in order to further reduce the coding work and improve the efficiency of industrial test script generation, it is considered to provide an automatic generation solution for industrial test scripts.
为了使本申请的目的、技术方案及优点更加清楚明白,下面结合附图并举实施例,对本申请的技术方案进行详细说明。In order to make the purpose, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be described in detail below with reference to the accompanying drawings and examples.
图1为本申请实施例中一种工业测试脚本生成方法的示例性流程图。如图1所示,该方法可包括如下步骤:Figure 1 is an exemplary flow chart of an industrial test script generation method in an embodiment of the present application. As shown in Figure 1, the method may include the following steps:
步骤101,接收用于测试一工业应用的以自然语言编写的自然语言测试用例。 所述自然语言测试用例包括以自然语言描述的测试所述工业应用的操作的自然语言命令。Step 101: Receive natural language test cases written in natural language for testing an industrial application. The natural language test cases include natural language commands describing operations of the industrial application described in natural language.
例如,一个例子中关于面板报警LED灯检查的自然语言测试用例包括如下内容:For example, an example of a natural language test case for panel alarm LED light inspection includes the following:
Test Case-Panel Alarm LED Check;测试用例-面板报警LED灯检查Test Case-Panel Alarm LED Check; Test Case-Panel Alarm LED Check
Precondition:前提条件Precondition: precondition
1.Panel connect with all kinds of devices full with full load;面板与各种设备满负荷连接1.Panel connect with all kinds of devices full with full load; panel connects with various devices at full load
Steps:;步骤Steps:; steps
1.Check the panel is normal,check the panel Alarm LED is off;检查面板是否正常,检查面板报警LED灯是否关闭1.Check the panel is normal, check the panel Alarm LED is off; check whether the panel is normal, check whether the panel alarm LED is off
2.Make an alarm from any type of device,check the panel Alarm LED should be kept on;从任一类型的设备发出警报,检查面板警报LED灯是否应保持点亮2.Make an alarm from any type of device,check the panel Alarm LED should be kept on;
3.Remove the alarm event,reset panel;check the panel is normal,check the Alarm LED is off;移除报警事件,重置面板;检测面板是否正常,检查报警LED灯是否熄灭3.Remove the alarm event, reset panel; check the panel is normal, check the Alarm LED is off; remove the alarm event, reset the panel; check whether the panel is normal, check whether the alarm LED is off
上述例子中,以自然语言采用英文的情况为例,分号右侧为其中文翻译。当然,自然语言也可以采用其他语言,如中文等。其中,步骤1中包括两个自然语言命令,即:1.1 Check the panel is normal(检查面板是否正常),1.2 Check the panel Alarm LED is off(检查面板报警LED灯是否关闭)。步骤2中包括两个自然语言命令,即:2.1 Make an alarm from any type of device(从任一类型的设备发出警报),2.2 Check the panel Alarm LED should be kept on(检查面板警报LED灯是否应保持点亮)。步骤3中包括四个自然语言命令,即:3.1 Remove the alarm event(移除报警事件),3.2 Reset panel(重置面板);3.3 Check the panel is normal(检查面板是否正常),3.4 Check the Alarm LED is off(检查报警LED灯是否熄灭)。In the above example, the natural language is in English, and the right side of the semicolon is its Chinese translation. Of course, natural language can also use other languages, such as Chinese. Among them, step 1 includes two natural language commands, namely: 1.1 Check the panel is normal (check whether the panel is normal), 1.2 Check the panel Alarm LED is off (check whether the panel alarm LED light is off). Step 2 includes two natural language commands, namely: 2.1 Make an alarm from any type of device (issue an alarm from any type of device), 2.2 Check the panel Alarm LED should be kept on (check whether the panel alarm LED light should be stay lit). Step 3 includes four natural language commands, namely: 3.1 Remove the alarm event (remove the alarm event), 3.2 Reset panel (reset the panel); 3.3 Check the panel is normal (check whether the panel is normal), 3.4 Check the Alarm LED is off (check whether the alarm LED light is off).
具体实现时,假如测试用例是一个文档D,则该文档D可以表示为D={s 1,s 2,...,s m},其中,s 1,s 2,...,s m为以自然语言语句表示的自然语言命令。 In specific implementation, if the test case is a document D, the document D can be expressed as D={s 1 , s 2 ,..., s m }, where s 1 , s 2 ,..., s m are natural language commands expressed in natural language sentences.
步骤102,对所述自然语言测试用例进行语句分段,得到多个自然语言命令,并将每个自然语言命令表示为一个待处理单词序列。Step 102: Segment the natural language test case into sentence segments to obtain multiple natural language commands, and represent each natural language command as a sequence of words to be processed.
例如,针对上述的测试用例,可得到上述1.1~3.4几个自然语言命令。具体实现 时,为了方便断句,可在测试用例中的相邻自然语言命令之间添加特定分隔符,则本步骤中可根据所述特定分隔符进行语句分段;或者,本步骤中,也可以直接根据测试用例中的逗号和句号进行语句分段。具体可根据实际情况确定,此处不对其进行限定。For example, for the above test case, several natural language commands 1.1 to 3.4 mentioned above can be obtained. During specific implementation, in order to facilitate sentence segmentation, specific separators can be added between adjacent natural language commands in the test case, and then the statement can be segmented according to the specific separators in this step; or, in this step, you can also Segment statements directly based on commas and periods in test cases. The specifics can be determined according to the actual situation and are not limited here.
在得到各个自然语言命令后,可将每个自然语言命令表示为一个待处理单词序列,即s i={w 1,w 2,...,w s},其中,w 1,w 2,...,w s为自然语言命令中的各个单词。以自然语言命令“Check the panel is normal”为例,对应的待处理单词序列为{Check,the,panel,is,normal}。 After obtaining each natural language command, each natural language command can be expressed as a sequence of words to be processed, that is, si = {w 1 , w 2 ,..., w s }, where w 1 , w 2 , ...,w s is each word in the natural language command. Taking the natural language command "Check the panel is normal" as an example, the corresponding word sequence to be processed is {Check,the,panel,is,normal}.
当然,针对自然语言为其他语种的情况,这里的“单词”则指该语种语句中的最小组成单元,例如,若自然语言为中文,则这里的“单词”指的是每个汉字。Of course, if the natural language is another language, the "word" here refers to the smallest component unit in the sentence of that language. For example, if the natural language is Chinese, the "word" here refers to each Chinese character.
步骤103,针对每个待处理单词序列,将其作为一预先训练好的序列到序列模型的输入,并得到所述序列到序列模型输出的与一工业测试脚本函数相关联的目标单词序列;所述序列到序列模型以对应历史自然语言命令的单词序列作为输入样本,以所述历史自然语言命令对应的工业测试脚本函数的单词序列作为输出样本训练得到。Step 103: For each word sequence to be processed, use it as the input of a pre-trained sequence-to-sequence model, and obtain the target word sequence output by the sequence-to-sequence model associated with an industrial test script function; so The sequence-to-sequence model is trained by taking the word sequence corresponding to the historical natural language command as an input sample, and using the word sequence of the industrial test script function corresponding to the historical natural language command as the output sample.
图2示出了本发明实施例中一个序列到序列模型的结构示意图。如图2所示,该序列到序列模型为带有双向长短期记忆网络(LSTM,Long Short-Term Memory)编码器和LSTM解码器的序列到序列模型。Figure 2 shows a schematic structural diagram of a sequence-to-sequence model in an embodiment of the present invention. As shown in Figure 2, the sequence-to-sequence model is a sequence-to-sequence model with a bidirectional long short-term memory network (LSTM, Long Short-Term Memory) encoder and LSTM decoder.
其中,待处理单词序列中的所有单词按序依次输入到序列到序列模型中,例如,待处理单词序列中的所有单词在每个时间戳输入到模型的LSTM编码器中,LSTM编码器经过嵌入处理和隐藏状态处理并乘以其关注权重之后,得到上下文感知的表示向量。然后,LSTM解码器在时刻t选择一个单词w i,选择w i后,在i时刻的隐藏层状态h i将在时刻t+1馈入LSTM解码器。然后,序列到序列模型输出与一工业测试脚本函数相关联的目标单词序列。 Among them, all words in the word sequence to be processed are input into the sequence-to-sequence model in order. For example, all words in the word sequence to be processed are input into the LSTM encoder of the model at each timestamp, and the LSTM encoder is embedded After processing and multiplying the hidden states by their attention weights, a context-aware representation vector is obtained. Then, the LSTM decoder selects a word w i at time t. After selecting w i , the hidden layer state h i at time i will be fed into the LSTM decoder at time t+1. The sequence-to-sequence model then outputs a target word sequence associated with an industrial test script function.
图2中,
Figure PCTCN2022097686-appb-000001
Figure PCTCN2022097686-appb-000002
为产生第二个词的时刻对输入的待处理单词序列(以下简称输入序列)第j个词的关注度;
Figure PCTCN2022097686-appb-000003
为输入序列第j个词的隐藏层的值;J为输入序列词的长度;
Figure PCTCN2022097686-appb-000004
为输出序列第二个词的隐藏层的值;
Figure PCTCN2022097686-appb-000005
是加入注意力机制之后的输出序列第二个词的隐藏层的值。其中⊕是向量拼接符号, W和b为可学习的参数。
In Figure 2,
Figure PCTCN2022097686-appb-000001
Figure PCTCN2022097686-appb-000002
The degree of attention paid to the j-th word of the input word sequence to be processed (hereinafter referred to as the input sequence) at the moment when the second word is generated;
Figure PCTCN2022097686-appb-000003
is the value of the hidden layer of the j-th word in the input sequence; J is the length of the input sequence word;
Figure PCTCN2022097686-appb-000004
is the value of the hidden layer of the second word in the output sequence;
Figure PCTCN2022097686-appb-000005
is the value of the hidden layer of the second word in the output sequence after adding the attention mechanism. where ⊕ is the vector splicing symbol, and W and b are learnable parameters.
具体实现时,序列到序列模型可根据推理结果从一词汇表中提取目标单词。这里,词汇表可以包括各工业测试脚本函数的函数名(或者函数名和参数)中的所有单词经去重处理后得到的所有单词。若推理结果提示所述词汇表中没有所需的目标单词,则目标单词可以从输入序列(即输入的待处理单词序列)中直接拷贝所需的目标单词。也就是说,组成该目标单词序列的单词可以是提取自一词汇表中的单词,也可以是拷贝自待处理单词序列中的单词。When implemented, the sequence-to-sequence model can extract target words from a vocabulary based on inference results. Here, the vocabulary list may include all words obtained by deduplicating all words in the function name (or function name and parameters) of each industrial test script function. If the inference result indicates that the required target word is not in the vocabulary, the target word can be directly copied from the input sequence (ie, the input sequence of words to be processed). That is to say, the words composing the target word sequence may be words extracted from a vocabulary, or may be words copied from the word sequence to be processed.
具体实现时,所述序列到序列模型基于下述操作确定所述目标单词序列中每个时刻输出的单词:During specific implementation, the sequence-to-sequence model determines the words output at each moment in the target word sequence based on the following operations:
1)将所述词汇表中的单词与所述待处理单词序列中的单词合起来得到一扩展词汇表V ext,即扩展词汇表V ext是在原词汇表中单词的基础上加入输入序列中的单词之后构成的词汇表。 1) Combine the words in the vocabulary and the words in the word sequence to be processed to obtain an extended vocabulary V ext , that is, the extended vocabulary V ext is added to the input sequence on the basis of the words in the original vocabulary. A vocabulary made up of words.
2)根据以下公式(1)计算得到一个扩展词汇表V ext中的各个单词在t时刻的输出概率分布: 2) Calculate the output probability distribution of each word in an extended vocabulary V ext at time t according to the following formula (1):
P Vert(y t)=p gen,tP g(y t)+(1-p gen,t)P c(y t)(1) P Vert (y t )=p gen,t P g (y t )+(1-p gen,t )P c (y t )(1)
其中,p gen,t为t时刻选择是从词汇表中生成单词还是从输入序列中选择一个单词。
Figure PCTCN2022097686-appb-000006
其中,σ是sigmoid函数;
Figure PCTCN2022097686-appb-000007
为产生第t个词的时刻对输入序列所有词的关注度和隐藏层值的加权和;
Figure PCTCN2022097686-appb-000008
为输出序列第t个词的隐藏层的值;E y,t-1是上一时刻(t-1)产生词的隐含层的值,W s,z,W s,h,W s,E,b s是可学习参数。词汇表中的各个词汇在t时刻的输出概率分布P g(y t)和输入序列中各个单词在t时刻的关注度分布P c(y t)分别根据下式(2)和(3)确定:
Among them, p gen,t is the choice at time t whether to generate a word from the vocabulary or select a word from the input sequence.
Figure PCTCN2022097686-appb-000006
Among them, σ is the sigmoid function;
Figure PCTCN2022097686-appb-000007
It is the weighted sum of the attention and hidden layer values of all words in the input sequence at the moment when the t-th word is generated;
Figure PCTCN2022097686-appb-000008
is the value of the hidden layer of the t-th word in the output sequence; E y,t-1 is the value of the hidden layer that produced the word at the previous moment (t-1), W s,z , W s,h , W s, E , b s are learnable parameters. The output probability distribution P g (y t ) of each word in the vocabulary at time t and the attention distribution P c (y t ) of each word in the input sequence at time t are determined according to the following formulas (2) and (3) respectively. :
Figure PCTCN2022097686-appb-000009
Figure PCTCN2022097686-appb-000009
Figure PCTCN2022097686-appb-000010
Figure PCTCN2022097686-appb-000010
其中,y t为t时刻生成的需要输出的单词,P vocab,t(y t)为t时刻从词汇表中生成y t的概率,
Figure PCTCN2022097686-appb-000011
为产生词的t时刻对输入序列第j个词的关注度,ν为词汇表,∪为并集符号,unk为定义的未知字符符号,χ为输入序列词汇表。
Among them, y t is the word that needs to be output generated at time t, P vocab,t (y t ) is the probability of generating y t from the vocabulary at time t,
Figure PCTCN2022097686-appb-000011
is the attention paid to the j-th word in the input sequence at time t when the word is generated, ν is the vocabulary, ∪ is the union symbol, unk is the defined unknown character symbol, and χ is the vocabulary of the input sequence.
3)在得到所述扩展词汇表V ext中的各个单词在t时刻的输出概率分布之后,将概率最大的单词作为t时刻的输出单词y t3) After obtaining the output probability distribution of each word in the extended vocabulary V ext at time t, the word with the highest probability is used as the output word y t at time t .
此外,有些工业测试脚本函数可能只具有函数名,而有些工业测试脚本函数会同时具有函数名和参数等,相应地,序列到序列模型输出的目标单词序列可包括:函数名单词,或者包括函数名单词和参数单词。具体实现时,针对目标单词序列同时包括函数名单词和参数单词的情况,为了将函数名单词和参数单词分隔开,序列到序列模型输出的目标单词序列可包括函数名单词、参数单词、以及介于所述函数名单词和所述参数单词之间的分隔符。相应地,在对序列到序列模型进行训练时,作为输出样本的工业测试脚本函数的单词序列也包括:函数名单词、参数单词、以及介于所述函数名单词和所述参数单词之间的分隔符。In addition, some industrial test script functions may only have function names, while some industrial test script functions may have both function names and parameters. Correspondingly, the target word sequence output by the sequence-to-sequence model may include: function name words, or include function names. words and parameter words. During specific implementation, for the situation where the target word sequence includes both function name words and parameter words, in order to separate the function name words and parameter words, the target word sequence output by the sequence-to-sequence model may include function name words, parameter words, and The delimiter between the function name word and the argument word. Correspondingly, when training the sequence-to-sequence model, the word sequence of the industrial test script function as the output sample also includes: function name words, parameter words, and words between the function name words and the parameter words. separator.
步骤104,基于所述目标单词序列确定对应的工业测试脚本函数。Step 104: Determine the corresponding industrial test script function based on the target word sequence.
本实施例中,当基于深度学习的序列到序列模型经过大量样本的训练后,推理结果已经变得足够准确时,其输出的目标单词序列将足够接近工业测试脚本函数的单词序列甚至与工业测试脚本函数的单词序列一致,此时可直接根据所述目标单词序列确定对应的工业测试脚本函数。或者,进一步地,为了提高目标单词序列到对应的工业测试脚本函数的映射准确度,本步骤中可将所述目标单词序列与存储的各工业测试脚本函数的单词序列进行匹配,以获取对应的工业测试脚本函数。In this embodiment, when the sequence-to-sequence model based on deep learning has been trained with a large number of samples and the inference results have become sufficiently accurate, the target word sequence it outputs will be close enough to the word sequence of the industrial test script function or even the same as the industrial test. The word sequence of the script function is consistent. In this case, the corresponding industrial test script function can be determined directly according to the target word sequence. Or, further, in order to improve the mapping accuracy of the target word sequence to the corresponding industrial test script function, in this step, the target word sequence can be matched with the stored word sequence of each industrial test script function to obtain the corresponding Industrial test script functions.
例如,针对每个自然语言命令,经过步骤103的序列到序列模型进行推理后,可得到一个包含函数名单词W gen={w 1a,w 2a,...,w pa}、分隔符、和函数参数单词W gen_aguments={w 1b,w 2b,...,w qb}的目标单词序列。 For example, for each natural language command, after reasoning through the sequence-to-sequence model in step 103, a function name word W gen ={w 1a ,w 2a ,...,w pa }, delimiters, and Function parameter word W gen_aguments = target word sequence of {w 1b , w 2b ,..., w qb }.
每个工业测试脚本函数名funcName i可表示为一个名字列表W ground,i={w 1,w 2,...}。具体实现时,可利用ROUGE metric*生成的函数名列表W gen搜索最相似的W ground,i。例如,可使用ROUGE-1、ROUGE-2和ROUGE-L的加权和,分别测量生成的W gen和W ground,i之间的单词级单个单词重叠数量、两个单词重叠数量和最长公共序列中单词的数量。具体地,可通过下式(4)找到最相似的funcNamet: Each industrial test script function name funcName i can be expressed as a name list W ground,i = {w 1 , w 2 ,...}. During specific implementation, the function name list W gen generated by ROUGE metric* can be used to search for the most similar W ground,i . For example, the word-level number of single-word overlaps, the number of two-word overlaps, and the longest common sequence between the generated W gen and W ground,i can be measured using the weighted sum of ROUGE-1, ROUGE-2, and ROUGE-L, respectively. The number of words in . Specifically, the most similar funcNamet can be found through the following formula (4):
funcName t=argmax i(ROUGE-L F1(W ground,i;W gen)+α*ROUGE-2 F1(W ground,i;W gen)+β*ROUGE-1 F1(W ground,i;W gen))(4) funcName t =argmax i (ROUGE-L F1 (W ground,i ; W gen )+α*ROUGE-2 F1 (W ground,i ; W gen )+β*ROUGE-1 F1 (W ground,i ; W gen ))(4)
其中,α和β为预先设定的经验值Among them, α and β are preset experience values
例如,针对自然语言命令“Check the panel is normal”,可得到工业测试脚本函数 FC30_AI_Normal check,其参数可如下述表1所示:For example, for the natural language command "Check the panel is normal", the industrial test script function FC30_AI_Normal check can be obtained, and its parameters can be shown in Table 1 below:
Figure PCTCN2022097686-appb-000012
Figure PCTCN2022097686-appb-000012
表1Table 1
步骤105,将得到的对应各自然语言命令的工业测试脚本函数按照与各自然语言命令的排序一致的顺序进行连接,得到对应所述自然语言测试用例的工业测试脚本。Step 105: Connect the obtained industrial test script functions corresponding to each natural language command in an order consistent with the order of each natural language command to obtain an industrial test script corresponding to the natural language test case.
例如,得到的完整测试脚本T可表示为:T={funcName 1(W gen_aguments,1),funcName 2(W gen_aguments,2),...,funcName q(W gen_aguments,q)}。 For example, the obtained complete test script T can be expressed as: T={funcName 1 (W gen_aguments,1 ), funcName 2 (W gen_aguments,2 ),..., funcName q (W gen_aguments,q )}.
本实施例中,假设工业测试脚本函数已经编写完成,本实施例中是对工业测试脚本函数进行选择,并填入函数的输入参数。In this embodiment, it is assumed that the industrial test script function has been written. In this embodiment, the industrial test script function is selected and the input parameters of the function are filled in.
以上对本发明实施例中的工业测试脚本生成方法进行了详细描述,下面再对本发明实施例中的工业测试脚本生成装置进行详细描述。本发明实施例中的工业测试脚本生成装置可用于实施本发明实施例中的工业测试脚本生成方法,对于本发明装置实施例中未详细披露的细节可参见本发明方法实施例中的相应描述。The industrial test script generating method in the embodiment of the present invention has been described in detail above, and the industrial test script generating device in the embodiment of the present invention will be described in detail below. The industrial test script generation device in the embodiment of the present invention can be used to implement the industrial test script generation method in the embodiment of the present invention. For details not disclosed in the device embodiment of the present invention, please refer to the corresponding description in the method embodiment of the present invention.
图3为本发明实施例中的工业测试脚本生成装置的示例性结构图。如图3所示,该装置可包括:第一模块301、第二模块302、第三模块303、第四模块304和第五模块305。Figure 3 is an exemplary structural diagram of an industrial test script generating device in an embodiment of the present invention. As shown in FIG. 3 , the device may include: a first module 301 , a second module 302 , a third module 303 , a fourth module 304 and a fifth module 305 .
其中,第一模块301用于接收用于测试一工业应用的以自然语言编写的自然语言测试用例;所述自然语言测试用例包括以自然语言描述的测试所述工业应用的操作的自然语言命令。Among them, the first module 301 is used to receive a natural language test case written in natural language for testing an industrial application; the natural language test case includes a natural language command described in natural language to test the operation of the industrial application.
第二模块302用于对所述自然语言测试用例进行语句分段,得到多个自然语言命令,并将每个自然语言命令表示为一个待处理单词序列。The second module 302 is used to segment the natural language test case into sentence segments, obtain multiple natural language commands, and represent each natural language command as a sequence of words to be processed.
第三模块303用于针对每个待处理单词序列,将其作为一预先训练好的序列到序列模型的输入,并得到所述序列到序列模型输出的与一工业测试脚本函数相关联的目标单词序列;所述序列到序列模型以对应历史自然语言命令的单词序列作为输入样本,以所述历史自然语言命令对应的工业测试脚本函数的单词序列作为输出样本训练得到。在一个实施方式中,所述序列到序列模型为带有双向长短期记忆网络LSTM编码器和LSTM解码器的序列到序列模型。其中,在所述工业测试脚本函数具有函数名和参数时,所述序列到序列模型输出的目标单词序列可包括:函数名单词、参数单词、以及介于所述函数名单词和所述参数单词之间的分隔符。在一个实施方式中,所述目标单词序列可包括:提取自一词汇表中的单词和/或拷贝自待处理单词序列中的单词;其中,所述词汇表中的单词包括:与各工业测试脚本函数相关联的单词。The third module 303 is configured to use each to-be-processed word sequence as an input to a pre-trained sequence-to-sequence model, and obtain the target word output by the sequence-to-sequence model associated with an industrial test script function. Sequence; the sequence-to-sequence model is trained by taking the word sequence corresponding to the historical natural language command as an input sample, and using the word sequence of the industrial test script function corresponding to the historical natural language command as the output sample. In one embodiment, the sequence-to-sequence model is a sequence-to-sequence model with a bidirectional long short-term memory network LSTM encoder and LSTM decoder. Wherein, when the industrial test script function has a function name and parameters, the target word sequence output by the sequence-to-sequence model may include: function name words, parameter words, and words between the function name words and the parameter words. separator between. In one embodiment, the target word sequence may include: words extracted from a vocabulary and/or words copied from the word sequence to be processed; wherein, the words in the vocabulary include: words related to each industrial test The word associated with the script function.
第四模块304用于基于所述目标单词序列确定对应的工业测试脚本函数。具体实现时,第四模块304可将所述目标单词序列与存储的各工业测试脚本函数的单词序列进行匹配,获取对应的工业测试脚本函数。The fourth module 304 is used to determine the corresponding industrial test script function based on the target word sequence. During specific implementation, the fourth module 304 may match the target word sequence with the stored word sequence of each industrial test script function to obtain the corresponding industrial test script function.
第五模块305用于将得到的对应各自然语言命令的工业测试脚本函数按照与各自然语言命令的排序一致的顺序进行连接,得到对应所述自然语言测试用例的工业测试脚本。The fifth module 305 is used to connect the obtained industrial test script functions corresponding to each natural language command in an order consistent with the order of each natural language command, to obtain an industrial test script corresponding to the natural language test case.
事实上,本申请的这种实施方式提供的工业测试脚本生成装置可以以各种方式具体实施。例如,可以通过使用符合特定规则的应用编程接口,将工业测试脚本生成装置编译为安装在智能终端中的插件,或者可以封装到应用程序中以供用户下载和使用。In fact, the industrial test script generation device provided by this embodiment of the present application can be implemented in various ways. For example, the industrial test script generation device can be compiled into a plug-in installed in a smart terminal by using an application programming interface that conforms to specific rules, or it can be packaged into an application program for users to download and use.
当编译为插件时,工业测试脚本生成装置可以多种插件形式实现,如ocx、dll和cab。本申请的这种实现方式提供的工业测试脚本生成装置也可以通过使用特定技术来实现,例如Flash插件技术、RealPlayer插件技术、MMS插件技术、MIDI人员插件技术或ActiveX插件技术。When compiled as a plug-in, the industrial test script generation device can be implemented in a variety of plug-in forms, such as ocx, dll and cab. The industrial test script generation device provided by this implementation of the present application can also be implemented by using specific technologies, such as Flash plug-in technology, RealPlayer plug-in technology, MMS plug-in technology, MIDI plug-in technology or ActiveX plug-in technology.
本申请的这种实现方式提供的工业测试脚本生成方法可以以指令存储方式或指令集存储方式存储在各种存储介质中。这些存储介质包括但不限于:软盘、光盘、DVD、硬盘、闪存、USB闪存、CF卡、SD卡、MMC卡、SM卡、记忆棒和xD卡。The industrial test script generation method provided by this implementation of the present application can be stored in various storage media in an instruction storage mode or an instruction set storage mode. These storage media include but are not limited to: floppy disk, optical disk, DVD, hard disk, flash memory, USB flash memory, CF card, SD card, MMC card, SM card, memory stick and xD card.
此外,本申请的这种实施方式提供的工业测试脚本生成方法也可以应用于基于 闪存(Nand-flash)的存储介质,例如USB闪存驱动器、CF卡、SD卡、SDHC卡、MMC卡、SM卡、记忆棒和xD卡。In addition, the industrial test script generation method provided by this embodiment of the present application can also be applied to flash memory (Nand-flash)-based storage media, such as USB flash drives, CF cards, SD cards, SDHC cards, MMC cards, SM cards , memory stick and xD card.
应该清楚的是,在计算机中操作的操作系统,不仅可以通过执行计算机从存储介质读取的程序代码,而且可以通过使用基于程序代码的指令来实现部分或全部实际操作,以实现上述实施例中任何实施例的功能。It should be clear that the operating system operating in the computer can not only implement the program code read by the computer from the storage medium, but also implement part or all of the actual operations by using instructions based on the program code to implement the above embodiments. function of any embodiment.
例如,图4为本申请实施例中另一种工业测试脚本生成装置备的示例性结构图。该设备可用于执行图1所示的方法,或用于实现图3中的装置。如图4所示,装置可以包括至少一个存储器41和至少一个处理器42。此外,还可以包括一些其他组件,例如通信端口、输入/输出控制器、网络通信接口等。这些组件通过总线43等进行通信。For example, FIG. 4 is an exemplary structural diagram of another industrial test script generating device in an embodiment of the present application. The device can be used to perform the method shown in Figure 1, or to implement the device in Figure 3. As shown in FIG. 4 , the device may include at least one memory 41 and at least one processor 42 . In addition, some other components can be included, such as communication ports, input/output controllers, network communication interfaces, etc. These components communicate via bus 43 and so on.
至少一个存储器41用于存储计算机程序。在一个例子中,计算机程序可以理解为包括图3所示的装置的各种模块。另外,至少一个存储器41可以存储操作系统等。操作系统包括但不限于:Android操作系统、Symbian操作系统、windows操作系统、Linux操作系统等。At least one memory 41 is used to store computer programs. In one example, the computer program can be understood as including various modules of the device shown in FIG. 3 . In addition, at least one memory 41 may store an operating system and the like. Operating systems include but are not limited to: Android operating system, Symbian operating system, windows operating system, Linux operating system, etc.
至少一个处理器42用于调用存储在至少一个存储器41中的计算机程序,以执行本申请实例中描述的工业测试脚本生成方法。处理器42可以是CPU、处理单元/模块、ASIC、逻辑模块或可编程门阵列等,它可以通过通信端口接收和发送数据。At least one processor 42 is used to call a computer program stored in at least one memory 41 to execute the industrial test script generation method described in the example of this application. The processor 42 may be a CPU, a processing unit/module, an ASIC, a logic module or a programmable gate array, etc., and it may receive and send data through a communication port.
输入/输出控制器具有显示器和输入装置,用于作为人机交互模块输入、输出和显示相关数据。The input/output controller has a display and an input device for inputting, outputting and displaying relevant data as a human-computer interaction module.
应当理解,本文中使用的“和/或”旨在包括一个或多个相关联的所列项目的任何和所有可能的组合。It will be understood that as used herein, "and/or" is intended to include any and all possible combinations of one or more of the associated listed items.
由上面的技术方案可知,本申请中由于利用历史自然语言命令及其对应的工业测试脚本函数预先训练得到一能够进行深度学习的序列到序列模型,之后,便可对测试用例进行语句分割,得到各个自然语言命令,之后便可基于该序列到序列模型推理得到对应的工业测试脚本函数,然后对得到的各工业测试脚本函数按照各自然语言命令在测试用例中的排序进行连接,便可得到对应测试用例的工业测试脚本,实现了从测试用例到测试脚本的全自动工作流,节省了测试工程师的工作量。It can be seen from the above technical solution that in this application, a sequence-to-sequence model capable of deep learning is obtained by pre-training by using historical natural language commands and their corresponding industrial test script functions. After that, the test cases can be segmented into statements, and we get For each natural language command, the corresponding industrial test script function can then be obtained based on the sequence-to-sequence model reasoning. Then, the obtained industrial test script functions can be connected according to the order of each natural language command in the test case, and the corresponding industrial test script function can be obtained. Industrial test scripts for test cases realize a fully automated workflow from test cases to test scripts, saving the workload of test engineers.
此外,本发明实施例中基于深度学习的技术方案与基于规则的方法相比,具有更高的准确性。此外,本发明实施例中的技术方案可以省去规则总结的工作。In addition, the technical solution based on deep learning in the embodiment of the present invention has higher accuracy than the rule-based method. In addition, the technical solution in the embodiment of the present invention can save the work of rule summary.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the present application. within the scope of protection.

Claims (10)

  1. 一种工业测试脚本生成方法,其特征在于,包括:An industrial test script generation method is characterized by including:
    接收用于测试一工业应用的以自然语言编写的自然语言测试用例;所述自然语言测试用例包括以自然语言描述的测试所述工业应用的操作的自然语言命令;Receive natural language test cases written in natural language for testing an industrial application; the natural language test cases include natural language commands describing the operation of the industrial application in natural language;
    对所述自然语言测试用例进行语句分段,得到多个自然语言命令,并将每个自然语言命令表示为一个待处理单词序列;Perform sentence segmentation on the natural language test case to obtain multiple natural language commands, and represent each natural language command as a sequence of words to be processed;
    针对每个待处理单词序列,将其作为一预先训练好的序列到序列模型的输入,并得到所述序列到序列模型输出的与一工业测试脚本函数相关联的目标单词序列;所述序列到序列模型以对应历史自然语言命令的单词序列作为输入样本,以所述历史自然语言命令对应的工业测试脚本函数的单词序列作为输出样本训练得到;基于所述目标单词序列确定对应的工业测试脚本函数;For each word sequence to be processed, use it as the input of a pre-trained sequence-to-sequence model, and obtain the target word sequence output by the sequence-to-sequence model associated with an industrial test script function; the sequence to The sequence model uses the word sequence corresponding to the historical natural language command as the input sample, and is trained with the word sequence of the industrial test script function corresponding to the historical natural language command as the output sample; the corresponding industrial test script function is determined based on the target word sequence. ;
    将得到的对应各自然语言命令的工业测试脚本函数按照与各自然语言命令的排序一致的顺序进行连接,得到对应所述自然语言测试用例的工业测试脚本。The obtained industrial test script functions corresponding to each natural language command are connected in a sequence consistent with the sorting of each natural language command to obtain an industrial test script corresponding to the natural language test case.
  2. 根据权利要求1所述的工业测试脚本生成方法,其特征在于,所述基于所述目标单词序列确定对应的工业测试脚本函数包括:将所述目标单词序列与存储的各工业测试脚本函数的单词序列进行匹配,获取对应的工业测试脚本函数。The method for generating industrial test scripts according to claim 1, wherein determining the corresponding industrial test script function based on the target word sequence includes: combining the target word sequence with the stored words of each industrial test script function. Match the sequence and obtain the corresponding industrial test script function.
  3. 根据权利要求1所述的工业测试脚本生成方法,其特征在于,所述序列到序列模型为带有双向长短期记忆网络LSTM编码器和LSTM解码器的序列到序列模型。The method for generating industrial test scripts according to claim 1, wherein the sequence-to-sequence model is a sequence-to-sequence model with a bidirectional long short-term memory network LSTM encoder and an LSTM decoder.
  4. 根据权利要求1至3中任一项所述的工业测试脚本生成方法,其特征在于,所述工业测试脚本函数具有函数名和参数;所述序列到序列模型输出的目标单词序列包括:函数名单词、参数单词、以及介于所述函数名单词和所述参数单词之间的分隔符。The industrial test script generation method according to any one of claims 1 to 3, characterized in that the industrial test script function has a function name and parameters; the target word sequence output by the sequence-to-sequence model includes: function name words , parameter words, and separators between the function name words and the parameter words.
  5. 根据权利要求1至3中任一项所述的工业测试脚本生成方法,其特征在于,所述目标单词序列包括:提取自一词汇表中的单词和/或拷贝自待处理单词序列中的单词;其中,所述词汇表中的单词包括:与各工业测试脚本函数相关联的单词。The industrial test script generation method according to any one of claims 1 to 3, characterized in that the target word sequence includes: words extracted from a vocabulary and/or words copied from the word sequence to be processed ; Wherein, the words in the vocabulary include: words associated with each industrial test script function.
  6. 根据权利要求5所述的工业测试脚本生成方法,其特征在于,所述序列到序列模型基于下述操作确定所述目标单词序列中每个时刻输出的单词:The industrial test script generation method according to claim 5, wherein the sequence-to-sequence model determines the words output at each moment in the target word sequence based on the following operations:
    将所述词汇表中的单词与所述待处理单词序列中的单词合起来得到一扩展词汇 表V extCombining the words in the vocabulary and the words in the word sequence to be processed to obtain an extended vocabulary V ext ;
    根据如下公式计算得到所述扩展词汇表V ext中的各个单词在t时刻的输出概率分布: The output probability distribution of each word in the extended vocabulary V ext at time t is calculated according to the following formula:
    P Vert(y t)=p gen,tP g(y t)+(1-p gen,t)P c(y t) P Vert (y t )=p gen,t P g (y t )+(1-p gen,t )P c (y t )
    上式中,p gen,t为t时刻选择是从词汇表中生成单词还是从输入序列中选择一个单词。
    Figure PCTCN2022097686-appb-100001
    其中,σ是sigmoid函数;
    Figure PCTCN2022097686-appb-100002
    为产生第t个词的时刻对输入序列所有词的关注度和隐藏层值的加权和;
    Figure PCTCN2022097686-appb-100003
    为输出序列第t个词的隐藏层的值;E y,t-1是上一时刻(t-1)产生词的隐含层的值,W s,z,W s,h,W s,E,b s是可学习参数。词汇表中的各个词汇在t时刻的输出概率分布P g(y t)和输入序列中各个单词在t时刻的关注度分布P c(y t)分别根据下式(2)和(3)确定:
    In the above formula, p gen,t is the choice at time t whether to generate a word from the vocabulary or select a word from the input sequence.
    Figure PCTCN2022097686-appb-100001
    Among them, σ is the sigmoid function;
    Figure PCTCN2022097686-appb-100002
    It is the weighted sum of the attention and hidden layer values of all words in the input sequence at the moment when the t-th word is generated;
    Figure PCTCN2022097686-appb-100003
    is the value of the hidden layer of the t-th word in the output sequence; E y,t-1 is the value of the hidden layer that produced the word at the previous moment (t-1), W s,z , W s,h , W s, E , b s are learnable parameters. The output probability distribution P g (y t ) of each word in the vocabulary at time t and the attention distribution P c (y t ) of each word in the input sequence at time t are determined according to the following formulas (2) and (3) respectively. :
    Figure PCTCN2022097686-appb-100004
    Figure PCTCN2022097686-appb-100004
    Figure PCTCN2022097686-appb-100005
    Figure PCTCN2022097686-appb-100005
    其中,y t为t时刻生成的需要输出的单词,P vocab,t(y t)为t时刻从词汇表中生成y t的概率,
    Figure PCTCN2022097686-appb-100006
    为产生词的t时刻对输入序列第j个词的关注度,ν为词汇表,∪为并集符号,unk为定义的未知字符符号,χ为输入序列词汇表。
    Among them, y t is the word that needs to be output generated at time t, P vocab,t (y t ) is the probability of generating y t from the vocabulary at time t,
    Figure PCTCN2022097686-appb-100006
    is the attention paid to the j-th word in the input sequence at time t when the word is generated, ν is the vocabulary, ∪ is the union symbol, unk is the defined unknown character symbol, and χ is the vocabulary of the input sequence.
    在得到所述扩展词汇表V ext中的各个单词在t时刻的输出概率分布之后,将概率最大的单词作为t时刻的输出单词y tAfter obtaining the output probability distribution of each word in the extended vocabulary V ext at time t, the word with the highest probability is used as the output word y t at time t.
  7. 一种工业测试脚本生成装置,其特征在于,包括:An industrial test script generation device, characterized by including:
    第一模块,用于接收用于测试一工业应用的以自然语言编写的自然语言测试用例;所述自然语言测试用例包括以自然语言描述的测试所述工业应用的操作的自然语言命令;The first module is used to receive natural language test cases written in natural language for testing an industrial application; the natural language test cases include natural language commands describing the operation of the industrial application in natural language;
    第二模块,用于对所述自然语言测试用例进行语句分段,得到多个自然语言命令,并将每个自然语言命令表示为一个待处理单词序列;The second module is used to segment the natural language test cases into sentence segments, obtain multiple natural language commands, and represent each natural language command as a sequence of words to be processed;
    第三模块,用于针对每个待处理单词序列,将其作为一预先训练好的序列到序列模型的输入,并得到所述序列到序列模型输出的与一工业测试脚本函数相关联的目标单词序列;所述序列到序列模型以对应历史自然语言命令的单词序列作为输入 样本,以所述历史自然语言命令对应的工业测试脚本函数的单词序列作为输出样本训练得到;The third module is used to treat each word sequence to be processed as an input to a pre-trained sequence-to-sequence model, and obtain the target word output by the sequence-to-sequence model associated with an industrial test script function. Sequence; the sequence-to-sequence model is trained by using the word sequence corresponding to the historical natural language command as an input sample, and using the word sequence of the industrial test script function corresponding to the historical natural language command as the output sample;
    第四模块,用于基于所述目标单词序列确定对应的工业测试脚本函数;The fourth module is used to determine the corresponding industrial test script function based on the target word sequence;
    第五模块,用于将得到的对应各自然语言命令的工业测试脚本函数按照与各自然语言命令的排序一致的顺序进行连接,得到对应所述自然语言测试用例的工业测试脚本。The fifth module is used to connect the obtained industrial test script functions corresponding to each natural language command in an order consistent with the order of each natural language command, to obtain an industrial test script corresponding to the natural language test case.
  8. 根据权利要求7所述的工业测试脚本生成装置,其特征在于,所述目标单词序列包括:提取自一词汇表中的单词和/或拷贝自待处理单词序列中的单词;其中,所述词汇表中的单词包括:与各工业测试脚本函数相关联的单词;The industrial test script generation device according to claim 7, wherein the target word sequence includes: words extracted from a vocabulary and/or words copied from the word sequence to be processed; wherein, the vocabulary The words in the table include: words associated with each industrial test script function;
    所述序列到序列模型基于下述操作确定所述目标单词序列中每个时刻输出的单词:The sequence-to-sequence model determines the words output at each moment in the target word sequence based on the following operations:
    将所述词汇表中的单词与所述待处理单词序列中的单词合起来得到一扩展词汇表V extCombining the words in the vocabulary and the words in the word sequence to be processed to obtain an extended vocabulary V ext ;
    根据如下公式计算得到所述扩展词汇表V ext中的各个单词在t时刻的输出概率分布: The output probability distribution of each word in the extended vocabulary V ext at time t is calculated according to the following formula:
    P Vert(y t)=p gen,tP g(y t)+(1-p gen,t)P c(y t) P Vert (y t )=p gen,t P g (y t )+(1-p gen,t )P c (y t )
    上式中,p gen,t为t时刻选择是从词汇表中生成单词还是从输入序列中选择一个单词。
    Figure PCTCN2022097686-appb-100007
    其中,σ是sigmoid函数;
    Figure PCTCN2022097686-appb-100008
    为产生第t个词的时刻对输入序列所有词的关注度和隐藏层值的加权和;
    Figure PCTCN2022097686-appb-100009
    为输出序列第t个词的隐藏层的值;E y,t-1是上一时刻(t-1)产生词的隐含层的值,W s,z,W s,h,W s,E,b s是可学习参数。词汇表中的各个词汇在t时刻的输出概率分布P g(y t)和输入序列中各个单词在t时刻的关注度分布P c(y t)分别根据下式(2)和(3)确定:
    In the above formula, p gen,t is the choice at time t whether to generate a word from the vocabulary or select a word from the input sequence.
    Figure PCTCN2022097686-appb-100007
    Among them, σ is the sigmoid function;
    Figure PCTCN2022097686-appb-100008
    It is the weighted sum of the attention and hidden layer values of all words in the input sequence at the moment when the t-th word is generated;
    Figure PCTCN2022097686-appb-100009
    is the value of the hidden layer of the t-th word in the output sequence; E y,t-1 is the value of the hidden layer that produced the word at the previous moment (t-1), W s,z , W s,h , W s, E , b s are learnable parameters. The output probability distribution P g (y t ) of each word in the vocabulary at time t and the attention distribution P c (y t ) of each word in the input sequence at time t are determined according to the following formulas (2) and (3) respectively. :
    Figure PCTCN2022097686-appb-100010
    Figure PCTCN2022097686-appb-100010
    Figure PCTCN2022097686-appb-100011
    Figure PCTCN2022097686-appb-100011
    其中,y t为t时刻生成的需要输出的单词,P vocab,t(y t)为t时刻从词汇表中生成y t的概率,
    Figure PCTCN2022097686-appb-100012
    为产生词的t时刻对输入序列第j个词的关注度,ν为词汇表,∪为并集 符号,unk为定义的未知字符符号,χ为输入序列词汇表。
    Among them, y t is the word that needs to be output generated at time t, P vocab,t (y t ) is the probability of generating y t from the vocabulary at time t,
    Figure PCTCN2022097686-appb-100012
    is the attention paid to the j-th word in the input sequence at time t when the word is generated, ν is the vocabulary, ∪ is the union symbol, unk is the defined unknown character symbol, and χ is the vocabulary of the input sequence.
    在得到所述扩展词汇表V ext中的各个单词在t时刻的输出概率分布之后,将概率最大的单词作为t时刻的输出单词y tAfter obtaining the output probability distribution of each word in the extended vocabulary V ext at time t, the word with the highest probability is used as the output word y t at time t.
  9. 一种工业测试脚本生成装置,其特征在于,包括至少一个存储器和至少一个处理器,其中:An industrial test script generation device is characterized by including at least one memory and at least one processor, wherein:
    所述至少一个存储器用于存储计算机程序;The at least one memory is used to store a computer program;
    所述至少一个处理器用于调用所述至少一个存储器中存储的计算机程序,执行如权利要求1至6中任一项所述的工业测试脚本生成方法。The at least one processor is configured to call a computer program stored in the at least one memory to execute the industrial test script generation method according to any one of claims 1 to 6.
  10. 一种计算机可读存储介质,其上存储有计算机程序;其特征在于,所述计算机程序能够被一处理器执行并实现如权利要求1至6中任一项所述的工业测试脚本生成方法。A computer-readable storage medium on which a computer program is stored; characterized in that the computer program can be executed by a processor and implement the industrial test script generation method as claimed in any one of claims 1 to 6.
PCT/CN2022/097686 2022-06-08 2022-06-08 Industrial test script generation method and apparatus, and storage medium WO2023236114A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/097686 WO2023236114A1 (en) 2022-06-08 2022-06-08 Industrial test script generation method and apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/097686 WO2023236114A1 (en) 2022-06-08 2022-06-08 Industrial test script generation method and apparatus, and storage medium

Publications (1)

Publication Number Publication Date
WO2023236114A1 true WO2023236114A1 (en) 2023-12-14

Family

ID=89117240

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/097686 WO2023236114A1 (en) 2022-06-08 2022-06-08 Industrial test script generation method and apparatus, and storage medium

Country Status (1)

Country Link
WO (1) WO2023236114A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415838A (en) * 2018-03-01 2018-08-17 吉旗(成都)科技有限公司 A kind of automated testing method based on natural language processing technique
US20180349256A1 (en) * 2017-06-01 2018-12-06 Royal Bank Of Canada System and method for test generation
CN109840192A (en) * 2017-11-27 2019-06-04 北京京东尚科信息技术有限公司 The method and apparatus of automatic test
CN110347603A (en) * 2019-07-12 2019-10-18 北京精密机电控制设备研究所 A kind of automation software testing system and method for artificial intelligence
US20200019488A1 (en) * 2018-07-12 2020-01-16 Sap Se Application Test Automate Generation Using Natural Language Processing and Machine Learning
CN113032257A (en) * 2021-03-19 2021-06-25 中国工商银行股份有限公司 Automatic test method, device, computer system and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180349256A1 (en) * 2017-06-01 2018-12-06 Royal Bank Of Canada System and method for test generation
CN109840192A (en) * 2017-11-27 2019-06-04 北京京东尚科信息技术有限公司 The method and apparatus of automatic test
CN108415838A (en) * 2018-03-01 2018-08-17 吉旗(成都)科技有限公司 A kind of automated testing method based on natural language processing technique
US20200019488A1 (en) * 2018-07-12 2020-01-16 Sap Se Application Test Automate Generation Using Natural Language Processing and Machine Learning
CN110347603A (en) * 2019-07-12 2019-10-18 北京精密机电控制设备研究所 A kind of automation software testing system and method for artificial intelligence
CN113032257A (en) * 2021-03-19 2021-06-25 中国工商银行股份有限公司 Automatic test method, device, computer system and readable storage medium

Similar Documents

Publication Publication Date Title
CN113110988B (en) Testing applications with defined input formats
WO2022007823A1 (en) Text data processing method and device
US11645470B2 (en) Automated testing of dialog systems
CN111611810B (en) Multi-tone word pronunciation disambiguation device and method
US20210035556A1 (en) Fine-tuning language models for supervised learning tasks via dataset preprocessing
CN109697292B (en) Machine translation method, device, electronic equipment and medium
CN111737991B (en) Text sentence breaking position identification method and system, electronic equipment and storage medium
WO2022174496A1 (en) Data annotation method and apparatus based on generative model, and device and storage medium
CN110941951B (en) Text similarity calculation method, text similarity calculation device, text similarity calculation medium and electronic equipment
CN111950279A (en) Entity relationship processing method, device, equipment and computer readable storage medium
CN111611797A (en) Prediction data labeling method, device and equipment based on Albert model
CN114330588A (en) Picture classification method, picture classification model training method and related device
CN114237582A (en) Project construction method, device, medium and electronic equipment
CN113723077B (en) Sentence vector generation method and device based on bidirectional characterization model and computer equipment
CN117392983B (en) Intelligent voice interaction control system and control method for drilling machine
CN108875024B (en) Text classification method and system, readable storage medium and electronic equipment
EP4060526A1 (en) Text processing method and device
CN117795474A (en) Source code for domain specific language synthesized from natural language text
CN113626576A (en) Method and device for extracting relational characteristics in remote supervision, terminal and storage medium
WO2023236114A1 (en) Industrial test script generation method and apparatus, and storage medium
CN112417860A (en) Training sample enhancement method, system, device and storage medium
CN116225973A (en) Chip code testing method and device based on embedded implementation electronic equipment
CN113407719B (en) Text data detection method and device, electronic equipment and storage medium
WO2020167156A1 (en) Method for debugging a trained recurrent neural network
TW202324202A (en) Extracting explanations from attention-based models

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22945259

Country of ref document: EP

Kind code of ref document: A1