CN116137601A - Test method, related device and equipment for target test pile service - Google Patents

Test method, related device and equipment for target test pile service Download PDF

Info

Publication number
CN116137601A
CN116137601A CN202111363566.7A CN202111363566A CN116137601A CN 116137601 A CN116137601 A CN 116137601A CN 202111363566 A CN202111363566 A CN 202111363566A CN 116137601 A CN116137601 A CN 116137601A
Authority
CN
China
Prior art keywords
target
service
test
code
intermediate code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111363566.7A
Other languages
Chinese (zh)
Inventor
李松
郭懿心
韦德志
郑伟涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111363566.7A priority Critical patent/CN116137601A/en
Publication of CN116137601A publication Critical patent/CN116137601A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The embodiment of the application discloses a testing method, a related device and equipment for target test pile service, and the related embodiment can be applied to various scenes such as cloud technology, artificial intelligence and the like, and is used for improving the safety of accessing the test pile service and reducing the access cost. The method comprises the following steps: and receiving a test request for the target test pile service, acquiring a first intermediate code and a second intermediate code, wherein the first intermediate code carries a priority loading identifier and comprises a first function name and a first byte code corresponding to the first function name, loading the first intermediate code and the second intermediate code according to the sequence of the priority loading identifier to obtain a target code, executing the target code, sending the test query message to the target test pile service for processing according to a target test pile service address in the target code when receiving the test query message, and if a response message returned by the target test pile service is received, successfully testing the target test pile service.

Description

