Movatterモバイル変換


[0]ホーム

URL:


CN110321282A - The XML configuration file amending method and system of Mock test - Google Patents

The XML configuration file amending method and system of Mock test
Download PDF

Info

Publication number
CN110321282A
CN110321282ACN201910440459.6ACN201910440459ACN110321282ACN 110321282 ACN110321282 ACN 110321282ACN 201910440459 ACN201910440459 ACN 201910440459ACN 110321282 ACN110321282 ACN 110321282A
Authority
CN
China
Prior art keywords
configuration file
xml configuration
node
mock test
xml
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910440459.6A
Other languages
Chinese (zh)
Inventor
胡苗青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co LtdfiledCriticalOneConnect Smart Technology Co Ltd
Priority to CN201910440459.6ApriorityCriticalpatent/CN110321282A/en
Publication of CN110321282ApublicationCriticalpatent/CN110321282A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明涉及数据采集技术领域,本发明提供一种Mock测试的XML配置文件修改方法和系统,上述方法包括:读取在Mock测试对象的后台中指定路径下的第一XML配置文件,并按照节点的层级顺序显示第一XML配置文件中各个节点;从节点中选择待编辑节点,将第一XML配置文件的可编辑范围限定在待编辑节点的代码范围内,并在可编辑范围内对待编辑节点进行修改,得到第二XML配置文件;Mock测试对象的后台接收第二XML配置文件并将第一XML配置文件替换为第二XML配置文件。上述方法可以将结构复杂的XML配置文件的代码按照节点的层级顺序进行显示,便于快速查找相应的待编辑节点进行修改,同时避免误改节点的XML代码格式,提高XML配置文件修改的效率和准确性。

The present invention relates to the technical field of data acquisition. The present invention provides a method and system for modifying an XML configuration file for Mock testing. The method includes: reading the first XML configuration file under the specified path in the background of the Mock test object, and according to the node Each node in the first XML configuration file is displayed in the hierarchical order of Modify to obtain the second XML configuration file; the background of the Mock test object receives the second XML configuration file and replaces the first XML configuration file with the second XML configuration file. The above method can display the code of the XML configuration file with a complex structure according to the hierarchical order of the nodes, which is convenient for quickly finding the corresponding node to be edited for modification, and at the same time avoids changing the XML code format of the node by mistake, improving the efficiency and accuracy of XML configuration file modification sex.

Description

Translated fromChinese
Mock测试的XML配置文件修改方法和系统Method and system for modifying XML configuration file for mock testing

技术领域technical field

本发明涉及数据采集技术领域,具体而言,本发明涉及一种Mock测试的XML配置文件修改方法、Mock测试的XML配置文件修改系统、计算机设备和存储介质。The invention relates to the technical field of data collection, in particular, the invention relates to a mock test XML configuration file modification method, a mock test XML configuration file modification system, computer equipment and a storage medium.

背景技术Background technique

在对业务系统进行优化或再开发之前,有必要了解业务系统大量的相关资料和数据,在优化和新增功能之前保障原业务系统的功能正常运行,以及在原业务系统的基础上完成优化或再开发。但是也会有一些业务系统因为人为原因、系统保密性等原因,可以公开或留存的相关资料和数据较少,难以获取足够的资料和数据。例如应用于银行的部分业务系统,能够获取到该业务系统后端的资料和数据很少,数据量少的情况是很难满足系统开发的需要。目前对公开或留存的相关资料和数据较少的业务系统,难以根据过少的资料和数据进行页面系统的优化或进一步开发,往往需要通过Mock(模拟后台)测试的方式来测试待优化的业务系统,从而获得更多的数据,以便于进行后续的开发。Before optimizing or redeveloping the business system, it is necessary to understand a large amount of relevant information and data of the business system, to ensure the normal operation of the original business system before optimizing and adding new functions, and to complete the optimization or redevelopment on the basis of the original business system. develop. However, there will also be some business systems that, due to human reasons, system confidentiality and other reasons, have less relevant information and data that can be disclosed or retained, and it is difficult to obtain sufficient information and data. For example, in some business systems applied to banks, there are very few materials and data that can be obtained from the back end of the business system, and it is difficult to meet the needs of system development if the amount of data is small. At present, it is difficult to optimize or further develop the page system based on too little information and data for business systems with relatively few public or retained relevant materials and data. It is often necessary to test the business to be optimized by means of Mock (simulation background) testing system to obtain more data for subsequent development.

Mock测试过程中,利用XML配置文件对Mock测试对象进行配置,通过XML配置文件的使用可以实现测试代码和数据的分离。当开发人员因为测试场景的变化而需要修改对Mock对象的测试行为时,就可以直接改动该XML配置文件,无需修改测试代码,减少因测试场景改变而修改的数据量。In the mock test process, the Mock test object is configured using the XML configuration file, and the separation of the test code and data can be realized through the use of the XML configuration file. When the developer needs to modify the test behavior of the Mock object due to the change of the test scene, he can directly modify the XML configuration file without modifying the test code, reducing the amount of data modified due to the change of the test scene.

现有技术下的XML配置文件不容易修改。对于应用在Linux操作系统中且结构复杂、数据量大的XML配置文件,一是,虽然在Linux操作系统中修改XML配置文件可以减少修改后文件因格式造成的出错,但是在Linux操作系统下,从结构复杂且数据量大的XML配置文件中查找节点相当困难,而且在Linux操作系统进行修改还需要要求修改者能够熟悉Linux操作系统的指令,对修改者的业务能力要求较高;二是,如果将Linux操作系统下XML配置文件导出至其他操作系统中进行修改,如导出至Windows操作系统中修改,容易因为编程格式的问题而导致出错,会增加出错率,增加修改后的调试时间,影响了Mock数据返回过程中XML配置文件修改效率。The XML configuration file in the prior art is not easy to modify. For XML configuration files with complex structure and large data volume applied in Linux operating system, first, although modifying XML configuration files in Linux operating system can reduce errors caused by format of the modified file, under Linux operating system, It is quite difficult to find nodes from XML configuration files with complex structures and large amounts of data, and modification in the Linux operating system requires the modifyer to be familiar with the instructions of the Linux operating system, which requires high business capabilities of the modifyer; second, If the XML configuration file under the Linux operating system is exported to other operating systems for modification, such as exporting to the Windows operating system for modification, it is easy to cause errors due to programming format problems, which will increase the error rate and increase the debugging time after modification. Improve the efficiency of XML configuration file modification during the process of Mock data return.

发明内容Contents of the invention

本发明的目的旨在至少能解决上述的技术缺陷之一,特别是Mock数据返回过程中XML配置文件修改的效率低的技术缺陷。The purpose of the present invention is to at least solve one of the above-mentioned technical defects, especially the technical defect of low efficiency of XML configuration file modification in the process of Mock data return.

