CN117459421A - Message receiving and transmitting test method, device, equipment and medium - Google Patents

Message receiving and transmitting test method, device, equipment and medium Download PDF

Info

Publication number
CN117459421A
CN117459421A CN202311299424.8A CN202311299424A CN117459421A CN 117459421 A CN117459421 A CN 117459421A CN 202311299424 A CN202311299424 A CN 202311299424A CN 117459421 A CN117459421 A CN 117459421A
Authority
CN
China
Prior art keywords
message
test
description information
simulation
content
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
CN202311299424.8A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202311299424.8A priority Critical patent/CN117459421A/en
Publication of CN117459421A publication Critical patent/CN117459421A/en
Pending legal-status Critical Current

Links

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/04Processing captured monitoring data, e.g. for logfile generation
    • H04L43/045Processing captured monitoring data, e.g. for logfile generation for graphical visualisation of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to the field of software testing, in particular to a message receiving and transmitting testing method, device, equipment and medium, which are used for solving the problem that testing efficiency is low because self testing equipment is needed and other equipment is needed to complete testing in a matching manner when message testing is carried out. The method comprises the following steps: after the preset condition is met, determining to trigger a test instruction; generating a message simulatable content according to the message description information corresponding to the test scene selected by the user in the test instruction; filling the message simulative contents and the message non-simulative contents in the message description information into a message template corresponding to the message type contained in the message description information to generate a simulation message; and adopting a test scheme corresponding to the test scene to carry out receiving and transmitting test on the simulation message.

Description

