Simulation service test method and system and electronic equipment

Through the simulation test method of the simulation server, the preset mapping table is used to query and update the simulation test response message, which solves the problem of dependence of industrial software testing on electrical equipment and achieves the correctness of the test logic without relying on the entity of the electrical equipment. Testing improves testing efficiency and progress.

CN118567979APending Publication Date: 2024-08-30NEW EASTECH TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410652256.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the existing technology, industrial software testing relies heavily on electrical equipment, which affects the test progress when the electrical equipment has not arrived or has not been assembled and debugged.

Method used

Provide a test method and system for simulated services. By simulating the server to receive the business test request from the test end, querying and sending simulated test response messages using the preset mapping table, the test of the business logic of the target electrical equipment is realized, including static and dynamic tables. query and update.

Benefits of technology

Without relying on the target electrical equipment entity, test efficiency is improved, test progress is ensured, abnormal scenarios are fully considered, and test coverage is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567979A
    Figure CN118567979A
Patent Text Reader

Abstract

The invention provides a simulation service testing method and system and electronic equipment, and relates to the technical field of computers. The method can be applied to a server side with a simulation service function, and comprises the following steps: based on a simulation service, receiving a target service test request sent by a test side, the target service test request being used for requesting to test the correctness of target service logic corresponding to target electrical equipment in the test side; based on the simulation service, a target simulation test response message corresponding to the target service test request is inquired through a preset mapping table, the target simulation test response message is sent to the test end, and the preset mapping table comprises simulation test response messages corresponding to the target electrical equipment under the multiple service test requests; the correctness of the service logic in the test end can be tested without depending on the target electrical equipment entity, the test efficiency is improved, and the test progress is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a testing method, system and electronic equipment for simulating services. Background Art

[0002] Industrial control software testing is an important part of ensuring the quality and functional integrity of industrial control system software. Since industrial control software is directly related to production safety, efficiency and product quality, its testing process has strict standards and a high degree of professionalism.

[0003] In the prior art, the testing of industrial software needs to be completed through cooperation with electrical equipment.

[0004] It can be seen that the existing testing of industrial software is heavily dependent on electrical equipment. Therefore, when the electrical equipment has not arrived or the assembly and debugging have not been completed, it will affect the testing progress of the industrial software. Summary of the invention

[0005] The purpose of this application is to provide a testing method, system and electronic equipment for a simulation service in response to the above-mentioned deficiencies in the prior art, which can test the correctness of the business logic in the test end without relying on the target electrical equipment entity, improve the test efficiency and ensure the test progress.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, the present invention provides a test method for a simulated service, which is applied to a server having a simulated service function, and the method comprises:

[0008] Based on the simulation service, receiving a target service test request sent by the test end, wherein the target service test request is used to request to test the correctness of the target service logic corresponding to the target electrical device in the test end;

[0009] Based on the simulation service, the target simulation test response message corresponding to the target business test request is queried through a preset mapping table, and the target simulation test response message is sent to the test end, wherein the preset mapping table includes simulation test response messages corresponding to the target electrical equipment under multiple business test requests.

[0010] In an optional implementation, the preset mapping table includes a static table and a dynamic table, the static table includes: static simulation test response messages corresponding to the target electrical equipment under multiple service test requests, and the dynamic table includes: dynamic simulation test response messages corresponding to the target electrical equipment under multiple service test requests, wherein the dynamic simulation test response message under each service test request includes: simulation test response messages corresponding to the target electrical equipment under different working conditions;

[0011] The querying of the target simulation test response message corresponding to the target service test request through the preset mapping table includes:

[0012] Query the dynamic table to see whether there is a target simulation test response message corresponding to the target service test request;

[0013] If it does not exist, query the static table for the target simulation test response message corresponding to the target service test request.

[0014] In an optional implementation manner, querying the dynamic table to see whether there is a target simulation test response message corresponding to the target service test request includes:

[0015] Based on a preset matching order, the target service test request is matched with each service test request in the dynamic table in order;

[0016] If there is a matching service test request in the dynamic table, the simulation test response message corresponding to the matching service test request is used as the target simulation test response message.

[0017] In an optional implementation manner, after sending the target simulation test response message to the test end, the method further includes:

[0018] Delete the table entry corresponding to the target service test request in the preset mapping table.

[0019] In an optional embodiment, the method further comprises:

[0020] Receive a response message configuration request sent by a configuration client, wherein the response message configuration request includes at least one of the following: a response message query request, a response message deletion request, and a response message setting request;

[0021] The preset mapping table is updated according to the response message configuration request.