本发明提供一种Mock测试的XML配置文件修改方法,包括如下步骤:The present invention provides a kind of XML configuration file revising method of Mock test, comprises the following steps:

读取在Mock测试对象的后台中指定路径下的第一XML配置文件,并按照节点的层级顺序显示所述第一XML配置文件中各个节点;Read the first XML configuration file under the specified path in the background of the Mock test object, and display each node in the first XML configuration file according to the hierarchical order of the nodes;

从所述节点中选择待编辑节点,将所述第一XML配置文件的可编辑范围限定在所述待编辑节点的代码范围内,并在所述可编辑范围内对所述待编辑节点进行修改,得到第二XML配置文件;Select a node to be edited from the nodes, limit the editable range of the first XML configuration file to the code range of the node to be edited, and modify the node to be edited within the editable range , get the second XML configuration file;

向所述Mock测试对象的后台发送所述第二XML配置文件,所述Mock测试对象的后台接收所述第二XML配置文件并将所述第一XML配置文件替换为所述第二XML配置文件。Send the second XML configuration file to the background of the Mock test object, the background of the Mock test object receives the second XML configuration file and replaces the first XML configuration file with the second XML configuration file .

在一个实施例中,所述在所述可编辑范围内对所述待编辑节点进行修改的步骤,包括:In one embodiment, the step of modifying the node to be edited within the editable range includes:

获取替换目标数据,将所述可编辑范围内的选中数据修改为所述替换目标数据。Obtain replacement target data, and modify the selected data within the editable range to the replacement target data.

在一个实施例中,所述在所述可编辑范围内对所述待编辑节点进行修改的步骤,包括:In one embodiment, the step of modifying the node to be edited within the editable range includes:

获取新增目标数据,确定所述可编辑范围内的选中位置,在所述选中位置插入所述新增目标数据。Acquiring newly added target data, determining a selected position within the editable range, and inserting the newly added target data at the selected position.

在一个实施例中,所述在所述可编辑范围内对所述待编辑节点进行修改的步骤,包括:In one embodiment, the step of modifying the node to be edited within the editable range includes:

获取删除指令,确定所述可编辑范围内的选中数据,删除所述选中数据。Obtain a delete instruction, determine the selected data within the editable range, and delete the selected data.

在一个实施例中,在所述向所述Mock测试对象的后台发送修改后的第二XML配置文件的步骤之前,还包括:In one embodiment, before the step of sending the modified second XML configuration file to the background of the Mock test object, it also includes:

校验所述第二XML配置文件的代码是否符合XML代码格式;当所述第二XML配置文件的代码符合XML代码格式时,执行所述向所述Mock测试对象的后台发送修改后的第二XML配置文件的步骤;当所述第二XML配置文件的任意节点的代码不符合所述XML代码格式时,将所述可编辑范围设置在该节点的代码范围内,并发出编辑提示信息。Check whether the code of the second XML configuration file conforms to the XML code format; when the code of the second XML configuration file conforms to the XML code format, execute the second modified second to the background of the Mock test object. The step of the XML configuration file: when the code of any node in the second XML configuration file does not conform to the XML code format, setting the editable range within the code range of the node, and sending out an edit prompt message.

在一个实施例中,在所述读取在Mock测试对象的后台中指定路径下的第一XML配置文件的步骤之前,还包括:In one embodiment, before the step of reading the first XML configuration file under the specified path in the background of the Mock test object, it also includes:

获取Mock测试用户的当前登录帐号;判断所述当前登录帐号是否在预设的权限名单内;当所述预设的权限名单内存在所述当前登录帐号时,调用预先存储的所述后台的后台帐号和后台密码,登录所述后台;当所述预设的权限名单内不存在所述当前登录帐号时,向所述Mock测试用户发送用于提醒操作受限的信息。Obtain the current login account of the Mock test user; judge whether the current login account is in the preset authority list; when the current login account exists in the preset authority list, call the pre-stored background of the background account number and background password, to log into the background; when the current login account does not exist in the preset permission list, send information for reminding the Mock test user that the operation is limited.

在一个实施例中,所述从所述节点中选择待编辑节点的步骤,包括:In one embodiment, the step of selecting a node to be edited from the nodes includes:

获取关键词,在注释信息中检索所述关键词并获得所述关键词所在的目标节点,其中,所述注释信息是保存在所述第一XML配置文件中节点上的备注信息;将所述待编辑节点跳转至所述目标节点。Obtain the keyword, retrieve the keyword in the annotation information and obtain the target node where the keyword is located, wherein the annotation information is the remark information stored on the node in the first XML configuration file; the The node to be edited jumps to the target node.

在一个实施例中,在所述向所述Mock测试对象的后台发送修改后的第二XML配置文件的步骤之前,还包括:In one embodiment, before the step of sending the modified second XML configuration file to the background of the Mock test object, it also includes:

对所述第一XML配置文件进行备份,根据时间命名所述第一XML配置文件的备份文件的名称,并保存所述备份文件;获取查询时间段;根据备份文件的名称,从所述备份文件中调取与所述查询时间段的对应的备份文件。The first XML configuration file is backed up, the name of the backup file of the first XML configuration file is named according to time, and the backup file is saved; the query time period is obtained; according to the name of the backup file, from the backup file Call the backup file corresponding to the query time period.

在一个实施例中,在所述向所述Mock测试对象的后台发送修改后的XML配置文件的步骤之后,还包括:In one embodiment, after the step of sending the modified XML configuration file to the background of the Mock test object, it also includes:

根据所述XML配置文件调用所述后台的待测试接口,获取所述待测试接口输出的Mock测试数据。Calling the interface to be tested in the background according to the XML configuration file, and obtaining the Mock test data output by the interface to be tested.

本发明还提供一种Mock测试的XML配置文件修改系统,包括:The present invention also provides a kind of XML configuration file modification system of Mock test, comprising:

读取模块,用于读取在Mock测试对象的后台中指定路径下的第一XML配置文件,并按照节点的层级顺序显示所述第一XML配置文件中各个节点;The reading module is used to read the first XML configuration file under the specified path in the background of the Mock test object, and display each node in the first XML configuration file according to the hierarchical order of the nodes;

修改模块,用于从所述节点中选择待编辑节点,将所述第一XML配置文件的可编辑范围限定在所述待编辑节点的代码范围内,并在所述可编辑范围内对所述待编辑节点进行修改,得到第二XML配置文件;A modification module, configured to select a node to be edited from the nodes, limit the editable range of the first XML configuration file to the code range of the node to be edited, and edit the The node to be edited is modified to obtain the second XML configuration file;

发送模块,用于向所述Mock测试对象的后台发送所述第二XML配置文件,所述Mock测试对象的后台接收所述第二XML配置文件并将所述第一XML配置文件替换为所述第二XML配置文件。Sending module, for sending the second XML configuration file to the background of the Mock test object, the background of the Mock test object receives the second XML configuration file and replaces the first XML configuration file with the Second XML configuration file.