Message receiving and transmitting test method, device, equipment and medium
Technical Field
The present invention relates to the field of software testing, and in particular, to a method, an apparatus, a device, and a medium for testing message transceiving.
Background
In order to ensure that the message transmission function and the non-function both meet the corresponding indexes, the message receiving and transmitting can be tested in the testing process of the equipment. When the message receiving test is performed, the message sender needs to continuously send the message to the test equipment, when the message sending test is performed, the test equipment needs to generate a plurality of messages to send to the message receiver, and other equipment (the message sender is the message receiver when the message receiving test is performed, and the message receiver is the message receiver when the message sending test is performed) needs to generate the message for testing.
Because the messages are various and the scenes of each message are complex, if other devices except the test device are inconvenient to cooperate with the test, the test propelling efficiency is possibly low, so that the problem of low test efficiency is caused.
Disclosure of Invention
The embodiment of the application provides a message receiving and transmitting test method, device, equipment and medium, which are used for solving the problem that when a message is tested, not only self test equipment but also other equipment are required to complete the test in a matching way, so that the test efficiency is low.
In a first aspect, the present application provides a method for testing messaging, including:
after the preset condition is met, determining to trigger a test instruction;
generating a message simulatable content according to the message description information corresponding to the test scene selected by the user in the test instruction;
filling the simulative message content and the non-simulative message content in the message description information into a message template corresponding to the message type contained in the message description information to generate a simulative message;
and carrying out message receiving and transmitting test by utilizing the test scheme corresponding to the test scene and the simulation message.
The method can generate the message simulatable content according to the message description information corresponding to the test scene after receiving the test instruction initiated by the user, generate the simulation message based on the message simulatable content and the message non-simulatable content included in the message description information, and perform the message transceiving test by using the simulation message, so that other equipment is not required to generate the message to perform message interaction with the equipment to be tested, but the test equipment directly generates the simulation message to perform the message transceiving test, and the test efficiency is improved
In one possible embodiment, the generating the content capable of simulating the message according to the message description information corresponding to the test scene selected by the user in the test instruction includes:
the message description information comprises the number of the simulation messages and the simulatable content generation rule corresponding to each simulation message;
and generating the message simulative contents corresponding to each simulation message according to the simulative content generation rule corresponding to each simulation message included in the message description information.
In one possible embodiment, the method includes filling the simulatable message content and the non-simulatable message content in the message description information into a message template corresponding to a message type included in the message description information, and after generating a simulated message, the method includes:
responding to a prompt instruction sent by a user, and displaying an editing page containing a visual message; wherein, the visual message is the visual message converted by the analog message;
responding to an editing instruction triggered by a user, updating the visual message according to the modified content in the editing instruction, converting the visual message into a message expressed by a computer-readable language, and replacing the converted message expressed by the computer-readable language with the analog message.
In one possible embodiment, the method further includes, after filling the simulatable message content and the non-simulatable message content in the message description information into a message template corresponding to a message type included in the message description information to generate a simulated message:
and if the message type contained in the message description information is the message type needing to be signed, signing the simulated message according to the encryption key of the message sender corresponding to the identity information of the message sender.
In a possible embodiment, after performing the message transceiving test by using the test scheme corresponding to the test scenario and the analog message, the method further includes:
if the test result does not accord with the expected test result corresponding to the test scene, determining test failure and displaying test failure information to a user;
if the test result accords with the expected test result corresponding to the test scene, determining that the test is successful, and displaying the information of the test success to the user.
In a possible embodiment, the performing a message transceiving test by using the test scheme corresponding to the test scenario and the analog message includes:
If the test direction indicated in the test scene is a message receiving test, carrying out the message receiving test by utilizing a message receiving test scheme corresponding to the test scene and the simulation message;
if the test direction indicated in the test scene is the message sending test, the message sending test is carried out by utilizing a message sending test scheme corresponding to the test scene and the simulation message.
In a second aspect, the present application provides a device for testing messaging, including:
the testing module is used for determining a trigger testing instruction after the preset condition is met; performing message receiving and transmitting test by using a test scheme corresponding to the test scene and the simulation message;
the generation module is used for generating the simulative message content according to the message description information corresponding to the test scene selected by the user in the test instruction; and filling the message simulative contents and the message non-simulative contents in the message description information into a message template corresponding to the message type contained in the message description information to generate a simulation message.
In a possible embodiment, the generating module is specifically configured to:
the message description information comprises the number of the simulation messages and the simulatable content generation rule corresponding to each simulation message;
And generating the message simulative contents corresponding to each simulation message according to the simulative content generation rule corresponding to each simulation message included in the message description information.
In a possible embodiment, the generating module is further configured to:
responding to a prompt instruction sent by a user, and displaying an editing page containing a visual message; wherein, the visual message is the visual message converted by the analog message;
responding to an editing instruction triggered by a user, updating the visual message according to the modified content in the editing instruction, converting the visual message into a message expressed by a computer-readable language, and replacing the converted message expressed by the computer-readable language with the analog message.
In a possible embodiment, the generating module is further configured to:
and if the message type contained in the message description information is the message type needing to be signed, signing the simulated message according to the encryption key of the message sender corresponding to the identity information of the message sender.
In one possible embodiment, the apparatus further comprises: a display module;
the display module is used for determining test failure if the test result does not accord with the expected test result corresponding to the test scene, and displaying the information of the test failure to a user;
If the test result accords with the expected test result corresponding to the test scene, determining that the test is successful, and displaying the information of the test success to the user.
In a possible embodiment, the test module is specifically configured to:
if the test direction indicated in the test scene is a message receiving test, carrying out the message receiving test by utilizing a message receiving test scheme corresponding to the test scene and the simulation message;
if the test direction indicated in the test scene is the message sending test, the message sending test is carried out by utilizing a message sending test scheme corresponding to the test scene and the simulation message.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing program requests;
a processor for invoking a program request stored in said memory, executing the steps comprised by the method according to any of the first aspects in accordance with the obtained program request.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program comprising program requests, which when executed by a computer, cause the computer to perform the method of any one of the first aspects.
In a fifth aspect, the present application provides a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the first aspects.
Drawings
Fig. 1 is a flowchart of a method for testing message transmission and reception according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a visual message template according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for generating a Swift message according to an embodiment of the present application;
fig. 4 is a structural diagram of a device for testing transceiver of a message according to an embodiment of the present application;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure. Embodiments and features of embodiments in this application may be combined with each other arbitrarily without conflict. Also, while a logical order of illustration is depicted in the flowchart, in some cases the steps shown or described may be performed in a different order than presented.
The terms first and second in the description and claims of the present application and in the above-described figures are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. The term "plurality" in the present application may mean at least two, for example, two, three or more, and embodiments of the present application are not limited.
In the technical scheme, the data are collected, transmitted, used and the like, and all meet the requirements of national related laws and regulations.
Before describing the method for testing messaging provided in the embodiments of the present application, for convenience of understanding, the following detailed description is first provided for the technical background of the embodiments of the present application.
Term interpretation:
a Swift message receiving and transmitting simulator: the tool for simulating various types of Swift messages sent by the Swift organization can simulate various types of Swift messages sent by different opponent banks and can also send various types of Swift messages to opponents.
SWIFT: the global homonymy bank financial telecommunication society, headquarters are arranged in the belgium capital brussels, and the main function is to transfer settlement information between global banking systems. The use of SWIFT makes the settlement of bank provide safe, reliable, quick, standardized and automatic communication service, so as to greatly raise the settlement speed of bank. The SWIFT messaging service platform, product and service connects over 200 countries and regions with over 11,000 banking institutions, securities institutions, market infrastructure and enterprise customers. According to SWIFT website information, "although SWIFT does not hold funds or manage accounts on behalf of customers, we enable the worldwide community of users to communicate securely, exchange standardized financial messages reliably, and thus we promote global and regional financial flows, promoting trade and business development worldwide.
The message comprises the following steps: the message is a carrier for exchanging information, is a basic unit for exchanging service data between system nodes, and consists of a message header, a digital signature domain and a message body.
SWIFT is always a well-known message that the various devices of a bank communicate. In order to reduce dependence on the Swift and reduce the transformation of the existing system as far as possible, a self message transmission platform is also provided, and in order to ensure that the message transmission function and the non-function meet the corresponding indexes, various messages need to be subjected to receiving and transmitting tests, and as the type of the Swift messages is various and the scene of each message is complex, if the Swift messages are initiated by the hands and the hands are not matched with the test, the test efficiency is lower.
Based on this, the embodiment of the application provides a scheme, and the simulation message is generated in the test equipment, and the message receiving and transmitting test is performed on the simulation message by adopting the test scheme, so that the message receiving and transmitting test is performed in the test equipment as much as possible, and compared with the test by matching other equipment, the test efficiency is higher.
The following describes the embodiments of the present application in detail with reference to the drawings.
Referring to fig. 1, an embodiment of the present application provides a method for testing message transmission and reception, which is applied to a testing device and includes:
s100: after the preset condition is met, determining to trigger a test instruction;
exemplary, the preset conditions are: the user triggers the test button, specifically, when the message receiving and transmitting test is performed, the test equipment displays the test button, after the user triggers the test button, the test equipment determines a trigger test instruction after meeting the preset condition, so that the message receiving and transmitting test is performed.
The preset conditions may also be: the current time is a preset time point, specifically, the preset time point is directly set. For example: 9 am, 12 pm, etc., and automatically triggers the test instruction when the current time point reaches 9 am, or automatically triggers the test instruction when the current time point reaches 12 pm.
The preset condition may also be that the first user triggers the test button, and the other time is a set interval duration, for example, 15 minutes, 30 minutes, 1 hour, etc. For example, the user triggers the test button, triggers the test instruction, performs the first message transceiving test, records the time when the current user triggers the test button, automatically triggers the test instruction after 15 minutes, performs the second message transceiving test, and stops the message transceiving test until the user triggers the stop button.
It should be noted that the above-mentioned preset conditions are only exemplary, and may be specifically set based on actual test conditions.
S101: generating a message simulatable content according to the message description information corresponding to the test scene selected by the user in the test instruction;
the message description information comprises the number of the simulation messages and a simulatable content generation rule corresponding to each simulation message;
the specific implementation process is as follows: and generating the message simulative contents corresponding to each simulation message according to the simulative content generation rule corresponding to each simulation message included in the message description information.
The test scene may be a boundary scene, or a scene in which different types of messages are sent to a plurality of hands (devices performing message tests with the test device), a scene in which abnormal messages are sent, and the like.
And taking a scene of sending different types of messages to a plurality of hands as an example, wherein the message description information corresponding to the test scene comprises description information of the different types of messages of the plurality of hands.
When the hand-held device includes 2 or 3 types of messages, the message description information corresponding to the test scene includes the message description information of the first 3 types of messages of the hand-held device and the message description information of the second 3 types of messages of the hand-held device.
The content that can be simulated is exemplified by the content that the message needs to communicate, and when the message is 102, namely the message related to the financial aspect, a false content related to the financial aspect is generated based on the content generation rule related to the financial aspect. When the message is 203, namely, the message related to the query aspect, a false content related to the query aspect is generated based on the content generation rule related to the query aspect.
S102: filling the message simulative contents and the message non-simulative contents in the message description information into a message template corresponding to the message type contained in the message description information to generate a simulation message;
The method comprises the steps of setting simulative content and non-simulative content of a message as examples, wherein the message consists of a message header, a digital signature domain and a message body.
The message header includes basic information of the message, such as the length of the message header, the total length of the message, the identifier, the protocol, the identity information of the sender and the identity information of the receiver;
the message body, that is, the content of the message that needs to be communicated.
The basic information of the message included in the message header, for example, the length of the message header, the total length of the message, the identifier, the protocol, etc., and the content of the message included in the message body, which needs to be communicated, may be simulative content.
The identity information of the sender and the identity information of the receiver are non-simulatable contents;
generating the simulative content based on the generation rule contained in the message description information;
for non-simulatable content: when the message is received and tested, the identity information of the sender is the identity information of other equipment, the identity information of the receiver is the identity information of self-testing equipment, and when the equipment among banks is used for carrying out the message test, the identity information of the sender is the line number of other banks; the identity information of the receiver is the line number of the self-testing equipment;
when the message is transmitted and tested, the identity information of the sender is the identity information of self-testing equipment, the identity information of the receiver is the identity information of other equipment, and when the equipment among banks is used for testing the message, the identity information of the receiver is the line number of other banks; the identity information of the sender is the line number of the self-testing equipment.
S103: and carrying out message receiving and transmitting test by using a test scheme and an analog message corresponding to the test scene.
If the test direction indicated in the test scene is a message receiving test, a message receiving test is carried out by utilizing a received message test scheme and a simulated message corresponding to the test scene;
if the indicated test direction in the test scene is the message sending test, the message sending test is carried out by utilizing a message sending test scheme and a simulation message corresponding to the test scene.
The test scheme of sending message can be installed in the test equipment in a similar and method, in the actual operation process, when the test direction indicated in the test scene is the message receiving test, the simulation message is sent to the interface of receiving message in the test equipment, the interface calls the test scheme of receiving message, and executes the test scheme of receiving message to carry out the message receiving test. When the test direction indicated in the test scene is the message sending test, the simulation message is sent to a message sending interface in the test equipment, the interface calls a message sending test scheme, and the message sending test scheme is executed to carry out the message sending test.
The test result is obtained by utilizing the test scheme corresponding to the test scene and the simulation message to carry out message receiving and transmitting test, if the test result does not accord with the expected test result corresponding to the test scene, the test failure is determined, and the information of the test failure is displayed to the user;
If the test result accords with the expected test result corresponding to the test scene, determining that the test is successful, and displaying the information of the test success to the user.
Taking a message sending test scheme as an example, when the message sending test scheme is executed, calling an information simulation test device required by the message sending to send a scene of the simulation message, wherein the result output by the test device is a test result;
when the message receiving test scheme is executed, the scene that the information simulation test equipment required by the message receiving is called to receive the simulation message is called, and the result output by the test equipment is the test result.
In detail, for different test scenarios, the test device may have different responses, which are also referred to as test results, and if the test result obtained after the test device executes the test scheme corresponding to the test scenario corresponds to the expected test result corresponding to the test scenario, the test is determined to be successful. If the test result obtained after the test equipment executes the test scheme corresponding to the test scene does not accord with the expected test result corresponding to the test scene, determining that the test fails.
Taking a test scene as an example of a scene for receiving the abnormal message, wherein an expected test result corresponding to the test scene is a response of the test equipment when the abnormal message is received; after the test scheme corresponding to the test scene is executed, the test equipment gives a test result, and if the test result accords with the response of the test equipment when the abnormal message is received, the test is determined to be successful; and if the test result does not accord with the response of the test equipment when the abnormal message is received, determining that the test fails.
Based on the scheme, the message interacted by the test equipment and the bank equipment is taken as an example, when the message receiving test is carried out, the message description information corresponding to the test scene is taken as an interface document, the interface document of the interface of the test equipment is analyzed, and an interface object is generated; the interface object is a data structure expressed in a computer readable language and used for describing an interface document, the interface object comprises field entities, the field entities are entities corresponding to fields of the interface document, and the field entities at least comprise the following attributes: field names, types, and regular rules (which may simulate content generation rules); constructing a simulation message by using the simulated content of the message corresponding to all field entities in the interface object; wherein, the simulative content of the message is random data generated according to the attribute of the field entity; and receiving the interface object by using a test scheme corresponding to the test scene to obtain a test result, comparing the test result with an expected test result corresponding to the test scene, if the test result is accordant with the expected test result, determining that the test is successful, and if the test result is not accordant with the expected test result, determining that the test is unsuccessful.
When a message sending test is carried out, the message description information corresponding to the test scene is used as an interface document, and the interface document of the test equipment interface is analyzed to generate an interface object; the specific process of generating the result object is as shown in the above, the interface object is sent by using the test scheme corresponding to the test scene, the test result is obtained, the test result is compared with the expected test result corresponding to the test scene, if the test result is in accordance with the expected test result, the test is determined to be successful, and if the test result is not in accordance with the expected test result, the test is determined to be unsuccessful.
In order to avoid generating errors of a simulation message, the embodiment of the invention provides a manual interface for checking whether the generated simulation message is accurate, in detail, filling a message simulatable content and a message non-simulatable content in message description information into a message template corresponding to a message type contained in the message description information, and after generating the simulation message, the method comprises the following steps:
responding to a prompt instruction sent by a user, and displaying an editing page containing a visual message; the visual message is a visual message for simulating message conversion;
responding to an editing instruction triggered by a user, updating the visual message according to the modified content in the editing instruction, converting the visual message into a message expressed by a computer-readable language, and replacing the converted message expressed by the computer-readable language with the analog message.
In detail, since the simulative message content and the non-simulative message content in the message description information are filled into the message template corresponding to the message type contained in the message description information, the generated simulative message is a message expressed by a computer readable language, and the message looks troublesome to a common user, so that a visualized message can be generated. The content of the message can be extracted from the generated simulation message, and the visualized message template is filled with the content of the message to generate the visualized message. The visualized message Wen Mo is in the form of a plate, as shown in fig. 2, and includes version, header length, TOS, total length, identifier, flag, segment offset, TTL, protocol, checksum, source IP address, destination IP address, option, required communication content, and the elements in the visualized message template are extracted from the generated analog message to obtain specific content, for example, header length 8.
After the visualized message is displayed, a user can check the visualized message, the message can be modified or not, if the visualized message is checked by the user to have no problem, the user directly clicks and submits the message, and if the visualized message is checked by the user to have the problem, the user directly modifies an editing page of the visualized message, for example, the head length is 8 and is changed to 12, the modified visualized message is converted into a message expressed in a computer readable language, and the converted message expressed in the computer readable language is replaced by the simulated message, so that the message test can be performed by using the modified simulated message.
Wherein, some message types need to be encrypted, some message types do not need to be encrypted, after filling the simulatable message content and the non-simulatable message content in the message description information into a message template corresponding to the message type contained in the message description information, generating a simulation message, the method further comprises:
if the message type contained in the message description information is the message type needing to be signed, signing the simulated message according to the encryption key of the message sender corresponding to the identity information of the message sender.
The identity information of the message sender may be a bank line number tested by the test device, and the corresponding relationship between the bank line numbers of the banks and encryption keys of the banks, such as a public key, is prestored in the test device; the line number of the message sender is found from the message description information, a corresponding encryption key is found from a pre-stored corresponding relation based on the line number of the message sender, and the encryption key is adopted to sign the simulated message.
Based on the above scheme, referring to fig. 3, an embodiment of the present invention provides a method for generating a Swift message, including:
s300: judging whether the test direction indicated by the test scene is a message receiving test or not according to the receiving and transmitting type contained in the message description information corresponding to the test scene;
s301: determining a message Wen Moban to be adopted according to the message type contained in the message description information;
s302: determining the simulative content of the message according to the message description information contained in the message description information; generating a message simulatable content according to the message description information;
s303: the method comprises the steps that a counter row number included in the message description information is used as identity information of a sender, and a self row number is used as identity information of a receiver; filling the simulative content of the message, the identity information of the sender and the identity information of the receiver into a message template to be adopted to obtain a simulative Swift message;
S304: responding to a prompt instruction sent by a user, converting the simulated shift message into a visual message, and displaying an editing page containing the visual message; responding to an editing instruction triggered by a user, updating the visual message according to the modified content in the editing instruction, converting the visual message into a message expressed by a computer-readable language, and replacing the converted message expressed by the computer-readable language with the analog message;
s305: if the message type contained in the message description information is the message type needing to be signed, signing the simulated Swift message according to the public key corresponding to the line number of the hand; and carrying out message receiving test by utilizing a received message test scheme and a simulated Swift message corresponding to the test scene;
s306: determining a message Wen Moban to be adopted according to the message type contained in the message description information;
s307: determining the simulative content of the message according to the message description information contained in the message description information; generating a message simulatable content according to the message description information;
s308: the method comprises the steps that an opponent line number included in the message description information is used as identity information of a receiver, and a self line number is used as identity information of a sender; filling the simulative content of the message, the identity information of the sender and the identity information of the receiver into a message template to be adopted to obtain a simulative Swift message;
S309: responding to a prompt instruction sent by a user, converting the simulated shift message into a visual message, and displaying an editing page containing the visual message; responding to an editing instruction triggered by a user, updating a visual message according to the modified content in the editing instruction, converting the visual message into a message expressed by a computer-readable language, and replacing the converted message expressed by the computer-readable language with a simulated Swift message;
s310: if the message type contained in the message description information is the message type needing to be signed, signing the simulated Swift message according to the public key corresponding to the line number of the message description information; and performing message transmission test by using a transmission message test scheme and a simulation Swift message corresponding to the test scene.
Through the content, the scheme of the embodiment of the invention not only improves the convenience of testing by the developer, but also can simulate abnormal messages which cannot be sent out by normal service scenes, enhances the testing of boundary scenes and improves the fault tolerance of the system. By combining the concurrency technology, different types of messages can be sent to a plurality of opposite lines at the same time, and meanwhile, the high efficiency and the accuracy of the sent messages can be improved, so that the testing efficiency and the testing reliability between the lines and the opposite lines are improved, and the period of technology and service testing is greatly shortened; through parameterized configuration, the tool can initiate service at regular time or at any time in a test environment, so that the investment of high-cost service personnel is greatly saved, the labor cost is reduced, and the automation of system test is improved. Such as: a skilled high-level business person may test 2000 cases daily for 10 days, and by the present invention, retests of 2000 cases can be completed in less than 1 hour.
Based on the same inventive concept, an embodiment of the present application provides a device for testing message transmission and reception, please refer to fig. 4, the device includes:
the test module 400 is configured to determine to trigger a test instruction after a preset condition is satisfied; performing message receiving and transmitting test by using a test scheme corresponding to the test scene and the simulation message;
the generating module 401 is configured to generate a message simulatable content according to the message description information corresponding to the test scene selected by the user in the test instruction; filling the simulative message content and the non-simulative message content in the message description information into a message template corresponding to the message type contained in the message description information to generate a simulative message;
optionally, the generating module is specifically configured to:
the message description information comprises the number of the simulation messages and the simulatable content generation rule corresponding to each simulation message;
and generating the message simulative contents corresponding to each simulation message according to the simulative content generation rule corresponding to each simulation message included in the message description information.
Optionally, the generating module is further configured to:
responding to a prompt instruction sent by a user, and displaying an editing page containing a visual message; wherein, the visual message is the visual message converted by the analog message;
Responding to an editing instruction triggered by a user, updating the visual message according to the modified content in the editing instruction, converting the visual message into a message expressed by a computer-readable language, and replacing the converted message expressed by the computer-readable language with the analog message.
Optionally, the generating module is further configured to:
and if the message type contained in the message description information is the message type needing to be signed, signing the simulated message according to the encryption key of the message sender corresponding to the identity information of the message sender.
Optionally, the apparatus further includes: a display module;
the display module is used for determining test failure if the test result does not accord with the expected test result corresponding to the test scene, and displaying the information of the test failure to a user;
if the test result accords with the expected test result corresponding to the test scene, determining that the test is successful, and displaying the information of the test success to the user.
Optionally, the test module is specifically configured to:
if the test direction indicated in the test scene is a message receiving test, carrying out the message receiving test by utilizing a message receiving test scheme corresponding to the test scene and the simulation message;
If the test direction indicated in the test scene is the message sending test, the message sending test is carried out by utilizing a message sending test scheme corresponding to the test scene and the simulation message.
Illustratively, taking the test of the Swift message as an example, the device comprises a Swift message receiving and transmitting test module (the same as the test module) and a Swift message receiving and transmitting simulator (the same as the generation module);
the Swift message receiving and transmitting test module is used for receiving a test instruction, and extracting a receiving and transmitting type, message description information, a hand line number, a self line number and a message type from a test scene contained in the test instruction; inputting the extracted information to a Swift message receiving and transmitting simulator; the Swift message receiving and transmitting simulator determines a test direction indicated by the test scene according to the receiving and transmitting type contained in the message description information corresponding to the test scene; if the test direction indicated by the test scene is a message receiving test, determining a message Wen Moban to be adopted according to the message type contained in the message description information; determining the simulative content of the message according to the message description information contained in the message description information; generating a message simulatable content according to the message description information; the method comprises the steps that a counter row number included in the message description information is used as identity information of a sender, and a self row number is used as identity information of a receiver; filling the simulative content of the message, the identity information of the sender and the identity information of the receiver into a message template to be adopted to obtain a simulative Swift message; responding to a prompt instruction sent by a user, converting the simulated shift message into a visual message, and displaying an editing page containing the visual message; responding to an editing instruction triggered by a user, updating the visual message according to the modified content in the editing instruction, converting the visual message into a message expressed by a computer-readable language, and replacing the converted message expressed by the computer-readable language with the analog message; if the message type contained in the message description information is the message type needing to be signed, signing the simulated Swift message according to the public key corresponding to the line number of the hand; and sending the encrypted analog message to a Swift message receiving and transmitting test module, wherein the Swift message receiving and transmitting test module carries out message receiving test by utilizing a receiving message test scheme and the analog Swift message corresponding to the test scene.
If the test direction indicated by the test scene is a message sending test, the Swift message receiving and sending simulator determines a message Wen Moban to be adopted according to the message type contained in the message description information; determining the simulative content of the message according to the message description information contained in the message description information; generating a message simulatable content according to the message description information; the method comprises the steps that an opponent line number included in the message description information is used as identity information of a receiver, and a self line number is used as identity information of a sender; filling the simulative content of the message, the identity information of the sender and the identity information of the receiver into a message template to be adopted to obtain a simulative Swift message; responding to a prompt instruction sent by a user, converting the simulated shift message into a visual message, and displaying an editing page containing the visual message; responding to an editing instruction triggered by a user, updating a visual message according to the modified content in the editing instruction, converting the visual message into a message expressed by a computer-readable language, and replacing the converted message expressed by the computer-readable language with a simulated Swift message; if the message type contained in the message description information is the message type needing to be signed, signing the simulated Swift message according to the public key corresponding to the line number of the message description information; and sending the encrypted analog message to a Swift message receiving and transmitting test module, wherein the Swift message receiving and transmitting test module carries out message sending test by utilizing a sending message test scheme and the analog Swift message corresponding to the test scene.
Based on the same inventive concept, the embodiments of the present application provide an electronic device, which may implement the functions of the foregoing discussed method for testing messaging, and referring to fig. 5, the device includes a processor 501 and a memory 502,
wherein the processor 501 is configured to execute the instructions to implement the messaging test method as described in any one of the above references. Because the principle of the electronic device for solving the problem is similar to that of the method for testing the message sending and receiving, the implementation of the electronic device can be referred to the implementation of the method, and the repetition is omitted.
Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium, the computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the messaging test method as any of the preceding discussion. Since the principle of the solution of the problem of the computer readable storage medium is similar to that of the message transmitting and receiving test method, the implementation of the computer readable storage medium can refer to the implementation of the method, and the repetition is omitted.
Based on the same inventive concept, embodiments of the present application also provide a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the messaging test method as any of the preceding discussion. Since the principle of the solution of the problem of the computer program product is similar to that of the method for testing the message transmission and reception, the implementation of the computer program product can refer to the implementation of the method, and the repetition is omitted.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program requests. These computer program requests may be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus to produce a machine, such that the requests, which are executed by the processor of the computer or other programmable data processing apparatus, produce a means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program requests may also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the requests stored in the computer readable memory produce an article of manufacture including request means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program requests may also be loaded onto a computer or other programmable data processing apparatus to cause a series of user operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the requests which are executed on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (15)