Test method, related device and equipment for target test pile service
Technical Field
The embodiment of the application relates to the technical field of network security management, in particular to a testing method, a related device and equipment for target test pile service.
Background
Along with the rapid development of internet information, more and more internet services bring convenience to life of people, so that each business object such as an enterprise can realize the butt joint between a financial system of the business object and a comprehensive business system of a business service end in a special line connection mode, however, after the test of a business service test environment is passed, a target business service end can open a formal production environment for the business object to carry out business services such as business transaction, business inquiry or business fund detail, so that in order to maintain the stability of the business service test environment, the business service end is usually simulated by accessing a test pile service to process message data sent by the business object.
However, because the service object and the service server generally adopt modes such as signature encryption and the like provided by the service server to realize secure communication, but the test pile service cannot directly identify or process encrypted or signed messages by using a simulation target service server, the test pile service is generally modified to be capable of cracking various encryption algorithms of the service server by modifying the test pile service, so that the modified test pile service can identify and process received message data after encryption and signature, but the difficulty of cracking the encryption algorithm of the service server is higher, and high-cost manpower, financial resources and technical support are required, thereby leading to the improvement of the cost of accessing the test pile service.
Disclosure of Invention
The embodiment of the application provides a test method, a related device and equipment for target test pile service, which are used for safely accessing the target test pile service through a target test pile service address, sending a received test query message to a target test pile service simulation target business server for processing through the test pile service address, and reducing the consumption of supporting cost of manpower, financial resources and technology without modifying the test pile service, thereby reducing the cost of accessing the test pile service.
In one aspect, an embodiment of the present application provides a method for testing a target test pile service, including:
receiving a test request for a target test pile service;
acquiring a first intermediate code and a second intermediate code according to a test request, wherein the first intermediate code carries a priority loading identifier, the first intermediate code comprises a first function name and a first byte code corresponding to the first function name, the first byte code comprises a target test stub service address, and the second intermediate code is obtained by compiling a service code of a target service;
loading the first intermediate code and the second intermediate code according to the sequence of the priority loading identifiers to obtain target codes;
Executing the target code, and when receiving a test query message of the target service, sending the test query message to the target test stub service for processing according to the target test stub service address in the target code;
and if a response message returned by the target test pile service is received, the target test pile service is successfully tested.
Another aspect of the present application provides a test apparatus for testing a pile service, including:
the receiving unit is used for receiving a test request for the target test pile service;
the acquisition unit is used for acquiring a first intermediate code and a second intermediate code according to the test request, wherein the first intermediate code carries a priority loading identifier, the first intermediate code comprises a first function name and a first byte code corresponding to the first function name, the first byte code comprises a target test stub service address, and the second intermediate code is obtained by compiling a service code of a target service;
the processing unit is used for loading the first intermediate code and the second intermediate code according to the sequence of the priority loading identifiers to obtain target codes;
the processing unit is also used for executing the target code, and when receiving the test query message of the target service, the processing unit sends the test query message to the target test stub service for processing according to the target test stub service address in the target code;
And the receiving unit is also used for successfully testing the target test pile service if receiving a response message returned by the target test pile service.
In one possible design, in one implementation of another aspect of the embodiments of the present application, the processing unit may specifically be configured to:
according to the sequence of the priority loading identifiers, the first intermediate code is loaded preferentially;
when the first intermediate code is loaded and then loaded into the second intermediate code, filtering the second intermediate code according to the first function name to obtain a local second intermediate code different from the first function name;
and loading the local second intermediate code to obtain the target code.
In one possible design, in one implementation of another aspect of the embodiments of the present application, the processing unit may specifically be configured to:
after loading the first intermediate code, loading the second intermediate code according to the first function name, and if the second function name identical to the first function name is identified in the second intermediate code, ignoring the second function name and the second byte code corresponding to the second function name;
and if the second function name which is different from the first function name is identified in the second intermediate code, the second function name and the second byte code corresponding to the second function name are taken as local second intermediate codes.
In one possible design, in one implementation of another aspect of the embodiments of the present application, the obtaining unit may specifically be configured to:
downloading a first intermediate code according to the first test identifier;
and downloading the service code according to the second test identifier, and compiling the service code according to the second function name to obtain a second intermediate code.
In one possible design, in one implementation of another aspect of the embodiments of the present application, the processing unit may specifically be configured to:
executing the target code, and processing the test query message into a test query plaintext according to the target code when the test query message of the target service is received;
and sending the test query plaintext to a target test pile service corresponding to the target test pile service address for processing.
In one possible design, in one implementation of another aspect of the embodiments of the present application,
the processing unit is also used for updating the target code into a second intermediate code and executing the second intermediate code;
and the processing unit is also used for sending the target service message to the target service server for processing according to the interface address of the target service server in the second intermediate code when the target service message is received.
In one possible design, in one implementation of another aspect of the embodiments of the present application, the processing unit may specifically be configured to:
when receiving the target service message, processing the target service message into a target service ciphertext according to an encryption algorithm corresponding to the target service server interface in the second intermediate code;
and sending the target service ciphertext to a target service server corresponding to the interface address of the target service server for processing.
Another aspect of the present application provides a computer device comprising: memory, transceiver, processor, and bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory to realize the method of the aspects;
the bus system is used to connect the memory and the processor to communicate the memory and the processor.
Another aspect of the present application provides a computer-readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the methods of the above aspects.
One aspect of the present application provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method of determining a text category provided in any of the above aspects.
From the above technical solutions, the embodiments of the present application have the following advantages:
the method comprises the steps of receiving a test request for target test pile service, obtaining a first intermediate code and a second intermediate code carrying a priority loading identifier according to the test request, loading the first intermediate code and the second intermediate code according to the sequence of the priority loading identifier to obtain a target code, executing the target code, sending the test query message to the target test pile service for processing according to a target test pile service address in the target code when the test query message of target service is received, and successfully testing the target test pile service when a response message returned by the target test pile service is received. By means of the method, the first intermediate code can be replaced with the second intermediate code with the same first function name through the priority loading identifier, so that the target intermediate code can be acquired, when the target code is executed, the target test pile service can be safely accessed through the target test pile service address, the received test query message is sent to the target test pile service simulation target service server for processing through the test pile service address, the test pile service is not required to be modified, the consumption of labor, financial resources and technical support cost can be reduced, and the cost of accessing the test pile service is reduced.
Drawings
FIG. 1 is a schematic diagram of an architecture of a data control system in an embodiment of the present application;
FIG. 2 is another architecture diagram of a data control system in an embodiment of the present application;
FIG. 3 is a schematic diagram of an interaction of a data control system in an embodiment of the present application;
FIG. 4 is a flow chart of one embodiment of a method of testing a target test stake service in an embodiment of the application;
FIG. 5 is a schematic flow chart of a testing method of a target test stake service according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a testing environment for a testing method of a target test stub service in an embodiment of the present application;
FIG. 7 is a schematic diagram of one embodiment of a testing apparatus for a target test stake service in an embodiment of the application;
FIG. 8 is a schematic diagram of one embodiment of a computer device in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a test method, a related device and equipment for target test pile service, which are used for safely accessing the target test pile service through a target test pile service address, sending a received test query message to a target test pile service simulation target business server for processing through the test pile service address, and reducing the consumption of supporting cost of manpower, financial resources and technology without modifying the test pile service, thereby reducing the cost of accessing the test pile service.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be capable of operation in sequences other than those illustrated or described herein, for example. Furthermore, the terms "comprises," "comprising," and "includes" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
With the rapid development of information, cloud technology (Cloud technology) is also gradually moving into the aspects of people's life. The cloud technology is a generic term of network technology, information technology, integration technology, management platform technology, application technology and the like based on cloud computing business model application, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
Cloud Security (Cloud Security) refers to a generic term of Security software, hardware, users, institutions, and Security Cloud platforms based on Cloud computing business model application. Cloud security fuses emerging technologies and concepts such as parallel processing, grid computing, unknown virus behavior judgment and the like, acquires the latest information of Trojan horse and malicious programs in the Internet through abnormal monitoring of a large number of network clients on software behaviors, sends the latest information to a server for automatic analysis and processing, and distributes solutions of viruses and Trojan horse to each client. The testing method of the target test pile service provided by the embodiment of the application can be realized through a cloud computing technology and a cloud security technology.
It should be understood that the test method of the target test pile service provided by the application can be applied to the fields of cloud technology, artificial intelligence, intelligent traffic and the like, and is used in a scene that message data is processed by a test pile service simulation service end to provide standardized service for a service object, for example, the test pile service simulation bank processes a fund inquiry message to provide the service of fund inquiry for enterprise clients; as another example, processing a holding securities query message by a test stake service simulation securities company, for example, enables providing a business service holding securities queries for a query object; for example, in the above-mentioned various scenarios, in order to access a test stub service to simulate a service end of the service, the test stub service needs to be modified into a test stub service capable of cracking various encryption algorithms of the service end, so that the modified test stub service can identify and process received encrypted signed message data, but the difficulty of cracking the encryption algorithm of the service end is high, and high-cost manpower, financial resources and technical support are required, thereby increasing the cost of accessing the test stub service.
In order to solve the above-mentioned problems, the present application proposes a testing method for a target test stub service, which is applied to a data control system shown in fig. 1, referring to fig. 1, fig. 1 is a schematic diagram of an architecture of the data control system in an embodiment of the present application, as shown in fig. 1, an application server obtains a first intermediate code and a second intermediate code carrying a priority loading identifier according to a test request by receiving a test request of a terminal device for the target test stub service, loads the first intermediate code and the second intermediate code according to a priority loading identifier sequence, so as to obtain the target code, then executes the target code, when a test query message of a target service is received, sends the test query message to the target test stub service according to a target test stub service address in the target code for processing, and when a response message returned by the target test stub service is received, the test of the target test stub service is successful. By means of the method, the first intermediate code can be replaced with the second intermediate code with the same first function name through the priority loading identifier, so that the target intermediate code can be acquired, when the target code is executed, the target test pile service can be safely accessed through the target test pile service address, the received test query message is sent to the target test pile service simulation target service server for processing through the test pile service address, the test pile service is not required to be modified, the consumption of labor, financial resources and technical support cost can be reduced, and the cost of accessing the test pile service is reduced.
The application server is in communication connection with the terminal equipment, and the application server is in communication connection with the test pile service. Specifically, the application server and the test pile service may be integrated on the same server, or may be two servers that are independent from each other. It should be understood that the number of target terminal devices, application servers, and test stub services shown in fig. 1 is only one example, and is not intended to limit the number of target terminal devices, application servers, and test stub servers, and the number should be flexibly determined in particular in connection with practical situations.
It should be noted that, referring to fig. 2, fig. 2 is another schematic architecture diagram of the data control system in the embodiment of the present application, which includes a target terminal device, an application server, and a test pile service, it can be understood that only one terminal device is shown in fig. 2, and in an actual scenario, more kinds of terminal devices may participate in the data processing process, where the terminal devices include, but are not limited to, a mobile phone, a computer, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, etc., and specific numbers and kinds are not limited herein, depending on the actual scenario. In addition, one server is shown in fig. 2, but in an actual scenario, there may also be a plurality of servers involved, especially in a scenario of multi-model training interaction, the number of servers depends on the actual scenario, and the present application is not limited thereto.
It should be noted that in this embodiment, the server may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (content delivery network, CDN), and basic cloud computing services such as big data and an artificial intelligence platform. The terminal device and the server may be directly or indirectly connected through wired or wireless communication, and the terminal device and the server may be connected to form a blockchain network, which is not limited herein.
In order to solve the above-mentioned problems, the present application proposes a testing method of a target test stub service, which is generally performed by a server or a terminal device, and accordingly, a testing apparatus applied to the target test stub service is generally provided in the server or the terminal device.
It is understood that the method, apparatus and device for testing a stake service according to the present disclosure, wherein a plurality of servers or terminal devices may be configured as a blockchain, and the servers or terminal devices are nodes on the blockchain. In practical applications, data sharing between nodes may be required in a blockchain, and code data or the like may be stored on each node.
For easy understanding, referring to fig. 3, fig. 3 is an interaction diagram of the data control system in the embodiment of the present application, as shown in fig. 3, in step S1, that is, when a business object wants to access a target business server to perform a business service through an application server, that is, the target business server can perform business transaction, business query, business fund detail and other business services through the application server opening a production environment for the business object, in this case, the application server can access the test stake service to simulate the target business server to process a business service packet sent by the business object, so, in order to verify whether the test stake service can simulate a certain business capability of the target business server, a test request of the target test stake service can be sent to the application server through a terminal device.
In step S2, that is, in the process of a test transaction of the test stub service, when a test request of the target test stub service is received, the application server may compile the code in the acquired stub device program into a first intermediate code by receiving a stub device program uploaded by a developer or a tester, and may compile the code in the acquired stub device program into a first intermediate code according to a preset function naming specification, and at the same time, the application server may add the preset function naming specification into a software development kit (Software Development Kit, SDK), may download a service code from a pre-device, compile the acquired service code into a second intermediate code by the SDK, then may load the first intermediate code and the second intermediate code into target codes through an interpreter, and when the target code is run in an operating system of the application server, the developer or the tester may simulate a service object to send a test query message to the application server, and at this time, the application server may have one or more physical servers, where a specific number is not limited, where the physical servers may be specifically represented by the test server, may be used for controlling the operation of the application server, and may identify the service code by the test stub may be executed by the test server, and may be accessed to the test stub, and may be tested by a plain text, and may be processed by the test stub, and may be accessed to the test stub, and may be tested by the test stub.
In step S3, that is, in the test transaction response of the test stub service, a developer or a tester may configure a response message corresponding to the logic processing result in the target test stub service according to the SDK port, the corresponding logic algorithm and the processing example provided in advance by the target service server, when the target test stub service receives the test query plaintext sent by the application server through the network communication protocol, the target test stub service may identify the received test query plaintext, and may simulate the target service server to perform corresponding logic processing on the test query plaintext according to the acquired service capability of the SDK port, so as to acquire the logic processing result, and then, the target test stub service may acquire the corresponding response message according to the logic processing result and send the response message to the application server through the network communication protocol.
In step S4, that is, when the application server receives the response message fed back by the target pile service, the application server may perform corresponding logic processing on the received response message according to the target code and send the processed response message to the target terminal device, that is, the application server may successfully access the target test pile service, and the target test pile service may simulate the target service server to process the test query message and return a corresponding processing result, so as to display that the test of the test pile service is successful, and the application server has the capability of accessing the target service server.
In step S5, that is, when the test transaction of the target service server is finished, it may be understood that the performance of the application server accessing the target service server to perform a certain service is stable, so that the target service server may open a production environment corresponding to the service through the application server facing the service object, so that the service object accesses the target service server through the application server to perform the service, and in this case, for the service, the service object may send a target service message to the application server through the terminal device, and perform corresponding logic processing, such as message encryption or signature verification, on the received target service message through the application server.
In step S6, that is, when the access service of the target service server is finished, after the application server performs corresponding logic processing on the received target service message, the application server may access the target service server through the corresponding SDK port, and send the processed target service message to the target service server through the network communication protocol for processing, so that the processing result may be returned to the service object through the application server.
Referring to fig. 4, fig. 5, and fig. 6, an embodiment of a method for testing a target test stub service in an embodiment of the present application includes:
in step S101, a test request for a target test stub service is received;
in this embodiment, when a tester or a caller wants to test or verify whether the application server has the capability of providing the service for the service object, it can be reflected by testing whether the test stub service of the application server can simulate the target service server, so that the tester or the caller can send a test request of the target test stub service to the application server through the terminal device, so that the target test stub service can be tested later according to the test request to obtain relevant data.
Specifically, the target test stub service may be represented as a mock test stub service, or may be another test stub service, such as a stub test stub service, which is not limited herein, and it is to be understood that the target test stub service in this embodiment is described by taking a mock test stub service as an example, where the mock test stub service can be used to simulate a test result, but the mock test stub service can only identify and process plaintext, and the mock test stub service mainly refers to a puppet of a program, that is, a dummy program, and can respond according to the wishes of a tester, and returns information that needs to be obtained by a tested object, so that the mock test stub service can simulate a dummy object of a real object behavior in a controllable manner, for example, an automobile designer uses a crash test dummy to simulate a dynamic behavior of a person in a vehicle crash. The application server may be embodied as a bank payment product, a stock delivery center or a school information inquiry platform, or the like, or may be other servers, which are not particularly limited herein, wherein the bank payment product can be used to aggregate the fund payment capabilities of a plurality of target service servers, shield the difference between each target service server, and provide standardized payment receiving service or fund inquiry service for service correspondence, or the like. The target service server may be embodied as a bank, a securities company, an information management system, or the like, and may be other servers, which are not particularly limited herein. Business objects may be embodied as businesses, general individual users or communities, etc., as well as other objects, without specific limitation.
For example, when the tester wants to verify whether the application server can access the function of inquiring the total amount of funds, the tester can send a test request of the target test stake service corresponding to the function of inquiring the total amount of funds to the application server through the terminal device.
In step S102, a first intermediate code and a second intermediate code are obtained according to a test request, wherein the first intermediate code carries a priority loading identifier, the first intermediate code includes a first function name and a first byte code corresponding to the first function name, the first byte code includes a target test stub service address, and the second intermediate code is obtained by compiling a service code of a target service;
in this embodiment, as shown in fig. 5, after receiving a test request for a target test stub service, a first intermediate code and a second intermediate code may be acquired according to the test request, so that the acquired first intermediate code and second intermediate code may be processed subsequently to accurately access the target test stub service.
Specifically, as shown in fig. 6, after receiving a test request for a target test stub service, the application server may compile the acquired code in the stub device program into a first intermediate code by receiving the stub device program code uploaded by a developer or tester, and according to a preset function naming specification, and at the same time, the application server may add the preset function naming specification into the software development kit SDK, and then may download the service code from the front-end device, and compile the acquired service code into a second intermediate code through the SDK.
The pile device program code is a code which can be used for carrying out corresponding logic processing on the message data when corresponding logic processing links are carried out, and specifically as shown in table 1, the first intermediate code is a binary code which is obtained after compiling the pile device program code according to preset first function names and is convenient for the computer equipment to identify, so that the obtained message data can be processed into plaintext data which can be identified by the target pile service according to the first byte code corresponding to each first function name. The front-end equipment can be specifically expressed as a front-end processor, and the front-end processor can be connected with a direct-connection gateway, such as a bank-enterprise direct-connection gateway, so that the communication protocol message conversion of the target service server can be realized, and the communication protocol message can be subjected to differential logic processing, thereby obtaining a standard interface which passes the test and providing the standard interface for the upper-layer service. A priority loading Identifier (ID) for indicating a code that can be preferentially identified and loaded may be embodied as a numeric string of an integer (int), a character string, or the like.
TABLE 1
Figure BDA0003359761780000081
It can be understood that the function name in the second intermediate code may only include a second function name identical to the first function name, or may include a second function name and other function names, where the second function name corresponds to a second byte code, and since the second intermediate code is compiled based on a program in the front-end processor, and the program in the front-end processor may be compiled based on a bank-enterprise direct-connection client SDK, the second byte code may be expressed as performing message encryption according to an SDK encryption algorithm, or performing message signature according to an SDK signature method, or the message communication address is a target service server interface address, such as an SDK port, or may be other byte codes, where the method is not specifically limited.
In step S103, loading the first intermediate code and the second intermediate code according to the sequence of the priority loading identifier to obtain the target code;
in this embodiment, as shown in fig. 5, after the first intermediate code, the second intermediate code and the priority loading identifier are acquired, the first intermediate code may be loaded preferentially, and the second intermediate code may be loaded continuously, and meanwhile, according to a loading condition that only the unique function name is reserved, an object code may be acquired, so that the acquired object code may be quickly and accurately accessed to the service of the target test stub in a subsequent operation, where the object code includes the first intermediate code and a local second intermediate code, and the local second intermediate code is a code corresponding to a function name different from the first function name in the second code.
Specifically, after the first intermediate code, the second intermediate code and the priority loading identifier are obtained, the first intermediate code and the second intermediate code may be both input into the interpreter, and may run while compiling according to the interpreter, and the loaded function names and byte codes are not reloaded any more, only the principle of the unique function names and byte codes of the priority loading is reserved, the first intermediate code may be loaded in the interpreter according to the priority loading identifier, the first function names and the first byte codes as shown in table 1, then loading the second intermediate code is continued, and if the loaded function names, such as the first function names, the byte codes of the function names may be covered, ignored, or hidden, etc. are identified until the second intermediate code is loaded, so as to obtain the target code.
For example, according to the priority loading identifier, assuming that a first intermediate code of a first function name "message encryption" and a corresponding first byte code "unencrypted" are already loaded in the interpreter, then, when the second function name is "message encryption" identical to the first function name in the second intermediate code and the second intermediate code is "message encryption according to an SDK encryption algorithm", the first byte code "unencrypted" corresponding to the first function name "message encryption" covers "message encryption according to the SDK encryption algorithm", so that the service message can be subjected to corresponding logic processing according to the first byte code "unencrypted" when the subsequent rerun target code performs the message encryption processing on the service message.
In step S104, executing the target code, and when receiving the test query message of the target service, sending the test query message to the target test stub service for processing according to the target test stub service address in the target code;
in this embodiment, as shown in fig. 5, after the target code is acquired, the target code may be input into the operating system to run, which may be understood that the current application server has already established a test environment with the target test stub service, so that a test query message sent by a developer or a caller may be received, and the test query message may be processed according to each logic processing link of the running target code, so that a test query message subjected to logic processing may be acquired, and meanwhile, the application server may be directly accessed to the target test stub service through a target test stub service address corresponding to message communication, and then the test query message subjected to logic processing may be sent to the accessed target test stub service through a network protocol to process, without modifying the capability of the test stub service, so that the test query message may be accurately and rapidly sent to the target test stub service to process, and consumption of manpower, financial resources and technical support may be reduced, so as to reduce the cost of accessing the test stub service.
Specifically, as shown in fig. 6, after the operating system may run the object code, it may be understood that the application server has established a test environment with the object test stub service, and a developer or a tester may configure, in advance, a response packet corresponding to the logic processing result in the object test stub service according to the SDK port, the corresponding logic algorithm and the processing example provided by the object service server, so that the object test stub service can simulate the obtained plaintext by processing by the object service server.
Further, when the application server accesses to the target test pile service through the target test pile service address, then, the test query message is sent to the target test pile service according to the network communication protocol, so that the target test pile service can receive the test query message sent by the application server through the network communication protocol, the target test pile service can identify the received test query message, and the target service server can be simulated according to the acquired service capability of the SDK port to perform corresponding logic processing on the test query message, so as to acquire a logic processing result.
For example, if the application server receives the test query message when accessing to the target test stub service A1 through the target test stub service address 001, the application server may process the test query message according to the target code, such as not encrypting, and then send the test query message "whether the query balance has 20 ten thousand yuan" without encryption to the target test stub service A1 through a network communication protocol, such as an http protocol, so that the target test stub service A1 may simulate the fund query capability of the target service server, such as the bank B, to identify and process whether the obtained test query message "whether the query balance has 20 ten thousand yuan" without encryption.
In step S105, if a response message returned by the target test stub service is received, the test of the target test stub service is successful.
In this embodiment, when the application server receives the response message fed back by the target pile service, it may be understood that the target test pile service successfully simulates that the target service server processes the test query message, that is, the test of the target test pile service is successful.
Specifically, when the application server receives the response message fed back by the target pile service, the application server may perform corresponding logic processing on the received response message according to the target code, and send the processed response message to the target terminal device, so that a developer or a caller can timely perceive that the target test pile service is successfully tested, that is, the application server can successfully access the target test pile service, and the target test pile service can simulate the target service server to process the test query message, thereby reflecting the capability of the application server to access the target service server.
For example, assuming that the target test stub service A1 may simulate the fund inquiry capability of the target service server, such as the bank B, to identify and process whether the acquired unencrypted test inquiry message has 20 ten thousand yuan, then, the target test stub service A1 may determine, according to a pre-configured response message case, that a response message fed back to a message such as inquiring funds or inquiring balances is "balance deficient", and the target test stub service A1 may send the response message as "balance deficient" to the application server, and send the response message to the terminal device through the application server, so that a developer or a caller may timely perceive that the test of the target test stub service is successful.
It can be understood that if the response message returned by the target test pile service is not received, it can be understood that the target test pile service simulates that the target service server fails to process the test query message, or the target test pile service simulates that the test query message fails to be identified, and the like, so that the target test pile service fails to be tested, a prompt of the test failure and a reason of the failure can be sent to the terminal device through the application server, so that a developer or a caller can modify an abnormal code in time according to the prompt of the test failure and the reason of the failure, or maintain the target test pile service.
In the embodiment of the application, the method for testing the target test pile service is provided, by adopting the mode, the first intermediate code can be replaced by the second intermediate code with the same first function name through the priority loading identifier, so that the target intermediate code is acquired, the target test pile service can be safely accessed through the target test pile service address when the target code is executed, and the received test inquiry message is sent to the target test pile service simulation target service server for processing through the test pile service address, so that the test pile service is not required to be modified, the consumption of manpower, financial resources and technical support cost can be reduced, and the cost of accessing the test pile service is reduced.
Optionally, on the basis of the embodiment corresponding to fig. 4, in another optional embodiment of the method for testing a target test stub service provided in the embodiment of the present application, loading the first intermediate code and the second intermediate code according to the sequence of the priority loading identifier to obtain the target code includes:
according to the sequence of the priority loading identifiers, the first intermediate code is loaded preferentially;
when the first intermediate code is loaded and then loaded into the second intermediate code, filtering the second intermediate code according to the first function name to obtain a local second intermediate code different from the first function name;
and loading the local second intermediate code to obtain the target code.
In this embodiment, as shown in fig. 6, after the first intermediate code, the second intermediate code and the priority loading identifier are acquired, the first intermediate code may be loaded preferentially, if the first intermediate code is loaded and then is loaded into the second intermediate code, a code different from the first function name, that is, the second intermediate code, may be filtered from the second intermediate code according to the first function name, and then, the filtered local second intermediate code is loaded to acquire the target code, so that the first intermediate code may be replaced by the code corresponding to the function name identical to the first function name in the second intermediate code, so as to acquire the target code, so that the acquired message data may be processed into plaintext data according to the target code, and then, the plaintext data may be automatically routed to the corresponding target test stub service according to the target test stub service address, and may be sent to the target test stub service for processing, thereby enabling the stability of the test environment of the test stub service to be maintained and the cost of accessing the target test stub service to be reduced.
Specifically, after the first intermediate code, the second intermediate code and the priority loading identifier are obtained, the first intermediate code and the second intermediate code may be both input into the interpreter, the first intermediate code may be loaded in the interpreter according to the priority loading identifier, the first function name and the first byte code as shown in table 1 may be loaded preferentially, then the second intermediate code may be loaded continuously, if the function name identical to the first function name is identified, the code corresponding to the function name may be filtered, that is, the function name, that is, the byte code corresponding to the function name, is filtered, and only the local second intermediate code different from the first function name is loaded until the loading is completed, so that the target code may be obtained.
For example, according to the priority loading identifier, it is assumed that, in the interpreter, according to the priority loading identifier S01, a first intermediate code corresponding to the priority loading identifier S01, such as a first function name "message check" and a first byte code corresponding to the first intermediate code "no check", then, when the first intermediate code is loaded, when the first intermediate code is continuously loaded into a second intermediate code, the function name of the second intermediate code may be traversed, and if the function name of the "message check" identical to the first function name is identified, the function name and the byte code corresponding to the function name may be filtered as "message check according to the SDK check algorithm".
Optionally, in another alternative embodiment of the method for testing the target test stub service according to the embodiment of fig. 4, when the first intermediate code is loaded and then loaded into the second intermediate code, the filtering operation is performed on the second intermediate code according to the first function name, to obtain a local second intermediate code different from the first function name, including:
after loading the first intermediate code, loading the second intermediate code according to the first function name, and if the second function name identical to the first function name is identified in the second intermediate code, ignoring the second function name and the second byte code corresponding to the second function name;
and if the second function name which is different from the first function name is identified in the second intermediate code, the second function name and the second byte code corresponding to the second function name are taken as local second intermediate codes.
In this embodiment, after the first intermediate code is loaded, the second intermediate code may be loaded according to the first function name, if a second function name identical to the first function name is identified in the second intermediate code, the second function name and a second byte code corresponding to the second function name are ignored, and if a second function name different from the first function name is identified in the second intermediate code, the second function name and the second byte code corresponding to the second function name are used as local second intermediate codes, so that a target code may be acquired according to the loaded first intermediate code and the loaded local second intermediate code, so that the acquired message data may be processed into plaintext data according to the target code, and the plaintext data may be automatically routed to the corresponding target test stub service directly according to the target test stub service address, and the plaintext data may be sent to the target test stub service for processing, thereby enabling to maintain the stability of the test environment of the test stub service and reduce the cost of accessing the target test stub service.
Specifically, after the first intermediate code is loaded in the interpreter according to the priority loading identifier, the second intermediate code may be first identified according to the loaded first function name, if the second function name identical to the first function name is identified, the code corresponding to the function name may be ignored, that is, the byte code corresponding to the function name is ignored, and if the second function name different from the first function name is identified, the byte code corresponding to the function name, that is, the local second intermediate code, is loaded and ignored until the loading is completed, so as to obtain the target code.
For example, according to the priority loading identifier, it is assumed that after the interpreter finishes loading the first intermediate code, loading may be continued on the second intermediate code, and according to the principle that the interpreter only identifies and loads the unique function name, if a second function name identical to the first function name, such as "message communication", is identified, the second function name and a second byte code corresponding to the second function name, such as "target service server SDK port S1", may be ignored, and if a second function name different from the first function name, such as "message protocol header", is identified, the second function name and a second byte code corresponding to the second function name, such as "step1", may be loaded, so as to obtain a local second intermediate code.
Optionally, based on the embodiment corresponding to fig. 4, in another optional embodiment of the method for testing the target test stub service provided in the embodiment of the present application, the test request carries a first test identifier and a second test identifier; acquiring the first intermediate code and the second intermediate code according to the test request, including:
downloading a first intermediate code according to the first test identifier;
and downloading the service code according to the second test identifier, and compiling the service code according to the second function name to obtain a second intermediate code.
In this embodiment, when a test request for a target test stub service is received, a first test identifier and a second test identifier carried by the test request may be obtained, a first intermediate code corresponding to the first test identifier may be downloaded according to the first test identifier, then a service code corresponding to the second test identifier may be obtained from a front-end device corresponding to the second test identifier according to the second test identifier, and the service code may be compiled by a second function name to obtain a second intermediate code, so that the service code in the front-end device does not need to be invaded in subsequent test and practical application, and the test may be accurately and quickly accessed into the target test stub service through the replacement of the first intermediate code, so that not only may development cost of accessing the test stub service be reduced, but also funds risk caused by incorrect operation due to the service code invaded into the front-end device may be avoided, so as to maintain stability of a test environment.
The first test identifier may be bound to the target test stub service, and is configured to trigger the application server to remotely download a first intermediate code corresponding to the first test identifier when a test request for the target test stub service is received, where the first test identifier may be specifically represented as a digital string that is an integer, or may be specifically represented as a character string, or the like. The second test identifier may be bound to the target service code, and when a test request for the target test stub service is received, the application server may be triggered to download the target service code from the front-end device storing the target service code corresponding to the second test identifier.
Specifically, when a test request for a target test pile service is received, a first test identifier and a second test identifier carried by the test request can be obtained, then the application server can send a download request of the first intermediate code to the remote pile device by the first test identifier, can remotely download the first intermediate code corresponding to the first test identifier, and can reduce the cost of manually uploading the first intermediate code in real time in a test environment, thereby realizing quick switching to the test environment.
Further, the application server can also quickly and accurately index the corresponding front-end equipment according to the second test identifier, download the target service code corresponding to the second test identifier in the front-end equipment, call the SDK toolkit, fill the first function name defined in advance into the SDK toolkit, and combine the first function name with other function names defined in the SDK toolkit to obtain a second function name, so that the SDK toolkit can compile the service code through the second function name to obtain a second intermediate code.
Optionally, in another optional embodiment of the method for testing a target test stub service according to the embodiment of fig. 4, when a test query packet of a target service is received, the target code is executed, and the test query packet is sent to the target test stub service according to a target test stub service address in the target code for processing, where the method includes:
executing the target code, and processing the test query message into a test query plaintext according to the target code when the test query message of the target service is received;
and sending the test query plaintext to a target test pile service corresponding to the target test pile service address for processing.
In this embodiment, the target code is executed, which may be understood that the application server may access the target test stub service to perform performance simulation of processing a certain business service, so when a test query message of the target business is received, the application server may process the test query message into a test query plaintext according to a message processing manner in the target code, then may access the target test stub service according to a target test stub service address, and send the processed test query plaintext to the target test stub service for identification and processing through a network communication protocol, and may automatically route to the target test stub service through the target test stub service address in the target code, thereby implementing low-cost access to the target test stub service, and second, may implement automatic test of the target test stub service by acquiring the test query plaintext that the target test stub service may identify and process through the running target code, thereby reducing development cost.
Specifically, when a test query message of a target service is received, the application server can process the test query message into a test query plaintext according to a processing mode corresponding to a message encryption processing link in a target code as 'non-encryption', and meanwhile, the application server can automatically access a target test pile service through a communication address corresponding to a message communication processing link in the target code as a 'target test pile service address', and then, the application server can send the processed test query plaintext into the target test pile service for processing through a network communication protocol, so that the automatic test of the target test pile service is realized.
Optionally, on the basis of the embodiment corresponding to fig. 4, in another optional embodiment of the method for testing a target test stub service provided in the embodiment of the present application, the second byte code includes a target service server interface address; if a response message returned by the target test stub service is received, after the test of the target test stub service is successful, the method further comprises the following steps:
updating the target code into a second intermediate code, and executing the second intermediate code;
and when the target service message is received, the target service message is sent to the target service server for processing according to the interface address of the target service server in the second intermediate code.
In this embodiment, after the test of the target test stub service is successful, it may be understood that the application server accesses the target service server to perform performance stabilization of a certain service, so that a developer may end a test deployment stage, at this time, the target service server may open a production environment corresponding to the service for the service object through the application server, the application server may update the target code into a second intermediate code and execute the second intermediate code, and then, when receiving a target service packet sent by the service object through the terminal device, the application server may access the target service server according to an interface address of the target service server in the second intermediate code and send the target service packet to the target service server through a network communication protocol for processing, without invading the service code in the front device, so that accurate and rapid access to the target service server for performing service processing may be implemented, and a risk caused by an erroneous operation due to the service code invading the front device may be avoided, so as to maintain stability of the production environment.
The target service message is message data formed by a request or an instruction sent by the target terminal device by the service object, and specifically may be represented by enterprise fund inquiry, income or expense inquiry, or receipt and payment service, or other expression forms, which are not limited herein.
Specifically, as shown in fig. 6, after the test of the target test stub service is successful, the application server may stop running the target code, and further, may re-input the acquired second intermediate code into the interpreter, reload the second intermediate code through the interpreter, that is, update the target code to the second intermediate code, and then, the application server may run the second intermediate code in the operating system.
Further, after the second intermediate code operates, it may be understood that the target service server is opened through a production environment corresponding to a certain service of the application server facing the service object, and the application server may be stably connected to the target service server to develop the service, so when the application server receives the target service packet, the application server may automatically connect to the target service server according to the interface address of the target service server in the second code, and then the application server may send the processed target service packet to the target service server for processing through a network communication protocol.
For example, if a target service message such as "total amount of inquiry funds" is received, the target service message can be accessed to the target service server by the application server through the running second intermediate code, wherein the message communication address of the second intermediate code is "the SDK interface address of the target service server is S2", the target service message "total amount of inquiry funds" is sent to the target service server by the network communication protocol is "bank C", so that the target service server decrypts and checks the target service message by the "bank C", and the decrypted target service message "total amount of inquiry funds" can be obtained, and then corresponding funds inquiry processing is performed.
Optionally, in another optional embodiment of the method for testing the target test stub service according to the embodiment of fig. 4, when the target service packet is received, the target service packet is sent to the target service server according to the target service server interface address in the second intermediate code for processing, where the method includes:
when receiving the target service message, processing the target service message into a target service ciphertext according to an encryption algorithm corresponding to the target service server interface in the second intermediate code;
and sending the target service ciphertext to a target service server corresponding to the interface address of the target service server for processing.
In this embodiment, the second intermediate code is executed, which may be understood that the application server may access the target service server to process a certain service, so when a target service packet sent by a service object through the terminal device is received, the application server may process the target service packet into a target service ciphertext according to a packet processing manner in the second code, then may access the target service server according to a target service interface address, and send the processed target service ciphertext to the target service server through a network communication protocol, and perform processing such as decryption or signature verification, so as to analyze the target service ciphertext into a target service plaintext, and then may further identify and process the analyzed target service plaintext, without intrusion into a service code in a front device, and may use the second intermediate code after the service code is compiled to perform corresponding encryption or signature verification processing on the received target service packet, so as to obtain the target service ciphertext, and may ensure the security of the packet, thereby maintaining the stability of the production environment.
Specifically, when receiving the target service message of the target service, the application server may encrypt the message according to the processing mode corresponding to the "message encryption" processing link in the second code as "performing message encryption according to the SDK encryption algorithm", and process the target service message into the target service ciphertext, and simultaneously, the application server may automatically access the target service server through the communication address corresponding to the "message communication" processing link in the second intermediate code as the "target service server interface address", and then, the application server may send the processed target service ciphertext to the target service server for processing through the network communication protocol.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating an embodiment of a testing apparatus for testing a pile service according to an embodiment of the present application, the testing apparatus 20 for testing a pile service includes:
a receiving unit 201, configured to receive a test request for a target test stub service;
an obtaining unit 202, configured to obtain a first intermediate code and a second intermediate code according to a test request, where the first intermediate code carries a priority loading identifier, the first intermediate code includes a first function name and a first byte code corresponding to the first function name, the first byte code includes a target test stub service address, and the second intermediate code is obtained by compiling a service code of a target service;
The processing unit 203 is configured to load the first intermediate code and the second intermediate code according to the sequence of the priority loading identifier, so as to obtain an object code;
the processing unit 203 is further configured to execute the target code, and when receiving the test query message of the target service, send the test query message to the target test stub service for processing according to the target test stub service address in the target code;
the receiving unit 201 is further configured to, if a response message returned by the target test stub service is received, test the target test stub service successfully.
Alternatively, in another embodiment of the testing apparatus for testing a pile service according to the present application, based on the embodiment corresponding to fig. 7, the processing unit 203 may specifically be configured to:
according to the sequence of the priority loading identifiers, the first intermediate code is loaded preferentially;
when the first intermediate code is loaded and then loaded into the second intermediate code, filtering the second intermediate code according to the first function name to obtain a local second intermediate code different from the first function name;
and loading the local second intermediate code to obtain the target code.
Alternatively, in another embodiment of the testing apparatus for testing a pile service according to the present application, based on the embodiment corresponding to fig. 7, the processing unit 203 may specifically be configured to:
After loading the first intermediate code, loading the second intermediate code according to the first function name, and if the second function name identical to the first function name is identified in the second intermediate code, ignoring the second function name and the second byte code corresponding to the second function name;
and if the second function name which is different from the first function name is identified in the second intermediate code, the second function name and the second byte code corresponding to the second function name are taken as local second intermediate codes.
Alternatively, in another embodiment of the testing apparatus for testing a pile service according to the present application, based on the embodiment corresponding to fig. 7, the obtaining unit 202 may specifically be configured to:
downloading a first intermediate code according to the first test identifier;
and downloading the service code according to the second test identifier, and compiling the service code according to the second function name to obtain a second intermediate code.
Alternatively, in another embodiment of the testing apparatus for testing a pile service according to the present application, based on the embodiment corresponding to fig. 7, the processing unit 203 may specifically be configured to:
executing the target code, and processing the test query message into a test query plaintext according to the target code when the test query message of the target service is received;
And sending the test query plaintext to a target test pile service corresponding to the target test pile service address for processing.
Alternatively, in another embodiment of the testing apparatus for testing a pile service according to the present embodiment, based on the embodiment corresponding to fig. 7, as described above,
the processing unit 203 is further configured to update the object code to a second intermediate code, and execute the second intermediate code;
the processing unit 203 is further configured to send, when receiving the target service message, the target service message to the target service server according to the target service server interface address in the second intermediate code for processing
Alternatively, in another embodiment of the testing apparatus for testing a pile service according to the present application, based on the embodiment corresponding to fig. 7, the processing unit 203 may specifically be configured to:
when receiving the target service message, processing the target service message into a target service ciphertext according to an encryption algorithm corresponding to the target service server interface in the second intermediate code;
and sending the target service ciphertext to a target service server corresponding to the interface address of the target service server for processing.
Another aspect of the present application provides another schematic diagram of a computer device, as shown in fig. 8, where fig. 8 is a schematic diagram of a computer device structure provided in an embodiment of the present application, where the computer device 300 may have a relatively large difference due to configuration or performance, and may include one or more central processing units (central processing units, CPU) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) storing application programs 331 or data 332. Wherein memory 320 and storage medium 330 may be transitory or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations in the computer device 300. Still further, the central processor 310 may be configured to communicate with the storage medium 330 and execute a series of instruction operations in the storage medium 330 on the computer device 300.
The computer device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input/output interfaces 360, and/or one or more operating systems 333, such as Windows Server TM ,Mac OS X TM ,Unix TM ,Linux TM ,FreeBSD TM Etc.
The computer device 300 described above is also used to perform the steps in the corresponding embodiment as in fig. 4.
Another aspect of the present application provides a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the steps of the method described in the embodiment shown in fig. 4.
Another aspect of the present application provides a computer program product comprising instructions which, when run on a computer or processor, cause the computer or processor to perform the steps in the method described in the embodiment shown in fig. 4.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of 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.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (11)