[0022] In an optional implementation, the response message setting request includes: a dynamic simulation test response message corresponding to at least one business test request, wherein the dynamic simulation test response message under each business test request includes: a simulation test response message corresponding to the target electrical equipment under different working conditions;

[0023] The updating of the preset mapping table according to the response message configuration request includes:

[0024] The dynamic table is updated according to the multiple dynamic simulation test response messages corresponding to each service test request.

[0025] In an optional implementation manner, the receiving a target service test request sent by the test end includes:

[0026] Based on the long connection technology, the receiving test end calls the target business test request sent by the target business interface through the target test case.

[0027] In an optional implementation, the target electrical device includes: a photolithography machine.

[0028] In a second aspect, the present invention provides a test system for simulating services, the test system comprising: at least one test end, a server end having a simulation service function, and a configuration client end, wherein each of the test end and the configuration client end is respectively connected to the server end for communication;

[0029] The test end is used to send a target business test request to the server end, and the target business test request is used to request to test the correctness of the target business logic corresponding to the target electrical equipment in the test end; the configuration client is used to send a response message configuration request to the server end; the server end is used to execute the steps of the test method of the simulation service described in any of the aforementioned implementation methods.

[0030] In a third aspect, the present invention provides a test device for simulating a service, which is applied to a server having a simulation service function, and the test device comprises:

[0031] A receiving module, used for receiving a target service test request sent by a test end based on a simulation service, wherein the target service test request is used for requesting to test the correctness of a target service logic corresponding to a target electrical device in the test end;

[0032] A query module is used to query the target simulation test response message corresponding to the target business test request through a preset mapping table based on the simulation service, and send the target simulation test response message to the test end, wherein the preset mapping table includes simulation test response messages corresponding to the target electrical equipment under multiple business test requests.

[0033] In an optional implementation, the preset mapping table includes a static table and a dynamic table, the static table includes: static simulation test response messages corresponding to the target electrical equipment under multiple service test requests, and the dynamic table includes: dynamic simulation test response messages corresponding to the target electrical equipment under multiple service test requests, wherein the dynamic simulation test response message under each service test request includes: simulation test response messages corresponding to the target electrical equipment under different working conditions;

[0034] The query module is specifically used to query the dynamic table whether there is a target simulation test response message corresponding to the target business test request; if not, query the static table for the target simulation test response message corresponding to the target business test request.

[0035] In an optional implementation manner, the query module is specifically used to sequentially match the target service test request with each service test request in the dynamic table based on a preset matching order;

[0036] If there is a matching service test request in the dynamic table, the simulation test response message corresponding to the matching service test request is used as the target simulation test response message.

[0037] In an optional implementation manner, the query module is further configured to delete the entry corresponding to the target service test request in the preset mapping table.

[0038] In an optional implementation, the receiving module is further used to receive a response message configuration request sent by the configuration client, the response message configuration request including at least one of the following: a response message query request, a response message deletion request, and a response message setting request;

[0039] The preset mapping table is updated according to the response message configuration request.

[0040] In an optional implementation, the response message setting request includes: a dynamic simulation test response message corresponding to at least one business test request, wherein the dynamic simulation test response message under each business test request includes: a simulation test response message corresponding to the target electrical equipment under different working conditions;

[0041] The receiving module is specifically used to update the dynamic table according to a plurality of dynamic simulation test response messages corresponding to each service test request.

[0042] In an optional implementation, the receiving module is specifically configured to receive, based on a long connection technology, a target service test request sent by the test end by calling a target service interface through a target test case.

[0043] In an optional implementation, the target electrical device includes: a photolithography machine.

[0044] In a fourth aspect, the present invention provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the test method for simulating services as described in any of the aforementioned implementations.

[0045] In a fifth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the testing method for simulating a service as described in any of the aforementioned implementations are executed.

[0046] The beneficial effects of this application are:

[0047] The testing method, system and electronic device for the simulation service provided in the embodiments of the present application can be applied to a server with a simulation service function. The method may include: based on the simulation service, receiving a target business test request sent by the test terminal, the target business test request is used to request to test the correctness of the target business logic corresponding to the target electrical equipment in the test terminal; based on the simulation service, querying the target simulation test response message corresponding to the target business test request through a preset mapping table, and sending the target simulation test response message to the test terminal, wherein the preset mapping table includes the simulation test response messages corresponding to the target electrical equipment under multiple business test requests. By applying the embodiments of the present application, through the setting of the simulation service function, the correctness of the business logic in the test terminal can be tested without relying on the target electrical equipment entity, thereby improving the test efficiency and ensuring the test progress. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A schematic diagram of the architecture of a test system provided in an embodiment of the present application;