1. The message receiving and transmitting test method is characterized by comprising the following steps:
after the preset condition is met, determining to trigger a test instruction;
generating a message simulatable content according to the message description information corresponding to the test scene selected by the user in the test instruction;
filling the simulative message content and the non-simulative message content in the message description information into a message template corresponding to the message type contained in the message description information to generate a simulative message;
and carrying out message receiving and transmitting test by utilizing the test scheme corresponding to the test scene and the simulation message.
2. The method of claim 1, wherein generating the message simulatable content according to the message description information corresponding to the test scene selected by the user in the test instruction comprises:
the message description information comprises the number of the simulation messages and the simulatable content generation rule corresponding to each simulation message;
and generating the message simulative contents corresponding to each simulation message according to the simulative content generation rule corresponding to each simulation message included in the message description information.
3. The method of claim 1, wherein filling the message simulatable content and the message non-simulatable content in the message description information into a message template corresponding to a message type contained in the message description information, and after generating a simulated message, the method comprises:
Responding to a prompt instruction sent by a user, and displaying an editing page containing a visual message; wherein, the visual message is the visual message converted by the analog message;
responding to an editing instruction triggered by a user, updating the visual message according to the modified content in the editing instruction, converting the visual message into a message expressed by a computer-readable language, and replacing the converted message expressed by the computer-readable language with the analog message.
4. The method of claim 1, wherein the message simulatable content and the message non-simulatable content in the message description information are filled into a message template corresponding to a message type contained in the message description information, and after generating a simulated message, the method further comprises:
and if the message type contained in the message description information is the message type needing to be signed, signing the simulated message according to the encryption key of the message sender corresponding to the identity information of the message sender.
5. The method of claim 1, wherein after performing the message transceiving test using the test scheme corresponding to the test scenario and the analog message, the method further comprises:
If the test result does not accord with the expected test result corresponding to the test scene, determining test failure and displaying test failure information to a user;
if the test result accords with the expected test result corresponding to the test scene, determining that the test is successful, and displaying the information of the test success to the user.
6. The method according to any one of claims 1 to 5, wherein performing a message transceiving test by using a test scheme corresponding to the test scenario and the analog message includes:
if the test direction indicated in the test scene is a message receiving test, carrying out the message receiving test by utilizing a message receiving test scheme corresponding to the test scene and the simulation message;
if the test direction indicated in the test scene is the message sending test, the message sending test is carried out by utilizing a message sending test scheme corresponding to the test scene and the simulation message.
7. A messaging test device, comprising:
the testing module is used for determining a trigger testing instruction after the preset condition is met; performing message receiving and transmitting test by using a test scheme corresponding to the test scene and the simulation message;
The generation module is used for generating the simulative message content according to the message description information corresponding to the test scene selected by the user in the test instruction; and filling the message simulative contents and the message non-simulative contents in the message description information into a message template corresponding to the message type contained in the message description information to generate a simulation message.
8. The apparatus of claim 7, wherein the generating module is specifically configured to:
the message description information comprises the number of the simulation messages and the simulatable content generation rule corresponding to each simulation message;
and generating the message simulative contents corresponding to each simulation message according to the simulative content generation rule corresponding to each simulation message included in the message description information.
9. The apparatus of claim 7, wherein the generation module is further to:
responding to a prompt instruction sent by a user, and displaying an editing page containing a visual message; wherein, the visual message is the visual message converted by the analog message;
responding to an editing instruction triggered by a user, updating the visual message according to the modified content in the editing instruction, converting the visual message into a message expressed by a computer-readable language, and replacing the converted message expressed by the computer-readable language with the analog message.
10. The apparatus of claim 7, wherein the generation module is further to:
and if the message type contained in the message description information is the message type needing to be signed, signing the simulated message according to the encryption key of the message sender corresponding to the identity information of the message sender.
11. The apparatus of claim 7, wherein the apparatus further comprises: a display module;
the display module is used for determining test failure if the test result does not accord with the expected test result corresponding to the test scene, and displaying the information of the test failure to a user;
if the test result accords with the expected test result corresponding to the test scene, determining that the test is successful, and displaying the information of the test success to the user.
12. The device according to any one of claims 7 to 11, wherein the test module is specifically configured to:
if the test direction indicated in the test scene is a message receiving test, carrying out the message receiving test by utilizing a message receiving test scheme corresponding to the test scene and the simulation message;
if the test direction indicated in the test scene is the message sending test, the message sending test is carried out by utilizing a message sending test scheme corresponding to the test scene and the simulation message.
13. An electronic device, comprising:
a memory for storing program requests;
a processor for invoking a program request stored in said memory, performing the steps comprised in the method according to any of claims 1-6 in accordance with the obtained program request.
14. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program requests, which when executed by a computer, cause the computer to perform the method according to any of claims 1-6.
15. A computer program product, the computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the preceding claims 1-6.
CN202311299424.8A 2023-10-09 2023-10-09 Message receiving and transmitting test method, device, equipment and medium Pending CN117459421A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311299424.8A CN117459421A (en) 2023-10-09 2023-10-09 Message receiving and transmitting test method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311299424.8A CN117459421A (en) 2023-10-09 2023-10-09 Message receiving and transmitting test method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117459421A true CN117459421A (en) 2024-01-26