本发明还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如任一实施例所述Mock测试的XML配置文件修改方法的步骤。The present invention also provides a computer device, including a memory and a processor, where computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the processor executes any one of the implementations. The steps of the method for modifying the XML configuration file of the Mock test described in the example.

本发明还提供一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行任一实施例所述Mock测试的XML配置文件修改方法的步骤。The present invention also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, one or more processors execute the XML of the Mock test described in any embodiment. Steps in the configuration file modification method.

上述的Mock测试的XML配置文件修改方法、系统、计算机设备和存储介质,可以将结构复杂的XML配置文件的代码按照节点的层级顺序进行显示,便于快速查找相应的待编辑节点进行修改,同时避免误改节点的XML代码格式,避免影响XML配置文件的编译,提高XML配置文件修改的效率和准确性。The XML configuration file modification method, system, computer equipment and storage medium of the above-mentioned Mock test can display the code of the XML configuration file with a complex structure according to the hierarchical order of the nodes, which is convenient for quickly searching for the corresponding node to be edited and modified, while avoiding Mistakenly change the XML code format of the node, avoid affecting the compilation of the XML configuration file, and improve the efficiency and accuracy of the modification of the XML configuration file.

本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and will become apparent from the description, or may be learned by practice of the invention.

附图说明Description of drawings

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:

图1为一个实施例中提供的Mock测试的XML配置文件修改方法的实施环境图;Fig. 1 is an implementation environment diagram of the XML configuration file modification method of the Mock test provided in one embodiment;

图2为一个实施例中Mock测试的XML配置文件修改方法的流程图;Fig. 2 is the flow chart of the XML configuration file modification method of Mock test in an embodiment;

图3为一个实施例中权限判断的流程图;Fig. 3 is a flowchart of authority judgment in an embodiment;

图4为另一个实施例中Mock测试的XML配置文件修改方法的流程图;Fig. 4 is the flowchart of the XML configuration file modification method of Mock test in another embodiment;

图5为一个实施例中Mock测试的XML配置文件修改系统的结构示意图;Fig. 5 is the structural representation of the XML configuration file modification system of Mock test in an embodiment;

图6为一个实施例中计算机设备的内部结构示意图。Fig. 6 is a schematic diagram of the internal structure of a computer device in an embodiment.

具体实施方式Detailed ways

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which this invention belongs. It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have meanings consistent with their meaning in the context of the prior art, and unless specifically defined as herein, are not intended to be idealized or overly Formal meaning to explain.

如图1所示,图1为一个实施例中提供的Mock测试的XML配置文件修改方法的实施环境图,在该实施环境中,包括测试侧110以及Mock测试对象120,测试侧110可以包括测试平台111和Mock测试用户112。As shown in Figure 1, Figure 1 is an implementation environment diagram of the XML configuration file modification method of the Mock test provided in an embodiment, in this implementation environment, including a test side 110 and a Mock test object 120, and the test side 110 can include a test Platform 111 and Mock test user 112 .

Mock测试对象120可以是待测试的业务系统,测试平台111与Mock测试对象120的后台连接。测试侧110用于控制Mock测试,其中,测试平台111可以用于直接对Mock测试对象120进行Mock测试。测试平台111可以与一个或多个Mock测试用户112连接。The mock test object 120 may be a service system to be tested, and the test platform 111 is connected to the background of the mock test object 120 . The test side 110 is used to control the Mock test, wherein the test platform 111 can be used to directly perform the Mock test on the Mock test object 120 . The test platform 111 can be connected with one or more mock test users 112 .

测试平台111和Mock测试对象120可以分别运行在计算机设备。测试平台111与Mock测试对象120之间,以及测试平台111与Mock测试用户112之间,可以通过蓝牙、USB(Universal Serial Bus,通用串行总线)或者其他网络或通讯连接方式进行连接,本发明在此不做限制。The test platform 111 and the mock test object 120 can run on computer devices respectively. Between test platform 111 and Mock test object 120, and between test platform 111 and Mock test user 112, can be connected by Bluetooth, USB (Universal Serial Bus, universal serial bus) or other network or communication connection mode, the present invention There is no limitation here.

在一个实施例中,如图2所示,图2为一个实施例中Mock测试的XML配置文件修改方法的流程图,本实施例中提出了一种Mock测试的XML配置文件修改方法,该Mock测试的XML配置文件修改方法可以应用于上述的测试侧110中,具体可以包括以下步骤:In one embodiment, as shown in Figure 2, Figure 2 is a flow chart of the XML configuration file modification method of the Mock test in an embodiment, a method for modifying the XML configuration file of the Mock test is proposed in this embodiment, the Mock The method for modifying the XML configuration file for testing can be applied to the above-mentioned testing side 110, and can specifically include the following steps:

步骤S210:读取在Mock测试对象的后台中指定路径下的第一XML配置文件,并按照节点的层级顺序显示第一XML配置文件中各个节点。Step S210: Read the first XML configuration file under the specified path in the background of the mock test object, and display each node in the first XML configuration file according to the hierarchical order of the nodes.

Mock测试中可以利用XML配置文件对Mock测试对象进行配置,其中XML配置文件可以预先放置在Mock测试对象的后台中指定路径下。本步骤中,测试平台可以读取在Mock测试对象的后台中的第一XML配置文件。同时测试平台可以可视化地显示第一XML配置文件的内容,根据XML代码格式将各个节点以层级顺序进行显示,将结构复杂的XML文件快速区分成各个节点,提高XML配置文件可读性,也便于查找待编辑的节点,减少查找时间和避免区分节点范围造成的出错,提高修改效率。In the Mock test, the Mock test object can be configured using an XML configuration file, where the XML configuration file can be pre-placed under a specified path in the background of the Mock test object. In this step, the test platform can read the first XML configuration file in the background of the mock test object. At the same time, the test platform can visually display the content of the first XML configuration file, display each node in a hierarchical order according to the XML code format, quickly distinguish the XML file with complex structure into each node, improve the readability of the XML configuration file, and facilitate Find the node to be edited, reduce the search time and avoid errors caused by distinguishing the node range, and improve the modification efficiency.

步骤S220:从节点中选择待编辑节点,将第一XML配置文件的可编辑范围限定在待编辑节点的代码范围内,并在可编辑范围内对待编辑节点进行修改,得到第二XML配置文件。Step S220: Select the node to be edited from the nodes, limit the editable range of the first XML configuration file to the code range of the node to be edited, and modify the node to be edited within the editable range to obtain the second XML configuration file.

