Automatic testing method, system and equipment based on service arrangement and medium
By configuring the order dispatch/return message template and interface automatic order dispatch, combined with work order status processing and message comparison, the problems of low testing efficiency and insufficient coverage in the business orchestration system are solved, efficient and accurate automated testing is achieved, and the transparency and traceability of business delivery are improved.
Patent Information
- Application Number
- CN202510478533.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-08-15
AI Technical Summary
The existing technology has problems such as inefficient testing efficiency, insufficient coverage and lack of multi-domain collaboration capabilities in the business orchestration system, which is difficult to meet the business needs of cross-system, cross-regional, and high-complex enterprises, especially in the fields of telecommunications and finance, resulting in process interruptions and data inconsistencies.
By configuring the order dispatch/return order message template, calling the order dispatch interface to automatically dispatch orders, performing automatic processing operations based on the work order status, and performing message comparisons to realize automated testing, including simulated skip and return order operations, and generating a comparison and analysis report.
Improves testing efficiency and accuracy, reduces labor costs, shortens test cycles, and improves transparency and traceability of business delivery.
Smart Images

Figure CN120492325A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automatic service testing, and in particular to an automatic testing method, system, equipment and medium based on service orchestration. Background Art
[0002] In recent years, with the rapid development of cloud computing, microservices, and cloud-native technologies, enterprise business systems have gradually evolved towards distributed, service-oriented architectures. Especially in the fields of telecommunications and finance, business needs are characterized by cross-system, cross-regional, and high complexity. There is an urgent need to integrate the distributed microservice capabilities into end-to-end automated processes through business orchestration technology.
[0003] However, the large-scale application of business orchestration faces the following bottlenecks:
[0004] Inefficient service loading: Traditional manual testing relies on step-by-step simulation of work order dispatch, receipt feedback, and data collection. This is time-consuming and cannot support daily or even hourly service provisioning requirements, making it difficult to meet operators' goals.
[0005] Insufficient test coverage and accuracy: Manual testing can easily miss abnormal branch scenarios, and the compatibility of cross-system interface protocols (such as JSON message format and resource query logic) is difficult to verify. This leads to frequent process interruptions and data inconsistencies after the orchestration package is launched.
[0006] Lack of multi-domain collaboration capabilities: In cross-provincial business and multi-professional collaboration scenarios, decentralized testing tools are unable to simulate the complete interaction of end-to-end processes, such as work order status synchronization and resource conflict detection between group and provincial systems, resulting in low collaboration efficiency.
[0007] Currently, the industry primarily relies on scripted testing tools (such as Postman and JMeter) to perform functional verification on single-link interfaces, or relies on manual triggering of work orders and manual data comparison. These methods suffer from fragmented testing links, lack of closed-loop data verification, and low execution efficiency, making them difficult to adapt to the multi-tenant, high-concurrency, and full-link automated testing requirements of business orchestration centers. Summary of the Invention
[0008] In response to the shortcomings of the existing technology, the present invention provides an automatic testing method, system, equipment and medium based on business orchestration. By configuring dispatch / return message templates, calling the dispatch interface to automatically dispatch orders, automatically processing work orders based on work order status, and comparing messages in each link with standard messages, it realizes automated testing of the business and effectively improves testing efficiency.
[0009] The first object of the present invention is to provide an automatic testing method based on service orchestration, comprising:
[0010] S1. Configure the dispatch message template for each business scenario and the return message template for each link in each business scenario;
[0011] S2. Generate a work order dispatch message based on the business test requirements and the configured dispatch message template, automatically dispatch the work order by calling the dispatch interface of the business orchestration system, and record the automatic dispatch record of the work order and the response record of the work order; wherein the response record of the work order includes archived and unarchived records;
[0012] S3. Based on the response records of the work orders, scan the unarchived work orders in real time and obtain their corresponding statuses, and perform corresponding automatic processing operations based on the statuses of the unarchived work orders; wherein the automatic processing operations include simulated skip operations and simulated return operations;
[0013] S4. Collect the input parameter messages and output parameter messages of the work order in each link of the dispatching and automatic processing operation, automatically compare the collected messages with the preset standard messages, and generate a comparison analysis report to realize business automation testing.
[0014] As a further improvement of the present invention, S2 includes:
[0015] S2.1. Generate a simulated identity token with production environment permissions;
[0016] S2.2. Obtain the dispatch message template and fill in the message parameters, encapsulate the message with the filled parameters, and generate a work order;
[0017] S2.3. Call the dispatching interface of the business orchestration system to automatically dispatch the work order, verify the response result of the dispatching interface, and record the automatic dispatch record and the work order response record.
[0018] As a further improvement of the present invention, the automatic dispatch record includes a dispatch work order number, a dispatch message, a dispatch time and a dispatch response message.
[0019] As a further improvement of the present invention, in S3, corresponding automatic processing operations are performed based on the status of the unarchived work order, including:
[0020] If the status of the unarchived work order is "to be skipped", a simulated skip operation is performed;
[0021] If the status of the unarchived work order is "pending return order", a simulated return order operation is performed; the return order simulation operation is to generate a return order message based on the configured return order message template, and transmit the generated return order message to the dispatch interface of the business orchestration system.
[0022] As a further improvement of the present invention, S3 further includes:
[0023] If the work order requires manual processing, set a processing time limit for manual processing, and automatically generate a receipt message based on the configured receipt message template after the timeout.
[0024] As a further improvement of the present invention, in S4, a JSON structured comparison algorithm is used to automatically compare the collected messages with preset standard messages.
[0025] As a further improvement of the present invention, the automatic comparison includes: full field comparison, key path comparison and data type consistency verification.
[0026] A second object of the present invention is to provide an automatic testing system based on service orchestration, for implementing the above method, comprising:
[0027] The template configuration module is used to configure the dispatch message template for each business scenario and the return message template for each link in each business scenario;
[0028] The work order dispatch module is used to generate work order dispatch messages based on business testing requirements and configured dispatch message templates, automatically dispatch work orders by calling the dispatch interface of the business orchestration system, and record automatic dispatch records and work order response records; the work order response records include archived and unarchived records;
[0029] A work order processing module is used to scan unarchived work orders in real time and obtain their corresponding status based on the response records of the work orders, and perform corresponding automatic processing operations based on the status of the unarchived work orders; wherein the automatic processing operations include simulated skip operations and simulated return operations;
[0030] The message comparison module is used to collect input parameter messages and output parameter messages of work orders in each link of dispatching and automatic processing operations, automatically compare the collected messages with preset standard messages, and generate a comparison analysis report.
[0031] The third object of the present invention is to provide an electronic device, comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the above method.
[0032] A fourth object of the present invention is to provide a storage medium storing a computer program executable by an electronic device, wherein when the program runs on the electronic device, the electronic device executes the above method.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] By configuring dispatch / return message templates, calling the dispatch interface to automatically dispatch orders, automatically processing work orders based on work order status, and comparing messages in each link with standard messages, we can achieve automated business testing, reduce manpower input and labor costs, and effectively shorten the testing cycle, while improving test efficiency and accuracy.
[0035] After the test is completed, an analysis report comparing the messages in each link is automatically generated to improve the transparency and traceability of business delivery. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a flow chart of the automatic testing method;
[0037] Figure 2 Flowchart for automatic dispatch of work orders;
[0038] Figure 3 Flowcharts for automated work order processing operations;
[0039] Figure 4 This is a schematic diagram of the basic information of each work order in the automatic dispatch record;
[0040] Figure 5 This is the structural diagram of the automatic test system. DETAILED DESCRIPTION
[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0042] The present invention is described in further detail below with reference to the accompanying drawings:
[0043] This embodiment provides an automatic testing method based on business orchestration. The method flow is as follows: Figure 1 Shown, including:
[0044] S1. Configure the dispatch message template for each business scenario and the return message template for each link in each business scenario;
[0045] S2. Generate a work order dispatch message based on the business test requirements and the configured dispatch message template, automatically dispatch the work order by calling the dispatch interface of the business orchestration system, and record the automatic dispatch record of the work order and the response record of the work order; wherein the response record of the work order includes archived and unarchived records;
[0046] S3. Based on the response records of the work orders, scan the unarchived work orders in real time and obtain their corresponding statuses, and perform corresponding automatic processing operations based on the statuses of the unarchived work orders; wherein the automatic processing operations include simulated skip operations and simulated return operations;
[0047] S4. Collect the input parameter messages and output parameter messages of the work order in each link of the dispatching and automatic processing operation, automatically compare the collected messages with the preset standard messages, and generate a comparison analysis report to realize business automation testing.
[0048] The testing method provided in this embodiment realizes automated testing of the business by configuring dispatch / return message templates, calling the dispatch interface to automatically dispatch orders, automatically processing work orders based on the work order status, and comparing the messages of each link with the standard messages, thereby reducing manpower input and lowering labor costs, while effectively shortening the testing cycle and improving testing efficiency and test accuracy. At the same time, after the test is completed, an analysis report of the message comparison of each link is automatically generated, effectively improving the transparency and traceability of business delivery.
[0049] Step S2 is the process of automatic dispatching. The specific process is as follows: Figure 2 Shown, including:
[0050] S2.1. Generate a simulated identity token with production environment permissions.
[0051] S2.2. Obtain the dispatch message template and fill in the message parameters. The filled message parameters can be dynamically adjusted according to the actual business scenario and business needs. The filled message is encapsulated and a work order is generated.
[0052] S2.3. Call the dispatch interface of the business orchestration system to automatically dispatch the work order, verify the response result of the dispatch interface, form a simulated dispatch table, and record the automatic dispatch record and the work order response record in the simulated dispatch table; wherein, the automatic dispatch record includes: the internal and external number of the dispatch work order, the dispatch message, the dispatch time and the dispatch response message, and the basic information of each work order in the automatic dispatch record such as Figure 4 As shown; the response record of the work order includes: "0" represents unfiled / uncompleted, and "1" represents filed / completed.
[0053] See also Figure 3 In step S3, the work orders whose response record is "0" in the simulated dispatch table are scanned and their corresponding statuses are obtained. Based on the status of the work order, the corresponding automatic processing operations are performed, specifically including:
[0054] Query the tf_so_opdetail_his table based on the internal work order number. If a record is found, update the response record of the work order to "1";
[0055] If no record is found, the status of the work order recorded in the tf_so_tache table is used, and corresponding automatic processing operations are performed based on the status of the work order, including:
[0056] If the status of the work order is "To be skipped" ("DF"), perform a simulated skip operation;
[0057] If the status of the work order is "Waiting for Return" ("WF"), a simulated return operation is performed; the return simulation operation is to generate a return message based on the configured return message template, and transmit the generated return message to the dispatch interface of the business orchestration system.
[0058] Furthermore, step S3 also includes: if the work order requires manual processing, setting a processing time limit for manual processing, and automatically generating a return message based on the configured return message template after the timeout, to avoid low testing efficiency due to busy manual work or insufficient manpower.
[0059] Furthermore, in step S4, input parameter messages and output parameter messages of each link of the work order dispatching and automatic processing operation are collected, and the collected messages are automatically compared with the preset standard messages using a JSON structured comparison algorithm. The automatic comparison includes: full field comparison, key path comparison, and data type consistency verification;
[0060] After the test is completed, a visual test report is automatically generated. The report includes the order dispatch success rate, processing time of each link, exception analysis, etc., which makes it easier for testers to adjust the business to be delivered based on the test report.
[0061] The testing method provided in this embodiment can automatically test the services orchestrated by the service orchestration system according to actual service needs, effectively shorten the testing cycle, and improve testing efficiency and test accuracy.
[0062] This embodiment provides an automatic testing system based on service orchestration, which is used to implement the above method. The system structure is as follows: Figure 5 As shown, the system includes:
[0063] The template configuration module is used to configure the dispatch message template for each business scenario and the return message template for each link in each business scenario;
[0064] The work order dispatch module is used to generate work order dispatch messages based on business testing requirements and configured dispatch message templates, automatically dispatch work orders by calling the dispatch interface of the business orchestration system, and record automatic dispatch records and work order response records; the work order response records include archived and unarchived records;
[0065] A work order processing module is used to scan unarchived work orders in real time and obtain their corresponding status based on the response records of the work orders, and perform corresponding automatic processing operations based on the status of the unarchived work orders; wherein the automatic processing operations include simulated skip operations and simulated return operations;
[0066] The message comparison module is used to collect input parameter messages and output parameter messages of work orders in each link of dispatching and automatic processing operations, automatically compare the collected messages with preset standard messages, and generate a comparison analysis report.
[0067] This embodiment provides an electronic device, including at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit performs the above method.
[0068] This embodiment provides a storage medium storing a computer program executable by an electronic device. When the program runs on the electronic device, the electronic device executes the above method.
[0069] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. An automatic testing method based on business orchestration, characterized in that: include: S1. Configure the dispatch message template for each business scenario and the return message template for each link in each business scenario; S2. Generate a work order dispatch message based on the business test requirements and the configured dispatch message template, automatically dispatch the work order by calling the dispatch interface of the business orchestration system, and record the automatic dispatch record of the work order and the response record of the work order; wherein the response record of the work order includes archived and unarchived records; S3. Based on the response records of the work orders, scan the unarchived work orders in real time and obtain their corresponding statuses, and perform corresponding automatic processing operations based on the statuses of the unarchived work orders; wherein the automatic processing operations include simulated skip operations and simulated return operations; S4. Collect the input parameter messages and output parameter messages of the work order in each link of the dispatching and automatic processing operation, automatically compare the collected messages with the preset standard messages, and generate a comparison analysis report to realize business automation testing.
2. The method according to claim 1, characterized in that S2 include: S2.
1. Generate a simulated identity token with production environment permissions; S2.
2. Obtain the dispatch message template and fill in the message parameters, encapsulate the message with the filled parameters, and generate a work order; S2.
3. Call the dispatching interface of the business orchestration system to automatically dispatch the work order, verify the response result of the dispatching interface, and record the automatic dispatch record and the work order response record.
3. The method according to claim 2, characterized in that The automatic dispatch record includes the dispatch work order number, dispatch message, dispatch time and dispatch response message.
4. The method according to claim 1, wherein In S3, corresponding automatic processing operations are performed based on the status of unarchived work orders, including: If the status of an unarchived work order is "To be skipped", a simulated skip operation is performed; If the status of an unarchived work order is "Waiting for Return", a simulated return operation is performed; the return simulation operation is to generate a return message based on the configured return message template and transmit the generated return message to the dispatch interface of the business orchestration system.
5. The method according to claim 1, wherein S3 also includes: If the work order requires manual processing, set a processing time limit for manual processing, and automatically generate a receipt message based on the configured receipt message template after the timeout.
6. The method according to claim 1, characterized in that In S4, a JSON structured comparison algorithm is used to automatically compare the collected messages with the preset standard messages.
7. The method according to claim 6, characterized in that The automatic comparison includes: full field comparison, key path comparison and data type consistency verification.
8. An automatic testing system based on service orchestration, used to implement the method according to any one of claims 1 to 7, characterized in that: include: The template configuration module is used to configure the dispatch message template for each business scenario and the return message template for each link in each business scenario; The work order dispatch module is used to generate work order dispatch messages based on business testing requirements and configured dispatch message templates, automatically dispatch work orders by calling the dispatch interface of the business orchestration system, and record automatic dispatch records and work order response records; the work order response records include archived and unarchived records; A work order processing module is used to scan unarchived work orders in real time and obtain their corresponding status based on the response records of the work orders, and perform corresponding automatic processing operations based on the status of the unarchived work orders; wherein the automatic processing operations include simulated skip operations and simulated return operations; The message comparison module is used to collect input parameter messages and output parameter messages of work orders in each link of dispatching and automatic processing operations, automatically compare the collected messages with preset standard messages, and generate a comparison analysis report.
9. An electronic device, characterized in that: The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The computer program that can be executed by an electronic device is stored therein. When the program is run on the electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 7.