1. A method of testing a target test stake service, comprising:
receiving a test request for the target test pile service;
acquiring a first intermediate code and a second intermediate code according to the test request, wherein the first intermediate code carries a priority loading identifier, the first intermediate code comprises a first function name and a first byte code corresponding to the first function name, the first byte code comprises the target test stub service address, and the second intermediate code is obtained by compiling a service code of a target service;
loading the first intermediate code and the second intermediate code according to the sequence of the priority loading identifiers to obtain target codes;
executing the target code, and when receiving a test query message of the target service, sending the test query message to the target test stub service for processing according to the target test stub service address in the target code;
and if the response message returned by the target test pile service is received, the test of the target test pile service is successful.
2. The method according to claim 1, wherein loading the first intermediate code and the second intermediate code according to the precedence order of the preferential loading identifier to obtain the target code includes:
According to the sequence of the priority loading identifiers, the first intermediate code is loaded preferentially;
when the first intermediate code is loaded and then loaded to the second intermediate code, filtering the second intermediate code according to the first function name to obtain a local second intermediate code different from the first function name;
and loading the local second intermediate code to obtain the target code.
3. The method according to claim 2, wherein when the first intermediate code is loaded and then the second intermediate code is loaded, performing a filtering operation on the second intermediate code according to the first function name, and obtaining the local second intermediate code different from the first function name includes:
after the first intermediate code is loaded, loading the second intermediate code according to the first function name, and if a second function name identical to the first function name is identified in the second intermediate code, ignoring the second function name and a second byte code corresponding to the second function name;
and if a second function name which is different from the first function name is identified in the second intermediate code, taking the second function name and a second byte code corresponding to the second function name as the local second intermediate code.
4. The method of claim 1, wherein the test request carries a first test identifier and a second test identifier;
the obtaining the first intermediate code and the second intermediate code according to the test request includes:
downloading the first intermediate code according to the first test identifier;
and downloading the service code according to the second test identifier, and compiling the service code according to the second function name to obtain the second intermediate code.
5. The method of claim 1, wherein the executing the object code, when receiving the test query message of the object service, sends the test query message to the object test stub service for processing according to the object test stub service address in the object code, comprises:
the target code is executed, and when a test query message of the target service is received, the test query message is processed into a test query plaintext according to the target code;
and sending the test query plaintext to the target test pile service corresponding to the target test pile service address for processing.
6. The method of claim 1, wherein the second bytecode comprises a target traffic server interface address;
if the response message returned by the target test pile service is received, after the test of the target test pile service is successful, the method further comprises:
updating the target code into the second intermediate code, and executing the second intermediate code;
and when the target service message is received, the target service message is sent to a target service server for processing according to the interface address of the target service server in the second intermediate code.
7. The method of claim 6, wherein the sending the target service message to a target service server for processing according to the target service server interface address in the second intermediate code when the target service message is received comprises:
when the target service message is received, processing the target service message into a target service ciphertext according to an encryption algorithm corresponding to a target service server interface in the second intermediate code;
and sending the target service ciphertext to the target service server corresponding to the interface address of the target service server for processing.
8. A test device for testing a pile service for a target, comprising:
the receiving unit is used for receiving a test request of the target test pile service;
the acquisition unit is used for acquiring a first intermediate code and a second intermediate code according to the test request, wherein the first intermediate code carries a priority loading identifier, the first intermediate code comprises a first function name and a first byte code corresponding to the first function name, the first byte code comprises the target test stub service address, and the second intermediate code is obtained by compiling a service code of a target service;
the processing unit is used for loading the first intermediate code and the second intermediate code according to the sequence of the priority loading identification to obtain a target code;
the processing unit is further configured to execute the target code, and when receiving a test query message of the target service, send the test query message to the target test stub service for processing according to the target test stub service address in the target code;
and the receiving unit is further used for successfully testing the target test pile service if receiving a response message returned by the target test pile service.
9. A computer device, comprising: memory, transceiver, processor, and bus system;
wherein the memory is used for storing programs;
the processor being adapted to implement the method of any one of claims 1 to 7 when executing a program in the memory;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
10. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 7.
11. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method of any of claims 1 to 7.
CN202111363566.7A 2021-11-17 2021-11-17 Test method, related device and equipment for target test pile service Pending CN116137601A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111363566.7A CN116137601A (en) 2021-11-17 2021-11-17 Test method, related device and equipment for target test pile service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111363566.7A CN116137601A (en) 2021-11-17 2021-11-17 Test method, related device and equipment for target test pile service

