WO2016082474A1 - Human-machine command script updating method and apparatus, and computer storage medium - Google Patents

Human-machine command script updating method and apparatus, and computer storage medium Download PDF

Info

Publication number
WO2016082474A1
WO2016082474A1 PCT/CN2015/078701 CN2015078701W WO2016082474A1 WO 2016082474 A1 WO2016082474 A1 WO 2016082474A1 CN 2015078701 W CN2015078701 W CN 2015078701W WO 2016082474 A1 WO2016082474 A1 WO 2016082474A1
Authority
WO
WIPO (PCT)
Prior art keywords
human
language command
command
machine
update
Prior art date
Application number
PCT/CN2015/078701
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 中兴通讯股份有限公司
Publication of WO2016082474A1 publication Critical patent/WO2016082474A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present invention relates to the field of human-machine command script technology, and in particular, to a human-machine command script update method and apparatus, and a computer storage medium.
  • MML Man-Machine Language
  • the MML command will be updated accordingly.
  • the network resource or the system's human-machine command script needs to be tested before the MML command is completely updated. Due to the huge number of MML commands included in the human-machine command script, the update process of the human-machine command script is time-consuming and complicated.
  • the method of testing human-machine command scripts by means of batch MML command automation scripts is common.
  • the batch MML command automation script speeds up the updating and maintenance of human-machine command scripts, the version of network resources often changes.
  • the number of MML commands included in the man-machine command script is too large, and the maintenance of the man-machine command script still poses a great challenge to the way of batching MML command automation scripts.
  • a common problem at this stage is that when the measured network resource or the service of the system changes, the process of modifying or updating the test script of the MML command is too complicated due to the huge number of MML commands corresponding to the network resource or the system, resulting in updating in a short time.
  • Test scripts for a large number of MML commands become unfinished tasks.
  • the existing method is mainly to improve the structure of the automated test script. Solve the maintenance problem of MML command automation test script.
  • the existing large automated test framework is produced to solve such problems. Born, its development has gone through the following stages:
  • Unstructured automated testing framework Data and MML command scripts are combined. A script is a test case. This type of script is faster to develop, but the maintenance cost is high, and any changes in the tested network resources or systems are made. All need to be solved through maintenance scripts.
  • Data-driven automated test framework read input data from data files, pass the parameterization of variables, and pass test data to test scripts. Different data files correspond to different test cases. In this mode, the data and the script are separated, the utilization and maintainability of the script are greatly improved, and the coverage of the data is also high, but it is still greatly affected by the interface change.
  • Keyword-driven automated testing framework Keyword-driven testing is an improved type of data-driven testing that decomposes test logic by keywords to form data files, and the keywords correspond to the packaged business logic.
  • the main keywords include three categories: manipulated objects, operations, and values.
  • the main idea of keyword-driven is: separation of script and data, separation of interface element names from test internal object names, separation of test descriptions and specific implementation details.
  • the data-driven automated test framework has obvious advantages in terms of interface impact, data drive and recording/playback, and can update the corresponding keyword objects according to changes in the interface without re-recording the script.
  • the above method is to increase the maintainability of the human-machine command script by improving the structure of the human-machine command script.
  • the structured script has the following problems:
  • embodiments of the present invention are directed to providing a human machine command script update method, apparatus, and computer storage medium.
  • the embodiment of the invention provides a method for updating a human-machine command script, the method comprising:
  • the man-machine command script based on the second human language command is updated according to the human language command update rule.
  • the obtaining the first data dictionary by using the first human language command comprises:
  • the first human language command is sorted according to the set attribute to obtain a first data dictionary.
  • the comparing the first data dictionary with the second data dictionary corresponding to the second human language command to obtain the difference human language command set includes:
  • the first distinct human language command set and the second differential human language command set are combined to form a differential human language command set.
  • the obtaining the human language command update rule according to the differential human language command set includes:
  • the obtaining the human language command update rule according to the differential human language command set further includes:
  • the human language command that distinguishes the human language command set is saved to the first human language command.
  • the embodiment of the invention further provides a device for updating a human-machine command script, the device comprising:
  • a first data dictionary obtaining unit configured to obtain a first data dictionary by using a first human language command
  • the human language command update rule obtaining unit is configured to compare the first data dictionary and the second data dictionary corresponding to the second human language command to obtain a difference human language command set; according to the difference human machine The language command set gets the human language command update rule;
  • the man machine command script update unit is configured to update the man machine command script based on the second human language command according to the man machine language command update rule.
  • the first data dictionary obtaining unit includes:
  • a human language command acquisition module configured to scan a tested system including a human machine command script having a first human language command to obtain a first human language command;
  • a first data dictionary obtaining module configured to command the first human language language according to a set attribute Sorting to get the first data dictionary.
  • the human language command update rule obtaining unit includes:
  • a first difference human-machine language command set obtaining module configured to form a first set human-machine language command in the first data dictionary into a first differential human-machine language command set; the first setting human-machine language command According to the set attribute, the same human language command cannot be found in the second data dictionary;
  • a second difference human-machine language command set obtaining module configured to form a second set human-machine language command in the second data dictionary into a second differential human-machine language command set; and the second setting human-machine language command According to the set attribute, the same human-machine language command cannot be found in the first data dictionary;
  • the difference human-machine language command set obtaining module is configured to form the first difference human-machine language command set and the second difference human-machine language command set into a difference human-machine language command set.
  • the human language command update rule acquiring unit further includes:
  • a human language command update rule module configured to determine an update order of the human language command of the second differential human language command set in the differential human language command set according to the priority of the set attribute; Determining an update direction of the human language command in the second differential human language command set according to the keyword of the setting attribute corresponding to the update order; and belonging to the second differential human language command set
  • the human language command is updated according to the update direction to a corresponding human language command belonging to the first differential human language command set, and the human machine language command belonging to the second differential human language command set is obtained.
  • Language command update rules configured to determine an update order of the human language command of the second differential human language command set in the differential human language command set according to the priority of the set attribute; Determining an update direction of the human language command in the second differential human language command set according to the keyword of the setting attribute corresponding to the update order; and belonging to the second differential human language command set
  • the human language command is updated according to the update direction to a corresponding human language command belonging to the first differential human language command set, and the
  • the human language command update rule module includes:
  • a human language command saver configured to be unable to update the corresponding human machine language belonging to the first differential human language command set according to the update direction according to the human language command belonging to the second differential human language command set
  • the language command will belong to the second difference human language command set
  • the combined human language command is saved to the first human language command.
  • the embodiment of the present invention further provides a computer storage medium, the computer storage medium comprising a set of instructions, when executed, causing at least one processor to execute the man-machine command script update method.
  • the human-machine command script updating method and apparatus and the computer storage medium provided by the embodiment of the present invention obtain a first data dictionary by using a first human-machine language command, and corresponding to the first data dictionary and the second human-machine language command.
  • the two data dictionaries are compared to obtain a differential MML command set;
  • the MML command update rule is obtained according to the differential MML command set;
  • the human machine command script of the second human machine language command is updated by the MML command update rule.
  • the solution of the invention updates the man-machine command script from the perspective of the MML command, simplifies the update process of the man-machine command script, and realizes the rapid update of a large number of man-machine command scripts.
  • FIG. 1 is a schematic flowchart of an implementation process of a human-machine command script update method according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic structural diagram of a human-machine command script updating apparatus according to Embodiment 2 of the present invention.
  • FIG. 3 is a schematic structural diagram of a component of an MML command update rule acquiring unit according to Embodiment 2 of the present invention.
  • the first data dictionary is obtained by the first human language command; the first data dictionary is compared with the second data dictionary corresponding to the second human language command to obtain a different person. a set of machine language commands; obtaining a human machine language command update rule according to the differential human machine language command set; updating the man machine command script based on the second human machine language command according to the man machine language command update rule.
  • the present embodiment is expected to provide a method for updating the human-machine command script. As shown in FIG. 1 , the method of the embodiment includes:
  • Step S101 Obtain a first data dictionary by using the updated MML command.
  • the data dictionary refers to the definition and description of data items, data structures, data streams, data storage, processing logic, external entities, etc., the purpose of which is to explain in detail the various elements in the data flow chart.
  • the first data dictionary of this embodiment is a statistic of an updated MML command (hereinafter referred to as a first human language command) capable of characterizing a first human language command.
  • Step S102 comparing the first data dictionary and the second data dictionary corresponding to the second human language command to obtain a difference MML command set; and obtaining an MML command update rule according to the differential MML command set;
  • the second human language command also has a corresponding second data dictionary
  • the second data dictionary characterizes the features of the second human language command. Comparing the first data dictionary with the second data dictionary can obtain a difference MML command set, and the difference MML command set can reflect the difference between the second human language command and the first human language command, and is also an object of the MML command update.
  • Many MML commands in the difference MML command set are caused by changes in the name or parameter attributes of the network resource or the human-machine command script in the system, but there is a corresponding relationship in essence, that is, the MML command update rule. Therefore, obtaining these MML command update rules enables modification of the human machine command script written by the second human language command.
  • Step S103 Update the man-machine command script based on the second human language command according to the MML command update rule.
  • the MML command update rule is used to update the MML command of the man-machine command script before the update, so that the updated man-machine command script is updated to the updated man-machine command script to implement network resource or system revision or upgrade.
  • the method of the embodiment updates the man-machine command script from the perspective of the MML command, and is applicable to all human-machine command scripts based on the second human-machine language command; updating the man-machine command script by the MML command can simplify the updating of the man-machine command script. Process to achieve rapid updates to a large number of human-machine command scripts.
  • step S101 includes:
  • the first human language command is included in the tested system that has been tested.
  • the tested system including the human machine command script having the first human language command is first scanned to obtain the first human language command; the MML command is usually in the different version of the human machine command script. All of the attributes are changed. Therefore, the first data dictionary can be obtained by counting the set attributes of the MML command, and the data dictionary is compared with the data dictionary corresponding to the second human language command to find the root. The difference between man-machine command scripts.
  • the difference MML command set is obtained by:
  • the first data dictionary is compared with a second data dictionary corresponding to the second human language command.
  • MML commands There are many identical MML commands in the first data dictionary and the second data dictionary. These MML commands have the same function in the pre-update human-machine command script and the updated human-machine command script, and may not be processed. .
  • MML command update rules MML commands to implement updates to MML commands.
  • the first set MML command in the first data dictionary is formed into a first differential MML command set; the first set MML command cannot be found in the second data dictionary according to the set attribute.
  • the setting attribute is usually the name or parameter of the MML command, but is not limited to the name and the parameter.
  • Obtaining an MML command update rule according to the differential MML command set in step S102 includes:
  • the method includes: determining, according to the priority of the set attribute, an update order of the MML command of the second differential MML command set, such as a command name and a sequence of the command parameters; each attribute itself further includes a keyword, such as When the attribute is a name, the corresponding keyword can be a command name and a command name description.
  • the corresponding keyword can be a command parameter and a command parameter description, and the keywords also have a priority.
  • the update direction of the MML command is further determined according to the keyword in the set attribute, that is, the second difference MML command is determined according to the keyword of the set attribute corresponding to the update order.
  • the update direction of the MML commands within the collection For example, in the command name, determining the update order of the command name and the command name description to determine the update direction; finally, updating the MML command belonging to the second differential MML command set to the corresponding update direction according to the update direction
  • An MML command that distinguishes the MML command set obtains an MML command update rule of the MML command belonging to the second differential MML command set.
  • An update to the MML command is implemented.
  • first difference MML command set and the second difference MML command set contain different numbers of MML commands.
  • the use is directly in the man-machine command script before the update.
  • Some MML commands may be used; when there is a command in the second difference MML command set that is not in the first difference MML command set, that is, the MML commands cannot be updated to correspond to the first difference MML command set according to the update direction.
  • the MML command saves the MML commands belonging to the second differential MML command set to the first human language command, and directly uses the human machine command script before the update, thereby finally realizing the update of the human machine command script.
  • This embodiment is a man-machine command script updating device proposed on the basis of the method of Embodiment 1, as shown in FIG. 2, the device includes:
  • the first data dictionary obtaining unit 201 is configured to obtain a first data dictionary by using a first human language command
  • the MML command update rule obtaining unit 202 is configured to compare the first data dictionary with a second data dictionary corresponding to the second human language command to obtain a differential MML command set; and obtain the MML according to the differential MML command set.
  • the man machine command script update unit 203 is configured to update the man machine command script based on the second human machine language command according to the MML command update rule.
  • the first data dictionary obtaining unit 201 specifically includes:
  • An MML command obtaining module configured to scan a tested system including a human machine command script having a first human language command to obtain a first human language command;
  • the first data dictionary obtaining module is configured to sort the first human language command according to the set attribute to obtain a first data dictionary.
  • the MML command update rule obtaining unit 202 specifically includes:
  • the first difference MML command set obtaining module 2021 is configured to form a first set MML command in the first data dictionary into a first differential MML command set; the first set MML command cannot be according to the set attribute Finding the exact same MML command in the second data dictionary;
  • the second difference MML command set obtaining module 2022 is configured to form a second set MML command in the second data dictionary into a second differential MML command set; the second set MML command cannot be according to the set attribute Finding identical MML commands in the first data dictionary;
  • the difference MML command set obtaining module 2023 is configured to form the first differential MML command set and the second differential MML command set into a differential MML command set.
  • the MML command update rule obtaining unit 202 may further include: an MML command update rule module 2024, configured to determine an update order of the MML commands of the second differential MML command set according to the priority of the set attribute, such as The command name, the order of the command parameters, and the update direction of the MML command in the second differential MML command set according to the keyword of the set attribute corresponding to the update order, such as the command name, the command name
  • the update sequence of the command name description determines the update direction; the MML command belonging to the second difference MML command set is updated according to the update direction to the corresponding MML command belonging to the first differential MML command set, and the belonging MMA command is obtained.
  • the MML command update rule of the second MML command that distinguishes the MML command set.
  • the MML command update rule module 2024 may further include an MML command saving module configured to: the MML command belonging to the second differential MML command set cannot be updated to correspond to the first differential MML command set according to the update direction. When the MML command is executed, the MML command belonging to the second differential MML command set is saved to the first human language command.
  • the second difference MML command set obtaining module 2022, the difference MML command set obtaining module 2023, and the MML command update rule module 2024 can be a central processing unit (CPU), a microprocessor (Micro Control) in the human machine command script updating device.
  • MCU digital signal A DSP (Digital Signal Processor, DSP) or a Field-Programmable Gate Array (FPGA) implementation
  • the MML command save module can be implemented by a CPU, an MCU, a DSP, or an FPGA in combination with a memory in the human-machine command script update device.
  • This embodiment describes the present invention in detail through an actual scenario.
  • Step A scanning the first human language command and its parameters to form an MML data dictionary (first data dictionary);
  • Step B identifying a difference between the first data dictionary of the first human language command and the second data dictionary of the second human language command, and updating the rule according to the MML command formulated according to the difference;
  • Step C Convert the second human machine language command according to the MML command update rule, convert the second human machine language command into the first human machine language command, and implement the update of the human machine command script before the update.
  • step A further includes:
  • Step A1 First, scan the network resource or the name of all MML commands of the system, and store the file as an Extensible Markup Language (XML) file according to the mnemonic, identifier, and command description of the name;
  • XML Extensible Markup Language
  • Step A2 and then scanning the parameters of each MML command, and storing the parameters in the XML file according to the name, ID, and parameter description of the parameter;
  • Step A3 combining the results of steps A1 and A2, generating a first data dictionary of names and parameters of all first human language commands;
  • Step B further includes:
  • the priority of the name is higher than the priority of the parameter, that is, the update order is: first, the MML commands in the second differential MML command set are sorted by name, and then the second difference MML is parameterized.
  • the MML command in the command set is sorted; wherein the name includes a keyword including a command name and a command name description, and the command name is first described as an update direction, and the MML command belonging to the second differential MML command set is updated to Corresponding MML commands belonging to the first differential MML command set obtain MML command update rules of the MML commands belonging to the second differential MML command set.
  • the method includes: 1) when the MML command of the second difference MML command set is compared with the MML command of the first difference MML command set, the MML command name changes, and when the command name description does not change, the second difference MML command set belongs to The command name of the MML command is modified to the command name of the corresponding MML command of the first difference MML command set; 2) the MML command is compared with the MML command of the first difference MML command set and the MML command of the first difference MML command set; When the name of the command is changed, the command name description of the MML command belonging to the second differential MML command set is modified to the command name description of the MML command corresponding to the first differential MML command set; 3) when the second When the MML command of the MML command set is different from the MML command of the first MML command set, when the MML command name changes and the command name description also changes, the command name is first modified, and then the command name description is modified.
  • the parameter keyword includes the command parameter and the command parameter
  • the parameter range update includes the following cases: 1) Adding or reducing an offset to a parameter in batches.
  • the command parameter NET ranges from 1 to 255 to 10 to 264.
  • the batch migration rule can increase the value of all the parameters in the second human language command by 10, so that the human machine command script can also run normally in the new version.
  • the parameter can be modified to 10 Up to 1024; 2)
  • the enumeration value has changed, for example, the enumeration value "DOMTOLL” of the command parameter is changed to "DOMAIN”; 3
  • the parameter format has changed, for example, the value of the command parameter DPC
  • the new keyword is added in the man-machine command script, and the key is added to the first human language command. The situation of the word.
  • an MML command that is not included in the second human language command is added to the first human language command, and the added MML command is applied to the human command script corresponding to the second human language command. That is, or there is a case where the first human language command reduces the MML commands that are not available in the second human language command, and these MML commands can be directly saved in the first human language command for later use.
  • the embodiment of the present invention constructs a first data dictionary of a first human language command, and establishes between the first data dictionary of the first human language command and the second data dictionary of the second human language command by the MML command update rule.
  • the mapping relationship is implemented to update the human-machine command script before the update.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • each shown or discussed The coupling, or direct coupling, or communication connection of the components to each other may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or other.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the above integration
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing storage device includes the following steps:
  • the foregoing storage medium includes: a removable storage device, a read-only memory (ROM), a magnetic disk, or an optical disk, and the like, which can store program codes.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • an embodiment of the present invention further provides a computer storage medium, where the computer storage medium includes a set of instructions, when executed, causing at least one processor to execute the man-machine command script update method.

