[go: up one dir, main page]

CN107544899B - Method and device for executing test case - Google Patents

Method and device for executing test case Download PDF

Info

Publication number
CN107544899B
CN107544899B CN201610474807.8A CN201610474807A CN107544899B CN 107544899 B CN107544899 B CN 107544899B CN 201610474807 A CN201610474807 A CN 201610474807A CN 107544899 B CN107544899 B CN 107544899B
Authority
CN
China
Prior art keywords
test
identifier
conflict
test case
case
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.)
Active
Application number
CN201610474807.8A
Other languages
Chinese (zh)
Other versions
CN107544899A (en
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.)
Sanechips Technology Co Ltd
Original Assignee
Sanechips 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 Sanechips Technology Co Ltd filed Critical Sanechips Technology Co Ltd
Priority to CN201610474807.8A priority Critical patent/CN107544899B/en
Priority to PCT/CN2017/087245 priority patent/WO2017219851A1/en
Publication of CN107544899A publication Critical patent/CN107544899A/en
Application granted granted Critical
Publication of CN107544899B publication Critical patent/CN107544899B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for executing a test case, which comprises the following steps: detecting whether a test platform identifier in a conflict identifier is the same as a current test platform identifier or not when detecting that the conflict identifier in the test case is not empty; when detecting that the test platform identification in the conflict identification is different from the current test platform identification, detecting whether the global parameter identification in the conflict identification conflicts with the global parameter identification set by the current test platform; when detecting that the global parameter identification in the conflict identification conflicts with the global parameter identification set by the current test platform, detecting whether the difference value between the current time and the marking time in the conflict identification is greater than the preset time; and when the difference value is detected to be larger than the preset time, clearing the conflict identification, setting the conflict identification of the current test platform, and executing the test case. The invention also discloses a device for executing the test case.

Description

一种执行测试用例的方法及装置A method and apparatus for executing a test case

技术领域technical field

本发明涉及数据测试技术,具体涉及一种执行测试用例的方法及装置。The invention relates to data testing technology, in particular to a method and device for executing a test case.

背景技术Background technique

在调制解调器(Momem,Modulator Demodula-tor)或终端测试中,系统环境下的无线网络控制器(RNC,Radio Network Controller)的参数,直接影响RNC下所有第三代移动通信技术(3G,The 3rd Generation Mobile Communications)小区的参数,演进型Node B基站(eNodeB,Evolved Node B)的参数,直接影响eNodeB下所有第四代移动通信技术(4G,The 4rd Generation Mobile Communications)小区的参数,这样多个测试平台下就有一些参数配置是全局的,全局参数的改变会影响所有的测试平台的测试环境。In the modem (Momem, Modulator Demodula-tor) or terminal test, the parameters of the radio network controller (RNC, Radio Network Controller) in the system environment directly affect all the third-generation mobile communication technologies (3G, The 3rd Generation) under the RNC. Mobile Communications) cell parameters, evolved Node B base station (eNodeB, Evolved Node B) parameters, directly affect the parameters of all fourth generation mobile communication technology (4G, The 4rd Generation Mobile Communications) cells under eNodeB, so many tests Some parameter configurations under the platform are global, and changes in global parameters will affect the test environment of all test platforms.

图1为现有技术中全局参数的4G/3G多模互操作的测试环境结构组成示意图;如图1所示,包括:OMCR服务器101、ATPi自动化测试平台102、ATPi自动化测试平台103、eNodeB104、RNC 105、LTE Cell 106、W(TD)Cell 107、HOC可调衰减器108、测试平台109和测试平台110,其中,Fig. 1 is a schematic diagram of the structure of a test environment for 4G/3G multi-mode interoperability of global parameters in the prior art; as shown in Fig. 1, including: OMCR server 101, ATPi automated test platform 102, ATPi automated test platform 103, eNodeB 104, RNC 105, LTE Cell 106, W(TD) Cell 107, HOC adjustable attenuator 108, test platform 109 and test platform 110, wherein,

所述OMCR服务器101,用于配置和修改所述eNodeB 104和RNC 105下的长期演进(LTE,Long Term Evolution)小区,即4G小区/W(TD)小区,即3G小区的参数;The OMCR server 101 is configured to configure and modify the parameters of a Long Term Evolution (LTE, Long Term Evolution) cell under the eNodeB 104 and the RNC 105, that is, a 4G cell/W (TD) cell, that is, a 3G cell;

所述eNodeB 104,用于4G网络中,用于使得无线接入网络中不同协议层之间的交互更紧密以及减少延迟和提高效率,4G网络采用扁平化结构,4G网络演进的UMTS陆地无线接入网(E-UTRAN,Evolved UMTS Terrestrial Radio Access Network)仅由eNodeB网络组成,eNodeB负责所有与无线相关的功能,每个功能负责管理多个小区;The eNodeB 104 is used in the 4G network to make the interaction between different protocol layers in the wireless access network closer, reduce the delay and improve the efficiency. The 4G network adopts a flat structure, and the UMTS terrestrial wireless connection of 4G network evolution Network access (E-UTRAN, Evolved UMTS Terrestrial Radio Access Network) is only composed of eNodeB network, eNodeB is responsible for all wireless-related functions, and each function is responsible for managing multiple cells;

所述RNC 105,用于3G网络中,是负责控制无线资源的网元,RNC 105下可以挂多个3G小区,多个测试平台也可以对在同一个RNC 105下的多个3G小区进行用例测试;The RNC 105, used in the 3G network, is a network element responsible for controlling radio resources. Multiple 3G cells can be attached to the RNC 105, and multiple test platforms can also perform use cases for multiple 3G cells under the same RNC 105. test;

所述ATPi自动化测试平台102连接所述测试平台109,所述ATPi自动化测试平台103连接所述测试平台110;所述ATPi自动化测试平台102和所述ATPi自动化测试平台103还分别通过所述OMCR服务器101与eNodeB 104和RNC 105连接;并且分别使用所述HOC可调衰减器108对从eNodeB 104和RNC105下的两个不同的LTE小区106和3G小区107出来的信号强度进行自动化测试控制。The ATPi automated testing platform 102 is connected to the testing platform 109, and the ATPi automated testing platform 103 is connected to the testing platform 110; the ATPi automated testing platform 102 and the ATPi automated testing platform 103 also pass through the OMCR server respectively. 101 is connected with eNodeB 104 and RNC 105; and the HOC adjustable attenuator 108 is used to perform automatic test control on the signal strength from two different LTE cells 106 and 3G cells 107 under eNodeB 104 and RNC 105, respectively.

现有技术中通常使用人工操作界面以及Telnet远程登陆对eNodeB和/或RNC的参数进行修改,当使用自动化测试平台进行执行测试用例时,使用Telnet远程登陆方式对eNodeB和/或RNC的参数进行修改。In the prior art, the parameters of the eNodeB and/or RNC are usually modified by using the manual operation interface and Telnet remote login. When using an automated test platform to execute test cases, the parameters of the eNodeB and/or RNC are modified by using the Telnet remote login method. .

由于eNodeB 104和RNC105的参数会影响TPi自动化测试平台102和TPi自动化测试平台103的测试环境,如果TPi自动化测试平台102通过OMCR服务器101修改了全局参数(eNodeB和/或RNC的参数),而这时,TPi自动化测试平台103是无法得知TPi自动化测试平台102已修改了全局参数的,就会按照TPi自动化测试平台102修改后的全局参数执行测试用例,这样就背离了原来测试用例设计的场景。Since the parameters of the eNodeB 104 and the RNC 105 will affect the test environment of the TPi automated test platform 102 and the TPi automated test platform 103, if the TPi automated test platform 102 modifies the global parameters (parameters of the eNodeB and/or RNC) through the OMCR server 101, and this At this time, the TPi automated test platform 103 cannot know that the TPi automated test platform 102 has modified the global parameters, and will execute the test case according to the modified global parameters of the TPi automated test platform 102, which deviates from the original test case design scenario .