Publications (1)

Publication Number Publication Date
CN116137601A true CN116137601A (en) 2023-05-19

Family

ID=86333085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111363566.7A Pending CN116137601A (en) 2021-11-17 2021-11-17 Test method, related device and equipment for target test pile service

Country Status (1)

Country Link
CN (1) CN116137601A (en)

Similar Documents

Publication Publication Date Title
US7979532B2 (en) Systems and methods for using an access point for testing multiple devices and using several consoles
CN108521858A (en) The device identifier relevant operation processing of packet-based data communication
EP4216077A1 (en) Blockchain network-based method and apparatus for data processing, and computer device
CN108491236A (en) A kind of plug-in loading method, device and computer readable storage medium
CN101714201A (en) Software code signing system and method
US11245577B2 (en) Template-based onboarding of internet-connectible devices
CN108683668A (en) Resource checksum method, apparatus, storage medium and equipment in content distributing network
US20060161616A1 (en) Provision of services over a common delivery platform such as a mobile telephony network
CN105812380A (en) Verification method and device
CN113129002A (en) Data processing method and equipment
CN115174645B (en) Automobile OTA cloud interaction method and system
CN116137601A (en) Test method, related device and equipment for target test pile service
CN112688899A (en) In-cloud security threat detection method and device, computing equipment and storage medium
CN115001776A (en) Data processing system and method
US10581905B2 (en) Detection of manipulation of applications
CN114567678A (en) Resource calling method and device of cloud security service and electronic equipment
CN116032510A (en) Data security protection system
CN112748960A (en) Process control method and device, electronic equipment and storage medium
CN109903487A (en) A kind of method and system for by billing server acquisition invoice data
RU2736166C1 (en) Method of identifying an online user and device thereof in an application
US11544045B2 (en) Automatic smart contract analysis
CN111786793B (en) Signature information verification method and device
CN117896118A (en) Internet of things card authentication login method and device, electronic equipment and storage medium
CN116415259A (en) Security check method and device
CN117992538A (en) Block chain data processing method, device, computer equipment, medium and product

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