[0050] Figure 2 A flowchart of a test method for simulating a service provided in an embodiment of the present application;

[0051] Figure 3 A flowchart of another simulation service testing method provided in an embodiment of the present application;

[0052] Figure 4 A flowchart of another simulation service testing method provided in an embodiment of the present application;

[0053] Figure 5 A flowchart of another simulation service testing method provided in an embodiment of the present application;

[0054] Figure 6A flowchart of another simulation service testing method provided in an embodiment of the present application;

[0055] Figure 7 A schematic diagram of functional modules of a test device for simulating services provided in an embodiment of the present application;

[0056] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0058] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0059] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0060] In related technologies, the testing of industrial software needs to be completed through cooperation with electrical equipment, but if the electrical equipment has not arrived or the assembly and debugging have not been completed, it will affect the testing progress of the industrial software.

[0061] In view of this, an embodiment of the present application provides a testing method, which can implement testing of a test end without relying on a target electrical device entity, improve testing efficiency, and ensure testing progress.

[0062] Figure 1An architectural diagram of a test system provided for an embodiment of the present application, wherein the test system may include: at least one test terminal 11, a server 12 with a simulation service function, and a configuration client 13, wherein each test terminal 11 communicates with the server 12 through a network 14 based on a TCP MOCK service, and the configuration client 13 communicates with the server 12 through a network 14 based on a TCP MOCK service, and each test terminal 11 can test the correctness of its deployed business logic by interacting with the server 12 through the network 14, and the configuration client 13 is used as a configuration entry for a preset mapping table in the server, and by interacting with the server, the preset mapping table in the server can be updated. For specific testing and configuration processes, please refer to the following specific embodiments.

[0063] In some embodiments, each test end and configuration client can respectively install a TCP client, and the server can install a TCP server, wherein each test end can communicate with the TCP server of the server through the TCP client to test the correctness of the business logic deployed by it; the configuration client can communicate with the TCP server of the server through the TCP client to update the preset mapping table in the server.

[0064] Of course, it should be noted that the present application does not limit the number of test terminals. Depending on the actual application scenario, it may include one or more test terminals. If it includes multiple test terminals, the server may be provided with a corresponding number of preset mapping tables. In addition, the configuration client may also include one or more test terminals. If it includes multiple test terminals, the test terminal and the configuration client may be deployed in the same device, or there may be a corresponding relationship between the two so that the test terminal may test the preset mapping table configured by the configuration client.

[0065] Figure 2 A flow chart of a test method provided in an embodiment of the present application, the method can be applied to a server with a simulation service function (MOCK), wherein the server can simulate the working process of the target electrical device through the simulation service function. During the test process, the server can test the correctness of the business logic corresponding to the target electrical device in the test terminal by interacting with the test terminal. Figure 2 As shown, the method may include:

[0066] Step 101: Based on the simulation service, a target service test request sent by a test end is received, where the target service test request is used to request to test the correctness of the target service logic corresponding to the target electrical equipment in the test end.

[0067] Optionally, the test end can be deployed with business logic corresponding to the industrial control software, wherein the industrial control software can be the host computer of the target electrical equipment. In some embodiments, the industrial control software can be used to set specified parameters in the target electrical equipment, obtain target parameters, or control the target electrical equipment to perform preset actions.

[0068] In some embodiments, the target electrical equipment may include: photolithography machines, lasers, encoders, sensors, power generation equipment (e.g., generators), substation equipment (transformers, reactors, capacitors), power transmission and distribution equipment (e.g., switchgear), etc., which are not limited here. It should be noted that for different target electrical equipment, communication between the test end and the service end needs to be achieved based on a specific communication protocol.

[0069] Among them, for the test end, if it is necessary to test the business logic deployed by it, it can generate a target business test request for the business logic to be tested and send it to the server. The server receives the target business test request based on the simulation service, and simulates the target electrical equipment to return the corresponding response data to the test end.

[0070] Step 102: Based on the simulation service, query the target simulation test response message corresponding to the target business test request through the preset mapping table, and send the target simulation test response message to the test end, wherein the preset mapping table includes the simulation test response messages corresponding to the target electrical equipment under multiple business test requests.

[0071] The server is configured to include a preset mapping table corresponding to the target electrical device, and the preset mapping table includes simulation test response messages corresponding to the target electrical device under various service test requests.