本步骤中,测试用户可以在测试平台中可视化的节点中逐层选择节点,在选择待编辑节点后,测试平台可以准确地定位待编辑节点的代码范围,便于对该待编辑节点进行修改。同时测试平台通过限制可编辑的范围,测试用户可以避免因错看并修改节点的格式而导致节点识别出现错误,或者可以避免错误修改其他节点内的数据值,可以减少修改出错。In this step, the test user can select nodes layer by layer from the visualized nodes in the test platform. After selecting the node to be edited, the test platform can accurately locate the code range of the node to be edited, so as to facilitate modification of the node to be edited. At the same time, by limiting the editable range of the test platform, test users can avoid errors in node recognition caused by misreading and modifying the format of nodes, or avoid incorrectly modifying data values in other nodes, which can reduce modification errors.

具体地,步骤S220中在可编辑范围内对待编辑节点进行修改的步骤,可以包括:Specifically, the step of modifying the node to be edited within the editable range in step S220 may include:

S221:获取替换目标数据,将可编辑范围内的选中数据修改为替换目标数据。可以对节点内的数据进行修改。S221: Obtain replacement target data, and modify selected data within an editable range to replacement target data. Data within a node can be modified.

S222:获取新增目标数据,确定所述可编辑范围内的选中位置,在选中位置插入新增目标数据。可以增加节点内的数据,同时可以按照XML配置文件的格式在该节点内对应地添加该新增目标数据。S222: Acquire newly added target data, determine a selected position within the editable range, and insert newly added target data at the selected position. The data in the node can be added, and at the same time, the newly added target data can be correspondingly added in the node according to the format of the XML configuration file.

S223:获取删除指令,确定可编辑范围内的选中数据,删除的选中数据。可以删除节点内的数据。S223: Obtain a delete instruction, determine the selected data within the editable range, and delete the selected data. Data within a node can be deleted.

以上S221、S222和S223的步骤,可以对单个步骤执行,也可以将其中若干个步骤进行组合执行。The above steps of S221, S222 and S223 may be performed on a single step, or a combination of several steps may be performed.

进一步地,在显示当前待编辑节点时,还可以显示该待编辑节点的后一个节点或前一个节点,显示相邻节点,以便于跳转至相邻节点或者下一个节点进行对应的节点修改。Furthermore, when displaying the current node to be edited, the next node or the previous node of the node to be edited can also be displayed, and adjacent nodes can be displayed, so as to jump to the adjacent node or the next node for corresponding node modification.

步骤S230:向Mock测试对象的后台发送第二XML配置文件,Mock测试对象的后台接收第二XML配置文件并将第一XML配置文件替换为第二XML配置文件。Step S230: Send the second XML configuration file to the background of the mock test object, and the background of the mock test object receives the second XML configuration file and replaces the first XML configuration file with the second XML configuration file.

本步骤中,测试平台可以将修改后的第二XML配置文件覆盖远在Mock测试对象的后台中的第一XML配置文件,完成Mock测试对象的后台中XML配置文件的修改。由于Mock测试对象的后台中一般使用Linux环境系统,此时XML配置文件的覆盖可以避免了在Mock测试对象的后台中通过调用Linux环境系统直接修改第一XML配置文件,减少调用Linux环境系统修改时带来的出错。In this step, the test platform can overwrite the modified second XML configuration file with the first XML configuration file in the background of the mock test object to complete the modification of the XML configuration file in the background of the mock test object. Since the Linux environment system is generally used in the background of the Mock test object, the coverage of the XML configuration file can avoid directly modifying the first XML configuration file by calling the Linux environment system in the background of the Mock test object, reducing the time for calling the Linux environment system to modify caused errors.

上述Mock测试的XML配置文件修改方法,可以将结构复杂的XML配置文件的代码按照节点的层级顺序进行显示,便于快速查找相应的待编辑节点进行修改,同时避免误改节点的XML代码格式,避免影响XML配置文件的编译,提高XML配置文件修改的效率和准确性。The XML configuration file modification method of the above Mock test can display the code of the XML configuration file with a complex structure according to the hierarchical order of the nodes, so that it is convenient to quickly find the corresponding node to be edited for modification, and at the same time avoid changing the XML code format of the node by mistake, avoiding Affects the compilation of XML configuration files, improving the efficiency and accuracy of XML configuration file modification.

在一个实施例中,在步骤S230向Mock测试对象的后台发送修改后的第二XML配置文件的步骤之前,还可以包括:In one embodiment, before step S230 sends the modified second XML configuration file to the background of the Mock test object, it may also include:

A1:校验第二XML配置文件的代码是否符合XML代码格式。A1: Check whether the code of the second XML configuration file conforms to the XML code format.

校验XML代码格式可以借助DTD(Document Type Definition,文档类型定义)语法或XML Schema(可扩展标记语言架构)语法。The XML code format can be verified by means of DTD (Document Type Definition, Document Type Definition) syntax or XML Schema (Extensible Markup Language Architecture) syntax.

A2:当第二XML配置文件的代码符合XML代码格式时,执行向Mock测试对象的后台发送修改后的第二XML配置文件的步骤。A2: When the code of the second XML configuration file conforms to the XML code format, execute the step of sending the modified second XML configuration file to the background of the Mock test object.

A3:当第二XML配置文件的任意节点的代码不符合XML代码格式时,将可编辑范围设置在该节点的代码范围内,并发出编辑提示信息。A3: When the code of any node in the second XML configuration file does not conform to the XML code format, set the editable range within the code range of the node, and issue an edit prompt message.

上述Mock测试的XML配置文件修改方法,为了避免存在错误代码格式的XML配置文件在Mock测试对象中运行后,会导致Mock测试对象中业务系统的运行异常,因此在将第二XML配置文件发送至Mock测试对象的后台之前,需要对第二XML配置文件进行校验,判断第二XML配置文件是否符合XML代码格式,将符合XML代码格式的第二XML配置文件发送至Mock测试对象,保障Mock测试对象在运行第二XML配置文件时因第二XML配置文件影响Mock测试对象的业务系统的功能。The above method for modifying the XML configuration file of the Mock test, in order to avoid the abnormal operation of the business system in the Mock test object after the XML configuration file with the wrong code format is run in the Mock test object, so the second XML configuration file is sent to Before the background of the Mock test object, it is necessary to verify the second XML configuration file to determine whether the second XML configuration file conforms to the XML code format, and send the second XML configuration file conforming to the XML code format to the Mock test object to ensure the mock test When the object runs the second XML configuration file, the function of the business system of the Mock test object is affected by the second XML configuration file.

在一个实施例中,如图3所示,图3为一个实施例中权限判断的流程图,在步骤S210中读取在Mock测试对象的后台中指定路径下的第一XML配置文件的步骤之前,还可以包括:In one embodiment, as shown in Figure 3, Figure 3 is a flow chart of authority judgment in an embodiment, before the step of reading the first XML configuration file under the specified path in the background of the Mock test object in step S210 , which can also include:

步骤S310:获取Mock测试用户的当前登录帐号。Step S310: Obtain the current login account of the Mock test user.

当前登录帐号可以是Mock测试用户登录测试平台时进行Mock测试时的登录帐号。The current login account may be the login account used by the Mock test user to log in to the test platform and perform the mock test.

步骤S320:判断当前登录帐号是否在预设的权限名单内。Step S320: Determine whether the current login account is in the preset authority list.

步骤S330:当预设的权限名单内存在当前登录帐号时,调用预先存储的后台的后台帐号和后台密码,登录后台。Step S330: When there is a current login account in the preset authority list, call the pre-stored background account and background password to log in to the background.

后台帐号可是该测试平台登录Mock测试对象的后台时所使用的登录帐号,后台密码时对应于所述后台帐号的密码。The background account is the login account used by the test platform to log in the background of the Mock test object, and the background password is the password corresponding to the background account.

步骤S340:当预设的权限名单内不存在当前登录帐号时,向Mock测试用户发送用于提醒操作受限的信息。同时还可以禁止当前登录帐号登录Mock测试对象的后台。Step S340: When the current login account does not exist in the preset authority list, send a message for reminding the Mock test user that the operation is restricted. At the same time, it is also possible to prohibit the current login account from logging into the background of the Mock test object.

上述Mock测试的XML配置文件修改方法,预先存储后台帐号和后台密码,避免由工作人员输入该后台帐号和后台密码,减少可以泄露后台帐号和后台密码的途径,降低安全隐患,提高后台帐号和后台密码的保密性。The method for modifying the XML configuration file of the above Mock test stores the background account number and background password in advance, avoids the input of the background account number and background password by the staff, reduces the ways that the background account number and background password can be leaked, reduces security risks, and improves the background account number and background password. Password confidentiality.

另外,还可以对预先存储的后台帐号和后台密码进行加密存储,在需要调用的时候进行对应的解密操作,可以进一步地提高保密性。In addition, the pre-stored background account number and background password can also be encrypted and stored, and the corresponding decryption operation can be performed when it needs to be called, which can further improve the confidentiality.

在一个实施例中,在步骤S220中从所述节点中选择待编辑节点的步骤之后,还可以包括:In one embodiment, after the step of selecting a node to be edited from the nodes in step S220, it may further include:

B1:获取关键词。B1: Obtain keywords.

本步骤中,可以通过可视化页面的输入对话框获取待进行检索的关键词。In this step, keywords to be retrieved may be obtained through an input dialog box on the visualization page.

B2:在注释信息中检索关键词并获得关键词所在的目标节点,其中,注释信息是保存在第一XML配置文件中节点上的备注信息。B2: Retrieve the keyword in the annotation information and obtain the target node where the keyword is located, wherein the annotation information is remark information stored on the node in the first XML configuration file.

本步骤中,在注释信息中检索关键词,确定关键词所在位置,根据该位置确定目标节点。In this step, the keyword is searched in the annotation information, the location of the keyword is determined, and the target node is determined according to the location.

B3:将待编辑节点跳转至目标节点。B3: Jump the node to be edited to the target node.

本步骤中,在可视化页面中待编辑节点可以表现出允许编辑的状态,在将待编辑节点跳转至目标节点,即将可视化页面中将目标节点设置为允许编辑的状态,关闭原来的待编辑节点的允许编辑的状态。In this step, the node to be edited in the visualization page can show the state of allowing editing, jump the node to be edited to the target node, that is, set the target node to the state of allowing editing in the visualization page, and close the original node to be edited The editable state of the .

上述Mock测试的XML配置文件修改方法,可以通过添加注释信息,对节点进行备注,便于后续通过关键词检索来查找并跳转至对应的目标节点,在数据量较大的XML文件中可以快速查找节点。The XML configuration file modification method of the above Mock test can add comment information to make notes on the node, so that it can be searched by keyword search and jump to the corresponding target node, and can be quickly searched in the XML file with a large amount of data. node.

在一个实施例中,在步骤S230中向Mock测试对象的后台发送修改后的第二XML配置文件的步骤之前,还可以包括:In one embodiment, before the step of sending the modified second XML configuration file to the background of the Mock test object in step S230, it may also include:

C1:对第一XML配置文件进行备份,根据时间命名第一XML配置文件的备份文件的名称,并保存备份文件。C1: Back up the first XML configuration file, name the backup file of the first XML configuration file according to time, and save the backup file.

C2:获取查询时间段。C2: Get the query time period.

C3:根据备份文件的名称,从备份文件中调取与查询时间段的对应的备份文件。C3: According to the name of the backup file, the backup file corresponding to the query time period is retrieved from the backup file.

可以按照该第一XML配置文件的修改时间作为名称命名的依据,以便于后续根据放置该第一XML配置文件的时间来查找相关的备份文件。The modification time of the first XML configuration file can be used as the basis for naming, so as to search for related backup files later according to the time when the first XML configuration file is placed.

上述Mock测试的XML配置文件修改方法,在将第一XML配置文件覆盖之前,对第一XML配置文件进行备份,便于查看以往Mock测试的XML配置文件。In the above method for modifying the XML configuration file of the Mock test, before the first XML configuration file is overwritten, the first XML configuration file is backed up, so that it is convenient to check the XML configuration files of the previous Mock test.

在一个实施例中,在步骤S230中向Mock测试对象的后台发送修改后的XML配置文件的步骤之后,还可以包括:In one embodiment, after the step of sending the modified XML configuration file to the background of the Mock test object in step S230, it may also include:

根据XML配置文件调用后台的待测试接口,获取待测试接口输出的Mock测试数据。Call the interface to be tested in the background according to the XML configuration file, and obtain the Mock test data output by the interface to be tested.

上述Mock测试的XML配置文件修改方法,根据XML配置文件调用后台的待测试接口,进行Mock测试,从待测试接口输出Mock测试所返回的Mock测试数据。The method for modifying the XML configuration file of the above-mentioned Mock test calls the interface to be tested in the background according to the XML configuration file to perform the Mock test, and outputs the Mock test data returned by the Mock test from the interface to be tested.

在另一个实施例中,如图4所示,图4为另一个实施例中Mock测试的XML配置文件修改方法的流程图,本实施例中提供一种Mock测试的XML配置文件修改方法,该Mock测试的XML配置文件修改方法可以应用于上述的测试侧110中,具体可以包括以下步骤:In another embodiment, as shown in FIG. 4, FIG. 4 is a flow chart of a method for modifying an XML configuration file of a Mock test in another embodiment. A method for modifying an XML configuration file for a Mock test is provided in this embodiment. The method for modifying the XML configuration file of the Mock test can be applied to the above-mentioned test side 110, and can specifically include the following steps:

步骤S410:调用预先存储的后台帐号和后台密码,登录Mock测试对象的业务系统的后台。Step S410: calling the pre-stored background account number and background password, and logging into the background of the business system of the Mock test object.

在Mock测试用户的当前登录帐号符合预设的权限时,登录Mock测试对象的后台。When the current login account of the Mock test user meets the preset permissions, log in to the background of the Mock test object.

步骤S420:读取在Mock测试对象的后台中指定路径下的第一XML配置文件,在线格式化地显示第一XML配置文件。Step S420: Read the first XML configuration file under the specified path in the background of the mock test object, and display the first XML configuration file online in a formatted format.

Mock测试中XML配置文件可以预先放置在Mock测试对象的后台中指定路径下。按照节点的层级顺序显示第一XML配置文件中各个节点,将结构复杂的XML文件快速区分成各个节点,提高XML配置文件可读性,也便于查找待编辑的节点。显示效果的大致效果可以表现为各层之间分层显示,用户可以可视化地逐层选择各个节点。In the mock test, the XML configuration file can be pre-placed under the specified path in the background of the mock test object. Each node in the first XML configuration file is displayed according to the hierarchical order of the nodes, and the XML file with a complex structure is quickly divided into each node, which improves the readability of the XML configuration file and facilitates the search for nodes to be edited. The general effect of the display effect can be shown as layered display between layers, and the user can visually select each node layer by layer.

另外,在显示的第一XML配置文件中还可以对各层级的节点添加备注,例如在节点添加注释信息,根据备注可以有方向性地快速查找所需要修改的节点和数据值的位置。In addition, in the displayed first XML configuration file, comments can also be added to the nodes of each level, for example, comment information can be added to the nodes, and the position of the node and the data value to be modified can be quickly searched in a directional manner according to the comments.

步骤S430:可视化地修改待编辑节点,从节点中选择待编辑节点,将第一XML配置文件的可编辑范围限定在待编辑节点的代码范围内,并在可编辑范围内对待编辑节点进行修改,得到第二XML配置文件。Step S430: Visually modify the node to be edited, select the node to be edited from the nodes, limit the editable range of the first XML configuration file to the code range of the node to be edited, and modify the node to be edited within the editable range, Get the second XML configuration file.

对待编辑节点的修改可以包括替换、增加和删减。例如根据需要变换的测试场景,对待编辑节点下的标签和元素进行替换,还可以在待编辑节点的新增关联的节点,也可以删除该待编辑节点。获取目标数据值,将可编辑范围内选中的待修改数据值替换为目标数据值;或者,获取新增数据值,确定可编辑范围内被选中的待操作位置,在待操作位置插入新增数据值;或者获取删除指令,确定可编辑范围内被选中的待操作区域,删除待操作区域的数据值。The modification of the node to be edited may include replacement, addition and deletion. For example, according to the test scene that needs to be changed, the labels and elements under the node to be edited can be replaced, and an associated node can also be added to the node to be edited, or the node to be edited can be deleted. Get the target data value, replace the selected data value to be modified in the editable range with the target data value; or get the new data value, determine the selected position to be operated in the editable range, and insert the new data at the position to be operated value; or obtain a delete command, determine the selected area to be operated within the editable range, and delete the data value of the area to be operated.

步骤S440:对第二XML配置文件进行校验。Step S440: Verifying the second XML configuration file.

校验第二XML配置文件的代码是否符合XML代码格式;当第二XML配置文件的任意节点的代码不符合XML代码格式时,将可编辑范围设置在该节点的代码范围内,并发出编辑提示信息。当第二XML配置文件的代码符合XML代码格式时,则执行下一步骤。此时避免存在错误代码格式的XML配置文件在Mock测试对象中运行后,会导致Mock测试对象中业务系统的运行异常。Check whether the code of the second XML configuration file conforms to the XML code format; when the code of any node in the second XML configuration file does not conform to the XML code format, set the editable range within the code range of the node, and issue an edit prompt information. When the code of the second XML configuration file complies with the XML code format, the next step is executed. At this time, avoid running the XML configuration file in the wrong code format in the mock test object, which will cause abnormal operation of the business system in the mock test object.

步骤S450:对第一XML配置文件进行备份。Step S450: Back up the first XML configuration file.

对第一XML配置文件进行备份,根据时间命名第一XML配置文件的备份文件的名称,并保存备份文件;获取查询时间段;根据备份文件的名称,从备份文件中调取与查询时间段的对应的备份文件。Back up the first XML configuration file, name the name of the backup file of the first XML configuration file according to time, and save the backup file; obtain the query time period; according to the name of the backup file, transfer and query the time period from the backup file corresponding backup file.

可以按照该第一XML配置文件的修改时间作为名称命名的依据,以便于后续根据放置该第一XML配置文件的时间来查找相关的备份文件。在将第一XML配置文件覆盖之前,对第一XML配置文件进行备份,便于查看以往Mock测试的XML配置文件。The modification time of the first XML configuration file can be used as the basis for naming, so as to search for related backup files later according to the time when the first XML configuration file is placed. Before overwriting the first XML configuration file, back up the first XML configuration file, so as to check the XML configuration files of previous Mock tests.

步骤S460:向Mock测试对象的后台发送第二XML配置文件,Mock测试对象的后台接收第二XML配置文件并将第一XML配置文件替换为第二XML配置文件。Step S460: Send the second XML configuration file to the background of the mock test object, and the background of the mock test object receives the second XML configuration file and replaces the first XML configuration file with the second XML configuration file.

将修改后的第二XML配置文件覆盖远在Mock测试对象的后台中的第一XML配置文件,完成Mock测试对象的后台中XML配置文件的修改。Mock测试对象的后台中一般使用Linux环境系统,此时可以避免了在Mock测试对象的后台中通过调用Linux环境系统直接修改第一XML配置文件,减少调用Linux环境系统修改时带来的出错。The modified second XML configuration file is overwritten on the first XML configuration file far away in the background of the Mock test object, and the modification of the XML configuration file in the background of the Mock test object is completed. The background of the Mock test object generally uses the Linux environment system. At this time, it can avoid directly modifying the first XML configuration file by calling the Linux environment system in the background of the Mock test object, reducing errors caused by calling the Linux environment system for modification.

上述Mock测试的XML配置文件修改方法,可以将结构复杂的XML配置文件的代码按照节点的层级顺序进行显示,便于快速查找相应的待编辑节点进行修改,同时避免误改节点的XML代码格式,避免影响XML配置文件的编译,提高XML配置文件修改的效率和避免出错。The XML configuration file modification method of the above Mock test can display the code of the XML configuration file with a complex structure according to the hierarchical order of the nodes, so that it is convenient to quickly find the corresponding node to be edited for modification, and at the same time avoid changing the XML code format of the node by mistake, avoiding Affects the compilation of XML configuration files, improves the efficiency of XML configuration file modification and avoids errors.