Abstract

A human-machine command script updating method and apparatus, and a computer storage medium. The method comprises: obtaining a first data dictionary via a first human-machine language command (S101); comparing the first data dictionary to a second data dictionary corresponding to a second human-machine language command to obtain a differentiated human-machine language command set; obtaining a man-machine language command updating rule according to the differentiated human-machine language command set (S102); and updating a human-machine command script based on the second human-machine language command according to the human-machine language command updating rule (S103).

Description

一种人机命令脚本更新方法、装置及计算机存储介质Man-machine command script updating method, device and computer storage medium 技术领域Technical field
本发明涉及人机命令脚本技术领域,尤其涉及一种人机命令脚本更新方法、装置及计算机存储介质。The present invention relates to the field of human-machine command script technology, and in particular, to a human-machine command script update method and apparatus, and a computer storage medium.
背景技术Background technique
人与智能设备之间通过人机语言(Man-Machine Language,MML)命令实现人机对话,同时,MML命令也是构成网络资源的重要基础。Human-machine dialogue is realized between human and smart devices through Man-Machine Language (MML) commands. At the same time, MML commands are also an important basis for constructing network resources.
当网络资源或智能设备的系统需要更新时,MML命令也会相应地进行更新。考虑到更新后的稳定性等因素,在对MML命令彻底更新前,需要对网络资源或系统的人机命令脚本进行测试。由于人机命令脚本包含的MML命令数量巨大,导致人机命令脚本的更新工作过程耗时长且复杂。When the network resource or the system of the smart device needs to be updated, the MML command will be updated accordingly. Considering the stability and other factors after the update, the network resource or the system's human-machine command script needs to be tested before the MML command is completely updated. Due to the huge number of MML commands included in the human-machine command script, the update process of the human-machine command script is time-consuming and complicated.
目前,采用批量MML命令自动化脚本的方式对人机命令脚本进行测试的方法较为普遍,尽管批量MML命令自动化脚本的方式加快了人机命令脚本的更新和维护,但由于网络资源的版本经常变化,且人机命令脚本包含的MML命令的数量太大,人机命令脚本的维护还是给批量MML命令自动化脚本的方式带来很大的挑战。At present, the method of testing human-machine command scripts by means of batch MML command automation scripts is common. Although the batch MML command automation script speeds up the updating and maintenance of human-machine command scripts, the version of network resources often changes. Moreover, the number of MML commands included in the man-machine command script is too large, and the maintenance of the man-machine command script still poses a great challenge to the way of batching MML command automation scripts.
现阶段常见的问题是被测网络资源或系统的业务发生了变动时,由于网络资源或系统对应的MML命令数量巨大,MML命令的测试脚本修改或者更新的过程过于复杂,导致在短时间内更新大量MML命令的测试脚本成为无法完成的任务。要保证在被测网络资源或系统的业务出现变动时,及时准确地修改上次人机命令的测试脚本,将其更新至符合当前测试的状态,现有方法主要通过改善自动化测试脚本的结构来解决MML命令自动化测试脚本的维护问题。现有的大型自动化测试框架就是为解决此类问题而产 生的,其发展经历了如下几个阶段:A common problem at this stage is that when the measured network resource or the service of the system changes, the process of modifying or updating the test script of the MML command is too complicated due to the huge number of MML commands corresponding to the network resource or the system, resulting in updating in a short time. Test scripts for a large number of MML commands become unfinished tasks. To ensure that the test script of the last human-machine command is modified in time and accurately when the network resource or system of the tested network changes, the existing method is mainly to improve the structure of the automated test script. Solve the maintenance problem of MML command automation test script. The existing large automated test framework is produced to solve such problems. Born, its development has gone through the following stages:
1.非结构化的自动化测试框架:数据和MML命令的脚本糅合在一起,一条脚本就是一个测试用例,这类脚本开发速度较快,但是维护成本很高,被测试网络资源或系统的任何变化都需要通过维护脚本来解决。1. Unstructured automated testing framework: Data and MML command scripts are combined. A script is a test case. This type of script is faster to develop, but the maintenance cost is high, and any changes in the tested network resources or systems are made. All need to be solved through maintenance scripts.
2.数据驱动的自动化测试框架:从数据文件读取输入数据,通过变量的参数化,将测试数据传入测试脚本,不同的数据文件对应不同的测试用例。在这种模式下数据和脚本分离,脚本的利用率、可维护性大大提高,数据的覆盖率也较高,但受界面变化的影响仍然很大。2. Data-driven automated test framework: read input data from data files, pass the parameterization of variables, and pass test data to test scripts. Different data files correspond to different test cases. In this mode, the data and the script are separated, the utilization and maintainability of the script are greatly improved, and the coverage of the data is also high, but it is still greatly affected by the interface change.
3.关键字驱动的自动化测试框架:关键字驱动测试是数据驱动测试的一种改进类型,它将测试逻辑按照关键字进行分解,形成数据文件,关键字对应封装的业务逻辑。主要关键字包括三类:被操作对象、操作和值。关键字驱动的主要思想是:脚本与数据分离、界面元素名与测试内部对象名分离、测试描述与具体实现细节分离。数据驱动的自动化测试框架在受界面影响方面、较数据驱动和录制/回放有明显的优势,可根据界面的变化更新对应的关键字对象,而不用重新录制脚本。3. Keyword-driven automated testing framework: Keyword-driven testing is an improved type of data-driven testing that decomposes test logic by keywords to form data files, and the keywords correspond to the packaged business logic. The main keywords include three categories: manipulated objects, operations, and values. The main idea of keyword-driven is: separation of script and data, separation of interface element names from test internal object names, separation of test descriptions and specific implementation details. The data-driven automated test framework has obvious advantages in terms of interface impact, data drive and recording/playback, and can update the corresponding keyword objects according to changes in the interface without re-recording the script.
上述方法是通过改进人机命令脚本的结构来增加人机命令脚本的可维护性,这种结构化的脚本存在如下问题:The above method is to increase the maintainability of the human-machine command script by improving the structure of the human-machine command script. The structured script has the following problems:
一、人机命令脚本开发的复杂度大大增加。具体地,由于要进行数据分离和关键字封装,这就增加了人机命令脚本开发的技术难度,延长了人机命令脚本开发周期。First, the complexity of human-machine command script development has greatly increased. Specifically, due to data separation and keyword encapsulation, this increases the technical difficulty of human-machine command script development and prolongs the man-machine command script development cycle.
二、存在较大的人机命令脚本维护工作量,MML命令变化后对关键字的修改需要花费很多时间。Second, there is a large man-machine command script to maintain the workload, and it takes a lot of time to modify the keyword after the MML command is changed.
发明内容Summary of the invention
有鉴于此,本发明实施例期望提供一种人机命令脚本更新方法、装置及计算机存储介质。 In view of this, embodiments of the present invention are directed to providing a human machine command script update method, apparatus, and computer storage medium.
本发明实施例的技术方案是这样实现的:The technical solution of the embodiment of the present invention is implemented as follows:
本发明实施例提供了一种人机命令脚本更新方法,所述方法包括:The embodiment of the invention provides a method for updating a human-machine command script, the method comprising:
通过第一人机语言命令得到第一数据字典;Obtaining a first data dictionary by a first human language command;
将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性人机语言命令集合;根据所述差异性人机语言命令集合得到人机语言命令更新规则;Comparing the first data dictionary with the second data dictionary corresponding to the second human language command to obtain a differential human language command set; and obtaining a human language command update rule according to the differential human language command set;
根据所述人机语言命令更新规则对基于第二人机语言命令的人机命令脚本进行更新。The man-machine command script based on the second human language command is updated according to the human language command update rule.
上述方案中,所述通过第一人机语言命令得到第一数据字典包括:In the above solution, the obtaining the first data dictionary by using the first human language command comprises:
扫描包含具有第一人机语言命令的人机命令脚本的被测试系统,得到第一人机语言命令;Scanning a system under test containing a human machine command script having a first human language command to obtain a first human language command;
按设定属性对所述第一人机语言命令进行排序,得到第一数据字典。The first human language command is sorted according to the set attribute to obtain a first data dictionary.
上述方案中,所述将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性人机语言命令集合包括:In the above solution, the comparing the first data dictionary with the second data dictionary corresponding to the second human language command to obtain the difference human language command set includes:
将所述第一数据字典中的第一设定人机语言命令组成第一区别人机语言命令集合;所述第一设定人机语言命令按照所述设定属性不能在所述第二数据字典中找到完全相同的人机语言命令;Forming, by the first set of human-machine language commands in the first data dictionary, a first set of different human-machine language commands; the first setting human-machine language command cannot be in the second data according to the set attribute Find the exact same human-machine language command in the dictionary;
将所述第二数据字典中的第二设定人机语言命令组成第二区别人机语言命令集合;所述第二设定人机语言命令按照所述设定属性不能在所述第一数据字典中找到完全相同的人机语言命令;Forming, by the second set of human-machine language commands in the second data dictionary, a second set of different human-machine language commands; the second setting human-machine language command cannot be in the first data according to the set attribute Find the exact same human-machine language command in the dictionary;
将所述第一区别人机语言命令集合和第二区别人机语言命令集合组成差异性人机语言命令集合。The first distinct human language command set and the second differential human language command set are combined to form a differential human language command set.
上述方案中,所述根据所述差异性人机语言命令集合得到人机语言命令更新规则包括:In the above solution, the obtaining the human language command update rule according to the differential human language command set includes:
根据所述设定属性的优先级确定所述差异性人机语言命令集合中的所 述第二区别人机语言命令集合的人机语言命令的更新顺序;Determining, in the set of the difference human-machine language command set, according to the priority of the set attribute An update sequence of the second human language command that distinguishes the human language command set;
根据所述更新顺序对应的所述设定属性的关键字确定对所述第二区别人机语言命令集合内的人机语言命令的更新方向;Determining an update direction of a human machine language command in the second differential human language command set according to the keyword of the setting attribute corresponding to the update order;
将属于所述第二区别人机语言命令集合的人机语言命令按照所述更新方向更新为对应的属于所述第一区别人机语言命令集合的人机语言命令,得到属于所述第二区别人机语言命令集合的人机语言命令的人机语言命令更新规则。Updating the human language command belonging to the second differential human language command set to the corresponding human language command belonging to the first differential human language command set according to the update direction, and obtaining the second difference Human-machine language command update rule for human-machine language commands of the human-machine language command set.
上述方案中,所述根据所述差异性人机语言命令集合得到人机语言命令更新规则还包括:In the above solution, the obtaining the human language command update rule according to the differential human language command set further includes:
若属于所述第二区别人机语言命令集合的人机语言命令按照所述更新方向无法更新为对应的属于所述第一区别人机语言命令集合的人机语言命令,则将属于所述第二区别人机语言命令集合的人机语言命令保存至第一人机语言命令。If the human language command belonging to the second differential human language command set cannot be updated to the corresponding human language command belonging to the first differential human language command set according to the update direction, The human language command that distinguishes the human language command set is saved to the first human language command.
本发明实施例还提供了一种人机命令脚本更新装置,所述装置包括:The embodiment of the invention further provides a device for updating a human-machine command script, the device comprising:
第一数据字典获取单元,配置为通过第一人机语言命令得到第一数据字典;a first data dictionary obtaining unit configured to obtain a first data dictionary by using a first human language command;
人机语言命令更新规则获取单元,配置为将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性人机语言命令集合;根据所述差异性人机语言命令集合得到人机语言命令更新规则;The human language command update rule obtaining unit is configured to compare the first data dictionary and the second data dictionary corresponding to the second human language command to obtain a difference human language command set; according to the difference human machine The language command set gets the human language command update rule;
人机命令脚本更新单元,配置为根据所述人机语言命令更新规则对基于第二人机语言命令的人机命令脚本进行更新。The man machine command script update unit is configured to update the man machine command script based on the second human language command according to the man machine language command update rule.
上述方案中,所述第一数据字典获取单元包括:In the above solution, the first data dictionary obtaining unit includes:
人机语言命令获取模块,配置为扫描包含具有第一人机语言命令的人机命令脚本的被测试系统,得到第一人机语言命令;a human language command acquisition module configured to scan a tested system including a human machine command script having a first human language command to obtain a first human language command;
第一数据字典获取模块,配置为按设定属性对所述第一人机语言命令 进行排序,得到第一数据字典。a first data dictionary obtaining module configured to command the first human language language according to a set attribute Sorting to get the first data dictionary.
上述方案中,所述人机语言命令更新规则获取单元包括:In the above solution, the human language command update rule obtaining unit includes:
第一区别人机语言命令集合获取模块,配置为将所述第一数据字典中的第一设定人机语言命令组成第一区别人机语言命令集合;所述第一设定人机语言命令按照所述设定属性不能在所述第二数据字典中找到完全相同的人机语言命令;a first difference human-machine language command set obtaining module, configured to form a first set human-machine language command in the first data dictionary into a first differential human-machine language command set; the first setting human-machine language command According to the set attribute, the same human language command cannot be found in the second data dictionary;
第二区别人机语言命令集合获取模块,配置为将所述第二数据字典中的第二设定人机语言命令组成第二区别人机语言命令集合;所述第二设定人机语言命令按照所述设定属性不能在所述第一数据字典中找到完全相同的人机语言命令;a second difference human-machine language command set obtaining module, configured to form a second set human-machine language command in the second data dictionary into a second differential human-machine language command set; and the second setting human-machine language command According to the set attribute, the same human-machine language command cannot be found in the first data dictionary;
差异性人机语言命令集合获取模块,配置为将所述第一区别人机语言命令集合和第二区别人机语言命令集合组成差异性人机语言命令集合。The difference human-machine language command set obtaining module is configured to form the first difference human-machine language command set and the second difference human-machine language command set into a difference human-machine language command set.
上述方案中,所述人机语言命令更新规则获取单元还包括:In the above solution, the human language command update rule acquiring unit further includes:
人机语言命令更新规则模块,配置为根据所述设定属性的优先级确定所述差异性人机语言命令集合中的所述第二区别人机语言命令集合的人机语言命令的更新顺序;根据所述更新顺序对应的所述设定属性的关键字确定对所述第二区别人机语言命令集合内的人机语言命令的更新方向;将属于所述第二区别人机语言命令集合的人机语言命令按照所述更新方向更新为对应的属于所述第一区别人机语言命令集合的人机语言命令,得到属于所述第二区别人机语言命令集合的人机语言命令的人机语言命令更新规则。a human language command update rule module, configured to determine an update order of the human language command of the second differential human language command set in the differential human language command set according to the priority of the set attribute; Determining an update direction of the human language command in the second differential human language command set according to the keyword of the setting attribute corresponding to the update order; and belonging to the second differential human language command set The human language command is updated according to the update direction to a corresponding human language command belonging to the first differential human language command set, and the human machine language command belonging to the second differential human language command set is obtained. Language command update rules.
上述方案中,所述人机语言命令更新规则模块包括:In the above solution, the human language command update rule module includes:
人机语言命令保存器,配置为在属于所述第二区别人机语言命令集合的人机语言命令按照所述更新方向无法更新为对应的属于所述第一区别人机语言命令集合的人机语言命令时,将属于所述第二区别人机语言命令集 合的人机语言命令保存至第一人机语言命令。a human language command saver configured to be unable to update the corresponding human machine language belonging to the first differential human language command set according to the update direction according to the human language command belonging to the second differential human language command set The language command will belong to the second difference human language command set The combined human language command is saved to the first human language command.
本发明实施例又提供了一种计算机存储介质,所述计算机存储介质包括一组指令,当执行所述指令时,引起至少一个处理器执行上述的人机命令脚本更新方法。The embodiment of the present invention further provides a computer storage medium, the computer storage medium comprising a set of instructions, when executed, causing at least one processor to execute the man-machine command script update method.
本发明实施例所提供的人机命令脚本更新方法、装置及计算机存储介质,通过第一人机语言命令得到第一数据字典,将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性MML命令集合;根据所述差异性MML命令集合得到MML命令更新规则;进而通过MML命令更新规则对第二人机语言命令的人机命令脚本进行更新。本发明方案从MML命令的角度对人机命令脚本进行更新,简化了人机命令脚本的更新过程,实现对大量人机命令脚本的快速更新。The human-machine command script updating method and apparatus and the computer storage medium provided by the embodiment of the present invention obtain a first data dictionary by using a first human-machine language command, and corresponding to the first data dictionary and the second human-machine language command. The two data dictionaries are compared to obtain a differential MML command set; the MML command update rule is obtained according to the differential MML command set; and the human machine command script of the second human machine language command is updated by the MML command update rule. The solution of the invention updates the man-machine command script from the perspective of the MML command, simplifies the update process of the man-machine command script, and realizes the rapid update of a large number of man-machine command scripts.
附图说明DRAWINGS
图1为本发明实施例1的人机命令脚本更新方法的实现流程示意图;1 is a schematic flowchart of an implementation process of a human-machine command script update method according to Embodiment 1 of the present invention;
图2为本发明实施例2的人机命令脚本更新装置的组成结构示意图;2 is a schematic structural diagram of a human-machine command script updating apparatus according to Embodiment 2 of the present invention;
图3为本发明实施例2的MML命令更新规则获取单元的组成结构示意图。FIG. 3 is a schematic structural diagram of a component of an MML command update rule acquiring unit according to Embodiment 2 of the present invention.
具体实施方式detailed description
以下结合说明书附图及具体实施例对本发明的技术方案做进一步的详细阐述。The technical solutions of the present invention are further elaborated below in conjunction with the drawings and specific embodiments.
在本发明的各种实施例中:通过第一人机语言命令得到第一数据字典;将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性人机语言命令集合;根据所述差异性人机语言命令集合得到人机语言命令更新规则;根据所述人机语言命令更新规则对基于第二人机语言命令的人机命令脚本进行更新。 In various embodiments of the present invention, the first data dictionary is obtained by the first human language command; the first data dictionary is compared with the second data dictionary corresponding to the second human language command to obtain a different person. a set of machine language commands; obtaining a human machine language command update rule according to the differential human machine language command set; updating the man machine command script based on the second human machine language command according to the man machine language command update rule.
实施例1Example 1
为了解决人机命令脚本的更新过程过于复杂等技术问题,本实施例期望提供一种人机命令脚本更新方法,如图1所示,本实施例方法包括:In order to solve the technical problem that the update process of the human-machine command script is too complicated, the present embodiment is expected to provide a method for updating the human-machine command script. As shown in FIG. 1 , the method of the embodiment includes:
步骤S101:通过更新后的MML命令得到第一数据字典;Step S101: Obtain a first data dictionary by using the updated MML command.
这里,数据字典是指对数据的数据项、数据结构、数据流、数据存储、处理逻辑、外部实体等进行定义和描述,其目的是对数据流程图中的各个元素做出详细的说明。本实施例的第一数据字典是对更新后的MML命令(以下称为第一人机语言命令)的统计,能够表征第一人机语言命令的特征。Here, the data dictionary refers to the definition and description of data items, data structures, data streams, data storage, processing logic, external entities, etc., the purpose of which is to explain in detail the various elements in the data flow chart. The first data dictionary of this embodiment is a statistic of an updated MML command (hereinafter referred to as a first human language command) capable of characterizing a first human language command.
步骤S102:将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性MML命令集合;根据所述差异性MML命令集合得到MML命令更新规则;Step S102: comparing the first data dictionary and the second data dictionary corresponding to the second human language command to obtain a difference MML command set; and obtaining an MML command update rule according to the differential MML command set;
这里,第二人机语言命令也有对应的第二数据字典,第二数据字典表征第二人机语言命令的特征。将第一数据字典和第二数据字典比较能够得到差异性MML命令集合,差异性MML命令集合能够反映第二人机语言命令和第一人机语言命令的区别,也是MML命令更新的对象。差异性MML命令集合中很多MML命令是由于网络资源或系统中人机命令脚本发生变化导致名称或参数等属性发生了变化,但本质上存在对应关系,即MML命令更新规则。因此,获得这些MML命令更新规则就能够对通过第二人机语言命令撰写的人机命令脚本进行修改。Here, the second human language command also has a corresponding second data dictionary, and the second data dictionary characterizes the features of the second human language command. Comparing the first data dictionary with the second data dictionary can obtain a difference MML command set, and the difference MML command set can reflect the difference between the second human language command and the first human language command, and is also an object of the MML command update. Many MML commands in the difference MML command set are caused by changes in the name or parameter attributes of the network resource or the human-machine command script in the system, but there is a corresponding relationship in essence, that is, the MML command update rule. Therefore, obtaining these MML command update rules enables modification of the human machine command script written by the second human language command.
步骤S103:根据所述MML命令更新规则对基于第二人机语言命令的人机命令脚本进行更新。Step S103: Update the man-machine command script based on the second human language command according to the MML command update rule.
通过MML命令更新规则对更新前的人机命令脚本的MML命令进行更新,进而使得更新前的人机命令脚本更新为更新后的人机命令脚本,实现网络资源或系统的改版或升级。 The MML command update rule is used to update the MML command of the man-machine command script before the update, so that the updated man-machine command script is updated to the updated man-machine command script to implement network resource or system revision or upgrade.
本实施例方法从MML命令的角度对人机命令脚本进行更新,适用于所有基于第二人机语言命令的人机命令脚本;通过MML命令更新人机命令脚本能够简化了人机命令脚本的更新过程,实现对大量人机命令脚本的快速更新。The method of the embodiment updates the man-machine command script from the perspective of the MML command, and is applicable to all human-machine command scripts based on the second human-machine language command; updating the man-machine command script by the MML command can simplify the updating of the man-machine command script. Process to achieve rapid updates to a large number of human-machine command scripts.
具体地,步骤S101包括:Specifically, step S101 includes:
实际中,第一人机语言命令包含在已经测试过的被测试系统中。为了获取第一人机语言命令脚本,首先扫描包含具有第一人机语言命令的人机命令脚本的被测试系统,得到第一人机语言命令;MML命令在不同版本的人机命令脚本中通常都是某些属性的改变,因此,可以通过对MML命令的设定属性进行统计得到第一数据字典,通过第一数据字典和第二人机语言命令对应的数据字典进行比较,从根本上找到人机命令脚本的区别点。In practice, the first human language command is included in the tested system that has been tested. In order to obtain the first human language command script, the tested system including the human machine command script having the first human language command is first scanned to obtain the first human language command; the MML command is usually in the different version of the human machine command script. All of the attributes are changed. Therefore, the first data dictionary can be obtained by counting the set attributes of the MML command, and the data dictionary is compared with the data dictionary corresponding to the second human language command to find the root. The difference between man-machine command scripts.
步骤S102中将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性MML命令集合包括:Comparing the first data dictionary with the second data dictionary corresponding to the second human language command in step S102, the difference MML command set is obtained by:
得到第一数据字典后,要将第一数据字典和第二人机语言命令对应的第二数据字典进行比较。第一数据字典和第二数据字典中会有很多完全相同的MML命令,这些MML命令在更新前的人机命令脚本和更新后的人机命令脚本中的作用是相同的,可以不对其进行处理。而对于那些在第一数据字典中的不能和第二数据字典中的MML命令完全对应的MML命令,则需要根据某些规则(即MML命令更新规则)找出其在第二数据字典中的对应MML命令,从而实现MML命令的更新。具体包括:将所述第一数据字典中的第一设定MML命令组成第一区别MML命令集合;所述第一设定MML命令按照所述设定属性不能在所述第二数据字典中找到完全相同的MML命令;将所述第二数据字典中的第二设定MML命令组成第二区别MML命令集合;所述第二设定MML命令按照所述设定属性不能在所述第一数据字典中找到完全相同的MML命令;将所述第一区别MML命令集合 和第二区别MML命令集合组成差异性MML命令集合。After the first data dictionary is obtained, the first data dictionary is compared with a second data dictionary corresponding to the second human language command. There are many identical MML commands in the first data dictionary and the second data dictionary. These MML commands have the same function in the pre-update human-machine command script and the updated human-machine command script, and may not be processed. . For those MML commands in the first data dictionary that do not correspond exactly to the MML commands in the second data dictionary, it is necessary to find out their correspondence in the second data dictionary according to some rules (ie, MML command update rules). MML commands to implement updates to MML commands. Specifically, the first set MML command in the first data dictionary is formed into a first differential MML command set; the first set MML command cannot be found in the second data dictionary according to the set attribute. An identical MML command; forming a second set MML command in the second data dictionary to form a second differentiated MML command set; the second set MML command cannot be in the first data according to the set attribute Find the exact same MML command in the dictionary; set the first difference MML command And the second difference MML command set constitutes a differential MML command set.
需要说明的是,设定属性通常为MML命令的名称或参数,但不限于名称和参数。It should be noted that the setting attribute is usually the name or parameter of the MML command, but is not limited to the name and the parameter.
步骤S102中根据所述差异性MML命令集合得到MML命令更新规则包括:Obtaining an MML command update rule according to the differential MML command set in step S102 includes:
为了保证更新MML命令的准确性,可以将MML命令中经常用到的几个属性作为设定属性,通过这些设定属性对比更新后的人机命令脚本和更新前的人机命令脚本,能够获得MML命令更新规则。同时,MML命令更新时对设定属性的修改也有先后顺序的问题,因此,设定属性之间也存在优先级。具体包括:根据所述设定属性的优先级确定所述第二区别MML命令集合的MML命令的更新顺序,如先命令名称,后命令参数的顺序;每个属性本身还包括有关键字,如属性为名称时,对应的关键字可以为命令名称和命令名称描述等;属性为参数时,对应的关键字可以为命令参数和命令参数描述等,关键字之间也存在优先级。在确定更新顺序后,还要对按设定属性中的关键字进一步确定MML命令的更新方向,即根据所述更新顺序对应的所述设定属性的关键字确定对所述第二区别MML命令集合内的MML命令的更新方向。如在命令名称中,确定对命令名称和命令名称描述的更新先后顺序确定更新方向;最后,将属于所述第二区别MML命令集合的MML命令按照所述更新方向更新为对应的属于所述第一区别MML命令集合的MML命令,得到属于所述第二区别MML命令集合的MML命令的MML命令更新规则。实现了对MML命令的更新。In order to ensure the accuracy of updating MML commands, several attributes that are frequently used in MML commands can be used as setting attributes. By comparing these updated attribute commands with the updated man-machine command script and the pre-update man-machine command script, MML command update rules. At the same time, when the MML command is updated, there are also problems in the modification of the set attributes. Therefore, there is also a priority between the set attributes. Specifically, the method includes: determining, according to the priority of the set attribute, an update order of the MML command of the second differential MML command set, such as a command name and a sequence of the command parameters; each attribute itself further includes a keyword, such as When the attribute is a name, the corresponding keyword can be a command name and a command name description. When the attribute is a parameter, the corresponding keyword can be a command parameter and a command parameter description, and the keywords also have a priority. After the update sequence is determined, the update direction of the MML command is further determined according to the keyword in the set attribute, that is, the second difference MML command is determined according to the keyword of the set attribute corresponding to the update order. The update direction of the MML commands within the collection. For example, in the command name, determining the update order of the command name and the command name description to determine the update direction; finally, updating the MML command belonging to the second differential MML command set to the corresponding update direction according to the update direction An MML command that distinguishes the MML command set obtains an MML command update rule of the MML command belonging to the second differential MML command set. An update to the MML command is implemented.
进一步地,第一区别MML命令集合和第二区别MML命令集合之间还存在另外一种情况,即第一区别MML命令集合和第二区别MML命令集合包含的MML命令的数量不相同。当第一区别MML命令集合中存在第二区别MML命令集合没有的命令时,直接在更新前的人机命令脚本中使用对这 些MML命令即可;当第二区别MML命令集合中存在第一区别MML命令集合没有的命令时,即这些MML命令按照所述更新方向无法更新为对应的属于所述第一区别MML命令集合的MML命令,则将这些属于所述第二区别MML命令集合的MML命令保存至第一人机语言命令,直接在更新前的人机命令脚本中使用,最终实现了人机命令脚本的更新。Further, there is another case between the first difference MML command set and the second difference MML command set, that is, the first difference MML command set and the second difference MML command set contain different numbers of MML commands. When there is a command in the first difference MML command set that is not in the second difference MML command set, the use is directly in the man-machine command script before the update. Some MML commands may be used; when there is a command in the second difference MML command set that is not in the first difference MML command set, that is, the MML commands cannot be updated to correspond to the first difference MML command set according to the update direction. The MML command saves the MML commands belonging to the second differential MML command set to the first human language command, and directly uses the human machine command script before the update, thereby finally realizing the update of the human machine command script.
实施例2Example 2
本实施例是在实施例1的方法的基础上提出的一种人机命令脚本更新装置,如图2所示,所述装置包括:This embodiment is a man-machine command script updating device proposed on the basis of the method of Embodiment 1, as shown in FIG. 2, the device includes:
第一数据字典获取单元201,配置为通过第一人机语言命令得到第一数据字典;The first data dictionary obtaining unit 201 is configured to obtain a first data dictionary by using a first human language command;
MML命令更新规则获取单元202,配置为将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性MML命令集合;根据所述差异性MML命令集合得到MML命令更新规则;The MML command update rule obtaining unit 202 is configured to compare the first data dictionary with a second data dictionary corresponding to the second human language command to obtain a differential MML command set; and obtain the MML according to the differential MML command set. Command update rule;
人机命令脚本更新单元203,配置为根据所述MML命令更新规则对基于第二人机语言命令的人机命令脚本进行更新。The man machine command script update unit 203 is configured to update the man machine command script based on the second human machine language command according to the MML command update rule.
其中,第一数据字典获取单元201具体包括:The first data dictionary obtaining unit 201 specifically includes:
MML命令获取模块,配置为扫描包含具有第一人机语言命令的人机命令脚本的被测试系统,得到第一人机语言命令;An MML command obtaining module configured to scan a tested system including a human machine command script having a first human language command to obtain a first human language command;
第一数据字典获取模块,配置为按设定属性对所述第一人机语言命令进行排序,得到第一数据字典。The first data dictionary obtaining module is configured to sort the first human language command according to the set attribute to obtain a first data dictionary.
MML命令更新规则获取单元202如图3所示,具体包括:As shown in FIG. 3, the MML command update rule obtaining unit 202 specifically includes:
第一区别MML命令集合获取模块2021,配置为将所述第一数据字典中的第一设定MML命令组成第一区别MML命令集合;所述第一设定MML命令按照所述设定属性不能在所述第二数据字典中找到完全相同的MML命令; The first difference MML command set obtaining module 2021 is configured to form a first set MML command in the first data dictionary into a first differential MML command set; the first set MML command cannot be according to the set attribute Finding the exact same MML command in the second data dictionary;
第二区别MML命令集合获取模块2022,配置为将所述第二数据字典中的第二设定MML命令组成第二区别MML命令集合;所述第二设定MML命令按照所述设定属性不能在所述第一数据字典中找到完全相同的MML命令;The second difference MML command set obtaining module 2022 is configured to form a second set MML command in the second data dictionary into a second differential MML command set; the second set MML command cannot be according to the set attribute Finding identical MML commands in the first data dictionary;
差异性MML命令集合获取模块2023,配置为将所述第一区别MML命令集合和第二区别MML命令集合组成差异性MML命令集合。The difference MML command set obtaining module 2023 is configured to form the first differential MML command set and the second differential MML command set into a differential MML command set.
进一步地,MML命令更新规则获取单元202还可以包括:MML命令更新规则模块2024,配置为根据所述设定属性的优先级确定所述第二区别MML命令集合的MML命令的更新顺序,如先命令名称,后命令参数的顺序;根据所述更新顺序对应的所述设定属性的关键字确定对所述第二区别MML命令集合内的MML命令的更新方向,如命令名称中,对命令名称和命令名称描述的更新先后顺序确定更新方向;将属于所述第二区别MML命令集合的MML命令按照所述更新方向更新为对应的属于所述第一区别MML命令集合的MML命令,得到属于所述第二区别MML命令集合的MML命令的MML命令更新规则。Further, the MML command update rule obtaining unit 202 may further include: an MML command update rule module 2024, configured to determine an update order of the MML commands of the second differential MML command set according to the priority of the set attribute, such as The command name, the order of the command parameters, and the update direction of the MML command in the second differential MML command set according to the keyword of the set attribute corresponding to the update order, such as the command name, the command name The update sequence of the command name description determines the update direction; the MML command belonging to the second difference MML command set is updated according to the update direction to the corresponding MML command belonging to the first differential MML command set, and the belonging MMA command is obtained. The MML command update rule of the second MML command that distinguishes the MML command set.
此外,MML命令更新规则模块2024还可以包括MML命令保存模块,配置为在属于所述第二区别MML命令集合的MML命令按照所述更新方向无法更新为对应的属于所述第一区别MML命令集合的MML命令时,将属于所述第二区别MML命令集合的MML命令保存至第一人机语言命令。In addition, the MML command update rule module 2024 may further include an MML command saving module configured to: the MML command belonging to the second differential MML command set cannot be updated to correspond to the first differential MML command set according to the update direction. When the MML command is executed, the MML command belonging to the second differential MML command set is saved to the first human language command.
实际应用时,第一数据字典获取单元201、MML命令更新规则获取单元202、人机命令脚本更新单元203、MML命令获取模块、第一数据字典获取模块、第一区别MML命令集合获取模块2021、第二区别MML命令集合获取模块2022、差异性MML命令集合获取模块2023、MML命令更新规则模块2024可由人机命令脚本更新装置中的中央处理器Central Processing Unit,CPU)、微处理器(Micro Control Unit,MCU)、数字信号 处理器(Digital Signal Processor,DSP)或可编程逻辑阵列(Field-Programmable Gate Array,FPGA)实现;MML命令保存模块可由人机命令脚本更新装置中的CPU、MCU、DSP或FPGA结合存储器实现。In actual application, the first data dictionary obtaining unit 201, the MML command update rule acquiring unit 202, the man-machine command script updating unit 203, the MML command acquiring module, the first data dictionary obtaining module, and the first difference MML command set obtaining module 2021. The second difference MML command set obtaining module 2022, the difference MML command set obtaining module 2023, and the MML command update rule module 2024 can be a central processing unit (CPU), a microprocessor (Micro Control) in the human machine command script updating device. Unit, MCU), digital signal A DSP (Digital Signal Processor, DSP) or a Field-Programmable Gate Array (FPGA) implementation; the MML command save module can be implemented by a CPU, an MCU, a DSP, or an FPGA in combination with a memory in the human-machine command script update device.
实施例3Example 3
本实施例通过一个实际场景对本发明进行详细说明。This embodiment describes the present invention in detail through an actual scenario.
本实施例包括以下步骤:This embodiment includes the following steps:
步骤A:扫描第一人机语言命令及其参数,形成MML数据字典(第一数据字典);Step A: scanning the first human language command and its parameters to form an MML data dictionary (first data dictionary);
步骤B:识别第一人机语言命令的第一数据字典和第二人机语言命令的第二数据字典之间的差异,根据该差异制定的MML命令更新规则;Step B: identifying a difference between the first data dictionary of the first human language command and the second data dictionary of the second human language command, and updating the rule according to the MML command formulated according to the difference;
步骤C:按照MML命令更新规则对第二人机语言命令进行转换,将第二人机语言命令转换为第一人机语言命令,实现对更新前的人机命令脚本的更新。Step C: Convert the second human machine language command according to the MML command update rule, convert the second human machine language command into the first human machine language command, and implement the update of the human machine command script before the update.
以MML命令的名称和参数作为设定属性,步骤A进一步包括:Taking the name and parameters of the MML command as setting attributes, step A further includes:
步骤A1、首先扫描网络资源或系统的所有MML命令的名称,按照名称的助记符、标识和命令描述存储成可扩展标记语言(Extensible Markup Language,XML)文件;Step A1: First, scan the network resource or the name of all MML commands of the system, and store the file as an Extensible Markup Language (XML) file according to the mnemonic, identifier, and command description of the name;
步骤A2、然后扫描每条MML命令的参数,按照参数的名称、ID和参数描述等存储在XML文件中;Step A2, and then scanning the parameters of each MML command, and storing the parameters in the XML file according to the name, ID, and parameter description of the parameter;
步骤A3、合并步骤A1和A2的结果,生成所有第一人机语言命令的名称及参数的第一数据字典;Step A3, combining the results of steps A1 and A2, generating a first data dictionary of names and parameters of all first human language commands;
步骤B进一步包括:Step B further includes:
B1、比较第一人机语言命令的第一数据字典和第二人机语言命令的第二数据字典之间的差异得到差异性MML命令集合;具体地,将所述第一数据字典中的第一设定MML命令组成第一区别MML命令集合;所述第一设 定MML命令按照所述设定属性不能在所述第二数据字典中找到完全相同的MML命令;将所述第二数据字典中的第二设定MML命令组成第二区别MML命令集合;所述第二设定MML命令按照所述设定属性不能在所述第一数据字典中找到完全相同的MML命令;将所述第一区别MML命令集合和第二区别MML命令集合组成差异性MML命令集合B1. Comparing the difference between the first data dictionary of the first human language command and the second data dictionary of the second human language command to obtain a difference MML command set; specifically, the first in the first data dictionary Setting a MML command to form a first difference MML command set; the first setting Determining the MML command according to the set attribute cannot find the exact same MML command in the second data dictionary; and forming the second set MML command in the second data dictionary into the second difference MML command set; The second set MML command cannot find the exact same MML command in the first data dictionary according to the set attribute; and the first difference MML command set and the second difference MML command set are combined into a differential MML command set.
B2、根据所述差异性MML命令集合得到MML命令更新规则;B2. Obtain an MML command update rule according to the differential MML command set.
本实施例中名称的优先级高于参数的优先级,即更新顺序为:首先以名称来对所述第二区别MML命令集合内的MML命令排序,然后再以参数对所述第二区别MML命令集合内的MML命令排序;其中,名称包含的关键字包括命令名称和命令名称描述,以先命令名称后命令名称描述为更新方向,将属于所述第二区别MML命令集合的MML命令更新为对应的属于所述第一区别MML命令集合中的MML命令,得到属于所述第二区别MML命令集合的MML命令的MML命令更新规则。具体包括:1)当第二区别MML命令集合的MML命令和第一区别MML命令集合的MML命令相比,MML命令名称发生变化,命令名称描述没有发生变化时,将属于第二区别MML命令集合的MML命令的命令名称修改为对应的第一区别MML命令集合的MML命令的命令名称;2)当第二区别MML命令集合的MML命令和第一区别MML命令集合的MML命令相比,MML命令名称没有发生变化,命令名称描述发生变化时,将属于第二区别MML命令集合的MML命令的命令名称描述修改为对应的第一区别MML命令集合的MML命令的命令名称描述;3)当第二区别MML命令集合的MML命令和第一区别MML命令集合的MML命令相比,MML命令名称发生变化,命令名称描述也发生变化时,首先对命令名称进行修改,然后对命令名称描述进行修改。同理,参数关键词包括命令参数和命令参数描述,更新方向为先命令参数后命令参数描述,具体过程和上述对名称的更新过程相同。 In this embodiment, the priority of the name is higher than the priority of the parameter, that is, the update order is: first, the MML commands in the second differential MML command set are sorted by name, and then the second difference MML is parameterized. The MML command in the command set is sorted; wherein the name includes a keyword including a command name and a command name description, and the command name is first described as an update direction, and the MML command belonging to the second differential MML command set is updated to Corresponding MML commands belonging to the first differential MML command set obtain MML command update rules of the MML commands belonging to the second differential MML command set. Specifically, the method includes: 1) when the MML command of the second difference MML command set is compared with the MML command of the first difference MML command set, the MML command name changes, and when the command name description does not change, the second difference MML command set belongs to The command name of the MML command is modified to the command name of the corresponding MML command of the first difference MML command set; 2) the MML command is compared with the MML command of the first difference MML command set and the MML command of the first difference MML command set; When the name of the command is changed, the command name description of the MML command belonging to the second differential MML command set is modified to the command name description of the MML command corresponding to the first differential MML command set; 3) when the second When the MML command of the MML command set is different from the MML command of the first MML command set, when the MML command name changes and the command name description also changes, the command name is first modified, and then the command name description is modified. Similarly, the parameter keyword includes the command parameter and the command parameter description, and the update direction is the command parameter description after the command parameter first, and the specific process is the same as the above-mentioned update process for the name.
另外,除了对命令参数和命令参数描述更新外,还经常遇到需要对命令参数的取值范围进行更新的情况。对参数取值范围更新包括以下几种情况:1)对某个参数批量增加或者减少一个偏移量,例如:更新后,命令参数NET的取值范围从1到255修改为从10到264,批量迁移规则可以把第二人机语言命令中的所有参数值都增加10,从而使得人机命令脚本在新版本中还能够正常运行,当需要对参数进行扩容时,还可以将参数修改为10到1024;2)枚举值发生了变化的情况,例如:命令参数的枚举值“DOMTOLL”修改为“DOMAIN”;3)、参数格式发生了变化的情况,例如:命令参数DPC的取值格式从DPC=“2.3.6”修改为DPC=“2-3-6”;4)、在人机命令脚本中统一增加新增关键字,用于第一人机语言命令中新增了关键字的情况。In addition, in addition to updating the command parameters and command parameters, it is often encountered that the value range of the command parameters needs to be updated. The parameter range update includes the following cases: 1) Adding or reducing an offset to a parameter in batches. For example, after updating, the command parameter NET ranges from 1 to 255 to 10 to 264. The batch migration rule can increase the value of all the parameters in the second human language command by 10, so that the human machine command script can also run normally in the new version. When the parameter needs to be expanded, the parameter can be modified to 10 Up to 1024; 2) The enumeration value has changed, for example, the enumeration value "DOMTOLL" of the command parameter is changed to "DOMAIN"; 3), the parameter format has changed, for example, the value of the command parameter DPC The format is changed from DPC=“2.3.6” to DPC=“2-3-6”; 4), the new keyword is added in the man-machine command script, and the key is added to the first human language command. The situation of the word.
除此以为,还可能存在第一人机语言命令中增加了第二人机语言命令没有的MML命令的情况,此时将增加的MML命令应用于第二人机语言命令对应的人机命令脚本即可;或存在第一人机语言命令中减少了第二人机语言命令没有的MML命令的情况,这些MML命令可以直接保存在第一人机语言命令中,以备后续使用。In addition, it may be the case that an MML command that is not included in the second human language command is added to the first human language command, and the added MML command is applied to the human command script corresponding to the second human language command. That is, or there is a case where the first human language command reduces the MML commands that are not available in the second human language command, and these MML commands can be directly saved in the first human language command for later use.
本发明实施例构造了第一人机语言命令的第一数据字典,通过MML命令更新规则建立第一人机语言命令的第一数据字典和第二人机语言命令的第二数据字典之间的映射关系,实现了对更新前的人机命令脚本进行更新。The embodiment of the present invention constructs a first data dictionary of a first human language command, and establishes between the first data dictionary of the first human language command and the second data dictionary of the second human language command by the MML command update rule. The mapping relationship is implemented to update the human-machine command script before the update.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各 组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed. In addition, each shown or discussed The coupling, or direct coupling, or communication connection of the components to each other may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or other.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the above integration The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read-Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing storage device includes the following steps: The foregoing storage medium includes: a removable storage device, a read-only memory (ROM), a magnetic disk, or an optical disk, and the like, which can store program codes.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a general purpose computer, a special purpose computer, An processor of an embedded processor or other programmable data processing device to generate a machine such that instructions executed by a processor of a computer or other programmable data processing device are generated for implementation in a flow or a flow of flowcharts and/or Or a block diagram of a device in a box or a function specified in a plurality of boxes.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
基于此,本发明实施例还提供一种计算机存储介质,所述计算机存储介质包括一组指令,当执行所述指令时,引起至少一个处理器执行上述的人机命令脚本更新方法。Based on this, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium includes a set of instructions, when executed, causing at least one processor to execute the man-machine command script update method.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.

