CN111865726A - Service message testing method, device, computer system and storage medium - Google Patents

Service message testing method, device, computer system and storage medium Download PDF

Info

Publication number
CN111865726A
CN111865726A CN202010748011.3A CN202010748011A CN111865726A CN 111865726 A CN111865726 A CN 111865726A CN 202010748011 A CN202010748011 A CN 202010748011A CN 111865726 A CN111865726 A CN 111865726A
Authority
CN
China
Prior art keywords
message
tested
service
generating
type
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.)
Granted
Application number
CN202010748011.3A
Other languages
Chinese (zh)
Other versions
CN111865726B (en
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010748011.3A priority Critical patent/CN111865726B/en
Publication of CN111865726A publication Critical patent/CN111865726A/en
Application granted granted Critical
Publication of CN111865726B publication Critical patent/CN111865726B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/06Generation of reports
    • H04L43/062Generation of reports related to network traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present disclosure provides a method for testing a service message, including: generating a message to be tested according to the service type and the service parameters; checking the message to be tested according to a preset rule; under the condition that the verification is passed, responding to the message to be tested; and generating a service message test report according to the response result. The present disclosure provides a service message testing apparatus, a computer system, and a storage medium. The service message testing method and the service message testing device can be used for testing service messages in the financial field or other fields.

Description

Service message testing method, device, computer system and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for testing a service message, a computer system, and a storage medium.
Background
With the continuous development of computer technology, enterprises and users can perform service communication based on service messages, for example, service messages are sent through short messages, WeChat, public numbers and the like, users can complete service handling, message subscription and the like, and enterprises can also push service recommendation messages, preferential messages and the like to users.
Service messages need to be tested before the message-based service is actually brought online. The tester can use the terminal (such as a real mobile phone) to manually edit and send the message, and the message processing result is returned by the test platform in the enterprise.
However, the manual message editing operation is complicated, and the message sending of the entity terminal depends on the SIM card, the traffic, etc. of the communication operator or the service provider, and both the message sending and the message receiving need the transfer of the operator or the service provider, so the testing efficiency is low, and obviously it is difficult to meet the requirement of the enterprise batch business message testing.
Disclosure of Invention
In view of the above, the present disclosure provides a method, an apparatus, a computer system, and a storage medium for testing a service message.
One aspect of the present disclosure provides a method for testing a service message, including: generating a message to be tested according to the service type and the service parameters; checking the message to be tested according to a preset rule; under the condition that the verification is passed, responding to the message to be tested; and generating a service message test report according to the response result.
According to the embodiment of the present disclosure, generating the message to be tested according to the service type and the service parameter includes: receiving a request for generating the message to be tested, wherein the request comprises the service type of the message to be tested; determining a target operation object corresponding to the service type in an object library according to the service type, wherein the object library comprises a plurality of operation objects and a sub operation object corresponding to each operation object; determining a target type identifier corresponding to the service type in a case base according to the service type, wherein the case base comprises a plurality of type identifiers and parameter information corresponding to each type identifier; and transmitting the parameter information corresponding to the target type identifier to a sub-operation object corresponding to the target operation object to generate the message to be tested.
According to the embodiment of the disclosure, verifying the message to be tested according to the preset rule includes at least one of the following: checking the message to be tested according to the letter case rule in the message to be tested; checking the message to be tested according to a character combination rule in the message to be tested; checking the message to be tested according to the digit number of the characters in the message to be tested; and checking the message to be tested according to the format of the characters in the message to be tested.
According to an embodiment of the present disclosure, responding to the message to be tested includes: sending the message to be tested to a testing platform; and receiving a response result from the test platform.
According to an embodiment of the present disclosure, responding to the message to be tested includes: distributing a message identifier for the message to be tested; sending the message to be tested and the message identification of the message to be tested to a test platform; and inquiring a response result of the message to be tested from the testing platform according to the message identifier of the message to be tested.
According to an embodiment of the present disclosure, generating the service message test report according to the response result includes: comparing the response result to an expected response result; and generating the service message test report according to the comparison result.
Another aspect of the present disclosure provides a service message testing apparatus, including: the first generation module is used for generating a message to be tested according to the service type and the service parameters; the checking module is used for checking the message to be tested according to a preset rule; the response module is used for responding to the message to be tested under the condition that the verification is passed; and the second generating module is used for generating a service message test report according to the response result.
According to an embodiment of the present disclosure, the first generating module includes: a receiving unit, configured to receive a request for generating the message to be tested, where the request includes a service type of the message to be tested; a first determining unit, configured to determine, according to the service type, a target operation object corresponding to the service type in an object library, where the object library includes multiple operation objects and a sub-operation object corresponding to each operation object; the second determining unit is used for determining a target type identifier corresponding to the service type in a case base according to the service type, wherein the case base comprises a plurality of type identifiers and parameter information corresponding to each type identifier; and the generating unit is used for transmitting the parameter information corresponding to the target type identifier to a sub-operation object corresponding to the target operation object so as to generate the message to be tested.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
Another aspect of the present disclosure provides a computer system comprising: one or more processors; storage means for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
According to the embodiment of the disclosure, a message to be tested is generated according to a service type and a service parameter, the message to be tested is verified according to a preset rule, the message to be tested is responded under the condition that the verification is passed, and a service message test report is generated according to a response result. The service message can be automatically generated according to the service type and the service parameters, so that the technical problem of low testing efficiency caused by manual message editing in the related technology is at least partially solved, and the technical effect of improving the testing efficiency is further achieved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates a scenario in which the service message testing method and apparatus according to the embodiments of the present disclosure may be applied;
FIG. 2 schematically illustrates a flow chart of a method of testing a service message according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of a method of generating a traffic message test report according to a response result according to an embodiment of the present disclosure;
FIG. 4 schematically shows a flow chart of a method of generating a message to be tested according to a service type and a service parameter according to an embodiment of the present disclosure;
FIG. 5 schematically shows a flow chart of a method of responding to a message to be tested according to an embodiment of the present disclosure;
fig. 6 schematically shows a block diagram of a traffic message testing device according to an embodiment of the present disclosure; and
FIG. 7 schematically shows a block diagram of a computer system according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the present disclosure provides a method for testing a service message, including: generating a message to be tested according to the service type and the service parameters; checking the message to be tested according to a preset rule; under the condition that the verification is passed, responding to the message to be tested; and generating a service message test report according to the response result.
Fig. 1 schematically illustrates a scenario in which the service message testing method and apparatus according to the embodiment of the present disclosure may be applied. It should be noted that fig. 1 is only an example of a scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the scenario 100 may include a terminal device 110, the terminal device 110 being a variety of electronic devices having a display screen and capable of data processing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The terminal device 110 may display a message generation page on which operation objects such as a drop-down box 111, a text box 112, a text box 113, and a button 114 may be set. For example, different service types may be selected at drop-down box 111, such as query balance, transfer money, etc. Parameter information, such as the card number, password, etc., of the bank card whose balance is to be queried, may be entered in text boxes 112 and 113. Clicking on button 114 may automatically generate a service message based on the selected service type and entered parameter information.
The terminal device 110 may also display a message transmission page, and an input box for inputting a sender number, a button for clicking transmission, and the like may be provided on the message transmission page.
The terminal device 110 may also display a message reception page, which may be provided with a display frame or the like for displaying a message processing result.
The terminal device 110 may further display a message test page, and the message test page may be provided with a tag or the like for reminding of an error in the processing result.
It should be understood that the number of drop-down boxes 111, text boxes 112, text boxes 113, buttons 114 in FIG. 1 are merely illustrative. There may be any number of drop-down boxes 111, text boxes 112, text boxes 113, buttons 114, as desired for the implementation.
Fig. 2 schematically shows a flow chart of a service message testing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S204.
In operation S201, a message to be tested is generated according to the service type and the service parameter.
According to the embodiment of the disclosure, the service types may include balance inquiry, credit inquiry, transfer remittance, message subscription, and the like in the banking field, and may also include telephone fee inquiry, flow inquiry, package handling, and the like of the communication service. Taking the field of banking as an example, the service parameters may include a payment card number, a collection card number, a password, an amount, a collection account name, and the like.
According to the embodiment of the present disclosure, the query balance type may be selected in a drop-down box on the terminal device 110, then the card numbers are respectively input in a text box 112, the password is entered in a text box 113, and a business message for querying the balance may be directly generated by clicking a button 114, for example, the business message may be a short message for querying the balance.
In operation S202, the message to be tested is verified according to a preset rule.
According to the embodiment of the disclosure, the checking of the message to be tested according to the preset rule comprises at least one of the following steps: checking the message to be tested according to the capital and lower case rule of letters in the message to be tested; checking the message to be tested according to a character combination rule in the message to be tested; checking the message to be tested according to the digit of the characters in the message to be tested; and checking the message to be tested according to the format of the characters in the message to be tested.
According to the embodiment of the present disclosure, before the service message test is performed, the generated service message may be checked. The message content has a certain judgment rule, and the message which does not conform to the rule is an invalid message. Taking the banking field as an example, the rule may include a message content letter case rule, a bin rule (the first six digits of the bank card conform to a certain combination rule), a password digit rule, and an amount rule, and the rule judgment implementation method is mainly a regular expression. The message which does not accord with the sending rule can be identified, only the message which accords with the rule is sent, and the message which does not accord with the rule is prevented from occupying system resources.
According to an embodiment of the present disclosure, the verification rule may be as follows:
checking rule 1: the case rule of the message content letters, for example, if the letters in the message content are all capital letters, the sending rule is met. If the lower case letters exist, the messages are invalid, and judgment can be carried out by using a regular expression.
Checking rule 2: the bin rule, for example, if the first 6 digits of the card number (i.e., bin) is in the bin set (e.g., 622202), then the sending rule is satisfied. If other digit combinations (e.g., 600021) occur, then an invalid message can be judged with a regular expression.
Checking rule 3: the cipher bit number rule, for example, if the cipher bit number is 6 bits, the transmission rule is satisfied. If the number of bits is not equal to 6 bits, the message is invalid and can be judged by a regular expression.
And 4, checking a rule: the amount rule, for example, the transaction amount may be in a format similar to 11.00, two digits after decimal point, and if the format is not met, the transaction amount is judged to be invalid message by regular expression.
Other verification rules may be supplemented as required by the test.
In operation S203, in case the verification passes, a response to the message to be tested is made.
According to the embodiment of the disclosure, a message sending page can be called, and a sender number, for example, a special service number configured by a test environment, is input in the message sending page. And then click the send button, the message can be sent to the test platform. The test platform may respond to the message to generate a message processing result. The message processing result may be obtained from the test platform.
In operation S204, a service message test report is generated according to the response result.
According to the embodiment of the disclosure, the test result is a returned transaction result, and the transaction result can be analyzed. For example, test logs are generated in the processes of message generation, message verification and message sending, and the test logs record the whole automatic test process, so that testers can trace the test process conveniently. Specifically, the error reporting during the test process can be specially marked in the test log, so that the tester can pay attention to the error. The transaction result can be analyzed according to the comparison between the transaction result and the expected result, and a service message test report is generated.
Fig. 3 schematically shows a flowchart of a method for generating a service message test report according to a response result according to an embodiment of the present disclosure.
As shown in fig. 3, operation S204 includes operations S301 to S302.
In operation S301, the response result is compared with an expected response result.
In operation S302, a service message test report is generated according to the comparison result.
According to the embodiment of the disclosure, an expected test result can be written in the test script in advance, after the test is completed, a page test result is obtained, a page test result message display frame is set as an identification object, a specific attribute value of the object is a test result, the actual test result is compared with the expected result, a regular expression is used for fuzzy matching, and a case with the expected result inconsistent with the actual test result is subjected to key prompt for reference analysis by a tester.
Fig. 4 schematically shows a flowchart of a method for generating a message to be tested according to a service type and a service parameter according to an embodiment of the present disclosure.
As shown in fig. 4, operation S201 includes operations S401 to S404.
In operation S401, a request to generate a message to be tested is received, wherein the request includes a service type of the message to be tested.
According to the embodiment of the disclosure, the script for automatically generating the message can be called to automatically generate the business message in batch. When generating the script, an operation object in the current page may be identified, and the operation object may be, for example, a drop-down box, a text box, a display box, a button, a tag, and the like, wherein a service type may be selected in the drop-down box. And adding the identified operation object into an object library, and compiling a script to realize the operation on the object, namely obtaining the automatic generation script of the service message. The script writing operation on the object may be a selection operation on a drop-down box, an operation on an incoming parameter on a text box, or the like. Different scripts may be generated for different traffic types. For example, script 1 may generate a message for balance inquiry, script 2 may generate a message for credit inquiry, and script 3 may generate a message for transfer remittance.
In operation S402, a target operand corresponding to the service type in an object library is determined according to the service type, where the object library includes a plurality of operands and sub-operands corresponding to each operand.
According to the embodiment of the disclosure, a request for generating a message is received, a script for automatically generating a service message is executed, the request can include a service type, in the process of executing the script, a drop-down box used for selecting the service type in a current message generation page can be identified, and the service type is selected in the drop-down box according to the service type carried in the request. A sub-operand corresponding to the drop-down box is then determined from the object library, e.g., the sub-operand may be two text boxes.
According to the embodiment of the present disclosure, the corresponding relationship between the operation object and the operation sub-object may be determined according to a pre-configured message template. For example, the message template for inquiring the balance is CXYE # card number # bank password, and the sub-operands of the operand (drop-down box) whose service type is inquiring the balance may be a text box for inputting the card number and a text box for inputting the password by the user.
According to the embodiment of the disclosure, a plurality of operation objects may be configured in the object library, such as a drop-down box, and the operation objects may be positioned in the drop-down box in the page (i.e., the operation objects in the page correspond to the operation objects in the object library) by describing the position, name (e.g., box1), and the like of the drop-down box. Each operation object may correspond to a different service type, a sub operation object corresponding to the operation object may be configured in the object library, such as a text box, and the sub operation object may be located in the text box in the page by describing a position, a name (such as a boxl), and the like of the text box.
In operation S403, a target type identifier corresponding to the service type in a case base is determined according to the service type, where the case base includes a plurality of type identifiers and parameter information corresponding to each type identifier.
According to the embodiment of the disclosure, the case base can be stored in a form of a two-dimensional table, the case base can contain a plurality of test cases, and each test case can comprise fields such as a "case name", a "parameter 1", and a "parameter 2". The "case name" is a key table field through which the test case is identified, the case name may correspond to a service type, for example, case name 1 is balance inquiry, case name 2 is limit inquiry, and case name 3 is transfer remittance.
In operation S404, parameter information corresponding to the target type identifier is transferred to a sub-operand corresponding to the target operand to generate a message to be tested.
According to the embodiment of the disclosure, the corresponding message generation script can be called through the case name, and then the object can be operated by running the script to automatically generate the service message. For example, the type identifier of the service type carried in the request is case name 1, that is, balance inquiry, and it may be determined to execute script 1, and in the process of executing script 1, parameter 1 and parameter 2 corresponding to case name 1 may be transferred to two text boxes corresponding to the target operation object, so as to generate a message for inquiring balance.
Fig. 5 schematically shows a flow chart of a method of responding to a message to be tested according to an embodiment of the present disclosure.
As shown in fig. 5, operation S203 includes operations S501 to S503.
In operation S501, a message identification is assigned to a message to be tested.
In operation S502, a message to be tested and a message identifier of the message to be tested are sent to a test platform.
In operation S503, a response result of the message to be tested is queried from the test platform according to the message identifier of the message to be tested.
According to the embodiment of the present disclosure, a sender number, which may be, for example, a preconfigured service number, may be automatically input as a message identifier in a text box on a messaging page using a messaging script.
According to the embodiment of the disclosure, the sender number and the message content are sent to the test platform, and the test platform processes the message to generate a message processing result.
According to the embodiment of the disclosure, the sender number and the transaction time can be used as query conditions to automatically query the message processing result, so as to realize the automatic receiving of the message.
The following describes the embodiment of the present disclosure in detail by taking short message banking as an example.
Specifically, a tester compiles a short message generation script of 'balance inquiry', 'credit inquiry' and 'money transfer remittance', identifies related operation objects in a short message generation module, adds the short message generation script into an object library of automatic test software, and compiles the script to realize the operation on the objects, namely the short message generation script is obtained. The parameters required to be input by the 'balance inquiry' short message are a card number and a short message bank password; the parameters required to be input by the 'credit line inquiry' short message are a card number and a short message bank password; the parameters required to be input by the transfer remittance short message are as follows: payment card number, collection account name, amount, short message bank password.
The short message generated by the short message generating script of 'inquiring balance' is as follows: CXYE #6212250200010281201#147258 (short message template: CXYE # card number # short message bank password); the short message generated by the short message generating script of 'inquiring the limit' is as follows: CXED #5105290033402315#14725 (short message template: CXED # card number # short message bank password); the short message generated by the short message generating script of transferring money is as follows: ZZHK #6212250200010281201#6212250200010281202# test username #50.0#147258 (SMS template: ZZHK # Payment card number # Collection username # amount # SMS bank password).
Specifically, the generated short message can be verified in a manner of setting a check point for the short message generation result. For example, (1) "query balance": CXYE #6212250200010281201#147258, check pass; (2) "inquire amount": CXED #5105290033402315#14725, the regular expression for checking the password "14725" is: \ { d {6} (meaning: any 6 digits), the password "14725" cannot pass the verification, and the short message is identified as an invalid short message. (3) "transfer money": ZZHK #6212250200010281201#6212250200010281202# test username #50.0#147258, the regular expression checked for amount "50.0" is: and (d + \ d {2} (meaning that the number before the decimal point is one or more numbers and the number after the decimal point is two digits), the sum of 50.0 cannot pass the verification, and the short message is identified as an invalid short message.
Specifically, a tester compiles a short message sending and receiving test script of 'balance inquiry', 'credit inquiry' and 'transfer remittance', identifies related operation objects in a short message test platform module, adds the related operation objects into an object library of automatic test software, and compiles the script to realize the operation on the objects, namely the short message sending and receiving test script. And in the step 2, the checked short message and the sending mobile phone number are used as parameters to be transmitted to the short message sending and receiving script. In this embodiment, only the "balance inquiry" short message passes the verification, the mobile phone number and the short message content (CXYE #6212250200010281201#147258) of the balance inquiry short message are used as parameters to be input into the short message sending and receiving test script, and after the script is executed, the test result short message is received: the account of the RMB is normal for a debit card with a tail number of 1201, the current balance is 3337.62 yuan, and the available balance is 3337.62 yuan. If you want to inquire the balance of the account opened by other short message banks, please send the '# card number' to 95588 in 30 minutes. Reply balance to remind, fund change knows [ XX bank ] early.
Specifically, after receiving the test result short message, the test result short message is verified, and the template verified by using the regular expression may be: the debit card with the tail number of \ d {4} is normal in the account of the RMB, the current balance \ d + \ d {2} element and the available balance \ d + \ d {2} element. If you want to inquire the balance of the account opened by other short message banks, please send the '# card number' to 95588 in 30 minutes. Reply balance to remind, fund change knows [ XX bank ] early. If the verification is passed, the case execution is prompted to pass, and if the verification is not passed, the case execution result is specially marked, so that a tester can pay special attention to the case execution result.
Specifically, in the test process, a log is generated at each step in the execution process, and if an abnormality occurs in the test process, a record is recorded in the log and is particularly marked, so that a tester can pay special attention to the log.
Fig. 6 schematically shows a block diagram of a traffic message testing device according to an embodiment of the present disclosure.
As shown in fig. 6, the service message testing apparatus 600 includes a first generating module 601, a verifying module 602, a responding module 603, and a second generating module 604.
The first generating module 601 is configured to generate a message to be tested according to the service type and the service parameter.
The checking module 602 is configured to check the message to be tested according to a preset rule.
The response module 603 is configured to respond to the message to be tested if the check is passed.
The second generating module 604 is configured to generate a service message test report according to the response result.
According to an embodiment of the present disclosure, a first generation module includes a receiving unit, a first determination unit, a second determination unit, and a generation unit.
The receiving unit is used for receiving a request for generating a message to be tested, wherein the request comprises a service type of the message to be tested.
The first determining unit is used for determining a target operation object corresponding to the business type in an object library according to the business type, wherein the object library comprises a plurality of operation objects and sub operation objects corresponding to each operation object.
The second determining unit is used for determining a target type identifier corresponding to the service type in the case base according to the service type, wherein the case base comprises a plurality of type identifiers and parameter information corresponding to each type identifier.
The generating unit is used for transmitting the parameter information corresponding to the target type identification to the sub-operation object corresponding to the target operation object so as to generate a message to be tested.
According to an embodiment of the disclosure, the verification module 602 is configured to perform at least one of: checking the message to be tested according to the capital and lower case rule of letters in the message to be tested; checking the message to be tested according to a character combination rule in the message to be tested; checking the message to be tested according to the digit of the characters in the message to be tested; and checking the message to be tested according to the format of the characters in the message to be tested.
According to an embodiment of the present disclosure, the response module 603 includes a first sending unit and a first receiving unit.
The first sending unit is used for sending the message to be tested to the testing platform.
The first receiving unit is used for receiving the response result from the test platform.
According to the embodiment of the present disclosure, the response module 603 further includes an allocation unit, a second sending unit, and a query unit.
The distribution unit is used for distributing message identification to the message to be tested.
The second sending unit is used for sending the message to be tested and the message identifier of the message to be tested to the testing platform.
The query unit is used for querying a response result of the message to be tested from the test platform according to the message identifier of the message to be tested.
It should be noted that the service message testing method and apparatus provided by the embodiment of the present disclosure may be used for service message testing in the financial field, for example, short message banking. The method and the device can also be used for testing the business messages in any field except the financial field, and the application field of the method and the device for testing the business messages is not limited by the disclosure.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the first generation module 601, the verification module 602, the response module 603 and the second generation module 604 may be combined and implemented in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the first generation module 601, the verification module 602, the response module 603, and the second generation module 604 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in a suitable combination of any of them. Alternatively, at least one of the first generation module 601, the verification module 602, the response module 603 and the second generation module 604 may be at least partially implemented as a computer program module, which when executed may perform a corresponding function.
It should be noted that the service message testing apparatus portion in the embodiment of the present disclosure corresponds to the service message testing method portion in the embodiment of the present disclosure, and the description of the service message testing apparatus portion specifically refers to the service message testing method portion, which is not described herein again.
FIG. 7 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method, according to an embodiment of the present disclosure. The computer system illustrated in FIG. 7 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 7, a computer system 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM703, various programs and data necessary for the operation of the system 700 are stored. The processor 701, the ROM702, and the RAM703 are connected to each other by a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM702 and/or the RAM 703. It is noted that the programs may also be stored in one or more memories other than the ROM702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the system 700 may also include an input/output (I/O) interface 705, the input/output (I/O) interface 705 also being connected to the bus 704. The system 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM702 and/or the RAM703 and/or one or more memories other than the ROM702 and the RAM703 described above.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A service message testing method comprises the following steps:
generating a message to be tested according to the service type and the service parameters;
checking the message to be tested according to a preset rule;
under the condition that the verification is passed, responding to the message to be tested; and
and generating a service message test report according to the response result.
2. The method of claim 1, wherein generating a message to be tested according to a traffic type and a traffic parameter comprises:
receiving a request for generating the message to be tested, wherein the request comprises the service type of the message to be tested;
determining a target operation object corresponding to the service type in an object library according to the service type, wherein the object library comprises a plurality of operation objects and a sub operation object corresponding to each operation object;
determining a target type identifier corresponding to the service type in a case base according to the service type, wherein the case base comprises a plurality of type identifiers and parameter information corresponding to each type identifier; and
and transmitting the parameter information corresponding to the target type identifier to a sub-operation object corresponding to the target operation object to generate the message to be tested.
3. The method of claim 1 or 2, wherein verifying the message to be tested according to a preset rule comprises at least one of:
checking the message to be tested according to the letter case rule in the message to be tested;
checking the message to be tested according to a character combination rule in the message to be tested;
checking the message to be tested according to the digit number of the characters in the message to be tested;
and checking the message to be tested according to the format of the characters in the message to be tested.
4. The method of claim 1 or 2, wherein responding to the message to be tested comprises:
sending the message to be tested to a testing platform; and
receiving a response result from the test platform.
5. The method of claim 1 or 2, wherein responding to the message to be tested comprises:
distributing a message identifier for the message to be tested;
sending the message to be tested and the message identification of the message to be tested to a test platform; and
and inquiring a response result of the message to be tested from the testing platform according to the message identification of the message to be tested.
6. The method of claim 1 or 2, wherein generating a traffic message test report according to the response result comprises:
comparing the response result to an expected response result; and
and generating the service message test report according to the comparison result.
7. A service message testing apparatus, comprising:
the first generation module is used for generating a message to be tested according to the service type and the service parameters;
the checking module is used for checking the message to be tested according to a preset rule;
the response module is used for responding to the message to be tested under the condition that the verification is passed; and
and the second generating module is used for generating a service message test report according to the response result.
8. The apparatus of claim 7, wherein the first generating means comprises:
a receiving unit, configured to receive a request for generating the message to be tested, where the request includes a service type of the message to be tested;
a first determining unit, configured to determine, according to the service type, a target operation object corresponding to the service type in an object library, where the object library includes multiple operation objects and a sub-operation object corresponding to each operation object;
a second determining unit, configured to determine, according to the service type, a target type identifier corresponding to the service type in a case base, where the case base includes a plurality of type identifiers and parameter information corresponding to each type identifier; and
and the generating unit is used for transmitting the parameter information corresponding to the target type identifier to a sub-operation object corresponding to the target operation object so as to generate the message to be tested.
9. A computer system, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-6.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 6.
CN202010748011.3A 2020-07-29 2020-07-29 Service message testing method, device, computer system and storage medium Active CN111865726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010748011.3A CN111865726B (en) 2020-07-29 2020-07-29 Service message testing method, device, computer system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010748011.3A CN111865726B (en) 2020-07-29 2020-07-29 Service message testing method, device, computer system and storage medium

Publications (2)

Publication Number Publication Date
CN111865726A true CN111865726A (en) 2020-10-30
CN111865726B CN111865726B (en) 2022-03-08

Family

ID=72946127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010748011.3A Active CN111865726B (en) 2020-07-29 2020-07-29 Service message testing method, device, computer system and storage medium

Country Status (1)

Country Link
CN (1) CN111865726B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905445A (en) * 2020-12-09 2021-06-04 江苏苏宁云计算有限公司 Log-based test method and device and computer system

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070157165A1 (en) * 2006-01-02 2007-07-05 Giloong Kim System and method for developing software based on business operating system
US20100125886A1 (en) * 2008-11-18 2010-05-20 At&T Intellectual Property I, L.P. Network diagnostics
CN103428046A (en) * 2012-05-25 2013-12-04 腾讯科技(深圳)有限公司 Interface protocol test method and terminal
CN105405221A (en) * 2015-10-28 2016-03-16 深圳怡化电脑股份有限公司 Method and device for automated test
US20160308749A1 (en) * 2015-04-17 2016-10-20 Somansa Co., Ltd. Test automation system and method for detecting change in signature of internet application traffic protocol
CN106470131A (en) * 2015-08-19 2017-03-01 阿里巴巴集团控股有限公司 A kind of method of testing and equipment
CN106487603A (en) * 2015-08-26 2017-03-08 阿里巴巴集团控股有限公司 A kind of response test method and device
CN106506283A (en) * 2016-12-08 2017-03-15 用友网络科技股份有限公司 Bank and the service test method and device of enterprise's docking system
DE102016001464A1 (en) * 2016-02-09 2017-08-10 Giesecke & Devrient Gmbh Verification of an item provided with a security element
CN108111364A (en) * 2016-11-24 2018-06-01 苏宁云商集团股份有限公司 The test method and device of a kind of operation system
CN108282377A (en) * 2017-01-05 2018-07-13 菜鸟智能物流控股有限公司 Processing method and device for testing logistics service data and server
CN108446223A (en) * 2018-03-06 2018-08-24 吉旗(成都)科技有限公司 A kind of business scenario automated testing method based on on-the-flier compiler
CN109815039A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Test method and device, storage medium, the computer equipment of business software
CN110380936A (en) * 2019-07-23 2019-10-25 中国工商银行股份有限公司 Test method and device
CN110414242A (en) * 2019-08-02 2019-11-05 中国工商银行股份有限公司 For detecting the method, apparatus, equipment and medium of service logic loophole

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070157165A1 (en) * 2006-01-02 2007-07-05 Giloong Kim System and method for developing software based on business operating system
US20100125886A1 (en) * 2008-11-18 2010-05-20 At&T Intellectual Property I, L.P. Network diagnostics
CN103428046A (en) * 2012-05-25 2013-12-04 腾讯科技(深圳)有限公司 Interface protocol test method and terminal
US20160308749A1 (en) * 2015-04-17 2016-10-20 Somansa Co., Ltd. Test automation system and method for detecting change in signature of internet application traffic protocol
CN106470131A (en) * 2015-08-19 2017-03-01 阿里巴巴集团控股有限公司 A kind of method of testing and equipment
CN106487603A (en) * 2015-08-26 2017-03-08 阿里巴巴集团控股有限公司 A kind of response test method and device
CN105405221A (en) * 2015-10-28 2016-03-16 深圳怡化电脑股份有限公司 Method and device for automated test
DE102016001464A1 (en) * 2016-02-09 2017-08-10 Giesecke & Devrient Gmbh Verification of an item provided with a security element
CN108111364A (en) * 2016-11-24 2018-06-01 苏宁云商集团股份有限公司 The test method and device of a kind of operation system
CN106506283A (en) * 2016-12-08 2017-03-15 用友网络科技股份有限公司 Bank and the service test method and device of enterprise's docking system
CN108282377A (en) * 2017-01-05 2018-07-13 菜鸟智能物流控股有限公司 Processing method and device for testing logistics service data and server
CN108446223A (en) * 2018-03-06 2018-08-24 吉旗(成都)科技有限公司 A kind of business scenario automated testing method based on on-the-flier compiler
CN109815039A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Test method and device, storage medium, the computer equipment of business software
CN110380936A (en) * 2019-07-23 2019-10-25 中国工商银行股份有限公司 Test method and device
CN110414242A (en) * 2019-08-02 2019-11-05 中国工商银行股份有限公司 For detecting the method, apparatus, equipment and medium of service logic loophole

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905445A (en) * 2020-12-09 2021-06-04 江苏苏宁云计算有限公司 Log-based test method and device and computer system

Also Published As

Publication number Publication date
CN111865726B (en) 2022-03-08

Similar Documents

Publication Publication Date Title
US10742582B2 (en) Launching a client application based on a message
CN111340558B (en) Online information processing method, device, equipment and medium based on federal learning
CN108073429B (en) Payment mode configuration method, device, equipment and storage medium
CN107862425B (en) Wind control data acquisition method, device and system and readable storage medium
CN112463729B (en) Data file warehousing method and device, electronic equipment and medium
CN110659206A (en) Simulation architecture establishing method, device, medium and electronic equipment based on microservice
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN112348326A (en) Bank business processing method and system
CN112711640A (en) Method and device for configuring business handling process
CN111865726B (en) Service message testing method, device, computer system and storage medium
CN112732547B (en) Service testing method and device, storage medium and electronic equipment
CN110336872B (en) Method, device and system for acquiring third-party data
CN115689570A (en) Business information risk identification method, device, equipment and medium
CN111046393A (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN115470139A (en) Interface testing method and related equipment
CN114780807A (en) Service detection method, device, computer system and readable storage medium
CN112437002B (en) Food ordering method, system, equipment and storage medium based on RCS message
CN113015170A (en) Short message verification method, device, electronic equipment and medium
CN114116509A (en) Program analysis method, program analysis device, electronic device, and storage medium
CN114489667A (en) Script generation method and device, electronic equipment and storage medium
CN113590243A (en) Energy enterprise project creation method and device, computer equipment and medium
CN112860344A (en) Component processing method and device, electronic equipment and storage medium
CN112184406A (en) Data processing method, system, electronic device and computer readable storage medium
CN112613980A (en) Transaction processing method and device, electronic equipment and computer-readable storage medium
CN111949259A (en) Risk decision configuration method, system, electronic 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
GR01 Patent grant
GR01 Patent grant