[0072] After obtaining the target business test request, the server can match and query the target simulation test response message corresponding to the target business test request in the preset mapping table, and return the queried target simulation test response message to the test end to verify the correctness of the business logic to be tested, thereby realizing the testing of the test end without relying on the target electrical equipment entity, improving the testing efficiency and ensuring the testing progress.

[0073] It should be noted that the present application does not limit the specific content of the simulation test response messages corresponding to various business test requests, wherein each simulation test response message can be a response message of successful response or a response message of failed response, which is not limited here.

[0074] In summary, the embodiment of the present application provides a testing method for a simulation service, which can be applied to a server with a simulation service function, and the method may include: based on the simulation service, receiving a target business test request sent by the test end, the target business test request is used to request to test the correctness of the target business logic corresponding to the target electrical equipment in the test end; based on the simulation service, querying the target simulation test response message corresponding to the target business test request through a preset mapping table, and sending the target simulation test response message to the test end, wherein the preset mapping table includes the simulation test response messages corresponding to the target electrical equipment under multiple business test requests. By applying the embodiment of the present application, through the setting of the simulation service function, the correctness of the business logic in the test end can be tested without relying on the target electrical equipment entity, thereby improving the test efficiency and ensuring the test progress.

[0075] Figure 3 A schematic diagram of another test method provided in an embodiment of the present application. Table 1 is a schematic diagram of a static table setting provided in an embodiment of the present application, and Table 2 is a schematic diagram of a dynamic table setting provided in an embodiment of the present application.

[0076] In an optional embodiment, the preset mapping table includes a static table and a dynamic table, the static table includes: static simulation test response messages corresponding to the target electrical equipment under multiple business test requests; the dynamic table includes: dynamic simulation test response messages corresponding to the target electrical equipment under multiple business test requests, wherein the dynamic simulation test response messages under each business test request include: simulation test response messages corresponding to the target electrical equipment under different working conditions.

[0077] Table 1

[0078]

[0079] Table 2

[0080]

[0081]

[0082] Among them, different business test requests are used to test different business logics. For the static table, the static simulation test response message corresponding to the target electrical equipment under various business test requests can be a default simulation test response message, for example, it can be the simulation test response message corresponding to the target electrical equipment under normal working conditions. It is not limited here and can be flexibly set according to the actual application scenario.

[0083] As shown in Table 1, for a certain target electrical equipment, if the service test request is A, the corresponding static simulation test response message includes 1, namely RA_1, which is used to indicate to the test end that the server has received the service test request A sent by it; if the service test request is B, the corresponding static simulation test response message includes 2, namely RB_1 and RB_2, RB_1 is used to indicate to the test end that the server has received the service test request B sent by it, and RB_2 is used to indicate to the test end that the server has successfully executed the service instruction corresponding to the service test request B.

[0084] For the dynamic table, optionally, each service test request may specifically include: a dynamic simulation test response message corresponding to the target electrical equipment under normal operating conditions, a dynamic simulation test response message corresponding to the target electrical equipment under abnormal operating conditions, and a dynamic simulation test response message corresponding to the target electrical equipment under boundary conditions.

[0085] As shown in Table 2, for a certain target electrical equipment, if the service test request is A, the corresponding dynamic simulation test response messages include 3 types. The first type of dynamic simulation test response message includes 1 message, namely RA_01, which is used to indicate to the test end that the server cannot execute the service instruction corresponding to the service test request B; the second type of dynamic simulation test response message includes 2 messages, namely RA_11 and RA_12, RA_11 is used to indicate to the test end that the server has received the service test request B sent by it, and RA_12 is used to indicate to the test end that the server has successfully executed the service instruction corresponding to the service test request A; the third type of dynamic simulation test response message includes 2 messages, namely RA_11 and RA_22, RA_11 is used to indicate to the test end that the server has received the service test request B sent by it, and RA_22 is used to indicate to the test end that the server failed to execute the service instruction corresponding to the service test request A.

[0086] It should be noted that for the same business test request, there may be multiple identical dynamic simulation test response messages in the dynamic table, such as the contents of sequence numbers 3 and 4 in Table 1. This can meet the needs of some special test scenarios and improve the applicability of the test.

[0087] It can be seen that the setting of the dynamic table fully considers the response of the target electrical equipment in abnormal scenarios. Therefore, the test coverage is higher and a comprehensive test of the test end can be achieved.

[0088] Optionally, for the above-mentioned static simulation test response message and dynamic simulation test response message, it should be noted that the static simulation test response message and dynamic simulation test response message may include one or more messages. If multiple messages are included, they are responded to in sequence according to a preset response order. Here, a static table is used as an example for explanation, that is, the first static simulation test response message R11 and the second static simulation test response message R12 are returned to the test end in sequence.