现有技术中,为了避免上述问题,采用人工沟通或同时测试相同全局参数的测试用例进行测试执行,无法实现完全的自动化测试,测试效率低,且浪费测试设备资源。In the prior art, in order to avoid the above problems, manual communication or test cases that simultaneously test the same global parameters are used for test execution, which cannot achieve complete automated testing, has low test efficiency, and wastes test equipment resources.

发明内容SUMMARY OF THE INVENTION

为解决现有存在的技术问题,本发明实施例期望提供一种执行测试用例的方法及装置,能够实现完全的自动化测试,提高测试效率。In order to solve the existing technical problems, the embodiments of the present invention are expected to provide a method and apparatus for executing a test case, which can realize a complete automatic test and improve the test efficiency.

本发明实施例的技术方案是这样实现的:The technical solution of the embodiment of the present invention is realized as follows:

根据本发明实施例的一方面,提供一种执行测试用例的方法,所述方法包括:According to an aspect of the embodiments of the present invention, there is provided a method for executing a test case, the method comprising:

检测到测试用例中的冲突标识不为空时,检测所述冲突标识中的测试平台标识与当前测试平台标识是否相同;When detecting that the conflict identifier in the test case is not empty, detect whether the test platform identifier in the conflict identifier is the same as the current test platform identifier;

检测到所述冲突标识中的测试平台标识与所述当前测试平台标识不相同时,检测所述冲突标识中的全局参数标识与当前测试平台所设置的全局参数标识是否冲突;When detecting that the test platform identification in the conflict identification is different from the current test platform identification, detect whether the global parameter identification in the conflict identification conflicts with the global parameter identification set by the current test platform;

检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识冲突时,检测当前时间与所述冲突标识中的标记时间的差值是否大于预设时间;When detecting that the global parameter identifier in the conflict identifier conflicts with the global parameter identifier set by the current test platform, detect whether the difference between the current time and the marked time in the conflict identifier is greater than a preset time;

检测到所述差值大于预设时间时,清除所述冲突标识,设置所述当前测试平台的冲突标识,并执行所述测试用例。When it is detected that the difference value is greater than the preset time, the conflict flag is cleared, the conflict flag of the current test platform is set, and the test case is executed.

上述方案中,所述方法还包括:In the above scheme, the method also includes:

检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识不冲突时,复用全局参数,在所述冲突标识中增设当前测试平台标识,并修改所述冲突标识中的标记时间,执行所述测试用例。When detecting that the global parameter identification in the conflict identification does not conflict with the global parameter identification set by the current test platform, multiplex the global parameter, add the current test platform identification in the conflict identification, and modify the conflict identification At the marked time in , the test case is executed.

上述方案中,所述方法还包括:In the above scheme, the method also includes:

检测到所述冲突标识中的测试平台标识与所述当前测试平台标识相同时,更新所述冲突标识中的全局参数标识和所述标记时间,并执行所述测试用例。When it is detected that the test platform identification in the conflict identification is the same as the current test platform identification, the global parameter identification and the marking time in the conflict identification are updated, and the test case is executed.

上述方案中,所述方法还包括:In the above scheme, the method also includes:

检测到所述测试用例中的冲突标识为空时,设置所述当前测试平台的冲突标识,并执行所述测试用例。When it is detected that the conflict identifier in the test case is empty, the conflict identifier of the current test platform is set, and the test case is executed.

上述方案中,在执行完毕所述测试用例之后,所述方法还包括:In the above solution, after the test case is executed, the method further includes:

清除所述当前测试平台的冲突标识,并设置所述测试用例的用例执行标识的值为预设值。The conflict identifier of the current test platform is cleared, and the value of the use case execution identifier of the test case is set to a preset value.

上述方案中,在所述检测到所述测试用例中的冲突标识不为空之前,所述方法还包括:In the above solution, before it is detected that the conflict identifier in the test case is not empty, the method further includes:

检测所述测试用例的用例执行标识的值是否是预设值;Detecting whether the value of the use case execution identifier of the test case is a preset value;

检测到所述测试用例的用例执行标识的值是预设值时,停止执行当前的测试用例,检查并执行下一个测试用例;When detecting that the value of the use case execution identifier of the test case is a preset value, stop executing the current test case, check and execute the next test case;

检测到所述测试用例的用例执行标识的值为非预设值时,触发检测所述测试用例中的冲突标识是否为空。When it is detected that the value of the use case execution identifier of the test case is not a preset value, triggering to detect whether the conflict identifier in the test case is empty.

上述方案中,所述测试用例设置于测试用例池中,在检测所述测试用例的用例执行标识的值是否是预设值之前,所述方法还包括:In the above solution, the test case is set in the test case pool, and before detecting whether the value of the use case execution identifier of the test case is a preset value, the method further includes:

检测所述测试用例池的循环测试标识的值是否为预设值;Detecting whether the value of the loop test identifier of the test case pool is a preset value;

检测到所述循环测试标识的值是预设值时,停止对所述测试用例池中的测试用例的测试;When detecting that the value of the loop test identifier is a preset value, stop testing the test cases in the test case pool;

检测到所述循环测试标识的值为非预设值时,检测所述测试用例池中的循环测试标识的值是否是预设值,并检测所述测试用例池中未执行的测试用例的用例执行标识的值是否是预设值。When it is detected that the value of the loop test identifier is not a preset value, detect whether the value of the loop test identifier in the test case pool is a preset value, and detect the use case of the unexecuted test case in the test case pool Whether the value of the execution flag is a preset value.

上述方案中,所述方法还包括:In the above scheme, the method also includes:

检测到所述差值小于预设时间时,退出执行所述测试用例,并检测下一个测试用例。When it is detected that the difference is less than the preset time, the execution of the test case is exited, and the next test case is detected.

根据本发明实施例的另一方面,提供一种执行测试用例的装置,所述装置包括:According to another aspect of the embodiments of the present invention, there is provided an apparatus for executing a test case, the apparatus comprising:

第一检测单元、第二检测单元、第三检测单元、第四检测单元和执行单元,其中,The first detection unit, the second detection unit, the third detection unit, the fourth detection unit and the execution unit, wherein,

所述第一检测单元,用于检测所述测试用例中的冲突标识是否为空;the first detection unit, configured to detect whether the conflict identifier in the test case is empty;

所述第二检测单元,用于所述第一检测单元检测到所述测试用例中的冲突标识不为空时,检测所述冲突标识中的测试平台标识与所述当前测试平台标识是否相同;The second detection unit is configured to detect whether the test platform identification in the conflict identification is the same as the current test platform identification when the first detection unit detects that the conflict identification in the test case is not empty;

所述第三检测单元,用于所述第二检测单元检测到所述冲突标识中的测试平台标识与所述当前测试平台标识不相同时,检测所述冲突标识中的全局参数标识与当前测试平台所设置的全局参数标识是否冲突;The third detection unit is used for the second detection unit to detect that the test platform identification in the conflict identification is different from the current test platform identification, and detect that the global parameter identification in the conflict identification is different from the current test platform identification. Whether the global parameter identifiers set by the platform conflict;

所述第四检测单元,用于所述第三检测单元检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识冲突时,检测当前时间与所述冲突标识中的标记时间的差值是否大于预设时间;The fourth detection unit is used for the third detection unit to detect that when the global parameter identifier in the conflict identifier conflicts with the global parameter identifier set by the current test platform, detect the current time and the conflict identifier. Whether the difference between the marked time is greater than the preset time;

所述执行单元,用于所述第四检测单元检测到所述差值大于预设时间时,清除所述冲突标识,设置所述当前测试平台的冲突标识,并执行所述测试用例。The execution unit is configured to clear the conflict flag when the fourth detection unit detects that the difference is greater than a preset time, set the conflict flag of the current test platform, and execute the test case.

上述方案中,所述执行单元,还用于所述第三检测单元检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识不冲突时,复用全局参数,并在所述冲突标识中增设当前测试平台标识,并修改所述标记时间后,执行所述测试用例。In the above scheme, the execution unit is further configured to reuse the global parameter when the third detection unit detects that the global parameter identifier in the conflict identifier does not conflict with the global parameter identifier set by the current test platform, The current test platform identifier is added to the conflict identifier, and the test case is executed after the marking time is modified.