Claims (11)

  1. 一种人机命令脚本更新方法,所述方法包括:A human-machine command script update method, the method comprising:
    通过第一人机语言命令得到第一数据字典;Obtaining a first data dictionary by a first human language command;
    将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性人机语言命令集合;根据所述差异性人机语言命令集合得到人机语言命令更新规则;Comparing the first data dictionary with the second data dictionary corresponding to the second human language command to obtain a differential human language command set; and obtaining a human language command update rule according to the differential human language command set;
    根据所述人机语言命令更新规则对基于第二人机语言命令的人机命令脚本进行更新。The man-machine command script based on the second human language command is updated according to the human language command update rule.
  2. 根据权利要求1所述的方法,其中,所述通过第一人机语言命令得到第一数据字典包括:The method of claim 1, wherein the obtaining the first data dictionary by the first human language command comprises:
    扫描包含具有第一人机语言命令的人机命令脚本的被测试系统,得到第一人机语言命令;Scanning a system under test containing a human machine command script having a first human language command to obtain a first human language command;
    按设定属性对所述第一人机语言命令进行排序,得到第一数据字典。The first human language command is sorted according to the set attribute to obtain a first data dictionary.
  3. 根据权利要求1所述的方法,其中,所述将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性人机语言命令集合包括:The method of claim 1, wherein the comparing the first data dictionary with the second data dictionary corresponding to the second human language command to obtain the difference human language command set comprises:
    将所述第一数据字典中的第一设定人机语言命令组成第一区别人机语言命令集合;所述第一设定人机语言命令按照所述设定属性不能在所述第二数据字典中找到完全相同的人机语言命令;Forming, by the first set of human-machine language commands in the first data dictionary, a first set of different human-machine language commands; the first setting human-machine language command cannot be in the second data according to the set attribute Find the exact same human-machine language command in the dictionary;
    将所述第二数据字典中的第二设定人机语言命令组成第二区别人机语言命令集合;所述第二设定人机语言命令按照所述设定属性不能在所述第一数据字典中找到完全相同的人机语言命令;Forming, by the second set of human-machine language commands in the second data dictionary, a second set of different human-machine language commands; the second setting human-machine language command cannot be in the first data according to the set attribute Find the exact same human-machine language command in the dictionary;
    将所述第一区别人机语言命令集合和第二区别人机语言命令集合组成差异性人机语言命令集合。The first distinct human language command set and the second differential human language command set are combined to form a differential human language command set.
  4. 根据权利要求3所述的方法,其中,所述根据所述差异性人机语言 命令集合得到人机语言命令更新规则包括:The method of claim 3, wherein said different human language is The command set to get the human language command update rules includes:
    根据所述设定属性的优先级确定所述差异性人机语言命令集合中的所述第二区别人机语言命令集合的人机语言命令的更新顺序;Determining, according to a priority of the set attribute, an update order of the human language command of the second differentiated human language command set in the differential human language command set;
    根据所述更新顺序对应的所述设定属性的关键字确定对所述第二区别人机语言命令集合内的人机语言命令的更新方向;Determining an update direction of a human machine language command in the second differential human language command set according to the keyword of the setting attribute corresponding to the update order;
    将属于所述第二区别人机语言命令集合的人机语言命令按照所述更新方向更新为对应的属于所述第一区别人机语言命令集合的人机语言命令,得到属于所述第二区别人机语言命令集合的人机语言命令的人机语言命令更新规则。Updating the human language command belonging to the second differential human language command set to the corresponding human language command belonging to the first differential human language command set according to the update direction, and obtaining the second difference Human-machine language command update rule for human-machine language commands of the human-machine language command set.
  5. 根据权利要求4所述的方法,其中,所述根据所述差异性人机语言命令集合得到人机语言命令更新规则还包括:The method of claim 4, wherein the obtaining the human language command update rule according to the differential human language command set further comprises:
    若属于所述第二区别人机语言命令集合的人机语言命令按照所述更新方向无法更新为对应的属于所述第一区别人机语言命令集合的人机语言命令,则将属于所述第二区别人机语言命令集合的人机语言命令保存至第一人机语言命令。If the human language command belonging to the second differential human language command set cannot be updated to the corresponding human language command belonging to the first differential human language command set according to the update direction, The human language command that distinguishes the human language command set is saved to the first human language command.
  6. 一种人机命令脚本更新装置,所述装置包括:A human-machine command script updating device, the device comprising:
    第一数据字典获取单元,配置为通过第一人机语言命令得到第一数据字典;a first data dictionary obtaining unit configured to obtain a first data dictionary by using a first human language command;
    人机语言命令更新规则获取单元,配置为将所述第一数据字典和第二人机语言命令对应的第二数据字典进行比较,得到差异性人机语言命令集合;根据所述差异性人机语言命令集合得到人机语言命令更新规则;The human language command update rule obtaining unit is configured to compare the first data dictionary and the second data dictionary corresponding to the second human language command to obtain a difference human language command set; according to the difference human machine The language command set gets the human language command update rule;
    人机命令脚本更新单元,配置为根据所述人机语言命令更新规则对基于第二人机语言命令的人机命令脚本进行更新。The man machine command script update unit is configured to update the man machine command script based on the second human language command according to the man machine language command update rule.
  7. 根据权利要求6所述的装置,其中,所述第一数据字典获取单元包括: The apparatus according to claim 6, wherein the first data dictionary obtaining unit comprises:
    人机语言命令获取模块,配置为扫描包含具有第一人机语言命令的人机命令脚本的被测试系统,得到第一人机语言命令;a human language command acquisition module configured to scan a tested system including a human machine command script having a first human language command to obtain a first human language command;
    第一数据字典获取模块,配置为按设定属性对所述第一人机语言命令进行排序,得到第一数据字典。The first data dictionary obtaining module is configured to sort the first human language command according to the set attribute to obtain a first data dictionary.
  8. 根据权利要求6所述的装置,其中,所述人机语言命令更新规则获取单元包括:The apparatus according to claim 6, wherein the human language command update rule acquisition unit comprises:
    第一区别人机语言命令集合获取模块,配置为将所述第一数据字典中的第一设定人机语言命令组成第一区别人机语言命令集合;所述第一设定人机语言命令按照所述设定属性不能在所述第二数据字典中找到完全相同的人机语言命令;a first difference human-machine language command set obtaining module, configured to form a first set human-machine language command in the first data dictionary into a first differential human-machine language command set; the first setting human-machine language command According to the set attribute, the same human language command cannot be found in the second data dictionary;
    第二区别人机语言命令集合获取模块,配置为将所述第二数据字典中的第二设定人机语言命令组成第二区别人机语言命令集合;所述第二设定人机语言命令按照所述设定属性不能在所述第一数据字典中找到完全相同的人机语言命令;a second difference human-machine language command set obtaining module, configured to form a second set human-machine language command in the second data dictionary into a second differential human-machine language command set; and the second setting human-machine language command According to the set attribute, the same human-machine language command cannot be found in the first data dictionary;
    差异性人机语言命令集合获取模块,配置为将所述第一区别人机语言命令集合和第二区别人机语言命令集合组成差异性人机语言命令集合。The difference human-machine language command set obtaining module is configured to form the first difference human-machine language command set and the second difference human-machine language command set into a difference human-machine language command set.
  9. 根据权利要求8所述的装置,其中,所述人机语言命令更新规则获取单元还包括:The device according to claim 8, wherein the human language command update rule acquisition unit further comprises:
    人机语言命令更新规则模块,配置为根据所述设定属性的优先级确定所述差异性人机语言命令集合中的所述第二区别人机语言命令集合的人机语言命令的更新顺序;根据所述更新顺序对应的所述设定属性的关键字确定对所述第二区别人机语言命令集合内的人机语言命令的更新方向;将属于所述第二区别人机语言命令集合的人机语言命令按照所述更新方向更新为对应的属于所述第一区别人机语言命令集合的人机语言命令,得到属于所述第二区别人机语言命令集合的人机语言命令的人机语言命令更新规 则。a human language command update rule module, configured to determine an update order of the human language command of the second differential human language command set in the differential human language command set according to the priority of the set attribute; Determining an update direction of the human language command in the second differential human language command set according to the keyword of the setting attribute corresponding to the update order; and belonging to the second differential human language command set The human language command is updated according to the update direction to a corresponding human language command belonging to the first differential human language command set, and the human machine language command belonging to the second differential human language command set is obtained. Language command update then.
  10. 根据权利要求9所述的装置,其中,所述人机语言命令更新规则模块包括:The apparatus of claim 9, wherein the human language command update rule module comprises:
    人机语言命令保存模块,配置为在属于所述第二区别人机语言命令集合的人机语言命令按照所述更新方向无法更新为对应的属于所述第一区别人机语言命令集合的人机语言命令时,将属于所述第二区别人机语言命令集合的人机语言命令保存至第一人机语言命令。a human language command saving module configured to, in the update direction, fail to update the corresponding human machine language command belonging to the second differential human language command set to the corresponding human machine belonging to the first differential human language command set When the language command is issued, the human language command belonging to the second different human language command set is saved to the first human language command.
  11. 一种计算机存储介质,所述计算机存储介质包括一组指令,当执行所述指令时,引起至少一个处理器执行如权利要求1至5任一项所述的人机命令脚本更新方法。 A computer storage medium comprising a set of instructions that, when executed, cause at least one processor to perform the human machine command script update method of any one of claims 1 to 5.