[0089] In some embodiments, Figure 3 As shown, the above-mentioned querying the target simulation test response message corresponding to the target service test request through the preset mapping table includes:

[0090] Step 201: Query the dynamic table to see whether there is a target simulation test response message corresponding to the target service test request.

[0091] Step 202: If it does not exist, query the static table for the target simulation test response message corresponding to the target service test request.

[0092] Based on the settings of the above dynamic tables and static tables, it should be noted that when conducting specific tests, the dynamic table can be used for querying first. If the query is successful, the simulation test response message matched in the dynamic table can be used as the target simulation test response message; if there is no match, the static table can be queried, and the static simulation test response message matched in the static table can be used as the target simulation test response message, so as to implement comprehensive testing by giving priority to the dynamic table. If the target simulation test response message cannot be determined by matching the dynamic table, it can be determined by querying the static table, which can avoid the situation where the service end cannot respond due to errors in the business logic of the test end, and can improve the reliability of the test method.

[0093] It should be noted that, according to the actual application scenario, for the preset test situation (for example, the scenario of successful electrical response and execution), only one static table can be set on the server side, and the static table can be used to perform the corresponding test.

[0094] Optionally, when matching a static table or a dynamic table, a full character matching determination may be performed.

[0095] Figure 4 A schematic diagram of another test method provided in the embodiment of the present application. In an optional embodiment, as Figure 4 As shown, the above query dynamic table whether there is a target simulation test response message corresponding to the target service test request includes:

[0096] Step 301: Based on a preset matching order, the target service test request is matched with each service test request in the dynamic table in order.

[0097] Step 302: If there is a matching service test request in the dynamic table, the simulation test response message corresponding to the matching service test request is used as the target simulation test response message.

[0098] Optionally, the preset matching order can be matched according to the storage order of each business test request in the dynamic table, that is, when performing specific matching, the target business test request can be matched line by line according to the storage order of each business test request. If a row matches successfully, the remaining rows will no longer match, and the simulation test response message corresponding to the matched business test request will be used as the target simulation test response message.

[0099] It should be noted that, referring to the description of the above-mentioned dynamic table, the same business test request in the dynamic table may correspond to multiple simulation test response messages of the target electrical equipment under different working conditions. Optionally, the successfully matched simulation test response message can be returned according to the storage order of the multiple simulation test response messages corresponding to the same business test request in the dynamic table.

[0100] For example, if the target business test request is A, as shown in Table 2, it can be seen that it matches sequence numbers 1 to 4. Optionally, in this case, the simulation test response message corresponding to sequence number 1 can be selected as the target simulation test response message corresponding to this target business test request; of course, it should be noted that according to the actual application scenario, the simulation test response message corresponding to sequence number 2 can also be selected as the target simulation test response message corresponding to this target business test request, which is not limited here.

[0101] By applying the embodiments of the present application, it is possible to quickly determine the target simulation test response message through a matching method, thereby improving the test efficiency.

[0102] Figure 5 A schematic diagram of another test method provided in the embodiment of the present application. In an optional embodiment, as Figure 5 As shown, after sending the target simulation test response message to the test end, it also includes:

[0103] Step 401: Delete the entry corresponding to the target simulation test response message in the preset mapping table.

[0104] The preset mapping table may include multiple table entries, and each table entry may include: service test request content and a simulation test response message corresponding to each service test request.

[0105] Optionally, the server can synchronously delete the table entry where the target simulation test response message is located in the preset mapping table after each time the target simulation test response message is sent to the test end (for example, as shown in Table 2, if the target simulation test response message is RA_01, the row number 1 can be deleted), thereby avoiding the target simulation test response message returned to the test end in the preset mapping table from interfering with subsequent tests, which can improve the applicability and testing efficiency of the method of the present application.

[0106] It should be noted that the execution of the above step 401 can be specifically applied to a dynamic table in a preset mapping table.

[0107] Figure 6 A schematic diagram of another test method provided in the embodiment of the present application. In an optional embodiment, as Figure 6 As shown, the above method also includes:

[0108] Step 501: Obtain a response message configuration request sent by a configuration client, where the response message configuration request includes at least one of the following: a response message query request, a response message deletion request, and a response message setting request.

[0109] Step 502: Update the preset mapping table according to the response message configuration request.