上述方案中,所述执行单元,还用于所述第二检测单元检测到所述冲突标识中的测试平台标识与当前测试平台标识相同时,更新所述冲突标识中的全局参数标识和所述标记时间,并执行所述测试用例。In the above scheme, the execution unit is also used for the second detection unit to update the global parameter identifier in the conflict identifier and the The time is marked and the test case is executed.

上述方案中,所述执行单元,还用于所述第一检测单元检测到所述测试用例中的冲突标识为空时,设置所述当前测试平台的冲突标识,并执行所述测试用例。In the above solution, the execution unit is further configured to, when the first detection unit detects that the conflict identifier in the test case is empty, set the conflict identifier of the current test platform, and execute the test case.

上述方案中,所述装置还包括:In the above scheme, the device also includes:

清除单元,用于在所述执行单元执行完毕所述测试用例之后,清除所述当前测试平台的冲突标识,并设置所述测试用例的用例执行标识的值为预设值。A clearing unit, configured to clear the conflict flag of the current test platform after the execution unit has finished executing the test case, and set the value of the test case execution flag of the test case to a preset value.

上述方案中,所述装置还包括:In the above scheme, the device also includes:

所述第五检测单元和触发单元;其中the fifth detection unit and trigger unit; wherein

所述第五检测单元,用于检测所述测试用例的用例执行标识的值是否是预设值;the fifth detection unit, configured to detect whether the value of the use case execution identifier of the test case is a preset value;

所述执行单元,还用于所述第五检测单元检测到所述测试用例的用例执行标识的值是预设值时,停止执行当前的测试用例,检查并执行下一个测试用例;The execution unit is further configured to stop executing the current test case, check and execute the next test case when the fifth detection unit detects that the value of the use case execution identifier of the test case is a preset value;

所述触发单元,具体用于所述第五检测单元检测到所述测试用例的用例执行标识的值不是预设值时,触发所述第一检测单元检测所述测试用例中的冲突标识是否为空。The triggering unit is specifically configured to trigger the first detection unit to detect whether the conflict identifier in the test case is null.

上述方案中,所述测试用例设于测试用例池中,所述装置还包括:第六检测单元和循环测试单元;其中,In the above solution, the test case is set in the test case pool, and the device further includes: a sixth detection unit and a loop test unit; wherein,

所述第六检测单元,用于检测所述测试用例池中的循环测试标识的值是否是预设值;The sixth detection unit is used to detect whether the value of the loop test identifier in the test case pool is a preset value;

所述循环测试单元,用于所述第六检测单元检测到所述循环测试标识的值是预设值时,停止对所述测试用例池中的测试用例的测试;The loop testing unit is configured to stop the testing of the test cases in the test case pool when the sixth detection unit detects that the value of the loop test identifier is a preset value;

所述第六检测单元检测到所述循环测试标识的值非预设值时,检测所述测试用例池中的循环测试标识的值是否是预设值,并由所述第五检测单元检测所述测试用例池中未执行的测试用例的用例执行标识的值是否是预设值。When the sixth detection unit detects that the value of the loop test identification is not a preset value, it detects whether the value of the loop test identification in the test case pool is a preset value, and the fifth detection unit detects the value of the loop test identification. Whether the value of the case execution identifier of the unexecuted test case in the test case pool is a preset value.

上述方案中,所述装置还包括:In the above scheme, the device also includes:

退出单元,用于所述第四检测单元检测到的所述差值小于预设时间时,退出执行所述测试用例,并检测下一个测试用例。The exit unit is used for exiting the execution of the test case and detecting the next test case when the difference detected by the fourth detection unit is less than a preset time.

本发明实施例提供一种执行测试用例的方法,通过检测到测试用例中的冲突标识不为空时,检测所述冲突标识中的测试平台标识与当前测试平台标识是否相同;检测到所述冲突标识中的测试平台标识与所述当前测试平台标识不相同时,检测所述冲突标识中的全局参数标识与当前测试平台所设置的全局参数标识是否冲突;检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识冲突时,检测当前时间与所述冲突标识中的标记时间的差值是否大于预设时间;检测到所述差值大于预设时间时,清除所述冲突标识,设置所述当前测试平台的冲突标识,并执行所述测试用例。如此,通过先执行全局参数标识不冲突的用例,或是先执行全局参数标识冲突但是能复用全局参数的用例,之后再通过循环测试标识对用例池中的用例进行循环测试,并对未执行的用例执行测试,实现了测试自动化,无需人工干预执行测试,提高了测试效率。The embodiment of the present invention provides a method for executing a test case, by detecting that the conflict identifier in the test case is not empty, detecting whether the test platform identifier in the conflict identifier is the same as the current test platform identifier; detecting the conflict When the test platform identification in the identification is different from the current test platform identification, it is detected whether the global parameter identification in the conflict identification conflicts with the global parameter identification set by the current test platform; the global parameter identification in the conflict identification is detected When the identification conflicts with the global parameter identification set by the current test platform, detect whether the difference between the current time and the marked time in the conflict identification is greater than the preset time; when it is detected that the difference is greater than the preset time, clear For the conflict identification, the conflict identification of the current test platform is set, and the test case is executed. In this way, firstly execute the use cases with non-conflicting global parameter identifiers, or first execute the use cases whose global parameter identifiers conflict but can reuse the global parameters, and then perform cyclic testing on the use cases in the use case pool through the cyclic test identifier, and test the use cases that are not executed. Execute the test with the use case, realize the test automation, execute the test without manual intervention, and improve the test efficiency.

附图说明Description of drawings

图1为现有技术中全局参数的4G/3G多模互操作的测试环境结构组成示意图;1 is a schematic diagram of the composition of the test environment structure of the 4G/3G multi-mode interoperability of global parameters in the prior art;

图2为本发明实施例中执行测试用例的方法流程示意图;2 is a schematic flowchart of a method for executing a test case in an embodiment of the present invention;

图3为本发明实施例中执行测试用例的装置组成示意图。FIG. 3 is a schematic diagram of the composition of an apparatus for executing a test case in an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图对本发明的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本发明,并不用于限制本发明。The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present invention, but not to limit the present invention.

图2为本发明实施例中执行测试用例的方法流程示意图;如图2所示,该方法包括:FIG. 2 is a schematic flowchart of a method for executing a test case in an embodiment of the present invention; as shown in FIG. 2 , the method includes:

步骤201,检测到测试用例中的冲突标识不为空时,检测所述冲突标识中的测试平台标识与当前测试平台标识是否相同;Step 201, when detecting that the conflict identifier in the test case is not empty, detect whether the test platform identifier in the conflict identifier is the same as the current test platform identifier;

