CN113297079A - Service test method, device, service test equipment and storage medium - Google Patents

Service test method, device, service test equipment and storage medium Download PDF

Info

Publication number
CN113297079A
CN113297079A CN202110570692.3A CN202110570692A CN113297079A CN 113297079 A CN113297079 A CN 113297079A CN 202110570692 A CN202110570692 A CN 202110570692A CN 113297079 A CN113297079 A CN 113297079A
Authority
CN
China
Prior art keywords
test
service
target
information
scene
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
CN202110570692.3A
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.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce 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 Ping An E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202110570692.3A priority Critical patent/CN113297079A/en
Publication of CN113297079A publication Critical patent/CN113297079A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof

Abstract

The application is applicable to the technical field of research and development management, and provides a service testing method, a device, service testing equipment and a storage medium, wherein the method comprises the following steps: when an external channel for testing a target service is abnormal, receiving a service ID, a scene ID and test parameter information sent by a service system; determining a target test scene from a plurality of test scenes of the target service according to the service ID and the scene ID, and determining template contents of a plurality of sending channels required by the target test scene; acquiring test parameters meeting the test parameter information from a data pool; combining the test parameters with the template contents of the plurality of sending channels to obtain test scene information; and returning the test scene information to the service system to generate a test result. By adopting the method, the problem that the service cannot be tested when the external channel is abnormal can be solved.

Description