PCT/CN2015/078701 2014-11-25 2015-05-11 Human-machine command script updating method and apparatus, and computer storage medium WO2016082474A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410691018.0 2014-11-25
CN201410691018.0A CN105700899A (en) 2014-11-25 2014-11-25 Update method and device of man-machine command script

Publications (1)

Publication Number Publication Date
WO2016082474A1 true WO2016082474A1 (en) 2016-06-02

Family

ID=56073490

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/078701 WO2016082474A1 (en) 2014-11-25 2015-05-11 Human-machine command script updating method and apparatus, and computer storage medium

Country Status (2)

Country Link
CN (1) CN105700899A (en)
WO (1) WO2016082474A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855501A (en) * 2019-11-21 2020-02-28 广州西麦科技股份有限公司 Batch publishing system, method and storage medium for creating middleware

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280099A (en) * 2017-01-11 2018-07-13 广州市动景计算机科技有限公司 Data dictionary management method, apparatus and server

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003007157A1 (en) * 2001-07-11 2003-01-23 Nokia Corporation Protocol based terminal authorities
US20110131549A1 (en) * 2009-11-30 2011-06-02 Sap Ag Central configuration and transport supporting software lifecycles
CN102354165A (en) * 2011-05-30 2012-02-15 浙江中控技术股份有限公司 Method for updating data online, controller and man-machine interactive system
CN102752138A (en) * 2012-06-30 2012-10-24 华为技术有限公司 Asynchronous configuration management method and network device
CN103207902A (en) * 2013-03-27 2013-07-17 交通银行股份有限公司 Method and system for updating financial client side data
CN103677869A (en) * 2012-09-06 2014-03-26 中国科学院计算技术研究所 Wireless sensor network node remote code updating system and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1329818C (en) * 2002-11-14 2007-08-01 中兴通讯股份有限公司 Implement method of the man machine command based on plain text command script files
JP2011065367A (en) * 2009-09-16 2011-03-31 Fujitsu Ltd Device, program and method for managing workflow
CN102905000B (en) * 2012-09-12 2015-06-24 中兴通讯股份有限公司 Address book synchronization method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003007157A1 (en) * 2001-07-11 2003-01-23 Nokia Corporation Protocol based terminal authorities
US20110131549A1 (en) * 2009-11-30 2011-06-02 Sap Ag Central configuration and transport supporting software lifecycles
CN102354165A (en) * 2011-05-30 2012-02-15 浙江中控技术股份有限公司 Method for updating data online, controller and man-machine interactive system
CN102752138A (en) * 2012-06-30 2012-10-24 华为技术有限公司 Asynchronous configuration management method and network device
CN103677869A (en) * 2012-09-06 2014-03-26 中国科学院计算技术研究所 Wireless sensor network node remote code updating system and method
CN103207902A (en) * 2013-03-27 2013-07-17 交通银行股份有限公司 Method and system for updating financial client side data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855501A (en) * 2019-11-21 2020-02-28 广州西麦科技股份有限公司 Batch publishing system, method and storage medium for creating middleware
CN110855501B (en) * 2019-11-21 2022-04-26 广州西麦科技股份有限公司 Batch publishing system, method and storage medium for creating middleware