Family

ID=89578968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311299424.8A Pending CN117459421A (en) 2023-10-09 2023-10-09 Message receiving and transmitting test method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117459421A (en)

Similar Documents

Publication Publication Date Title
CN110363665B (en) Credit right data processing method, device, equipment and medium
US7996818B1 (en) Method for testing using client specified references
CN103038752A (en) Bug clearing house
CN113505520A (en) Method, device and system for supporting heterogeneous federated learning
CN108833578A (en) The method and relevant device of duplex communication are carried out based on FIFO name pipeline
CN109726018A (en) Method for processing business, device, equipment and computer readable storage medium
CN112991027A (en) Bidding information processing method, device, equipment and medium based on block chain
CN112905460B (en) Device and method for simulating three-party receipt by automatic interface test
CN111382062B (en) Joint debugging test method and device for real estate transaction system and external institution business system
CN117215900A (en) Log acquisition method, device and equipment
CN111383148A (en) Education award teaching learning-assisting system based on block chain
CN117459421A (en) Message receiving and transmitting test method, device, equipment and medium
CN110347380A (en) Front and back end development approach and equipment
CN103152216A (en) System test method and device in internet
CN111865726B (en) Service message testing method, device, computer system and storage medium
CN112799956B (en) Asset identification capability test method, device and system device
CN114866628A (en) Message processing method, device, equipment and storage medium
CN113015170A (en) Short message verification method, device, electronic equipment and medium
CN112184406A (en) Data processing method, system, electronic device and computer readable storage medium
US12099976B2 (en) Group eligibility criteria builder
CN113141366B (en) Message submitting method and device, storage medium and electronic equipment
CN111144867B (en) Method and device for generating region code mapping relation
CN116260663B (en) Tax control management method and system for gas station
CN115277887A (en) Message content sending and processing method and device
CN117011097A (en) Workflow-based online examination management method, device, equipment and storage medium

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