这里,所述冲突标识用P1:EVN1@TIME表示,包括:全局参数标识、测试平台标识和标记时间;其中,所述全局参数标识,是指使用全局参数中的具体哪个参数,例如,可以设置为P1或者P2;所述平台标示,是指每个测试平台的编号,例如测试平台1设为ENV1,测试平台2设为ENV2;所述标记时间,是指测试平台设置全局参数的时间,设为TIME;在检测测试用例的冲突标识是否为空之前,要先检测测试用例池中的循环测试标识的值是否是预设值;这里循环测试标识为ALL flag,预设值为1,当检测到测试用例池中的循环测试标识ALL flag的值是1时,说明测试用例池中的用例已全部测试完毕,则停止对所述测试用例池中的测试用例的测试,并输出测试报告;当检测到测试用例池中的循环测试标识ALL flag的值不是1,而是ALL flag=0时,则说明在测试用例池中有未执行完测试的用例,需要对测试用例池进行循环测试。然后检测测试用例池中未执行的测试用例执行标识的值是否是预设值,这里测试用例执行标识为case flag,预设值为1;当检测到测试用例的用例执行标识caseflag的值是预设值1时,说明该测试用例已执行完毕,则停止执行所述测试用例,检测并执行下一个测试用例;当检测到所述测试用例的用例执行标识case flag的值不是预设值1,而是case flag=0时,说明所述测试用例未执行测试,则对所述测试用例执行测试。这里的循环测试标识ALL flag和用例执行标识case flag均可由ATPI自动生成的新的运行列表latest Run List生成,并将生成的ALL flag和case flag按固定格式保存到固定地方供测试用例时修改和查询,具体地,在执行测试用例前,检测ALL flag是否为预设值1,以及检测case flag是否为预设值1,可通过TCL用例脚本进行检测。具体TCL用例脚本语言的控制流程如下:Here, the conflict identifier is represented by P1:EVN1@TIME, including: global parameter identifier, test platform identifier and marking time; wherein, the global parameter identifier refers to which parameter in the global parameters is used, for example, it can be set is P1 or P2; the platform mark refers to the serial number of each test platform, for example, test platform 1 is set as ENV1, and test platform 2 is set as ENV2; the marking time refers to the time when the test platform sets the global parameters, set is TIME; before detecting whether the conflict flag of the test case is empty, first check whether the value of the loop test flag in the test case pool is the default value; here the loop test flag is ALL flag, and the default value is 1. When the value of the ALL flag of the loop test identifier in the test case pool is 1, it means that all test cases in the test case pool have been tested, stop the test of the test cases in the test case pool, and output the test report; when When it is detected that the value of the ALL flag of the loop test identifier in the test case pool is not 1, but the value of ALL flag=0, it means that there are test cases in the test case pool that have not been tested, and the test case pool needs to be tested in a loop. Then check whether the value of the unexecuted test case execution flag in the test case pool is a preset value. Here, the test case execution flag is case flag, and the default value is 1; When the value is set to 1, it means that the test case has been executed, then the execution of the test case is stopped, and the next test case is detected and executed; when it is detected that the case flag of the test case is not the default value of 1 Instead, when the case flag=0, it means that the test case has not been tested, and then the test is performed on the test case. The cycle test identifier ALL flag and the case execution identifier case flag can be generated by the new run list latest Run List automatically generated by ATPI, and the generated ALL flag and case flag are saved in a fixed format to a fixed place for modification and modification of test cases. Query, specifically, before executing the test case, check whether the ALL flag is the default value 1, and whether the case flag is the default value 1, can be detected through the TCL use case script. The control flow of the specific TCL use case scripting language is as follows:

Figure BDA0001029552970000071
Figure BDA0001029552970000071

需要说明的是,该控制流程仅为该TCL用例脚本语音的简化控制流程,仅作为一实现示例。It should be noted that the control flow is only a simplified control flow of the script voice of the TCL use case, and is only an implementation example.

在对所述测试用例执行测试时,首先,触发检测所述测试用例的冲突标识是否为空,若检测到所述测试用例中的冲突标识为空时,则说明没有测试平台在使用全局参数,当前测试平台可以使用所述全局参数,并设置当前测试平台的冲突标识,执行所述测试用例,在执行完毕所述测试用例后,清除所述冲突标识,并设置所述测试用例的用例执行标识的值为预设值:case flag=1;When the test is performed on the test case, first, it is triggered to detect whether the conflict identifier of the test case is empty. If it is detected that the conflict identifier in the test case is empty, it means that no test platform is using the global parameters. The current test platform can use the global parameters, set the conflict flag of the current test platform, execute the test case, after the test case is executed, clear the conflict flag, and set the use case execution flag of the test case is the default value: case flag=1;

若检测到所述测试用例中的冲突标识不为空时,说明有测试平台在使用所述全局参数,当前测试平台不能直接使用所述全局参数,这里,需要检测所述冲突标识中的测试平台标识与所述当前测试平台标识是否相同。If it is detected that the conflict identifier in the test case is not empty, it means that a test platform is using the global parameter, and the current test platform cannot directly use the global parameter. Here, the test platform in the conflict identifier needs to be detected Whether the identifier is the same as the current test platform identifier.

步骤202,检测到所述冲突标识中的测试平台标识与所述当前测试平台标识不相同时,检测所述冲突标识中的全局参数标识与当前测试平台所设置的全局参数标识是否冲突;Step 202, when detecting that the test platform identification in the conflict identification is different from the current test platform identification, detect whether the global parameter identification in the conflict identification conflicts with the global parameter identification set by the current test platform;

这里,检测到所述冲突标识中的测试平台标识与所述当前测试平台标识相同时,说明所述测试平台在上次执行完测试用例后,未正常清除其所设置的冲突标识,这里,只需要更新所述冲突标识中的全局参数标识和所述标记时间,在更新完毕之后,执行所述测试用例,并在执行完毕所述测试用例后,清除其所设置的冲突标识,设置所述测试用例的用例执行标识的值为case flag=1;Here, when it is detected that the test platform identification in the conflict identification is the same as the current test platform identification, it means that the test platform has not normally cleared the conflict identification set by the test platform after executing the test case last time. It is necessary to update the global parameter identification and the marking time in the conflict identification. After the update is completed, the test case is executed, and after the test case is executed, the set conflict identification is cleared, and the test is set. The value of the use case execution flag of the use case is case flag=1;

检测到所述冲突标识中的测试平台标识与所述当前测试平台标识不相同时,说明有测试平台已修改后所述全局参数,并且正在使所述全局参数下的环境,当前测试平台不能直接使用所述全局参数,这时需要检测所述冲突标识中的全局参数标识与当前测试平台所设置的全局参数标识是否冲突。When it is detected that the test platform identification in the conflict identification is not the same as the current test platform identification, it indicates that there are the global parameters after the test platform has been modified, and the environment under the global parameters is being changed, and the current test platform cannot directly When using the global parameter, it is necessary to detect whether the global parameter identifier in the conflict identifier conflicts with the global parameter identifier set by the current test platform.

步骤203,检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识冲突时,检测当前时间与所述冲突标识中的标记时间的差值是否大于预设时间;Step 203, when detecting that the global parameter identifier in the conflict identifier conflicts with the global parameter identifier set by the current test platform, detect whether the difference between the current time and the marked time in the conflict identifier is greater than a preset time;

这里,检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识不冲突时,说明当前测试平台使用的全局参数与正在使用全局参数的测试平台使用的全局参数相同,则当前测试平台能复用所述全局参数,当前测试平台复用所述全局参数后,设置当前测试平台标识和修改所述标记时间后,执行所述测试用例,并在执行完毕所述测试用例之后,清除当前平台所设置的冲突标识,设置所述测试用例的用例执行标识的值为case flag=1;Here, when it is detected that the global parameter identifier in the conflict identifier does not conflict with the global parameter identifier set by the current test platform, it means that the global parameter used by the current test platform is the same as the global parameter used by the test platform that is using the global parameter. , then the current test platform can reuse the global parameters, after the current test platform reuses the global parameters, after setting the current test platform identifier and modifying the marking time, execute the test case, and after the execution of the test is completed After the use case, clear the conflict flag set by the current platform, and set the value of the use case execution flag of the test case to case flag=1;

检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识冲突时,说明当前测试平台使用的全局参数与正在使用全局参数的测试平台使用的全局参数不同,需要进一步检测当前时间减去所述冲突标识中的标记时间是否大于预设时间,这里预设时间用maxtimer表示,用于防止其他测试平台异常退出时,未清除其所设置的冲突标识,导致再有测试平台使用所述全局参数测试用例时,就不能使用所述全局参数。When it is detected that the global parameter identifier in the conflict identifier conflicts with the global parameter identifier set by the current test platform, it indicates that the global parameter used by the current test platform is different from the global parameter used by the test platform using the global parameter, and further steps are required. Detect whether the current time minus the marked time in the conflict flag is greater than the preset time, where the preset time is represented by maxtimer, which is used to prevent other test platforms from exiting abnormally, the conflict flag set by them is not cleared, resulting in more tests When the platform uses the global parameter test case, the global parameter cannot be used.