Service test method, device, service test equipment and storage medium
Technical Field
The present application belongs to the field of research and development management technologies, and in particular, to a service testing method, an apparatus, a service testing device, and a storage medium.
Background
In the prior art, in order to meet the requirement of business development, many enterprises develop or introduce business systems, and the complexity of the business systems is different due to the business types, business operations and the like. For example, the business system of the bank core, which is an important component of the bank deposit, loan accounting processing and the like, all business operations related to the bank deposit, loan accounting are completed in the business system. Based on this, in order to determine whether each service module in the service system can normally operate to adapt to various scenes that may occur when each service module performs actual service operation, each service module in the service system needs to be tested.
At present, when a user tests a service module in a service system, a domain name butted with an external channel needs to be configured for each set of test environment in the service module, so that the service system can use the external channel to test a service corresponding to the service module. However, in the process of testing the service by using the external channel, if the external channel is abnormal, the service cannot be normally tested.
Disclosure of Invention
The embodiment of the application provides a service testing method and device, service testing equipment and a storage medium method and device, and can solve the problem that in the process of testing a service by using an external channel, if the external channel is abnormal, the service cannot be normally tested.
In a first aspect, an embodiment of the present application provides a service testing method, which is applied to a service testing device, and the method includes:
when an external channel for testing a target service is abnormal, receiving a test request aiming at the target service, which is sent by a service system, wherein the test request comprises a service ID, a scene ID and test parameter information;
determining a target test scene from a plurality of test scenes of the target service according to the service ID and the scene ID, and determining template contents of a plurality of sending channels required to be used by the target test scene;
acquiring test parameters meeting the test parameter information from a data pool;
combining the test parameters with the template contents of the plurality of sending channels to obtain test scene information;
and returning the test scene information to the service system, wherein the service system is used for generating a test result aiming at the target service according to the test scene information and preset test scene information.
In an embodiment, determining a target test scenario from a plurality of test scenarios of the target service according to the service ID and the scenario ID, and determining template contents of a plurality of transmission channels required to be used by the target test scenario includes:
determining a plurality of sending channels correspondingly used by the target service according to the service ID; and the number of the first and second groups,
determining a target test scenario from the plurality of test scenarios according to the scenario ID;
and respectively acquiring template contents corresponding to the plurality of sending channels in the target test scene based on the plurality of sending channels.
In one embodiment, the template content includes static template information and dynamic logic rule information;
combining the test parameters with the template contents of the plurality of sending channels to obtain test scene information, wherein the test scene information comprises:
aiming at the template content of any sending channel, if the test parameters are multiple, sequentially determining target test parameters which accord with each dynamic logic rule from multiple test parameters according to the dynamic logic rule information in the template content;
respectively and correspondingly replacing the dynamic logic rule information with a plurality of target test parameters;
and combining the replaced dynamic logic rule information and the replaced static target information to obtain the test scene information.
In an embodiment, the test parameter information includes a last test state of the target service and a test number when the target service is tested; the method further comprises the following steps:
if the test request does not include the scene ID, acquiring a test number contained in the test parameter information;
determining a next test state for testing the target service according to the test number and the previous test state;
and determining a target test scene for testing the next test state of the target service from a plurality of test scenes of the target service.
In an embodiment, after combining the test parameters with the template contents of the multiple transmission channels to obtain the test scenario information, the method further includes:
acquiring service data associated with the target test scene from the data pool;
and reconfiguring the test scenario information based on the configuration rule of the service data to obtain target test scenario information, wherein the target test scenario information meets the service verification rule of the target service.
In an embodiment, the method further comprises:
aiming at any test scene of the target service, if a plurality of external channels are normal, respectively acquiring a plurality of channel test scene information generated after the current test scene is tested through the plurality of external channels;
respectively carrying out data cleaning on the plurality of pieces of channel test scene information to obtain channel test parameters respectively corresponding to the plurality of pieces of channel test scene information in the current test scene;
determining channel test requests sent by the service system when the current test scene is tested through the plurality of external channels;
and associating the channel test parameters with the channel test request, and storing the channel test parameters and the channel test request into the data pool.
In an embodiment, before obtaining, respectively, a plurality of pieces of channel test scenario information generated after a current test scenario is tested through the plurality of external channels, the method further includes:
monitoring channel status of the plurality of external channels;
and if the channel states of the external channels are all recovered to be normal states, testing the test scenes under the target service through the external channels, and executing reminding operation on the service system.
In a second aspect, an embodiment of the present application provides a service testing apparatus, which is applied to a service testing device, and includes:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a test request aiming at a target service sent by a service system when an external channel for testing the target service is abnormal, and the test request comprises a service ID, a scene ID and test parameter information;
the first determining module is used for determining a target test scene from a plurality of test scenes of the target service according to the service ID and the scene ID and determining template contents of a plurality of sending channels required to be used by the target test scene;
the first acquisition module is used for acquiring the test parameters meeting the test parameter information from the data pool;
the combination module is used for combining the test parameters with the template contents of the plurality of sending channels to obtain test scene information;
and the return module is used for returning the test scene information to the service system, and the service system is used for generating a test result aiming at the target service according to the test scene information and preset test scene information.
In a third aspect, an embodiment of the present application provides a service testing device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method according to any one of the above first aspects is implemented.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method according to any one of the above first aspects.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a service testing device, causes the service testing device to execute the method described in any one of the above first aspects.
Compared with the prior art, the embodiment of the application has the advantages that: and when the external channel is determined to be abnormal, receiving a test request which is sent by the service system and used for testing the target service through the service test equipment. And then, determining a target test scene of the target service and template contents corresponding to each external transmission channel under the target test scene based on the service ID and the scene ID in the test request, so that the template contents currently determined by the service test equipment are consistent with the corresponding template contents when the external channels are normal. Furthermore, after the service test equipment acquires corresponding test parameters from the data pool to combine the template contents, the generated test scenario information is closer to the test scenario information when the external channel is normal. Furthermore, the tester can more accurately determine the test result of the service according to the received test scene information so as to normally test the service.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart illustrating an implementation of a service testing method according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating an implementation manner of S102 of a service testing method according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating an implementation manner of S104 of a service testing method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating an implementation of another service testing method according to an embodiment of the present application;
fig. 5 is a flowchart illustrating an implementation of another service testing method according to an embodiment of the present application;
fig. 6 is a flowchart illustrating an implementation of another service testing method according to an embodiment of the present application;
fig. 7 is a flowchart illustrating an implementation of another service testing method according to an embodiment of the present application;
fig. 8 is a block diagram illustrating a structure of a service testing apparatus according to an embodiment of the present application;
fig. 9 is a block diagram of a service test apparatus according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
The service testing method provided by the embodiment of the application can be applied to service testing equipment such as a notebook computer, a super-mobile personal computer (UMPC) and the like, and can also be applied to a service testing platform. Specifically, the service test platform may be a mock platform. The embodiment of the present application does not set any limit to the specific type of the service test device.
Referring to fig. 1, fig. 1 shows a flowchart of an implementation of a service testing method provided in an embodiment of the present application, where the method includes the following steps:
s101, when an external channel for testing a target service is abnormal, receiving a test request aiming at the target service, which is sent by a service system, wherein the test request comprises a service ID, a scene ID and test parameter information.
In this embodiment, the service system is a system for initiating a service test, and generally, a service system includes multiple service modules to execute functions corresponding to multiple services. In addition, for each new online service in the service system, a service test is usually performed on a service module corresponding to the service in advance to determine whether the service module can normally operate in an actual scene, so as to achieve an expected effect.
Generally, when a tester performs a service test, it is necessary to pre-configure a corresponding pair of test scenarios, and then initiate a test request for performing the service test to a service test device to obtain corresponding test scenario information. And then, respectively sending the test scene information to the service system through corresponding external channels, and judging by a tester according to the test scene information actually received by the service system to determine the test result of the service.
However, in practice, the external channels are typically responsible for other channel merchants. Therefore, it can be understood that the tester has strong dependency on the external channel when performing the business test. That is, when an external channel is abnormal, a tester cannot normally test the service. Therefore, the present embodiment is a specific example illustration provided for avoiding blocking of the service test when the external channel is abnormal. It should be added that, when performing the service test, the reason why the test scenario information needs to be sent through an external channel is that: after the service is on line, in the process of executing the corresponding function of the service, the generated service information (including but not limited to notification information, verification information, etc.) is all sent to the user through an external channel (a short message sending channel, an APP sending channel, etc.). Therefore, the service is tested through an external channel, and the test scene information received by the service system can be closer to the information actually received by the user. Therefore, the external channel is used for service test, so that the tester can more accurately determine the test result of the service according to the received test scene information.
Therefore, in this embodiment, when the external channel is abnormal, the service test device performing the service test may preset a device with multiple service test policies for the user, and may be configured to generate test scenario information according to the test request and send the test scenario information to the service system. The service testing device may be a mock platform, which has a function of simulating and controlling an external or system-level object or interface, so that a tester can complete testing of a service module without interacting with a real environment (an environment in which test scenario information is sent through an external channel) during service testing.
In this embodiment of the present application, the test request is a request initiated when a service system needs to test a certain service, where the test request includes, but is not limited to, a service ID, a scenario ID, and test parameter information of the service. The service ID can be used for identifying the service, and the service testing equipment determines all external channels which may be needed by the service during testing according to the service ID. And then, the test equipment can determine a target test scene according to the scene ID, so as to obtain the template content corresponding to each external channel in the target test scene. The test parameter information includes, but is not limited to, an order number, an order status, and other information when the service is tested.
In the embodiment of the present application, the service ID and the scene ID include, but are not limited to, numbers, letters, or a combination thereof. It can be understood that the service ID and the scenario ID are both unique, the service ID is used for uniquely identifying a plurality of services, and the scenario ID is used for uniquely identifying a plurality of test scenarios.
When the external channels are normal, the template contents corresponding to the external channels used in each test scenario need to be stored in the service test equipment in advance, so that the template contents determined by the service test equipment according to the scenario ID and the service ID are consistent with the template contents actually set.
S102, determining a target test scene from the plurality of test scenes of the target service according to the service ID and the scene ID, and determining template contents of a plurality of sending channels required by the target test scene.
In this embodiment of the present application, the target test scenario is a test scenario for testing the service. Each test scenario may be configured in advance by a configuration person, and the configuration content includes, but is not limited to, configuring a scenario ID for the test scenario, configuring a corresponding transmission channel for the test scenario, and configuring a corresponding template content for each transmission channel used in the test scenario.
In the embodiment of the present application, when an external channel is normal, a service ID included in a test request initiated by a service system is used to determine all channels of the service that may return test scenario information. Specifically, for the information notification type service, the available external channels for information transmission generally include an APP transmission channel, a short message transmission channel, and a mail transmission channel. However, for the target service under test, it may only be able to send the test scenario information through the short message channel and/or the micro-message public channel. At this time, the service test apparatus may determine a plurality of external channels to be used by the target service from among the plurality of external channels according to the service ID included in the test request.
In this embodiment of the present application, the template content may be information content that is set in advance in a service test scenario by a configurator. The template content in one test scenario generally includes multiple types. That is, each external channel in a test scenario usually corresponds to a template content. For example, the same test scenario includes both the template content in the short message transmission channel and the template content in the APP transmission channel. It should be noted that the reason why the corresponding template content is configured for each transmission channel is that: in the template content of the short message sending channel and the template content of the APP sending channel, the template contents belong to different information sending types, and the respective configuration logic rules are different. Therefore, each external channel generally corresponds to one template content, so that the test scenario information generated based on the template content can be transmitted through the corresponding external channel.
It can be understood that, in the same test scenario, although each external channel generally corresponds to one template content, the test scenario information generated based on each template content is the same. That is, in a target scene, when the generated APP notification information and the short message notification information are sent to a terminal of the same user, the displayed information contents are the same.
S103, obtaining the test parameters meeting the test parameter information from the data pool.
In the embodiment of the present application, a large number of test parameters are stored in the data pool in advance, however, the test parameters required in each test scenario are different. Based on this, the service test equipment can obtain the test parameters meeting the test parameter information from the data pool. The data pool may be a data pool of the service test device, or a data pool in the service system, and may be in data connection with the service test device, which is not limited herein.
For example, the test parameter information may include a user information condition, and the service test device obtains, as the test parameter, user information that satisfies the user information condition from the data pool according to the user information condition. For example, the data pool records a large number of short message contact addresses and/or mail contact addresses of users. If the user information condition is the condition of acquiring the short message contact way, the service test equipment can determine the user recorded with the user short message contact way as a target user, and simultaneously acquire other information of the target user stored in the data pool as a test parameter for subsequent processing.
It should be noted that, for template contents corresponding to different sending channels in the same test scenario, the above-mentioned S102 indicates that the template contents belong to different information sending types, and their respective configuration logic rules are different. Therefore, the test parameters obtained based on the test parameter information should have a plurality of kinds, which are respectively adapted to the configuration logic rules of the corresponding template contents.
And S104, combining the test parameters with the template contents of the plurality of sending channels to obtain test scene information.
In application, the contents of the template are already described in the above S102, and will not be further described. Typically, the template content includes static template information and dynamic logic rule information. The static template information is fixed content, and the dynamic logic rule information can be replaced by a specific test parameter by a logic code pre-configured by a configuration person.
For example, the test scenario is a scenario informing the user to receive the voucher, and the corresponding template content may be "respected [ surname # ], [ title # ], in xx year, x month x day you have consumed one hundred dollars, please go to [ title # ] to receive the voucher". Wherein, the information of "respected", "you have consumed a hundred of yuan" and the like are static template information, and the information of "[ surname # ] and" [ salutation # ] are dynamic logic rule information. The service test device can perform replacement based on the dynamic logic rule information and the obtained test parameters. For example, if the test parameters include a user name and a user gender, the test equipment may obtain a surname in the user name based on the dynamic logic rule information of the "surname" and perform replacement; and changing the name to Mr. or Ms based on the dynamic logic rule information of the name, which is not limited. That is, the dynamic logic rule information in the template content may be replaced by the preconfigured logic statement code with the corresponding test parameter, which is not limited. The logic statement code may be an SQL statement.
It is to be understood that, the template content has been described as having a plurality in S102, and the test parameters obtained based on the test parameter information have been described as having a plurality in S103, which are respectively adapted to the configuration logic rules of the corresponding template content. Based on this, the service test equipment generates a plurality of test scenario information, and although the actual content of each test scenario information is consistent, each test scenario information corresponds to one transmission channel due to different information transmission types.
And S105, returning the test scene information to the service system, wherein the service system is used for generating a test result aiming at the target service according to the test scene information and preset test scene information.
In the embodiment of the application, after the test scenario information is generated, the test scenario information may be directly returned to the service system by the service test equipment, and the test scenario information is processed by a tester of the service system. Furthermore, when the external channel is abnormal, the tester can normally carry out the business. The service system is pre-stored with preset test scene information when each test scene is normal. The service system can obtain corresponding preset test scene information based on the scene ID carried in the test scene information, and then compares the preset test scene information with the actually returned test scene information so that a tester can determine the test result of the target service.
It can be understood that, the information content of each of the plurality of test scenario information generated in one test scenario is generally consistent. Therefore, the number of the preset scene information may be 1.
In this embodiment, when it is determined that an external channel is abnormal, a test request for testing a target service, which is sent by a service system, is received by a service test device. And then, determining a target test scene of the target service and template contents corresponding to each external transmission channel under the target test scene based on the service ID and the scene ID in the test request, so that the template contents currently determined by the service test equipment are consistent with the corresponding template contents when the external channels are normal. Furthermore, after the service test equipment acquires corresponding test parameters from the data pool to combine the template contents, the generated test scenario information is closer to the test scenario information when the external channel is normal. Furthermore, the tester can more accurately determine the test result of the service according to the received test scene information so as to normally test the service.
Referring to fig. 2, in an embodiment, in step S102, according to the service ID and the scenario ID, determining a target test scenario from a plurality of test scenarios of the target service, and determining template contents of a plurality of transmission channels required to be used by the target test scenario specifically includes following sub-steps S1021 to 1023, which are detailed as follows:
s1021, determining a plurality of sending channels correspondingly used by the target business according to the service ID.
S1022, determining a target test scene from the plurality of test scenes according to the scene ID.
And S1023, respectively acquiring template contents corresponding to the plurality of sending channels in the target test scene based on the plurality of sending channels.
In the embodiment of the present application, the service ID and the scene ID are already explained in S101, and the explanation thereof is omitted.
In this embodiment, the service test device may determine, according to the service ID, all available transmission channels under the service. And then, determining a target test scene according to the scene ID in the test request. Furthermore, the service test device may obtain, based on the determined transmission channel, template content corresponding to the determined transmission channel in the target test scenario. For example, a short message sending template corresponding to the short message sending channel or an APP information sending template corresponding to the APP sending channel.
It can be understood that, after the service test device processes the content of the short message template according to the test parameter information in the test request to generate corresponding test scenario information, the test scenario information can only be sent through a short message sending channel. Similarly, the APP sending channel is similar to the short message sending channel, and will not be described in detail.
Referring to fig. 3, in an embodiment, the template content includes static template information and dynamic logic rule information; in S104, combining the test parameters with the template contents of the multiple transmission channels to obtain test scenario information, the following substeps S1041-1043 are specifically included, which are detailed as follows:
s1041, aiming at the template contents of any sending channel, if the number of the test parameters is multiple, sequentially determining the target test parameters meeting each dynamic logic rule from the multiple test parameters according to the dynamic logic rule information in the template contents.
In the embodiment of the present application, as for the static template information and the dynamic logic rule information in the template content, generally, there are a plurality of dynamic logic rule information, and there are also a plurality of test parameters obtained from the data pool according to the test parameter information. Based on the above, the service test device may determine, from the plurality of test parameters, a target test parameter that conforms to each dynamic logic rule in sequence according to the dynamic logic rule information.
Specifically, referring to the example in S104, the target test scenario is a scenario in which the user is notified to receive the voucher. In the target test scenario, the service test equipment may determine, based on the test parameters, a target test parameter that conforms to each dynamic logic rule from a plurality of test parameters (user name, activity address, user contact information) according to dynamic logic rule information such as [ surname # ], [ salutation # ], [ getting address # ], and the like in sequence.
S1042, respectively and correspondingly replacing the dynamic logic rule information with the plurality of target test parameters.
S1043, combining the replaced dynamic logic rule information and the static target information to obtain the test scene information.
In this embodiment of the application, after determining the target test parameters based on the step S1041, the service test device may sequentially replace the dynamic logic rule information with the corresponding target test parameters according to the logic statement codes corresponding to the dynamic logic rule information in the template content. Based on this, the replaced dynamic logic rule information (target test parameters) and static target information are combined to obtain test scene information.
For example, the test parameters may be stored in the data pool in the form of an xml table. Aiming at the template content corresponding to any external channel, the service test equipment can acquire the logic statement code in the dynamic logic rule information after determining the template content. The code is then executed to automatically write the target test parameters into the reserved locations of the template content (i.e., replace the locations where the dynamic logic rule information is located). Specifically, the dynamic logic rule information is arranged in the template content in the form of a placeholder. For example, the placeholder may be set in the form "$ { parameter ═ a }". The parameter is expressed as a parameter, that is, the parameter of the placeholder is "a", and the "a" expresses that after the code of the dynamic logic rule information is executed, the placeholder where the "a" is located is replaced by the test parameter acquired from the data pool, so that the template content is automatically combined to obtain the test scenario information.
Referring to fig. 4, in an embodiment, the test parameter information includes a last test state of the target service and a test number when the target service is tested; the service test method further includes the following steps S111-S113, which are detailed as follows:
and S111, if the test request does not include the scene ID, acquiring the test number included in the test parameter information.
In this embodiment of the application, the test parameter information further includes a test state for testing the target service, specifically, a previous test state when the target service is tested, and a test number when the target service is tested.
In this embodiment of the present application, the test parameter information may be recorded in a test order for testing the target service, and the test parameter information recorded in the test order may be processed by a tester in advance. And then, sending the generated test order to the service test equipment. The test order may be understood as a test order carried in each test request initiated by the service, where the test order is used to record all test parameter information in the test request (including but not limited to obtaining a test number and a last test state of the test order by the test order).
In this embodiment of the present application, when the test parameter information does not include a scenario ID, the service test device cannot directly determine what test scenario of the target service is to be subjected to a specific service test. Based on this, after the service test device determines a plurality of sending channels used by the target service, the service test device may determine a target test scenario based on a previous test state in the test parameter information.
And S112, determining the next test state for testing the target service according to the test number and the previous test state.
S113, determining a target test scene for testing the next test state of the target service from the plurality of test scenes of the target service.
In this embodiment, the test number may be used to identify a service when the service test device performs a test each time. For example, the service test device may compare the currently received test number with a plurality of test numbers received at previous time, and determine whether the previous time has received the same test number. If the test numbers are determined to have the same test number, the service to be tested corresponding to the test number at the previous moment can be determined based on the test number received at the previous moment, and the service is determined as the target service. Meanwhile, after the target service is determined, the service test equipment can directly determine a plurality of test scenes in the target service, a test state corresponding to each test scene, and a test sequence of the test states. Based on this, the service test equipment determines the next test state for testing the target service according to the previous test state and the test sequence. And then, determining a target test scene for testing the next test state of the target service according to the test state corresponding to each test scene.
Specifically, the service includes a plurality of test scenarios, and the corresponding template content in each test scenario is different, and the test scenarios are respectively used for testing different service scenarios in the same service. Illustratively, the target service includes an a test scenario at the beginning of the activity and a B test scenario after the activity is completed. For the a test scenario, at the beginning of the activity, the corresponding template content in the test scenario may be, for example, "respected # surname #" [ title # ", you just! You have noted about attending an activity on x month x day of xxxx year, please go to on time ". The template content in the corresponding B test scenario after the activity is completed may be, for example, "respected [ surname # ] [ sall # ], you are! You get a prize of # X #, etc. in the X-month X-day activity of xxxx year, please pick up on time ", etc. At this time, the a test scenario and the B test scenario are scenarios for testing two active states (an active initial state and an active completed state) in the target service. Based on this, when the service test device determines that the last test state is in the active initial state, it represents that the service test device has used the test scenario a to test the scenario in the active initial state. Then, when the service test device receives a service test request initiated by the service at the current time, it can be determined that the next state for testing the target service is the activity-completed state. And then, determining the B test scene corresponding to the activity finished state as a target test scene required to be used by the service test equipment.
It should be noted that, after testing the target test scenario, the service test device returns to the test scenario information of the service system, and may further include a test state and a test number corresponding to the target test scenario, so that the service system may write the test state and the test number as test parameter information into a test order. Furthermore, the service system may not include the scene ID written by the tester in the test request issued to the target service again. Furthermore, the situation that when a tester configures the scene ID in the test request, the scene ID configuration in the test request is wrong due to the excessive number of test scenes in the target service, and the test of one or more test scenes is missed can be avoided.
Referring to fig. 5, in an embodiment, after combining the test parameters with the template contents of the multiple transmission channels to obtain the test scenario information in S104, the following steps S141 to S142 are further included, which are detailed as follows:
s141, acquiring the service data associated with the target test scene from the data pool.
In the embodiment of the present application, generally, when the service is tested by using the target test scenario, only the test parameters need to be acquired from the data pool to replace the template content. However, in practical situations, there are special test scenarios for the tests that the service needs to perform. When the service is tested in the test scenario, the service data needs to be supplemented, so that the generated test scenario information can meet the service verification rule. The data which need to satisfy the service verification rule are all corresponding service data.
In the embodiment of the present application, the service data may be associated with the corresponding target test scenario in advance by the tester, and the association relationship is stored, so that the service test device may obtain the service data from the data pool based on the association relationship,
s142, based on the configuration rule of the service data, reconfiguring the test scenario information to obtain target test scenario information, wherein the target test scenario information meets the service verification rule of the target service.
In this embodiment, the configuration rule of the service data is similar to the manner of replacing the dynamic logic rule information with the test parameter in S1041.
For example, when a service is tested, a certain test scenario of the service is usually tested for continuity. Specifically, for the test scenario of the consumption service, the test request initiated by the service further includes test parameter information of the consumption amount of the consumer. Then, the generated test scenario information may be "you consume money for this time is" M $ ", and the total consumption amount is" N $ ". At this time, when the service test device repeatedly tests the test scenario again, if the test parameter of the consumption amount of the consumer in the test request initiated by the service is "L $", the generated test scenario information should be "the consumption amount of the consumer is" L $ ", and the total consumption amount is" N + L $ ". Based on this, it can be considered that, for the second test in the target test scenario, it needs to obtain the service data (i.e. the total consumption amount "N $" recorded in the last test) pre-stored in the target test scenario from the data pool. If the service data is not acquired, the generated test scenario information will not meet the actual situation of the consumer, and the rights and interests of the consumer will be damaged. Therefore, the service test equipment can enable the target test scene information received by the service system to be closer to the actual information received by the user by acquiring the service data related to the target test scene. And furthermore, the tester can more accurately determine the test result of the service according to the received test scene information.
Referring to fig. 6, in an embodiment, the service testing method further includes the following steps S114 to S117, which are detailed as follows:
s114, aiming at any test scene of the target service, if a plurality of external channels are normal, respectively acquiring a plurality of channel test scene information generated after the current test scene is tested through the plurality of external channels.
In the embodiment of the application, when the external channel is normal, the external channel generally sends the test scenario information. After the service is on line, various information sent to the outside is sent by an external channel. Therefore, when the external channel is normal, the external channel is used for sending the test scenario information, so that the information received by the service system is closer to the actual situation. At this time, the test scenario information sent by the external channel is the channel test scenario information. It is understood that when there are a plurality of external channels, there are a plurality of channel test scenario information generated by the external channels.
It should be noted that, if any external channel in the plurality of external channels corresponding to the target service is abnormal, the service test method may be used to perform the service test, so that the service test equipment may complete the service test of the target test scenario based on the test request, and the problem of test blocking of the service system due to the abnormal external channel is solved.
And S115, respectively carrying out data cleaning on the plurality of channel test scene information to obtain channel test parameters respectively corresponding to the plurality of channel test scene information in the current test scene.
In the embodiment of the present application, the data cleaning of the channel test scenario information may be to clean static template information in the channel test scenario information, and to retain test parameters corresponding to the internal dynamic logic rule information and service data associated with the corresponding test scenario.
Illustratively, for any channel test scenario information, if the channel test scenario information is: "respected [ M # ] [ N # ], your good! You have noted about attending an activity on x month x day of xxxx year, please go to on time ". After channel test scene information is cleaned, information such as [ M # ] and [ N # ] in the channel test scene information can be reserved as channel test parameters.
S116, determining channel test requests sent by the service system when the external channels test the current test scene.
And S117, associating the channel test parameter information with the channel test request, and storing the channel test parameter information and the channel test request into the data pool.
In the embodiment of the present application, when a service test is performed through an external channel, a service request (i.e., a channel test request) initiated by a service system includes a test scenario ID to be tested and corresponding test parameter information (channel test parameter information). Based on this, after channel test parameters corresponding to each piece of channel test scenario information in the current test scenario are obtained, the channel test parameters and the channel test request can be correlated and stored, so that when an external channel is abnormal, the service test equipment can obtain the corresponding test parameters from the data pool based on the test request.
It can be understood that, the associating the channel test parameter with the channel test request may specifically be: and associating the channel test parameters with the test parameter information in the channel test request. Based on this, when the external channel is abnormal, the service test device may obtain the corresponding test parameter from the data pool based on the test parameter information in the service request, and generate the test scenario information.
Referring to fig. 7, in an embodiment, before the step S114 respectively obtains the information of the plurality of channel test scenarios generated after the current test scenario is tested through the plurality of external channels, the following steps S118 to S119 are specifically included, which are detailed as follows:
and S118, monitoring channel states of the external channels.
S119, if the channel states of the external channels are all restored to the normal state, testing the test scenes under the target service through the external channels, and executing reminding operation on the service system.
In an embodiment of the present application, the channel status includes a normal status and an abnormal status. The channel status of the plurality of external channels may be monitored by a business system. Specifically, since the service system needs to use an external channel for service testing, the service system can constantly monitor the channel status of each external channel. Based on this, after the business system determines the channel status of each external channel, the channel status can be sent to the business test equipment.
In the embodiment of the present application, the reminding operation includes, but is not limited to, reminding in a manner of short message, email, and the like, and is not limited thereto.
It should be noted that, since the external channels used for each service may be different, when a certain external channel is in an abnormal state, it only affects the related service that uses the external channel to perform the service test. Based on this, when the channel state of any external channel is recovered to the normal state, the reminding operation can be executed on the service system. And then, the service system can determine the related service for performing the service test by using the external channel, and test the related service by using the external channel when the channel states of other external channels correspondingly used in the related service are all in the normal state.
Referring to fig. 8, fig. 8 is a block diagram of a service testing apparatus according to an embodiment of the present disclosure. The modules included in the service test apparatus in this embodiment are used to execute the steps in the embodiments corresponding to fig. 1 to 7. Please refer to fig. 1 to 7 and fig. 1 to 7 for related descriptions. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 8, the service test apparatus 800 includes: a receiving module 810, a first determining module 820, a first obtaining module 830, a combining module 840, and a returning module 850, wherein:
the receiving module 810 is configured to receive a test request for a target service sent by a service system when an external channel for testing the target service is abnormal, where the test request includes a service ID, a scenario ID, and test parameter information.
A first determining module 820, configured to determine a target test scenario from multiple test scenarios of the target service according to the service ID and the scenario ID, and determine template contents of multiple transmission channels required to be used by the target test scenario.
The first obtaining module 830 is configured to obtain the test parameters meeting the test parameter information from the data pool.
And the combination module 840 is used for combining the test parameters and the template contents of the plurality of sending channels to obtain test scene information.
A returning module 850, configured to return the test scenario information to the service system, where the service system is configured to generate a test result for the target service according to the test scenario information and preset test scenario information.
In an embodiment, according to the service ID and the scenario ID, the first determining module 820 is further configured to:
determining a plurality of sending channels correspondingly used by the target service according to the service ID; and the number of the first and second groups,
determining a target test scenario from the plurality of test scenarios according to the scenario ID;
and respectively acquiring template contents corresponding to the plurality of sending channels in the target test scene based on the plurality of sending channels.
In one embodiment, the template content includes static template information and dynamic logic rule information; the combining module 830 is further configured to:
aiming at the template content of any sending channel, if the test parameters are multiple, sequentially determining target test parameters which accord with each dynamic logic rule from multiple test parameters according to the dynamic logic rule information in the template content;
respectively and correspondingly replacing the dynamic logic rule information with a plurality of target test parameters;
and combining the replaced dynamic logic rule information and the replaced static target information to obtain the test scene information.
In an embodiment, the test parameter information includes a last test state of the target service and a test number when the target service is tested; the service test apparatus 800 further includes the following modules:
and a second obtaining module, configured to obtain the test number included in the test parameter information if the test request does not include the scene ID.
And the second determining module is used for determining the next test state for testing the target service according to the test number and the previous test state.
A third determining module, configured to determine, from the multiple test scenarios of the target service, a target test scenario for testing a next test state of the target service.
In one embodiment, the service test apparatus 800 further includes the following modules:
and the third acquisition module acquires the service data associated with the target test scene from the data pool.
And the configuration module is used for reconfiguring the test scene information based on the configuration rule of the service data to obtain target test scene information, and the target test scene information meets the service verification rule of the target service.
In one embodiment, the service test apparatus 800 further includes the following modules:
and the fourth acquisition module is used for acquiring a plurality of channel test scene information generated after the current test scene is tested through the plurality of external channels if the plurality of external channels are normal aiming at any test scene of the target service.
And the data cleaning module is used for respectively cleaning the data of the plurality of channel test scene information to obtain channel test parameters respectively corresponding to the plurality of channel test scene information in the current test scene.
A fourth determining module, configured to determine a channel test request sent by the service system when the current test scenario is tested through the multiple external channels.
And the storage module is used for associating the channel test parameters with the channel test requests and storing the channel test parameters and the channel test requests into the data pool.
In one embodiment, the service test apparatus 800 further includes the following modules:
and the monitoring module is used for monitoring the channel states of the external channels.
And the reminding module is used for testing a plurality of test scenes under the target service through the plurality of external channels and executing reminding operation on the service system if the channel states of the plurality of external channels are all recovered to be normal states.
It should be understood that, in the structural block diagram of the service testing apparatus shown in fig. 8, each unit/module is used to execute each step in the embodiment corresponding to fig. 1 to 7, and each step in the embodiment corresponding to fig. 1 to 7 has been explained in detail in the above embodiment, and specific reference is made to the relevant description in the embodiment corresponding to fig. 1 to 7 and fig. 1 to 7, which is not repeated herein.
Fig. 9 is a block diagram of a service test apparatus according to another embodiment of the present application. As shown in fig. 9, the service test apparatus 900 of this embodiment includes: a processor 910, a memory 920, and a computer program 930, such as a program for a traffic test method, stored in the memory 920 and executable at the processor 910. The processor 910, when executing the computer program 930, implements the steps in the embodiments of the service test methods described above, such as S101 to S105 shown in fig. 1. Alternatively, the processor 910, when executing the computer program 930, implements the functions of the modules in the embodiment corresponding to fig. 8, for example, the functions of the modules 810 to 850 shown in fig. 8, please refer to the related description in the embodiment corresponding to fig. 8.
Illustratively, the computer program 930 may be divided into one or more units, which are stored in the memory 920 and executed by the processor 910 to accomplish the present application. One or more elements may be a series of computer program instruction segments capable of performing specific functions that describe the execution of computer program 930 in business test apparatus 900.
The traffic testing device 900 may include, but is not limited to, a processor 910, a memory 920. It will be understood by those skilled in the art that FIG. 9 is merely an example of the business test apparatus 900 and is not intended to be limiting of the business test apparatus 900, and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the business test apparatus may also include input output devices, network access devices, buses, etc.
The processor 910 may be a central processing unit, but may also be other general purpose processors, digital signal processors, application specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 920 may be an internal storage unit of the service testing device 900, such as a hard disk or a memory of the service testing device 900. The memory 920 may also be an external storage device of the service testing device 900, such as a plug-in hard disk, a smart memory card, a flash memory card, etc. equipped on the service testing device 900. Further, the memory 920 may also include both an internal storage unit and an external storage device of the service test apparatus 900.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. The computer readable medium may include at least: the computer program code can be carried to any entity or device of the photographing apparatus/service testing device, an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A service test method is applied to service test equipment, and the method comprises the following steps:
when an external channel for testing a target service is abnormal, receiving a test request aiming at the target service, which is sent by a service system, wherein the test request comprises a service ID, a scene ID and test parameter information;
determining a target test scene from a plurality of test scenes of the target service according to the service ID and the scene ID, and determining template contents of a plurality of sending channels required to be used by the target test scene;
acquiring test parameters meeting the test parameter information from a data pool;
combining the test parameters with the template contents of the plurality of sending channels to obtain test scene information;
and returning the test scene information to the service system, wherein the service system is used for generating a test result aiming at the target service according to the test scene information and preset test scene information.
2. The service testing method of claim 1, wherein determining a target test scenario from a plurality of test scenarios of the target service and determining template contents of a plurality of transmission channels required to be used by the target test scenario according to the service ID and the scenario ID comprises:
determining a plurality of sending channels correspondingly used by the target service according to the service ID; and the number of the first and second groups,
determining a target test scenario from the plurality of test scenarios according to the scenario ID;
and respectively acquiring template contents corresponding to the plurality of sending channels in the target test scene based on the plurality of sending channels.
3. The traffic testing method of claim 1, wherein the template content includes static template information and dynamic logic rule information;
combining the test parameters with the template contents of the plurality of sending channels to obtain test scene information, wherein the test scene information comprises:
aiming at the template content of any sending channel, if the test parameters are multiple, sequentially determining target test parameters which accord with each dynamic logic rule from multiple test parameters according to the dynamic logic rule information in the template content;
respectively and correspondingly replacing the dynamic logic rule information with a plurality of target test parameters;
and combining the replaced dynamic logic rule information and the replaced static target information to obtain the test scene information.
4. The service testing method according to claim 1, wherein the test parameter information includes a last test state of the target service and a test number when the target service is tested; the method further comprises the following steps:
if the test request does not include the scene ID, acquiring a test number contained in the test parameter information;
determining a next test state for testing the target service according to the test number and the previous test state;
and determining a target test scene for testing the next test state of the target service from a plurality of test scenes of the target service.
5. The traffic testing method according to any of claims 1-4, wherein after combining the test parameters with the template contents of the plurality of transmission channels to obtain the test scenario information, further comprising:
acquiring service data associated with the target test scene from the data pool;
and reconfiguring the test scenario information based on the configuration rule of the service data to obtain target test scenario information, wherein the target test scenario information meets the service verification rule of the target service.
6. The traffic testing method of claim 1, wherein the method further comprises:
aiming at any test scene of the target service, if a plurality of external channels are normal, respectively acquiring a plurality of channel test scene information generated after the current test scene is tested through the plurality of external channels;
respectively carrying out data cleaning on the plurality of pieces of channel test scene information to obtain channel test parameters respectively corresponding to the plurality of pieces of channel test scene information in the current test scene;
determining channel test requests sent by the service system when the current test scene is tested through the plurality of external channels;
and associating the channel test parameters with the channel test request, and storing the channel test parameters and the channel test request into the data pool.
7. The business testing method of claim 6, wherein before obtaining the channel test scenario information generated after the current test scenario is tested through the external channels, respectively, further comprising:
monitoring channel status of the plurality of external channels;
and if the channel states of the external channels are all recovered to be normal states, testing the test scenes under the target service through the external channels, and executing reminding operation on the service system.
8. A service test device is applied to service test equipment, and comprises:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a test request aiming at a target service sent by a service system when an external channel for testing the target service is abnormal, and the test request comprises a service ID, a scene ID and test parameter information;
the first determining module is used for determining a target test scene from a plurality of test scenes of the target service according to the service ID and the scene ID and determining template contents of a plurality of sending channels required to be used by the target test scene;
the first acquisition module is used for acquiring the test parameters meeting the test parameter information from the data pool;
the combination module is used for combining the test parameters with the template contents of the plurality of sending channels to obtain test scene information;
and the return module is used for returning the test scene information to the service system, and the service system is used for generating a test result aiming at the target service according to the test scene information and preset test scene information.
9. A traffic testing device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the method according to any of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202110570692.3A 2021-05-25 2021-05-25 Service test method, device, service test equipment and storage medium Pending CN113297079A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110570692.3A CN113297079A (en) 2021-05-25 2021-05-25 Service test method, device, service test equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110570692.3A CN113297079A (en) 2021-05-25 2021-05-25 Service test method, device, service test equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113297079A true CN113297079A (en) 2021-08-24

Family

ID=77324719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110570692.3A Pending CN113297079A (en) 2021-05-25 2021-05-25 Service test method, device, service test equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113297079A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933534A (en) * 2019-03-26 2019-06-25 上海上湖信息技术有限公司 A kind of method and device of determining financial test object
CN110489334A (en) * 2019-07-24 2019-11-22 贝壳技术有限公司 A kind of system integration and test test processing method and device
CN110688236A (en) * 2019-08-08 2020-01-14 深圳木成林科技有限公司 Information touch method, system and terminal equipment
CN111917804A (en) * 2018-07-13 2020-11-10 阿里巴巴集团控股有限公司 Service channel recommendation method, system and equipment
CN112162925A (en) * 2020-09-29 2021-01-01 新华三大数据技术有限公司 Test method and system based on service virtualization

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111917804A (en) * 2018-07-13 2020-11-10 阿里巴巴集团控股有限公司 Service channel recommendation method, system and equipment
CN109933534A (en) * 2019-03-26 2019-06-25 上海上湖信息技术有限公司 A kind of method and device of determining financial test object
CN110489334A (en) * 2019-07-24 2019-11-22 贝壳技术有限公司 A kind of system integration and test test processing method and device
CN110688236A (en) * 2019-08-08 2020-01-14 深圳木成林科技有限公司 Information touch method, system and terminal equipment
CN112162925A (en) * 2020-09-29 2021-01-01 新华三大数据技术有限公司 Test method and system based on service virtualization

Similar Documents

Publication Publication Date Title
CN109547245B (en) System, method, apparatus and medium for providing mobile device support service
CN105005532B (en) A kind of system and method for automatic test application programming interfaces stability
US20160343001A1 (en) Multi-channel customer support and service
US9049105B1 (en) Systems and methods for tracking and managing event records associated with network incidents
CN110362455B (en) Data processing method and data processing device
CN109885786B (en) Data caching processing method and device, electronic equipment and readable storage medium
CN109327627A (en) Telephone number recognition methods, device and storage medium based on block chain
CN113220540B (en) Service management method, device, computer equipment and storage medium
CN114189525B (en) Service request method and device and electronic equipment
CN110610376A (en) Behavior data response method and device, computer equipment and storage medium
CN112948224A (en) Data processing method, device, terminal and storage medium
CN112888028B (en) Method and device for switching traffic service by switching life cycle state
CN109242665B (en) Business rule multi-channel sharing method, device, equipment and storage medium
CN113297079A (en) Service test method, device, service test equipment and storage medium
CN112633619A (en) Risk assessment method and device
CN102970159B (en) Data auditing and repair process method and apparatus
CN115587041A (en) Mobile application delivery task processing method and device, electronic equipment and storage medium
CN111405507B (en) Flow distribution method, device, system, terminal, server and medium
CN114895879A (en) Management system design scheme determining method, device, equipment and storage medium
CN110990554B (en) Content processing method, device, electronic equipment and medium
CN114693358A (en) Data processing method and device, electronic equipment and storage medium
CN115051987B (en) Mobile terminal service distribution system and method for multiple nodes
CN115374066B (en) Remote visualization system and remote visualization method
CN112491589B (en) Object storage network early warning method, system, terminal and storage medium
CN116307751A (en) Policy tree processing method, device, computer 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