在一个实施例中,如图5所示,图5为一个实施例中Mock测试的XML配置文件修改系统的结构示意图,本实施例中提供一种Mock测试的XML配置文件修改系统,包括读取模块510、修改模块520和发送模块530,其中:In one embodiment, as shown in Figure 5, Figure 5 is a schematic structural diagram of an XML configuration file modification system for Mock testing in an embodiment, and a system for modifying XML configuration files for Mock testing is provided in this embodiment, including reading Module 510, modification module 520 and sending module 530, wherein:

读取模块510,用于读取在Mock测试对象的后台中指定路径下的第一XML配置文件,并按照节点的层级顺序显示第一XML配置文件中各个节点。The reading module 510 is configured to read the first XML configuration file under the specified path in the background of the Mock test object, and display each node in the first XML configuration file according to the hierarchical order of the nodes.

Mock测试中可以利用XML配置文件对Mock测试对象进行配置,其中XML配置文件可以预先放置在Mock测试对象的后台中指定路径下。读取模块510中,测试平台可以可以读取在Mock测试对象的后台中的第一XML配置文件。同时测试平台可以可视化地显示第一XML配置文件的内容,根据XML代码格式将各个节点以层级顺序进行显示,将结构复杂的XML文件快速区分成各个节点,提高XML配置文件可读性,也便于查找待编辑的节点,减少查找时间和避免区分节点范围造成的出错,提高修改效率。In the Mock test, the Mock test object can be configured using an XML configuration file, where the XML configuration file can be pre-placed under a specified path in the background of the Mock test object. In the reading module 510, the test platform can read the first XML configuration file in the background of the Mock test object. At the same time, the test platform can visually display the content of the first XML configuration file, display each node in a hierarchical order according to the XML code format, quickly distinguish the XML file with complex structure into each node, improve the readability of the XML configuration file, and facilitate Find the node to be edited, reduce the search time and avoid errors caused by distinguishing the node range, and improve the modification efficiency.

修改模块520,用于从节点中选择待编辑节点,将第一XML配置文件的可编辑范围限定在待编辑节点的代码范围内,并在可编辑范围内对待编辑节点进行修改,得到第二XML配置文件。The modification module 520 is used to select the node to be edited from the nodes, limit the editable range of the first XML configuration file to the code range of the node to be edited, and modify the node to be edited within the editable range to obtain the second XML configuration file.

修改模块520中,测试用户可以在测试平台中在可视化的节点中逐层选择节点,在选择待编辑节点后,测试平台可以准确地定位待编辑节点的代码范围,便于对该待编辑节点进行修改。同时测试平台通过限制可编辑的范围,测试用户可以避免因错看并修改节点的格式而导致节点识别出现错误,或者可以避免错误修改其他节点内的数据值,可以减少修改出错。In the modification module 520, the test user can select nodes layer by layer in the visual nodes in the test platform. After selecting the node to be edited, the test platform can accurately locate the code range of the node to be edited, so as to facilitate the modification of the node to be edited. . At the same time, by limiting the editable range of the test platform, test users can avoid errors in node recognition caused by misreading and modifying the format of nodes, or avoid incorrectly modifying data values in other nodes, which can reduce modification errors.

发送模块530,用于向Mock测试对象的后台发送第二XML配置文件,Mock测试对象的后台接收第二XML配置文件并将第一XML配置文件替换为第二XML配置文件。The sending module 530 is configured to send the second XML configuration file to the background of the Mock test object, and the background of the Mock test object receives the second XML configuration file and replaces the first XML configuration file with the second XML configuration file.

发送模块530中,测试平台可以将修改后的第二XML配置文件覆盖远在Mock测试对象的后台中的第一XML配置文件,完成Mock测试对象的后台中XML配置文件的修改。由于Mock测试对象的后台中一般使用Linux环境系统,此时XML配置文件的覆盖可以避免了在Mock测试对象的后台中通过调用Linux环境系统直接修改第一XML配置文件,减少调用Linux环境系统修改时带来的出错。In the sending module 530, the test platform can overwrite the first XML configuration file in the background of the mock test object with the modified second XML configuration file to complete the modification of the XML configuration file in the background of the mock test object. Since the Linux environment system is generally used in the background of the Mock test object, the coverage of the XML configuration file can avoid directly modifying the first XML configuration file by calling the Linux environment system in the background of the Mock test object, reducing the time for calling the Linux environment system to modify caused errors.

上述Mock测试的XML配置文件修改系统,可以将结构复杂的XML配置文件的代码按照节点的层级顺序进行显示,便于快速查找相应的待编辑节点进行修改,同时避免误改节点的XML代码格式,避免影响XML配置文件的编译,提高XML配置文件修改的效率和准确性。The above-mentioned XML configuration file modification system of the Mock test can display the code of the XML configuration file with a complex structure according to the hierarchical order of the nodes, so that it is convenient to quickly find the corresponding node to be edited for modification, and at the same time avoid changing the XML code format of the node by mistake. Affects the compilation of XML configuration files, improving the efficiency and accuracy of XML configuration file modification.

关于Mock测试的XML配置文件修改系统的具体限定可以参见上文中对于Mock测试的XML配置文件修改方法的限定,在此不再赘述。上述Mock测试的XML配置文件修改系统中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitations of the XML configuration file modification system for the Mock test, please refer to the above-mentioned limitation of the XML configuration file modification method for the Mock test, which will not be repeated here. Each module in the above-mentioned XML configuration file modification system of Mock test can be fully or partially realized by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.

如图6所示,图6为一个实施例中计算机设备的内部结构示意图。该计算机设备包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中,该计算机设备的非易失性存储介质存储有操作系统和计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器实现一种Mock测试的XML配置文件修改方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该计算机设备的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种Mock测试的XML配置文件修改方法。该计算机设备的网络接口用于与终端连接通信。本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。As shown in FIG. 6, FIG. 6 is a schematic diagram of the internal structure of a computer device in an embodiment. The computer device includes a processor, a non-volatile storage medium, a memory and a network interface connected through a system bus. Wherein, the non-volatile storage medium of the computer device stores an operating system and computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor can implement a method for modifying an XML configuration file for Mock testing. The processor of the computer equipment is used to provide computing and control capabilities, and supports the operation of the entire computer equipment. Computer-readable instructions may be stored in the memory of the computer device, and when the computer-readable instructions are executed by the processor, the processor may execute a method for modifying an XML configuration file for Mock testing. The network interface of the computer device is used for connecting and communicating with the terminal. Those skilled in the art can understand that the structure shown in FIG. 6 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation on the computer equipment to which the solution of this application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or certain components may be combined, or have a different arrangement of components.