[0110] The response message query request is used to query the specified content in the preset mapping table, for example, the specified service test request in the preset mapping table, the specified simulation test response message, and all the contents in the preset mapping table can be queried, which is not limited here. Optionally, the response message query request can be implemented through a check instruction.

[0111] The reply message deletion request is used to delete the specified content in the preset mapping table, for example, it can delete the specified service test request in the preset mapping table, specify the simulation test reply message, delete all the contents in the preset mapping table, etc., which are not limited here. Optionally, the reply message deletion request can be implemented through a delete instruction.

[0112] The reply message setting request is used to add a new entry to the preset mapping table, or to modify an existing entry in the preset mapping table. Optionally, the reply message setting request can be implemented through a Transfer instruction.

[0113] In some embodiments, the expression format of the response message setting request may be Transfer: A! B, indicating that for service test request A, the simulation test response message is set to B, or Transfer: A! B#C, indicating that for service test request A, the simulation test response messages are set to B and C in sequence. The application of the embodiments of the present application can meet the setting requirements in various scenarios and improve the flexibility of the method of the present application.

[0114] Based on the above description, according to the actual application scenario, after obtaining the response message configuration request sent by the configuration client, the preset mapping table can be queried, deleted, added, and other update operations can be performed according to the response message configuration request. It can be applicable to testing any business logic of the test end, and can improve the applicability of the method of this application.

[0115] It should be noted that, if the preset mapping table includes a static table and a dynamic table, the static table or the dynamic table can be updated in a targeted manner by carrying the corresponding table name in the response message configuration request.

[0116] In addition, in combination with the above-mentioned setting methods of the response message query request, the response message deletion request, and the response message setting request, optionally, if the request received by the server includes response message configuration keywords such as check, delete, and transfer, the current request can be considered as a response message configuration request, otherwise, the current request can be considered as a target service test request. Of course, the specific distinction method is not limited to this.

[0117] In an optional embodiment, the response message setting request includes: a dynamic simulation test response message corresponding to at least one business test request, wherein the dynamic simulation test response message under each business test request includes: a simulation test response message corresponding to the target electrical equipment under different working conditions.

[0118] Correspondingly, the above-mentioned updating of the preset mapping table according to the response message configuration request includes: updating the dynamic table according to a plurality of dynamic simulation test response messages corresponding to each service test request.

[0119] In some embodiments, in order to improve the updating efficiency of the preset mapping table, the dynamic simulation test response message under each service test request in the response message setting request can be set to include: the simulation test response message corresponding to the target electrical equipment under different working conditions.

[0120] In conjunction with the above-mentioned Transfer instruction, the expression format of the response message setting request can be Transfer: A! B#C% A! C#D, which means that for the service test request A, two simulation test response messages are set, wherein the first simulation test response message is B and C in sequence, and the second simulation test response message is C and D in sequence.

[0121] Optionally, according to the actual application scenario, the expression format of the response message setting request can also be Transfer: A! B#C% A! C#D% M! B#D, which means setting the dynamic simulation test response messages corresponding to the two business test requests, wherein, for the business test request A, two simulation test response messages are set, wherein the first simulation test response message is B and C in sequence, and the second simulation test response message is C and D in sequence; and for the business test request M, one simulation test response message is set, wherein B and D in sequence.

[0122] In summary, by applying the embodiments of the present application, new entries can be added to the preset mapping table in batches, or existing entries in the preset mapping table can be modified in batches through the response message setting request, which can improve the updating efficiency of the preset mapping table and improve the applicability of the method of the present application.

[0123] In an optional implementation, the receiving of the target service test request sent by the test end includes: based on the long connection technology, the receiving test end calls the target service test request sent by the target service interface through the target test case.

[0124] Optionally, the test end can encapsulate the deployed business logic and provide multiple business interfaces to the outside world; in addition, test cases can be set on the test end, and the test cases are used to verify the correctness of the business logic corresponding to each business interface.

[0125] During the test process, the test end can call the target business interface through the target test case to execute the business logic corresponding to the target business interface and generate a target business test request. The generated target business test request can be further sent to the server based on the long connection technology, and the server will respond accordingly. In this process, since the long connection technology is used, the testing requirements of long-term and multiple data transmissions can be met.

[0126] Optionally, the target electrical equipment includes: a photolithography machine. In some embodiments, it may specifically be each electrical system of the photolithography machine, wherein each electrical system of the photolithography machine may include a control unit, and the control unit may perform test communication with the aforementioned test end to test the correctness of the business logic in the test end.