Also Published As

Publication number Publication date
CN105700899A (en) 2016-06-22

Similar Documents

Publication Publication Date Title
US20190213115A1 (en) Utilizing artificial intelligence to test cloud applications
WO2017096990A1 (en) Method and device for automatically generating test script
US8719784B2 (en) Assigning runtime artifacts to software components
US10402173B2 (en) Systems and methods for arbitrary software logic modeling
US9003231B1 (en) System for instantiating service instances for testing in a known state
JP7364709B2 (en) Extract and review vaccination data using machine learning and natural language processing
JP2016105270A (en) Lean product modeling system and method
CN111124892B (en) Automatic testing method and system based on command line
WO2016082474A1 (en) Human-machine command script updating method and apparatus, and computer storage medium
US11314489B1 (en) Automated authoring of software solutions by first analyzing and resolving anomalies in a data model
CN113032257B (en) Automated testing method, apparatus, computer system, and readable storage medium
CN109800776A (en) Material mask method, device, terminal and computer readable storage medium
US8468116B2 (en) Rule creation method and rule creating apparatus
CN111061733A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN116483707A (en) Test method, test device, test apparatus, test program, and test program
US11681511B2 (en) Systems and methods for building and deploying machine learning applications
WO2020062277A1 (en) Management method and apparatus for computing resources in data pre-processing phase of neural network
JP6516343B2 (en) Application user interface automatic test method, electronic device, system and storage medium
JP2013077124A (en) Software test case generation device
WO2021036697A1 (en) Commissioning method and apparatus, device and storage medium
CN110928761B (en) Demand chain and system and method for application thereof
CN114089889A (en) Model training method, device and storage medium
CN113056725A (en) Information processing system and information processing method
CN102063308A (en) Method for controlling processing flow of seismic prospecting data
CN113052501A (en) Automatic safe operation and maintenance method and terminal based on assets

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: 15862275

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15862275

Country of ref document: EP

Kind code of ref document: A1