步骤204,检测到所述差值大于预设时间时,清除所述冲突标识,设置所述当前测试平台的冲突标识,并执行所述测试用例。Step 204 , when it is detected that the difference is greater than a preset time, the conflict flag is cleared, the conflict flag of the current test platform is set, and the test case is executed.

这里,检测到所述当前时间减去所述标记时间大于预设时间时,说明有测试平台执行完毕测试后,未正常清除其所设置的冲突标识,这时,需要清除所述冲突标识,并设置所述当前测试平台的冲突标识后,执行所述测试用例,并在执行完毕所述测试用例后,清除其所设置的冲突标识,设置所述测试用例的用例执行标识的值为case flag=1;检测到所述当前时间减去所述标记时间小于预设时间时,说明有测试平台在使用所述全局参数,则全局参数冲突,不允许当前测试平台修改所述全局参数,这里,需要退出执行所述测试用例,执行下一个测试用例。Here, when it is detected that the current time minus the marked time is greater than the preset time, it means that after the test platform has completed the test, the set conflict flag has not been cleared normally. At this time, the conflict flag needs to be cleared, and After setting the conflict flag of the current test platform, execute the test case, and after executing the test case, clear the conflict flag set by the test case, and set the value of the use case execution flag of the test case to case flag= 1; when it is detected that the current time minus the marked time is less than the preset time, it means that the test platform is using the global parameters, then the global parameters conflict, and the current test platform is not allowed to modify the global parameters, here, it is necessary to Exit execution of the test case and execute the next test case.

例如:测试平台A和测试平台B均在执行测试,其中,测试平台A正在执行一个测试用例,使用了全局参数P中的场景P1,则设置测试平台A的冲突标识为:P1:ENV1@TIME;测试平台B也执行到一个使用全局参数P的用例,如果测试平台B使用的是全局参数P中的场景P2,则说明全局参数P中的P1与P2冲突,需要在执行上述方法中的方法步骤203,检测当前时间减去所述冲突标识中的标记时间是否大于预设时间,若大于预设时间,则说明有测试平台在使用后,不清除其所设置的冲突标识,这里,需要清除所述冲突标识后,设置测试平台B的冲突标识,例如:P2:ENV2@TIME,并执行所述测试用例,并在执行完毕所述测试用例后,清除其所设置的冲突标识,并设置所述测试用例的用例执行标识的值为case flag=1;若小于预设时间,则当前测试平台B退出执行所述测试用例,执行下一个测试用例。For example: Test platform A and test platform B are both executing tests. Among them, test platform A is executing a test case and uses the scenario P1 in the global parameter P. Set the conflict identifier of test platform A as: P1:ENV1@TIME ; Test platform B also executes a use case that uses the global parameter P. If the test platform B uses the scene P2 in the global parameter P, it means that P1 in the global parameter P conflicts with P2, and the method in the above method needs to be executed. Step 203, detecting whether the marked time in the current time minus the conflict flag is greater than the preset time, if it is greater than the preset time, it means that there is a test platform in use, and the conflict flag set by it is not cleared. Here, it is necessary to clear After the conflict identification, set the conflict identification of test platform B, for example: P2:ENV2@TIME, and execute the test case, and after the execution of the test case is completed, clear the conflict identification set by it, and set all The value of the case execution flag of the test case is case flag=1; if it is less than the preset time, the current test platform B exits the execution of the test case and executes the next test case.

如果测试平台B使用的也是全局参数P中的场景P1,则测试平台B与测试平台A使用的全局参数相同,测试平台B可以复用所述全局参数,并设置测试平台B的冲突标识后,为:P1:ENV12@TIME,此时的TIME为测试平台B设置冲突标识的时间,执行所述测试用例。If the test platform B also uses the scene P1 in the global parameter P, the test platform B uses the same global parameters as the test platform A, and the test platform B can reuse the global parameters, and after setting the conflict flag of the test platform B, It is: P1: ENV12@TIME, the TIME at this time is the time when the conflict flag is set for the test platform B, and the test case is executed.

在本发明实施例中,解决全局参数冲突是在TCL脚本中编写OMCR服务器的参数控制命令,查询修改全局参数实现,具体地,OMCR服务器提供人工操作的图形用户界面(GUI,Graphical User Interface),以及提供Telnet远程登陆修改参数的方法,简化流程如下(仅作为示意):In the embodiment of the present invention, solving the global parameter conflict is to write the parameter control command of the OMCR server in the TCL script, and query and modify the global parameter implementation. Specifically, the OMCR server provides a graphical user interface (GUI, Graphical User Interface) for manual operation, And provide a method for Telnet remote login to modify parameters, the simplified process is as follows (only for illustration):

Figure BDA0001029552970000091
Figure BDA0001029552970000091

Figure BDA0001029552970000101
Figure BDA0001029552970000101

在本发明实施例中,测试循环标识ALL flag和用例执行标识case flag可以在执行有全局参数的用例时使用,也可以在没有全局参数的用例时使用,在此并不限制。通过用例循环执行以及全局参数冲突时的解决方法,可以在全局参数发生冲突时,无需人工干预,完全实现自动化检测,极大程度地提高了测试效率。In this embodiment of the present invention, the test loop flag ALL flag and the use case execution flag case flag may be used when a use case with global parameters is executed, or may be used when a use case without global parameters is executed, which is not limited herein. Through the use case loop execution and the solution when the global parameters conflict, when the global parameters conflict, the automatic detection can be completely realized without manual intervention, which greatly improves the test efficiency.

图3为本发明实施例中执行测试用例的装置组成示意图;如图3所示,所述装置包括:第一检测单元301、第二检测单元302、第三检测单元303、第四检测单元304和执行单元305,其中,FIG. 3 is a schematic diagram of the composition of an apparatus for executing a test case in an embodiment of the present invention; as shown in FIG. 3 , the apparatus includes: a first detection unit 301 , a second detection unit 302 , a third detection unit 303 , and a fourth detection unit 304 and execution unit 305, where,

所述第一检测单元301,用于检测所述测试用例中的冲突标识是否为空;The first detection unit 301 is configured to detect whether the conflict identifier in the test case is empty;

所述第二检测单元302,用于所述第一检测单元301检测到所述测试用例中的冲突标识不为空时,检测所述冲突标识中的测试平台标识与所述当前测试平台标识是否相同;The second detection unit 302 is configured to detect whether the test platform identification in the conflict identification and the current test platform identification are not empty when the first detection unit 301 detects that the conflict identification in the test case is not empty. same;

所述第三检测单元303,用于所述第二检测单元302检测到所述冲突标识中的测试平台标识与所述当前测试平台标识不相同时,检测所述冲突标识中的全局参数标识与当前测试平台所设置的全局参数标识是否冲突;The third detection unit 303 is used for the second detection unit 302 to detect that the test platform identification in the conflict identification is different from the current test platform identification, and detect that the global parameter identification in the conflict identification is the same as that of the current test platform identification. Whether the global parameter identifiers set by the current test platform conflict;

所述第四检测单元304,用于所述第三检测单元303检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识冲突时,检测当前时间减去所述冲突标识中的标记时间是否大于预设时间;The fourth detection unit 304 is configured to detect that the current time minus the Whether the marking time in the conflict flag is greater than the preset time;

所述执行单元305,用于所述第四检测单元304检测到所述当前时间减去所述标记时间大于预设时间时,清除所述冲突标识,并设置所述当前测试平台的冲突标识后,执行所述测试用例。The execution unit 305 is configured to clear the conflict flag when the fourth detection unit 304 detects that the current time minus the marked time is greater than the preset time, and set the conflict flag of the current test platform. , execute the test case.