在一个实施例中,提出了一种计算机设备,包括存储器和处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行如上述任一实施例中Mock测试的XML配置文件修改方法的步骤。In one embodiment, a computer device is provided, including a memory and a processor. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor executes the Mock as in any of the above-mentioned embodiments. Steps for testing the XML configuration file modification method.

在一个实施例中,提出了一种存储有计算机可读指令的存储介质,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述任一实施例中Mock测试的XML配置文件修改方法的步骤。In one embodiment, a storage medium storing computer-readable instructions is provided. When the computer-readable instructions are executed by one or more processors, one or more processors execute the Mock in any of the above-mentioned embodiments. Steps for testing the XML configuration file modification method.

应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flow chart of the accompanying drawings are displayed sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the order of execution is also It is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.

以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above descriptions are only part of the embodiments of the present invention. It should be pointed out that those skilled in the art can make some improvements and modifications without departing from the principles of the present invention. It should be regarded as the protection scope of the present invention.

Claims (10)

CN201910440459.6A2019-05-242019-05-24The XML configuration file amending method and system of Mock testPendingCN110321282A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910440459.6ACN110321282A (en)2019-05-242019-05-24The XML configuration file amending method and system of Mock test

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910440459.6ACN110321282A (en)2019-05-242019-05-24The XML configuration file amending method and system of Mock test

Publications (1)

Publication NumberPublication Date
CN110321282Atrue CN110321282A (en)2019-10-11

Family

ID=68119271

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910440459.6APendingCN110321282A (en)2019-05-242019-05-24The XML configuration file amending method and system of Mock test

Country Status (1)

CountryLink
CN (1)CN110321282A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111813682A (en)*2020-07-142020-10-23北京达佳互联信息技术有限公司 A file modification method, device, server, intelligent terminal and storage medium
CN115144678A (en)*2022-09-012022-10-04卡斯柯信号(北京)有限公司Visual test condition configuration method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101286131A (en)*2007-04-092008-10-15国际商业机器公司Service test method and service test system
CN101860532A (en)*2010-05-072010-10-13深圳市共进电子有限公司Saving and loading method for multiprocess configuration files
WO2016201995A1 (en)*2015-06-162016-12-22中兴通讯股份有限公司Method and apparatus for implementation of test object construction, and service configuration test apparatus
CN106528393A (en)*2015-09-092017-03-22北京京东尚科信息技术有限公司Method and device for Mock testing of WebService
CN107179984A (en)*2016-03-102017-09-19北京京东尚科信息技术有限公司A kind of interface mock methods and interface test method
CN107203465A (en)*2016-03-182017-09-26阿里巴巴集团控股有限公司System interface method of testing and device
CN108345535A (en)*2017-12-262018-07-31阿里巴巴集团控股有限公司Mock test methods, device and equipment
CN109582560A (en)*2018-10-092019-04-05中国平安人寿保险股份有限公司Test file edit methods, device, equipment and computer readable storage medium
CN109656807A (en)*2018-11-012019-04-19平安科技(深圳)有限公司Interface mock test method, device, equipment and storage medium based on information security

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101286131A (en)*2007-04-092008-10-15国际商业机器公司Service test method and service test system
US20090007073A1 (en)*2007-04-092009-01-01International Business Machines CorporationService testing method and service testing system
CN101860532A (en)*2010-05-072010-10-13深圳市共进电子有限公司Saving and loading method for multiprocess configuration files
WO2016201995A1 (en)*2015-06-162016-12-22中兴通讯股份有限公司Method and apparatus for implementation of test object construction, and service configuration test apparatus
CN106528393A (en)*2015-09-092017-03-22北京京东尚科信息技术有限公司Method and device for Mock testing of WebService
CN107179984A (en)*2016-03-102017-09-19北京京东尚科信息技术有限公司A kind of interface mock methods and interface test method
CN107203465A (en)*2016-03-182017-09-26阿里巴巴集团控股有限公司System interface method of testing and device
CN108345535A (en)*2017-12-262018-07-31阿里巴巴集团控股有限公司Mock test methods, device and equipment
CN109582560A (en)*2018-10-092019-04-05中国平安人寿保险股份有限公司Test file edit methods, device, equipment and computer readable storage medium
CN109656807A (en)*2018-11-012019-04-19平安科技(深圳)有限公司Interface mock test method, device, equipment and storage medium based on information security

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111813682A (en)*2020-07-142020-10-23北京达佳互联信息技术有限公司 A file modification method, device, server, intelligent terminal and storage medium
CN115144678A (en)*2022-09-012022-10-04卡斯柯信号(北京)有限公司Visual test condition configuration method and device
CN115144678B (en)*2022-09-012022-12-09卡斯柯信号(北京)有限公司Visual test condition configuration method and device

Similar Documents

PublicationPublication DateTitle
US6941546B2 (en)Method and apparatus for testing a software component using an abstraction matrix
US8392880B2 (en)Rapid application development for database-aware applications
US9218269B2 (en)Testing multiple target platforms
CN101520730B (en)Test script transformation analyzer with change guide engine
US20160170719A1 (en)Software database system and process of building and operating the same
CN105144088A (en) Association of metadata with source code and applications and services based on it
ITTO980722A1 (en) PROCEDURE FOR INSTALLING AND / OR VERIFYING THE SOFTWARE FOR A COMPUTER SYSTEM MADE TO ORDER, AND COMPUTER SYSTEM FOR
CN115658452B (en) Buried point verification method, buried point verification device, readable storage medium, and electronic device
US9311077B2 (en)Identification of code changes using language syntax and changeset data
CN111782117A (en) Interface display method and device, storage medium, and electronic device
US20050137844A1 (en)Method for generating a language-independent regression test script
CN110659197B (en)Application test case generation method and device and software test system
EP2105837B1 (en)Test script transformation analyzer with change guide engine
CN114780109A (en)Python project third-party library dependence automatic analysis and installation method
CN114091383A (en)Test sequence generation method, device and system and related equipment
CN117032536A (en)Method and device for quickly constructing OTX diagnostic sequence
CN110321282A (en)The XML configuration file amending method and system of Mock test
US20100011018A1 (en)Custom database system and method of building the same
US11176022B2 (en)Health diagnostics and analytics for object repositories
US20060047723A1 (en)Custom database system and method of building the same
CN112256554B (en)Method and equipment for testing based on scene test cases
CN117632114A (en) A method and device for importing FMU files based on file analysis
US11934294B2 (en)Generating and debugging bytecode for a rule
CN116594883A (en)Code testing method, device, computer equipment and storage medium
US20080022258A1 (en)Custom database system and method of building and operating the same

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
WD01Invention patent application deemed withdrawn after publication

Application publication date:20191011

WD01Invention patent application deemed withdrawn after publication

[8]ページ先頭

©2009-2025 Movatter.jp