CN108075911B - A service testing method and device - Google Patents
A service testing method and device Download PDFInfo
- Publication number
- CN108075911B CN108075911B CN201610999759.4A CN201610999759A CN108075911B CN 108075911 B CN108075911 B CN 108075911B CN 201610999759 A CN201610999759 A CN 201610999759A CN 108075911 B CN108075911 B CN 108075911B
- Authority
- CN
- China
- Prior art keywords
- test
- service
- message
- identification field
- transaction message
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 285
- 238000004519 manufacturing process Methods 0.000 claims abstract description 60
- 238000000034 method Methods 0.000 claims abstract description 49
- 238000012545 processing Methods 0.000 claims description 38
- 230000008569 process Effects 0.000 description 33
- 238000010586 diagram Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 9
- 238000004590 computer program Methods 0.000 description 8
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000012423 maintenance Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000010998 test method Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
- H04L41/5003—Managing SLA; Interaction between SLA and QoS
- H04L41/5009—Determining service level performance parameters or violations of service level contracts, e.g. violations of agreed response time or mean time between failures [MTBF]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本发明涉及业务支撑技术领域,尤其涉及一种业务测试方法和装置。The present invention relates to the technical field of service support, in particular to a service testing method and device.
背景技术Background technique
在电信领域,随着业务的快速发展,IT支撑系统面临着大量的业务需求和变更上线工作。In the field of telecommunications, with the rapid development of business, IT support systems are faced with a large number of business requirements and changes to go online.
当前,业务支撑系统在快速迭代上线的过程中,为了保障上线质量和系统的稳定性,需要建立一套与生产环境一致的测试环境,进行程序正确性和高效性的验证。目前业务测试的流程大致为:S1、测试环境接收发布的新程序;S2、在测试环境中导入部分生产数据(业务数据+局数据);S3、按照测试案例进行业务测试;S4、记录测试结果;S5、评估测试过程正常后,在生产系统进行上线和测试;S6、生产系统完成上线工作,具体可参考图1所示的流程图。At present, in the process of rapid iterative launch of the business support system, in order to ensure the online quality and system stability, it is necessary to establish a test environment consistent with the production environment to verify the correctness and efficiency of the program. The current business test process is roughly as follows: S1, the test environment receives the new program released; S2, imports some production data (business data + bureau data) in the test environment; S3, conducts business tests according to the test case; S4, records the test results ; S5, after the evaluation and testing process is normal, go online and test in the production system; S6, the production system completes the online work, for details, please refer to the flowchart shown in FIG. 1 .
图1所示的测试流程是一种理想化的测试模式,要求测试环境虽然与生产环境理论上是完全一致的,但是在实际的测试过程中,无论从环境搭建过程还是系统运行负载,二者都是有区别的。测试环境中的测试案例无法完全覆盖生产与测试之间的差异变量,可能会导致还没有经过严格质量验证的程序发布到生产系统,导致无法估量的损失。The test process shown in Figure 1 is an ideal test mode, which requires that although the test environment is theoretically the same as the production environment, in the actual test process, no matter from the environment construction process or the system operation load, the two All are different. The test cases in the test environment cannot completely cover the difference variables between production and testing, which may lead to the release of programs that have not undergone rigorous quality verification to the production system, resulting in immeasurable losses.
因此,如何减小因测试环境与实际生产环境的差异导致的未能发现系统问题而带来的损失,提高业务上线的稳定性是亟待解决的技术问题之一。Therefore, how to reduce the loss caused by the failure to find system problems caused by the difference between the test environment and the actual production environment, and how to improve the stability of business online is one of the technical problems to be solved urgently.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种业务测试方法和装置,用以解决现有技术中因测试环境与实际生产环境的差异导致的未能发现系统问题而带来的损失,业务上线稳定性不高等问题。Embodiments of the present invention provide a service testing method and device, which are used to solve the problems in the prior art caused by failure to find system problems due to differences between the testing environment and the actual production environment, and low stability of service online.
本发明实施例提供一种业务测试方法,包括:An embodiment of the present invention provides a service testing method, including:
在实际生产环境中运行添加了标识字段的交易报文,所述标识字段用于指示所述交易报文是否为测试报文;Running the transaction message with the identification field added in the actual production environment, and the identification field is used to indicate whether the transaction message is a test message;
如果根据所述标识字段确定出所述交易报文为测试报文,则按照预设测试规则对各测试业务进行测试。If it is determined according to the identification field that the transaction message is a test message, each test service is tested according to a preset test rule.
本发明实施例提供一种业务测试装置,包括:An embodiment of the present invention provides a service testing device, including:
运行单元,用于在实际生产环境中运行添加了标识字段的交易报文,所述标识字段用于指示所述交易报文是否为测试报文;a running unit, configured to run a transaction message with an identification field added in an actual production environment, and the identification field is used to indicate whether the transaction message is a test message;
测试单元,用于如果根据所述标识字段确定出所述交易报文为测试报文,则按照预设测试规则对各测试业务进行测试。The testing unit is configured to test each test service according to a preset test rule if it is determined that the transaction message is a test message according to the identification field.
本发明有益效果包括:The beneficial effects of the present invention include:
本发明实施例提供的业务测试方法和装置,在实际生产环境中运行添加了标识字段的交易报文,其中,所述标识字段用于指示所述交易报文是否为测试报文;如果根据所述标识字段确定出所述交易报文为测试报文,则按照预设测试规则对各测试业务进行测试,本发明提供的测试方法直接将测试报文在实际生产环境中运行及对各测试业务进行测试,实现了将测试环境与实际生产环境的差异降低到零,提高了各测试业务上线后的准确性和稳定性,降低了因测试环境与实际生产环境的差异导致的未能发现系统问题而带来的损失。The service testing method and device provided by the embodiments of the present invention run a transaction message added with an identification field in an actual production environment, wherein the identification field is used to indicate whether the transaction message is a test message; The identification field determines that the transaction message is a test message, then each test service is tested according to the preset test rules, and the test method provided by the present invention directly runs the test message in the actual production environment and tests each test service. Carry out tests to reduce the difference between the test environment and the actual production environment to zero, improve the accuracy and stability of each test business after the launch, and reduce the failure to find system problems caused by the difference between the test environment and the actual production environment. resulting losses.
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description, claims, and drawings.
附图说明Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本发明的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described herein are used to provide further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached image:
图1为现有技术中所采用的业务测试方法的实施流程示意图;Fig. 1 is the implementation flow schematic diagram of the business testing method adopted in the prior art;
图2为本发明实施例提供的业务测试方法的实施流程示意图;2 is a schematic diagram of an implementation flow of a service testing method provided by an embodiment of the present invention;
图3为本发明实施例提供的业务上线方法的实施流程示意图;3 is a schematic diagram of an implementation flow of a service online method provided by an embodiment of the present invention;
图4a为本发明实施例提供的测试业务拆分为原子业务后进行业务测试的示意图;4a is a schematic diagram of performing a service test after a test service provided by an embodiment of the present invention is split into atomic services;
图4b为本发明实施例提供的测试业务拆分为原子业务的示意图;4b is a schematic diagram of splitting a test service provided by an embodiment of the present invention into atomic services;
图5为本发明实施例提供的业务测试装置的结构示意图。FIG. 5 is a schematic structural diagram of a service testing apparatus provided by an embodiment of the present invention.
具体实施方式Detailed ways
本发明实施例提供一种业务测试方法和装置,用以降低现有技术中因测试环境与实际生产环境的差异导致的未能发现系统问题而带来的损失,提高业务上线的稳定性。Embodiments of the present invention provide a service testing method and device, which are used to reduce losses caused by failure to find system problems due to differences between the testing environment and the actual production environment in the prior art, and improve the stability of service online.
以下结合说明书附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明,并且在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, but not to limit the present invention, and in the case of no conflict, the present invention The embodiments in and features in the embodiments can be combined with each other.
实施例一Example 1
如图2所示,为本发明实施例提供的业务测试方法的实施流程示意图,可以包括以下步骤:As shown in FIG. 2, it is a schematic diagram of the implementation process of the service testing method provided by the embodiment of the present invention, which may include the following steps:
S21、在实际生产环境中运行添加了标识字段的交易报文。S21. Run the transaction message to which the identification field is added in the actual production environment.
具体实施时,所述标识字段用于指示所述交易报文是否为测试报文。由于在生成环境中的报文格式一般采用xml格式或json格式,为了能够在原有交易报文中添加标识字段,需要修改生成报文协议,例如,增加<Testflag>1</Testflag>,或者<Testflag,1>字段,增加上述字段后,对上述标识字段Testflag进行赋值,如Testflag=0或Testflag=1,且系统可以预先定义Testflag=1为测试报文,则Testflag=0为生产报文,或者定义Testflag=0为测试报文;Testflag=1为生产报文。用户可以根据实际生产环境自行定义,本发明实施例对此不进行限定。为了描述方便,本发明实施例以Testflag=1为测试报文,则Testflag=0为生产报文为例进行说明。During specific implementation, the identification field is used to indicate whether the transaction packet is a test packet. Since the message format in the generation environment is generally in xml format or json format, in order to add the identification field to the original transaction message, it is necessary to modify the generated message protocol, for example, add <Testflag>1</Testflag>, or <Testflag>1</Testflag> Testflag, 1> field, after adding the above fields, assign value to the above identification field Testflag, such as Testflag=0 or Testflag=1, and the system can pre-define Testflag=1 as a test message, then Testflag=0 is a production message, Or define Testflag=0 as a test message; Testflag=1 as a production message. Users can define themselves according to the actual production environment, which is not limited in this embodiment of the present invention. For the convenience of description, the embodiment of the present invention takes Testflag=1 as a test packet and Testflag=0 as a production packet as an example for description.
S22、根据所述标识字段,判断添加了标识字段的交易报文是否为测试报文,如果是,则执行步骤S23;否则,执行步骤S24。S22. According to the identification field, determine whether the transaction message to which the identification field is added is a test message, and if so, execute step S23; otherwise, execute step S24.
根据步骤S21中定义的Testflag=1为测试报文为了进行说明,如果判断出所述交易报文添加的标识字段Testflag=1,则确定该交易报文为测试报文,则执行步骤S23;如果判断出所述交易报文添加的标识字段Testflag=0,则确定该交易报文为生产报文,则执行步骤S24。According to Testflag=1 defined in step S21, it is a test message. For illustration, if it is determined that the identification field Testflag=1 added to the transaction message is determined, the transaction message is determined to be a test message, and then step S23 is executed; if If it is judged that the flag field Testflag added to the transaction message is equal to 0, it is determined that the transaction message is a production message, and step S24 is executed.
S23、按照预设测试规则对各测试业务进行测试。S23. Test each test service according to a preset test rule.
具体实施时,由于生产环境中测试业务有很多,其测试业务处理逻辑也相应不同,如有查询话费业务、充值缴费业务、查询套餐业务等,每一测试业务中包含的处理流程也有很大区别,但每一测试业务都有自己的处理逻辑,例如,查询话费业务,以拨打10086查询话费余额为例进行说明,首先要获知要查询话费业务的电话号码;再根据该电话号码,调用该电话号码的账单;最后将账单以短信形式发送给用户,供用户参考。因此,在对测试报文进行业务测试时,需要将测试报文流转该测试业务的包含的每一流程,直至测试报文流转到该测试业务的最后一个流程,表明该业务测试完成,至于该测试业务是否测试通过,还需要进一步判断。During the specific implementation, since there are many test services in the production environment, the processing logic of the test services is also different accordingly. For example, the service of querying telephone bills, recharging payment services, querying package services, etc., the processing procedures included in each test service are also very different. , but each test service has its own processing logic. For example, to query the call charge service, take dialing 10086 to query the call charge balance as an example. First, you need to know the phone number of the call charge service to be queried; then call the phone according to the phone number. The bill of the number; finally, the bill is sent to the user in the form of a text message for the user's reference. Therefore, when the service test is performed on the test packet, it is necessary to transfer the test packet to each process included in the test service until the test packet is transferred to the last process of the test service, indicating that the service test is completed. Whether the test business passes the test requires further judgment.
S24、按照正常业务处理逻辑对生产报文进行处理。S24. Process the production message according to the normal business processing logic.
具体实施时,如果检测到交易报文中携带的标识字段Testflag=0,则代表该交易报文为生产报文,即用户发起的交易报文,则将该生产报文流转到正常业务处理流程,对用户发起的生成报文进行处理,如充值缴费、查询话费和更换套餐等业务。During specific implementation, if it is detected that the identification field Testflag=0 carried in the transaction message, it means that the transaction message is a production message, that is, a transaction message initiated by the user, and the production message flow is transferred to the normal business processing flow , to process the generated messages initiated by the user, such as recharging and payment, inquiring about phone bills, and changing packages.
本发明实施例提供的业务测试方法,为了将测试环境与实际生产环境的差异降低到零,无需另外提供一个测试环境,直接在实际的生产环境中对测试报文进行测试,但实际的生产环境中还有用户发起的交易报文,因此,为了区分实际生产环境中的交易报文,在实际生产环境中运行添加了标识字段的交易报文,所述标识字段用于指示所述交易报文是否为测试报文;如果根据所述标识字段确定出所述交易报文为测试报文,则按照预设测试规则对各测试业务进行测试,一方面实现了在实际生产环境中对测试报文进行各业务测试,提高了各测试业务上线后的准确性和稳定性;另一方面,在对测试报文进行业务测试时,不会对实际生产环境中处理用户发起的交易报文产生影响。In the service testing method provided by the embodiment of the present invention, in order to reduce the difference between the test environment and the actual production environment to zero, it is not necessary to provide another test environment, and the test packets are directly tested in the actual production environment, but the actual production environment There are also transaction messages initiated by users. Therefore, in order to distinguish the transaction messages in the actual production environment, the transaction message with the added identification field is run in the actual production environment, and the identification field is used to indicate the transaction message. Whether it is a test message; if it is determined according to the identification field that the transaction message is a test message, then each test service is tested according to the preset test rules, which on the one hand realizes the test message in the actual production environment. Carrying out various service tests improves the accuracy and stability of each test service after it goes online; on the other hand, when the service test is performed on test packets, it will not affect the processing of transaction packets initiated by users in the actual production environment.
实施例二Embodiment 2
根据现有的业务测试流程,在业务测试结束后,根据记录的测试结果,在评估测试过程正常后,再在实际生产环境中上线,这影响了业务上线效率。有鉴于此,本发明实施例二中提供了一种业务上线方法,在测试完成后即达上线的结果,无需再次发布上线,以提高业务上线效率。具体地,在利用实施例一提供的业务测试方法对交易报文的测试时,还包括图3提供的上线流程:According to the existing business test process, after the business test is completed, according to the recorded test results, after the test process is evaluated as normal, it will be launched in the actual production environment, which affects the efficiency of business online. In view of this, the second embodiment of the present invention provides a service online method, and the online result is obtained after the test is completed, and there is no need to release the online service again, so as to improve the service online efficiency. Specifically, when using the service testing method provided in the first embodiment to test the transaction message, the online process provided in FIG. 3 is also included:
S31、针对在所述实际生产环境中测试的每一测试业务,记录该测试业务的测试结果信息。S31. For each test service tested in the actual production environment, record the test result information of the test service.
具体实施时,在实施例一中步骤S23按照预设测试规则对各测试业务进行测试时,可根据测试业务的类型分别对测试报文进行处理,其中,所述测试业务类型大致分为两类:查询类业务和处理类业务:In specific implementation, when each test service is tested in step S23 according to the preset test rule in the first embodiment, the test packets can be processed according to the type of the test service, wherein the test service types are roughly divided into two categories : Query business and processing business:
(1)如果检测到所述测试业务为查询类业务,则按查询类业务处理逻辑对测试报文进行处理,并做标记和时间戳处理。(1) If it is detected that the test service is a query type service, the test packet is processed according to the query type service processing logic, and is marked and timestamped.
具体实施时,查询类业务可以为查话费、查流量、查询套餐等业务,本发明实施例以查询话费为例进行说明,当测试报文流转到的测试业务为查询话费业务时,则根据查询话费业务处理逻辑对测试报文进行处理,如会执行查询话费操作,获取当前话费余额等其它信息,并将话费余额等其它信息呈现到界面上,代表此次查询话费业务成功,然后在列表中标记该测试业务处理流程测试成功,否则测试失败。此外,该标记可以为打“√”代表测试业务成功,打“×”代表测试业务失败,以及做时间戳处理,记录此次完成查询话费业务处理流程所需要的时间。In specific implementation, the query type services may be services such as toll query, traffic query, package query, etc. The embodiment of the present invention is described by taking the query fee as an example. When the test service to which the test packet flows is the query fee service, the query The call charge business processing logic processes the test packets, such as performing the call charge query operation, obtaining other information such as the current call charge balance, and presenting other information such as the call charge balance on the interface, indicating that the call charge service query is successful, and then in the list Mark the test business process flow test as successful, otherwise the test fails. In addition, the mark can be marked with "√" to represent the success of the test service, "×" to represent the failure of the test service, and time stamp processing to record the time required to complete the processing flow of the call charge service this time.
(2)如果检测到所述测试业务为处理类业务,则做标记和时间戳处理。(2) If it is detected that the test service is a processing service, marking and time stamping are performed.
具体实施时,处理类业务可以包括更换套餐、充值缴费、积分兑换等业务;以充值缴费为例进行说明,当检测到测试报文流转到充值缴费业务时,该测试流程不会真正执行缴纳话费或流量费用,只需检测该测试报文能否成功执行充值缴费业务的各个流程,如果能够成功执行,则在列表中标记该测试业务处理流程测试成功,否则,测试失败。此外,该标记可以为打“√”代表测试业务成功,打“×”代表测试业务失败。另外,还需要做时间戳处理,记录此次完成充值缴费处理流程所需要的时间。During specific implementation, the processing services may include services such as package replacement, recharge payment, and point exchange; taking recharge payment as an example for illustration, when it is detected that the test packet flow is transferred to the recharge payment service, the test process will not actually execute the payment of call charges Or traffic charges, you only need to check whether the test packet can successfully execute each process of the recharge and payment service. If it can be successfully executed, mark the test service processing process test success in the list, otherwise, the test fails. In addition, the mark can be marked with "√" to represent the success of the test service, and "X" to represent the failure of the test service. In addition, timestamp processing is also required to record the time required to complete the recharge payment processing process.
根据实施例一中步骤S23按照预设测试规则对各测试业务进行测试后所做的时间戳处理,与正常业务处理逻辑对生产报文进行处理的平均时间进行比较,例如,针对查询话费业务,如果测试报文执行查询话费业务的各个流程所需的时间为2秒,正常业务处理用户发起的查询话费业务所需的时间为5秒,且如果步骤S23中列表中标记为“√”,则表示该测试业务达到上线标准,记录该测试业务的测试结果信息为测试通过;流转到其他测试业务,根据其在列表中的标记和时间戳,与在正常业务处理逻辑中执行该业务流程的完成时间进行比较,如果执行该测试业务流程的时间小于或等于与其在正常业务处理逻辑中执行该业务流程的完成时间,记录每一测试业务的测试结果信息。According to step S23 in the first embodiment, the time stamp processing performed after each test service is tested according to the preset test rule is compared with the average time for processing the production packet by the normal service processing logic. For example, for the query call charge service, If the time required for the test packet to execute each process of querying the call charge service is 2 seconds, and the time required for the normal service to process the call charge service initiated by the user is 5 seconds, and if the list in step S23 is marked as "√", then Indicates that the test business has reached the online standard, and the test result information of the test business is recorded as the test passed; the flow is transferred to other test businesses, and the completion of executing the business process in the normal business processing logic according to its mark and timestamp in the list Compare the time, if the time of executing the test business process is less than or equal to the completion time of executing the business process in the normal business processing logic, record the test result information of each test business.
S32、根据所述测试结果信息,判断该测试业务是否达到上线标准,如果是,执行步骤S33;否则,执行步骤S34。S32, according to the test result information, determine whether the test service meets the online standard, if yes, go to step S33; otherwise, go to step S34.
具体实施时,根据步骤S31记录的每一测试业务的测试结果信息,如果任一测试业务的测试结果信息均为测试通过,则执行步骤S33,否则,代表该测试业务上线失败,并反馈给运维人员,以便运维人员进行维护。During specific implementation, according to the test result information of each test service recorded in step S31, if the test result information of any test service is the test pass, then step S33 is executed; maintenance personnel for maintenance.
S33、上线该测试业务。S33, the test service is launched.
S34、测试业务上线失败。S34. The test service fails to go online.
本发明实施例二提供的业务上线方法,针对在所述实际生产环境中测试的每一测试业务,记录该测试业务的测试结果信息,如果根据所述测试结果信息确定该测试业务达到上线标准,则上线该测试业务,在实际生产环境中对测试报文进行各业务测试,当各业务达到上线标准时,即可上线该测试业务,提高了业务上线的稳定性。In the service online method provided in the second embodiment of the present invention, for each test service tested in the actual production environment, the test result information of the test service is recorded, and if it is determined according to the test result information that the test service meets the online standard, Then, the test service is launched, and each service test is performed on the test packets in the actual production environment. When each service reaches the online standard, the test service can be launched, which improves the stability of service online.
实施例三Embodiment 3
电信行业IT支撑系统服务具有涉及模块多和系统频繁变更等特点,在实际运维过程中,往往会出现上线A功能内容,而导致C功能无法正常使用的问题,而且问题不易发现,使得运维人员核查、处理问题的工作量非常大,基于此,本发明实施例提供了对业务进行原子化改造,即:The IT support system service in the telecommunications industry has the characteristics of involving many modules and frequent system changes. In the actual operation and maintenance process, there are often problems that the content of the A function goes online, which leads to the problem that the C function cannot be used normally, and the problem is not easy to find, which makes the operation and maintenance. The workload of personnel verification and problem handling is very large. Based on this, the embodiment of the present invention provides atomic transformation of the business, that is:
如果根据所述标识字段确定出所述交易报文为测试报文,则在按照预设测试规则对各测试业务进行测试之前,所述业务测试方法,还包括:If it is determined according to the identification field that the transaction message is a test message, before each test service is tested according to a preset test rule, the service testing method further includes:
将所述测试业务拆分为若干个原子业务。The test service is split into several atomic services.
具体实施时,参考图4a所示,原生产环境中业务可能是许多业务的组合,如查询业务是由查询话费业务、查询流量业务等业务组成,有时会发生查询话费业务正常使用,但查询流量业务无法正常工作,对此,本发明实施例三在对各业务进行测试之前,对测试业务拆分成不可再分的原子服务,即将查询业务中的查询话费业务和查询流量业务等其它查询业务拆分成各自独立的业务,如图4b所示,将查询业务拆分成不可再分的各原子业务,再按照各原子业务对测试报文进行测试,再通过各原子业务的组合,形成新业务对外输出,如分别按照查询话费业务、查询流量业务、查询套餐余量业务和资费查询业务等原子业务对测试报文进行测试,按照本发明实施例一中步骤S21~S24的流程完成业务测试,以及按照实施例二中的步骤S31~S34的上线过程完成业务上线,各原子业务之间互不影响,避免了业务上线后各业务间产生的交叉影响。In the specific implementation, referring to Figure 4a, the service in the original production environment may be a combination of many services. For example, the query service is composed of services such as query call charge service, query traffic service, etc. Sometimes the query call charge service is used normally, but the query traffic The service cannot work normally. In this regard, in the third embodiment of the present invention, before testing each service, the test service is divided into indivisible atomic services, that is, other query services such as the query call charge service and the query traffic service in the query service. Split into independent services, as shown in Figure 4b, split the query service into inseparable atomic services, then test the test packets according to each atomic service, and then combine the atomic services to form a new For external output of services, for example, test the test packets according to atomic services such as query call charge service, query traffic service, query package allowance service, and tariff query service, and complete the service test according to the process of steps S21 to S24 in Embodiment 1 of the present invention. , and the online service is completed according to the online process of steps S31 to S34 in the second embodiment, and the atomic services do not affect each other, which avoids the cross-influence between the services after the services are online.
本发明实施例三提供的业务测试上线方法中,为了避免各业务上线后业务间交叉影响的发生,在按照预设测试规则对各测试业务进行测试之前,将测试业务拆分成若干个原子业务,再按照拆分后的原子业务对测试报文进行测试,减小了业务间耦合。In the service test online method provided by the third embodiment of the present invention, in order to avoid the occurrence of cross-influence between services after each service is online, before each test service is tested according to a preset test rule, the test service is divided into several atomic services , and then test the test packets according to the split atomic services, reducing the coupling between services.
实施例四Embodiment 4
基于同一发明构思,本发明实施例中还提供了一种业务测试装置,由于上述装置解决问题的原理与业务测试方法相似,因此上述装置及设备的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present invention also provides a service testing apparatus. Since the principle of the above apparatus for solving problems is similar to that of the service testing method, the implementation of the above apparatus and equipment can refer to the implementation of the method, and the repetition will not be repeated. Repeat.
如图5所示,为本发明实施例提供的业务测试装置的结构示意图,包括:运行单元51、测试单元52,其中:As shown in FIG. 5, it is a schematic structural diagram of a service testing apparatus provided by an embodiment of the present invention, including: a running
运行单元51,用于在实际生产环境中运行添加了标识字段的交易报文,所述标识字段用于指示所述交易报文是否为测试报文;The running
测试单元52,用于如果根据所述标识字段确定出所述交易报文为测试报文,则按照预设测试规则对各测试业务进行测试。The
具体实施时,所述装置,还包括:记录单元53和上线单元54,其中:During specific implementation, the device further includes: a
所述记录单元53,用于针对在所述实际生产环境中测试的每一测试业务,记录该测试业务的测试结果信息;The
所述上线单元54,用于如果根据所述测试结果信息确定该测试业务达到上线标准,则上线该测试业务。The on-line unit 54 is configured to go on-line the test service if it is determined according to the test result information that the test service meets the on-line standard.
具体地,所述记录单元53,具体用于如果检测到所述测试业务为查询类业务,则按查询类业务处理逻辑对测试报文进行处理,并做标记和时间戳处理;如果检测到所述测试业务为处理类业务,则做标记和时间戳处理。Specifically, the
较佳地,所述测试单元52,还用于如果根据所述标识字段确定出所述交易报文为生产报文,则按照正常业务处理逻辑对生产报文进行处理。Preferably, the
具体地,所述装置,还包括拆分单元55,其中:Specifically, the device also includes a
所述拆分单元55,用于在所述测试单元52如果根据所述标识字段确定出所述交易报文为测试报文,则在按照预设测试规则对各测试业务进行测试之前,将所述测试业务拆分为若干个原子业务。The splitting
本发明实施例提供的业务测试方法和装置,在实际生产环境中运行添加了标识字段的交易报文,其中,所述标识字段用于指示所述交易报文是否为测试报文;如果根据所述标识字段确定出所述交易报文为测试报文,则按照预设测试规则对各测试业务进行测试,本发明提供的测试方法直接将测试报文在实际生产环境中运行及对各测试业务进行测试,实现了将测试环境与实际生产环境的差异降低到零,提高了各测试业务上线后的准确性和稳定性,降低了因测试环境与实际生产环境的差异导致的未能发现系统问题而带来的损失。The service testing method and device provided by the embodiments of the present invention run a transaction message added with an identification field in an actual production environment, wherein the identification field is used to indicate whether the transaction message is a test message; The identification field determines that the transaction message is a test message, then each test service is tested according to the preset test rules, and the test method provided by the present invention directly runs the test message in the actual production environment and tests each test service. Carry out tests to reduce the difference between the test environment and the actual production environment to zero, improve the accuracy and stability of each test business after the launch, and reduce the failure to find system problems caused by the difference between the test environment and the actual production environment. resulting losses.
此外,本发明实施例提供的业务测试方法和装置,在完成业务测试之后,针对在所述实际生产环境中测试的每一测试业务,记录该测试业务的测试结果信息,如果根据所述测试结果信息确定该测试业务达到上线标准,则上线该测试业务,在实际生产环境中对测试报文进行各业务测试,当各业务达到上线标准时,即可上线该测试业务,提高了业务上线的稳定性。In addition, in the service testing method and device provided by the embodiments of the present invention, after completing the service test, for each test service tested in the actual production environment, the test result information of the test service is recorded. The information confirms that the test service meets the online standard, then the test service is launched, and each service test is performed on the test packet in the actual production environment. When each service reaches the online standard, the test service can be launched, which improves the stability of service online. .
另外,为了避免各业务上线后业务间交叉影响的发生,本发明实施例提供的业务测试上线方法中,在按照预设测试规则对各测试业务进行测试之前,将测试业务拆分成若干个原子业务,再按照拆分后的原子业务对测试报文进行测试,减小了业务间耦合。In addition, in order to avoid the occurrence of cross-influence between services after each service goes online, in the service test online method provided by the embodiment of the present invention, before each test service is tested according to a preset test rule, the test service is divided into several atoms services, and then test the test packets according to the split atomic services, reducing the coupling between services.
为了描述的方便,以上各部分按照功能划分为各模块(或单元)分别描述。当然,在实施本发明时可以把各模块(或单元)的功能在同一个或多个软件或硬件中实现。For the convenience of description, the above parts are divided into modules (or units) according to their functions and described respectively. Of course, when implementing the present invention, the functions of each module (or unit) may be implemented in one or more software or hardware.
本申请的实施例所提供的业务测试装置可通过计算机程序实现。本领域技术人员应该能够理解,上述的模块划分方式仅是众多模块划分方式中的一种,如果划分为其他模块或不划分模块,只要业务测试装置具有上述功能,都应该在本申请的保护范围之内。The service testing apparatus provided by the embodiments of the present application may be implemented by a computer program. Those skilled in the art should be able to understand that the above-mentioned module division method is only one of many module division methods. If it is divided into other modules or not divided into modules, as long as the service testing device has the above functions, it should be within the protection scope of this application. within.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。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 present invention may take the form of an entirely hardware embodiment, an entirely 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 (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。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 process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes 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 apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow 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.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although the preferred embodiments of the present invention have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiment and all changes and modifications that fall within the scope of the present invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit and scope of the invention. Thus, provided that these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610999759.4A CN108075911B (en) | 2016-11-14 | 2016-11-14 | A service testing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610999759.4A CN108075911B (en) | 2016-11-14 | 2016-11-14 | A service testing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108075911A CN108075911A (en) | 2018-05-25 |
CN108075911B true CN108075911B (en) | 2020-12-08 |
Family
ID=62161891
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610999759.4A Active CN108075911B (en) | 2016-11-14 | 2016-11-14 | A service testing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108075911B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109165166B (en) * | 2018-10-15 | 2022-04-19 | 华泰证券股份有限公司 | High-simulation test method for financial product valuation and accounting system |
CN110266610B (en) * | 2019-05-30 | 2023-02-28 | 创新先进技术有限公司 | Traffic identification method and device and electronic equipment |
CN111475400A (en) * | 2020-03-19 | 2020-07-31 | 平安国际智慧城市科技股份有限公司 | A verification method for a business platform and related equipment |
CN111639035A (en) * | 2020-06-04 | 2020-09-08 | 中国工商银行股份有限公司 | Test method, test device, test system, and medium |
CN112486830B (en) * | 2020-06-24 | 2023-04-18 | 支付宝(杭州)信息技术有限公司 | Pressure testing method, device and system for block chain network |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101146046B (en) * | 2007-11-05 | 2010-06-02 | 福建星网锐捷网络有限公司 | A throughput testing method and testing system |
CN101272291B (en) * | 2008-04-29 | 2012-05-30 | 北京星网锐捷网络技术有限公司 | Network equipment testing method and system |
CN101841456B (en) * | 2009-03-18 | 2012-07-25 | 中国电信股份有限公司 | Method and system for implementing service application division |
CN102315964B (en) * | 2011-08-19 | 2013-12-18 | 华为技术有限公司 | Loopback method for testing message and exchange device |
US9009683B2 (en) * | 2012-03-28 | 2015-04-14 | Software Ag | Systems and/or methods for testing client reactions to simulated disruptions |
CN103763160B (en) * | 2014-02-18 | 2017-07-21 | 互联网域名系统北京市工程研究中心有限公司 | Based on concurrent automation OTE method of testings and its system |
CN104461863B (en) * | 2014-10-29 | 2018-04-17 | 中国建设银行股份有限公司 | A kind of operation system test method, equipment and system |
CN104468259B (en) * | 2014-11-11 | 2018-01-05 | 上海新炬网络信息技术股份有限公司 | A kind of communication traffic rate automated testing method |
-
2016
- 2016-11-14 CN CN201610999759.4A patent/CN108075911B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108075911A (en) | 2018-05-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108075911B (en) | A service testing method and device | |
CN108846659B (en) | Block chain-based transfer method and device and storage medium | |
CN109474578A (en) | Message method of calibration, device, computer equipment and storage medium | |
CN110134587A (en) | A test method, test device and computer-readable storage medium | |
CN111444224B (en) | Service data verification method and device | |
CN103186466A (en) | Information interaction device and method based on automatic generation of associated test cases | |
CN112801658B (en) | Cross-border resource transfer authenticity auditing method and device and electronic equipment | |
CN107153646B (en) | Data processing method and equipment | |
CN110175916B (en) | Fund flow checking method and device | |
CN106487603A (en) | A kind of response test method and device | |
CN110083581B (en) | Log tracing method and device, storage medium and computer equipment | |
CN112241362B (en) | A testing method, device, server and storage medium | |
CN108123810A (en) | A kind of error bills processing method and processing device | |
CN112600919B (en) | A device computing power evaluation method and system based on PoW consensus mechanism | |
CN107357721B (en) | Method and device for testing system | |
CN109447553A (en) | A kind of checking method of inventory, system and terminal device | |
CN116431364A (en) | Event processing method and related equipment | |
CN111026639B (en) | Method and system for testing service quality of multi-service system | |
CN110738396B (en) | Feature extraction method, device and equipment for equipment | |
CN113011869A (en) | Test data generation method and device and computer readable storage medium | |
CN114048145A (en) | Transaction checking test method and device, electronic equipment and storage medium | |
CN113225218A (en) | Method and device for checking call ticket quality | |
CN110597703A (en) | A regression testing method and device | |
CN105989025A (en) | Data checking method ad device | |
CN110633214A (en) | Configuration method and device of internal test message |
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 |