这里,在图3所示的装置基础上,所述装置还包括第五检测单元、第六检测单元、触发单元、循环测试单元、退出单元和清除单元,其中,所述第五检测单元、第六检测单元、触发单元、循环测试单元、退出单元和清除单元在图中均未示出;第一检测单元301检测所述测试用例中的冲突标示是否为空之前,先要由第五检测单元检测测试用例池中的循环测试标识的值是否是预设值;这里循环测试标识为ALL flag,预设值为1,当第五检测单元检测到测试用例池中的循环测试标识ALL flag的值是预设值1时,说明测试用例池中的用例已全部测试完毕,则由循环测试单元停止对所述测试用例池中的测试用例的测试,并输出测试报告;当第五检测单元检测到测试用例池中的循环测试标识ALL flag的值不是预设值1,而是ALL flag=0时,则说明在测试用例池中有未执行完测试的用例,循环测试单元会循环测试所述测试用例池中的循环测试标识的值是否是预设值,并由第六检测单元检测测试用例池中未执行的测试用例执行标识的值是否是预设值,这里用例执行标识为case flag,预设值为1;当第六检测单元检测到测试用例的用例执行标识case flag的值是预设值1时,说明该测试用例已执行完毕,则由执行用例单元停止执行所述测试用例,执行下一个测试用例;当第六检测单元检测到所述测试用例的用例执行标识case flag的值不是预设值1,而是case flag=0时,说明所述测试用例未执行测试,则由执行单元305对所述测试用例执行测试。Here, on the basis of the device shown in FIG. 3 , the device further includes a fifth detection unit, a sixth detection unit, a trigger unit, a loop test unit, an exit unit and a clearing unit, wherein the fifth detection unit, the sixth detection unit The six detection units, trigger unit, loop test unit, exit unit and clearing unit are not shown in the figure; before the first detection unit 301 detects whether the conflict flag in the test case is empty, the fifth detection unit Detect whether the value of the loop test flag in the test case pool is a preset value; here the loop test flag is ALL flag, and the default value is 1. When the fifth detection unit detects the value of the loop test flag ALL flag in the test case pool When it is the default value of 1, it means that all the test cases in the test case pool have been tested, and the loop test unit stops the test of the test cases in the test case pool, and outputs the test report; when the fifth detection unit detects When the value of the ALL flag of the loop test flag in the test case pool is not the default value of 1, but ALL flag=0, it means that there are test cases in the test case pool that have not been executed, and the loop test unit will test the test in a loop Whether the value of the loop test flag in the use case pool is a preset value, and the sixth detection unit detects whether the value of the test case execution flag that is not executed in the test case pool is a preset value. Set the value to 1; when the sixth detection unit detects that the value of the case flag of the case flag of the test case is the default value of 1, it means that the test case has been executed, and the execution case unit stops executing the test case and executes the The next test case; when the sixth detection unit detects that the value of the case flag case flag of the test case execution identifier is not the default value 1, but case flag=0, it means that the test case does not perform the test, then the execution Unit 305 executes tests on the test cases.

这里的循环测试标识ALL flag和用例执行标识case flag均可由ATPI自动生成的新的运行列表latest Run List生成,并将生成的ALL flag和case flag按固定格式保存到固定地方供测试用例时修改和查询。具体地,在执行测试用例前,由第五检测单元检测循环测试标识ALL flag的值是否为预设值1,以及由第六检测单元检测用例执行标识case flag的值是否为预设值1,可通过TCL用例脚本进行检测。具体TCL用例脚本语言的控制流程如下:The cycle test identifier ALL flag and the case execution identifier case flag can be generated by the new run list latest Run List automatically generated by ATPI, and the generated ALL flag and case flag are saved in a fixed format to a fixed place for modification and modification of test cases. Inquire. Specifically, before executing the test case, the fifth detection unit detects whether the value of the loop test flag ALL flag is the preset value 1, and the sixth detection unit detects whether the value of the case flag case flag is the preset value 1, Detection can be done through TCL use case scripts. The control flow of the specific TCL use case scripting language is as follows:

Figure BDA0001029552970000111
Figure BDA0001029552970000111

需要说明的是,该控制流程仅为该TCL用例脚本语音的简化控制流程,仅作为一实现示例。It should be noted that the control flow is only a simplified control flow of the script voice of the TCL use case, and is only an implementation example.

执行单元305在对所述测试用例执行测试时,首先,由触发单元触发第一检测单元301检测所述测试用例中的冲突标识是否为空,若第一检测单元301检测到所述测试用例中的冲突标识为空时,则说明没有测试平台在使用全局参数,当前测试平台可以使用所述全局参数,由执行用例单元设置当前测试平台的冲突标识,执行所述测试用例。执行用例单元执行完毕所述测试用例后,告之清除单元,由清除单元清除所述冲突标识,并设置所述测试用例的用例执行标识的值为预设值:case flag=1;When the execution unit 305 executes the test on the test case, first, the trigger unit triggers the first detection unit 301 to detect whether the conflict flag in the test case is empty, if the first detection unit 301 detects that the test case is in the When the conflict flag is empty, it means that no test platform is using the global parameters, the current test platform can use the global parameters, and the execution use case unit sets the conflict flag of the current test platform to execute the test case. After the execution use case unit finishes executing the test case, it informs the clearing unit, and the clearing unit clears the conflict flag, and sets the value of the test case execution flag of the test case to a default value: case flag=1;

若第一检测单元301检测到所述测试用例中的冲突标识不为空时,说明有测试平台在使用所述全局参数,当前测试平台不能直接使用所述全局参数,这时,需要第二检测单元302检测所述冲突标识中的测试平台标识与所述当前测试平台标识是否相同。第二检测单元302检测到所述冲突标识中的测试平台标识与所述当前测试平台标识相同时,说明所述测试平台在上次执行完测试用例后,未正常清除其所设置的冲突标识,这时,所述执行单元305只需更新所述冲突标识中的全局参数标识和所述标记时间,在更新完毕之后,执行所述测试用例,并在执行完毕所述测试用例后,告之清除单元,由清除单元清除其所设置的冲突标识,并设置所述测试用例的用例执行标识的值为case flag=1;If the first detection unit 301 detects that the conflict flag in the test case is not empty, it means that a test platform is using the global parameters, and the current test platform cannot directly use the global parameters. In this case, a second detection is required. The unit 302 detects whether the test platform identification in the conflict identification is the same as the current test platform identification. When the second detection unit 302 detects that the test platform identification in the conflict identification is the same as the current test platform identification, it means that the test platform has not normally cleared the conflict identification set by the test platform after executing the test case last time, At this time, the execution unit 305 only needs to update the global parameter identifier and the marked time in the conflict identifier, execute the test case after the update is completed, and notify the clearing after the test case is executed. unit, the clearing unit clears the conflict flag set by it, and sets the value of the test case execution flag of the test case as case flag=1;

若第二检测单元302检测到所述冲突标识中的测试平台标识与所述当前测试平台标识不相同时,说明有测试平台已修改后所述全局参数,并且正在使所述全局参数下的环境,当前测试平台不能直接使用所述全局参数,这时需要第三检测单元303检测所述冲突标识中的全局参数标识与当前测试平台所设置的全局参数标识是否冲突。第三检测单元303检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识不冲突时,说明当前测试平台使用的全局参数与正在使用全局参数的测试平台使用的全局参数相同,则当前测试平台能复用所述全局参数,当前测试平台复用所述全局参数后,由执行单元305设置当前测试平台标识和修改所述标记时间后,执行所述测试用例,并在执行完毕所述测试用例之后,告之所述清除单元,清除单元清除当前测试平台所设置的冲突标识后,设置所述测试用例的用例执行标识的值为case flag=1;If the second detection unit 302 detects that the test platform identification in the conflict identification is not the same as the current test platform identification, it indicates that the global parameter after the test platform has been modified, and the environment under the global parameter is being changed. , the current test platform cannot directly use the global parameter, at this time, the third detection unit 303 is required to detect whether the global parameter identifier in the conflict identifier conflicts with the global parameter identifier set by the current test platform. When the third detection unit 303 detects that the global parameter identifier in the conflict identifier does not conflict with the global parameter identifier set by the current test platform, it indicates that the global parameter used by the current test platform is the same as the one used by the test platform that is using the global parameter. If the global parameters are the same, the current test platform can reuse the global parameters. After the current test platform reuses the global parameters, the execution unit 305 sets the current test platform identifier and modifies the marked time, and then executes the test case, And after the test case is executed, the clearing unit is notified, and after the clearing unit clears the conflict flag set by the current test platform, the value of the use case execution flag of the test case is set as case flag=1;