[0127] In some embodiments, the target electrical equipment can specifically be a mask transmission and control subsystem, a silicon wafer transmission and control subsystem, a mask workbench system, a silicon wafer workbench system, a leveling and focusing system, an alignment system, an illumination system, an objective lens system, an exposure system, a lithography machine robot system, a lithography machine motor system, a lithography machine optical center system, a lithography machine sensor system, etc., which are not limited here.

[0128] For example, taking the target electrical equipment as a photolithography machine robot system, optionally, the target business test request may specifically be a plate taking business test request, a robot rotation request, etc., which is not limited here.

[0129] Optionally, the present application embodiment also provides a test system for simulating services. Figure 1 As shown, the test system includes: at least one test terminal 11, a server terminal 12 with a simulation service function, and a configuration client terminal 13, wherein each test terminal 11 and configuration client terminal 13 are respectively connected to the server terminal 12 through a network 14 for communication.

[0130] Among them, the test end is used to send a target business test request to the server end, and the target business test request is used to request the correctness of the target business logic corresponding to the target electrical equipment in the test end; the configuration client is used to send a response message configuration request to the server end; the server end is used to execute the steps of the above-mentioned simulation service test method.

[0131] For the testing process of the test end, configuration client, and server, please refer to the above-mentioned relevant instructions and will not be repeated here.

[0132] It should be noted that if the test system includes multiple test terminals, the server can be configured to use multi-threading, so that each test terminal can have an independent thread, and the blocking of any connection will not affect other connections. This makes it suitable for scenarios where multiple test terminals use the same server for testing.

[0133] In addition, according to the actual application scenario, the server can also be set up to use multiple threads to receive messages (for example, target business test requests) and send messages (for example, target simulation test responses). The thread that receives messages is specifically used to receive messages, and the thread that sends messages is specifically used to send message responses.

[0134] Optionally, the target service test request sent by the test end can also be set to carry an end mark (for example, a newline character "\r") according to a preset electrical communication protocol. In this way, it can be ensured that after receiving multiple target service test requests, the server can split the multiple target service test requests according to the end mark, and respond to the test end in order in the form of a message queue, so as to meet the situation where the test end continuously sends multiple target service test requests in some business scenarios, thereby improving the applicability of the method of the present application.

[0135] In summary, the testing method for simulation services provided in the embodiments of the present application can solve the dependence on hardware devices, improve testing efficiency, ensure testing progress, and fully consider the response of target electrical equipment in abnormal scenarios. The test coverage is higher and comprehensive testing of the test end can be achieved.

[0136] Figure 7 A functional module diagram of a test device for simulating services provided in an embodiment of the present application. The test device is applied to a server with a simulated service function. Its basic principle and technical effects are the same as those of the corresponding method embodiment described above. For the sake of brief description, the parts not mentioned in this embodiment can be referred to the corresponding contents in the method embodiment. Figure 7 As shown, the testing device 100 comprises:

[0137] The receiving module 110 is used to receive a target service test request sent by the test end based on the simulation service, wherein the target service test request is used to request to test the correctness of the target service logic corresponding to the target electrical device in the test end;

[0138] The query module 120 is used to query the target simulation test response message corresponding to the target business test request through a preset mapping table based on the simulation service, and send the target simulation test response message to the test end, wherein the preset mapping table includes the simulation test response messages corresponding to the target electrical equipment under multiple business test requests.

[0139] In an optional implementation, the preset mapping table includes a static table and a dynamic table, the static table includes: static simulation test response messages corresponding to the target electrical equipment under multiple service test requests, and the dynamic table includes: dynamic simulation test response messages corresponding to the target electrical equipment under multiple service test requests, wherein the dynamic simulation test response message under each service test request includes: simulation test response messages corresponding to the target electrical equipment under different working conditions;

[0140] The query module 120 is specifically used to query the dynamic table whether there is a target simulation test response message corresponding to the target business test request; if not, query the static table for the target simulation test response message corresponding to the target business test request.

[0141] In an optional implementation, the query module 120 is specifically configured to sequentially match the target service test request with each service test request in the dynamic table based on a preset matching order;

[0142] If there is a matching service test request in the dynamic table, the simulation test response message corresponding to the matching service test request is used as the target simulation test response message.

[0143] In an optional implementation, the query module 120 is further configured to delete the entry corresponding to the target service test request in the preset mapping table.

[0144] In an optional implementation, the receiving module 110 is further configured to receive a response message configuration request sent by the configuration client, wherein the response message configuration request includes at least one of the following: a response message query request, a response message deletion request, and a response message setting request;

[0145] The preset mapping table is updated according to the response message configuration request.