第三检测单元303检测到所述冲突标识中的全局参数标识与所述当前测试平台所设置的全局参数标识冲突时,说明当前测试平台使用的全局参数与正在使用全局参数的测试平台使用的全局参数不同,需要由第四检测单元304检测当前时间减去所述冲突标识中的标记时间是否大于预设时间,这里预设时间用maxtimer,表示,用于防止其他测试平台异常退出时,未清除其所设置的冲突标识,导致再有测试平台使用所述全局参数测试用例时,就不能使用所述全局参数。When the third detection unit 303 detects that the global parameter identifier in the conflict identifier conflicts with the global parameter identifier set by the current test platform, it explains the global parameter used by the current test platform and the global parameter used by the test platform that is using the global parameter. The parameters are different, and the fourth detection unit 304 needs to detect whether the current time minus the marked time in the conflict flag is greater than the preset time, where the preset time is represented by maxtimer, which is used to prevent other test platforms from exiting abnormally, not cleared The conflict flag set by it causes that when another test platform uses the global parameter test case, the global parameter cannot be used.

所述第四检测单元304检测到所述当前时间减去所述标记时间大于预设时间时,说明有测试平台执行完毕测试后,未正常清除其所设置的冲突标识,这时,需要清除单元清除所述冲突标识,并在所述清除单元清除所述冲突标识后,由执行单元305设置所述当前测试平台的冲突标识,并执行所述测试用例,在执行单元305执行完毕所述测试用例后,告之清除单元,由清除单元清除其所设置的冲突标识后,设置所述测试用例的用例执行标识的值为case flag=1;When the fourth detection unit 304 detects that the current time minus the marked time is greater than the preset time, it means that after the test platform has completed the test, the set conflict flag is not cleared normally. At this time, a clearing unit is required. Clear the conflict identification, and after the clearing unit clears the conflict identification, the execution unit 305 sets the conflict identification of the current test platform, and executes the test case, and the execution unit 305 completes the execution of the test case Then, inform the clearing unit, after clearing the conflict flag set by the clearing unit, set the value of the test case execution flag of the test case as case flag=1;

第四检测单元304检测到所述当前时间减去所述标记时间小于预设时间时,说明有测试平台在使用所述全局参数,则全局参数冲突,不允许当前测试平台修改所述全局参数,这时,需要由退出单元退出执行所述测试用例,并由执行单元305执行下一个测试用例。When the fourth detection unit 304 detects that the current time minus the marked time is less than the preset time, it indicates that a test platform is using the global parameters, then the global parameters conflict, and the current test platform is not allowed to modify the global parameters, At this time, the exit unit needs to exit the execution of the test case, and the execution unit 305 executes the next test case.

在本发明实施例中,所述冲突标识用例如,P1:EVN1@TIME表示,包括:全局参数标识、平台标识和标记时间;其中,所述全局参数标识,是指使用全局参数中的具体哪个参数,例如,可以设置为P1或者P2;所述平台标示,是指每个测试平台的编号,例如测试平台1设为ENV1,测试平台2设为ENV2;所述标记时间,是指测试平台设置全局参数的时间,设为TIME;In the embodiment of the present invention, the conflict identifier is represented by, for example, P1:EVN1@TIME, including: a global parameter identifier, a platform identifier, and a marking time; wherein, the global parameter identifier refers to which of the global parameters is used. The parameter, for example, can be set to P1 or P2; the platform label refers to the number of each test platform, for example, test platform 1 is set to ENV1, and test platform 2 is set to ENV2; the marking time refers to the test platform setting The time of the global parameter, set to TIME;

解决全局参数冲突是在TCL脚本中编写OMCR服务器的参数控制命令,查询修改全局参数实现,具体,OMCR服务器提供人工操作的图形用户界面(GUI,Graphical UserInterface),以及提供Telnet远程登陆修改参数的方法,简化流程如下(仅作为示意):Solving global parameter conflicts is to write the parameter control commands of the OMCR server in the TCL script, query and modify the global parameters to achieve, specifically, the OMCR server provides a graphical user interface (GUI, Graphical UserInterface) for manual operation, and provides Telnet remote login methods to modify parameters , the simplified process is as follows (only for illustration):

Figure BDA0001029552970000131
Figure BDA0001029552970000131

Figure BDA0001029552970000141
Figure BDA0001029552970000141

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including but not limited to disk storage, optical storage, and the like.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装所设置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising the arrangement of the instructions, The instruction means implements the functions specified in the flow or flows of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.

Claims (16)

1. A method of executing test cases, the method comprising:
detecting whether a test platform identifier in a conflict identifier is the same as a current test platform identifier or not when detecting that the conflict identifier in the test case is not empty;
when detecting that the test platform identification in the conflict identification is different from the current test platform identification, detecting whether the global parameter identification in the conflict identification conflicts with the global parameter identification set by the current test platform;
when detecting that the global parameter identification in the conflict identification conflicts with the global parameter identification set by the current test platform, detecting whether the difference value between the current time and the marking time in the conflict identification is greater than the preset time;
and when the difference value is detected to be larger than the preset time, clearing the conflict identification, setting the conflict identification of the current test platform, and executing the test case.
2. The method of claim 1, further comprising:
and when detecting that the global parameter identification in the conflict identification does not conflict with the global parameter identification set by the current test platform, multiplexing the global parameter, adding the current test platform identification in the conflict identification, modifying the marking time in the conflict identification, and executing the test case.
3. The method of claim 1, further comprising:
and when detecting that the test platform identification in the conflict identification is the same as the current test platform identification, updating the global parameter identification and the marking time in the conflict identification, and executing the test case.
4. The method of claim 1, further comprising:
and setting the conflict identifier of the current test platform and executing the test case when the conflict identifier in the test case is detected to be null.
5. The method of claim 1, wherein after the test case is executed, the method further comprises:
and clearing the conflict mark of the current test platform, and setting the value of the use case execution mark of the test case as a preset value.
6. The method of claim 1, wherein before the detecting that the conflicting identifications in the test case are not empty, the method further comprises:
detecting whether the value of the use case execution identifier of the test case is a preset value;
when detecting that the value of the case execution identifier of the test case is a preset value, stopping executing the current test case, and checking and executing the next test case;
and triggering and detecting whether the conflict mark in the test case is empty or not when the value of the case execution mark of the test case is detected to be a non-preset value.
7. The method of claim 6, wherein the test case is disposed in a test case pool, and before detecting whether a value of a case execution identifier of the test case is a preset value, the method further comprises:
detecting whether the value of the cyclic test identifier of the test case pool is a preset value;
stopping testing the test cases in the test case pool when detecting that the value of the cyclic test identifier is a preset value;
and when the value of the cyclic test identifier is detected to be a non-preset value, detecting whether the value of the cyclic test identifier in the test case pool is a preset value, and detecting whether the value of the case execution identifier of the unexecuted test case in the test case pool is a preset value.
8. The method of claim 1, further comprising:
and when the difference is detected to be smaller than the preset time, quitting the execution of the test case and detecting the next test case.
9. An apparatus for executing test cases, the apparatus comprising:
a first detection unit, a second detection unit, a third detection unit, a fourth detection unit and an execution unit, wherein,
the first detection unit is used for detecting whether the conflict mark in the test case is empty or not;
the second detection unit is configured to detect whether a test platform identifier in the conflict identifier is the same as a current test platform identifier when the first detection unit detects that the conflict identifier in the test case is not empty;
the third detection unit is configured to detect whether a global parameter identifier in the conflict identifier conflicts with a global parameter identifier set by the current test platform when the second detection unit detects that the test platform identifier in the conflict identifier is different from the current test platform identifier;
the fourth detection unit is configured to detect whether a difference between current time and a marking time in the conflict identifier is greater than a preset time when the third detection unit detects that a global parameter identifier in the conflict identifier conflicts with a global parameter identifier set by the current test platform;
and the execution unit is used for clearing the conflict identifier, setting the conflict identifier of the current test platform and executing the test case when the fourth detection unit detects that the difference value is greater than the preset time.
10. The apparatus according to claim 9, wherein the execution unit is further configured to, when the third detection unit detects that the global parameter identifier in the conflict identifier does not conflict with the global parameter identifier set by the current test platform, multiplex a global parameter, add a current test platform identifier in the conflict identifier, and modify the marking time, and then execute the test case.
11. The apparatus according to claim 9, wherein the execution unit is further configured to, when the second detection unit detects that the platform id in the conflicting ids is the same as the current platform id, update the global parameter id and the tag time in the conflicting ids, and execute the test case.
12. The apparatus according to claim 9, wherein the execution unit is further configured to set the collision identifier of the current test platform and execute the test case when the first detection unit detects that the collision identifier in the test case is empty.
13. The apparatus of claim 9, further comprising:
and the clearing unit is used for clearing the conflict identifier of the current test platform after the execution of the test case by the execution unit is finished, and setting the value of the case execution identifier of the test case as a preset value.
14. The apparatus of claim 9, further comprising:
a fifth detection unit and a trigger unit; wherein
The fifth detecting unit is configured to detect whether a value of the use case execution identifier of the test case is a preset value;
the execution unit is further configured to, when the fifth detection unit detects that the value of the case execution identifier of the test case is a preset value, stop executing the current test case, check and execute the next test case;
the triggering unit is specifically configured to trigger the first detecting unit to detect whether the conflict flag in the test case is empty when the fifth detecting unit detects that the value of the case execution flag of the test case is not the preset value.
15. The apparatus of claim 14, wherein the test cases are located in a test case pool, the apparatus further comprising: a sixth detection unit and a cycle test unit; wherein,
the sixth detection unit is configured to detect whether a value of the cyclic test flag in the test case pool is a preset value;
the cycle test unit is used for stopping the test of the test cases in the test case pool when the sixth detection unit detects that the value of the cycle test identifier is a preset value;
when the sixth detection unit detects that the value of the cyclic test identifier is not a preset value, it is detected whether the value of the cyclic test identifier in the test case pool is a preset value, and the fifth detection unit detects whether the value of the case execution identifier of the unexecuted test case in the test case pool is a preset value.
16. The apparatus of claim 9, further comprising:
and the quitting unit is used for quitting the execution of the test case and detecting the next test case when the difference value detected by the fourth detection unit is less than the preset time.
CN201610474807.8A 2016-06-24 2016-06-24 Method and device for executing test case Active CN107544899B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610474807.8A CN107544899B (en) 2016-06-24 2016-06-24 Method and device for executing test case
PCT/CN2017/087245 WO2017219851A1 (en) 2016-06-24 2017-06-06 Method and apparatus for executing test case, and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610474807.8A CN107544899B (en) 2016-06-24 2016-06-24 Method and device for executing test case

Publications (2)

Publication Number Publication Date
CN107544899A CN107544899A (en) 2018-01-05
CN107544899B true CN107544899B (en) 2020-04-24

Family

ID=60783875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610474807.8A Active CN107544899B (en) 2016-06-24 2016-06-24 Method and device for executing test case

Country Status (2)

Country Link
CN (1) CN107544899B (en)
WO (1) WO2017219851A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908543A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Applied program testing method, device, computer equipment and storage medium
CN108255718A (en) * 2018-01-11 2018-07-06 郑州云海信息技术有限公司 A kind of method for being multiplexed software use-case
TWI650710B (en) * 2018-04-12 2019-02-11 和碩聯合科技股份有限公司 Test process detection method
CN111309627B (en) * 2020-03-08 2022-11-29 苏州浪潮智能科技有限公司 Method and system for preventing test conflict in software test

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003099285A (en) * 2001-09-25 2003-04-04 Toshiba Corp Method and apparatus for generating test case related to function conflict, and program therefor
US7865793B2 (en) * 2008-04-30 2011-01-04 International Business Machines Corporation Test case generation with backward propagation of predefined results and operand dependencies
CN103049334A (en) * 2012-12-14 2013-04-17 华为技术有限公司 Task processing method and virtual machine
CN103365776A (en) * 2013-06-28 2013-10-23 中国科学院计算技术研究所 Parallel system weak consistency verifying method and system based on deterministic replay
CN103365720A (en) * 2012-03-28 2013-10-23 国际商业机器公司 Method and system for dynamically adjusting global heap allocation in multithreading environment
CN105138310A (en) * 2015-07-17 2015-12-09 北京京东尚科信息技术有限公司 Concurrent access control method and system
CN105373469A (en) * 2014-08-25 2016-03-02 广东金赋信息科技有限公司 Interface based software automation test method
CN105511951A (en) * 2016-01-06 2016-04-20 上海斐讯数据通信技术有限公司 Task scheduling method and task scheduling system for automatic WIFI performance test platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078699A1 (en) * 2002-09-18 2004-04-22 Thompson Ryan C. System for preventing translation lookaside buffer conflicts when generating and merging computer architecture test cases

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003099285A (en) * 2001-09-25 2003-04-04 Toshiba Corp Method and apparatus for generating test case related to function conflict, and program therefor
US7865793B2 (en) * 2008-04-30 2011-01-04 International Business Machines Corporation Test case generation with backward propagation of predefined results and operand dependencies
CN103365720A (en) * 2012-03-28 2013-10-23 国际商业机器公司 Method and system for dynamically adjusting global heap allocation in multithreading environment
CN103049334A (en) * 2012-12-14 2013-04-17 华为技术有限公司 Task processing method and virtual machine
CN103365776A (en) * 2013-06-28 2013-10-23 中国科学院计算技术研究所 Parallel system weak consistency verifying method and system based on deterministic replay
CN105373469A (en) * 2014-08-25 2016-03-02 广东金赋信息科技有限公司 Interface based software automation test method
CN105138310A (en) * 2015-07-17 2015-12-09 北京京东尚科信息技术有限公司 Concurrent access control method and system
CN105511951A (en) * 2016-01-06 2016-04-20 上海斐讯数据通信技术有限公司 Task scheduling method and task scheduling system for automatic WIFI performance test platform

Also Published As

Publication number Publication date
WO2017219851A1 (en) 2017-12-28
CN107544899A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN107544899B (en) Method and device for executing test case
KR101722897B1 (en) Method and apparatus for analyzing cause of link failure
RU2019106527A (en) METHOD AND DEVICE FOR RADIO RESOURCE MANAGEMENT
US20240244462A1 (en) Information processing method and apparatus
CN103875213A (en) Network device performance testing method, terminals, management device and system
US20170238168A1 (en) User Equipment Management Method, Device, and System
EP2981132A1 (en) Communication device and handover control method in radio communication system
CN114208280B (en) RRC reconfiguration during conditional handover
US20170222782A1 (en) Method and device for secondary base station change in dual connectivity system
CN103379446A (en) Multi-terminal control method and device based on wifi
WO2018036244A1 (en) Data analysis method, apparatus and device, and storage medium
US10050836B2 (en) Methods and apparatuses for function coordination control
US9985862B2 (en) MEP configuration method and network device
US12507091B2 (en) Testing in 5G SA communication network
CN101902771B (en) System and method for realizing M2M terminal test and M2M test platform
CN107193726A (en) A kind of terminal concurrence method of testing and device
US10904852B2 (en) Method for positioning pico remote radio unit and system for positioning pico remote radio unit
CN105447389A (en) Vulnerability location and rapid reproduction based on Peach platform
CN107295540B (en) Network element configuration method and device
CN113784382A (en) Base station testing method and device, electronic equipment and storage medium
CN114944987B (en) A method for real-time updating of operating parameters of communication equipment and communication equipment
CN121548978A (en) Distributed partitioned model monitoring method
CN105101242A (en) Call automated testing implementation method
CN119011397A (en) Network element upgrading method, device, equipment, storage medium and program product
US20200412620A1 (en) Wireless configuration diagnosis framework

Legal Events

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