[0146] In an optional implementation, the response message setting request includes: a dynamic simulation test response message corresponding to at least one business test request, wherein the dynamic simulation test response message under each business test request includes: a simulation test response message corresponding to the target electrical equipment under different working conditions;

[0147] The receiving module 110 is specifically configured to update the dynamic table according to a plurality of dynamic simulation test response messages corresponding to each service test request.

[0148] In an optional implementation, the receiving module 110 is specifically configured to receive a target service test request sent by the test end by calling a target service interface through a target test case based on a long connection technology.

[0149] In an optional implementation, the target electrical device includes: a photolithography machine.

[0150] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0151] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0152] Figure 8 The following is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device can be integrated into the above-mentioned test device. Figure 8 As shown, the electronic device may include: a processor 210, a storage medium 220 and a bus 230, the storage medium 220 stores machine-readable instructions executable by the processor 210, when the electronic device is running, the processor 210 and the storage medium 220 communicate through the bus 230, and the processor 210 executes the machine-readable instructions to perform the steps of the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0153] Optionally, the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method embodiment are executed. The specific implementation method and technical effect are similar and will not be repeated here.

[0154] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0155] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0156] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0157] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0158] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0159] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A testing method for simulating a service, characterized in that: Applied to a server having a simulation service function, the method comprises: Based on the simulation service, receiving a target service test request sent by the test end, wherein the target service test request is used to request to test the correctness of the target service logic corresponding to the target electrical device in the test end; Based on the simulation service, the target simulation test response message corresponding to the target business test request is queried through a preset mapping table, and the target simulation test response message is sent to the test end, wherein the preset mapping table includes simulation test response messages corresponding to the target electrical equipment under multiple business test requests.

2. The method according to claim 1, characterized in that The preset mapping table includes a static table and a dynamic table, wherein the static table includes: static simulation test response messages corresponding to the target electrical equipment under multiple service test requests, and the dynamic table includes: dynamic simulation test response messages corresponding to the target electrical equipment under multiple service test requests, wherein the dynamic simulation test response message under each service test request includes: simulation test response messages corresponding to the target electrical equipment under different working conditions; The querying of the target simulation test response message corresponding to the target service test request through the preset mapping table includes: Query the dynamic table to see whether there is a target simulation test response message corresponding to the target service test request; If it does not exist, query the static table for the target simulation test response message corresponding to the target service test request.

3. The method according to claim 2, characterized in that The querying of the dynamic table whether there is a target simulation test response message corresponding to the target service test request includes: Based on a preset matching order, the target service test request is matched with each service test request in the dynamic table in order; If there is a matching service test request in the dynamic table, the simulation test response message corresponding to the matching service test request is used as the target simulation test response message.

4. The method according to claim 1, characterized in that: After sending the target simulation test response message to the test end, the method further includes: Delete the table entry corresponding to the target service test request in the preset mapping table.

5. The method according to claim 2, characterized in that: The method further comprises: Obtain a response message configuration request sent by the configuration client, wherein the response message configuration request includes at least one of the following: a response message query request, a response message deletion request, and a response message setting request; The preset mapping table is updated according to the response message configuration request.

6. The method according to claim 5, characterized in that The response message setting request includes: a dynamic simulation test response message corresponding to at least one service test request, wherein the dynamic simulation test response message under each service test request includes: a simulation test response message corresponding to the target electrical equipment under different working conditions; The updating of the preset mapping table according to the response message configuration request includes: The dynamic table is updated according to the multiple dynamic simulation test response messages corresponding to each service test request.

7. The method according to claim 1, characterized in that The receiving the target service test request sent by the test end includes: based on the long connection technology, the receiving test end calls the target service test request sent by the target service interface through the target test case.

8. The method according to any one of claims 1 to 7, characterized in that: The target electrical equipment includes: a photolithography machine.

9. A test system for simulating services, characterized in that: The test system comprises: at least one test end, a server end with a simulation service function and a configuration client end, wherein each of the test end and the configuration client end is respectively connected to the server end for communication; The test end is used to send a target business test request to the server end, and the target business test request is used to request to test the correctness of the target business logic corresponding to the target electrical equipment in the test end; the configuration client is used to send a response message configuration request to the server end; the server end is used to execute the steps of the test method of the simulation service described in any one of claims 1-8.

10. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the test method for simulating services as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Client software testing method and apparatus

    CN106802859A

  • Dynamic simulation device for industrial control software testing

    CN114048121A

  • Software testing method and device, equipment and storage medium

    CN116089293A

  • Ground equipment software dynamic test method and system

    CN117724975A