CN117389866A - Full-flow test method, device, equipment and storage medium - Google Patents

Full-flow test method, device, equipment and storage medium Download PDF

Info

Publication number
CN117389866A
CN117389866A CN202311263006.3A CN202311263006A CN117389866A CN 117389866 A CN117389866 A CN 117389866A CN 202311263006 A CN202311263006 A CN 202311263006A CN 117389866 A CN117389866 A CN 117389866A
Authority
CN
China
Prior art keywords
test
flow
full
concurrent
interface
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
CN202311263006.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.)
China Merchants Bank Co Ltd
Original Assignee
China Merchants Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Merchants Bank Co Ltd filed Critical China Merchants Bank Co Ltd
Priority to CN202311263006.3A priority Critical patent/CN117389866A/en
Publication of CN117389866A publication Critical patent/CN117389866A/en
Pending legal-status Critical Current

Links

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
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • 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
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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
    • G06F11/3692Test management for test results analysis

Abstract

The application discloses a full-flow testing method, device, equipment and storage medium, and belongs to the technical field of testing. According to the method and the device, the whole flow case to be tested is obtained, wherein the whole flow case comprises at least two interfaces to be tested, and concurrent test instructions are obtained, wherein the concurrent test instructions are instructions for appointing to conduct concurrent test on part of the interfaces, so that corresponding test can be conducted on all the interfaces in the whole flow case according to the concurrent test instructions, a test result is obtained, namely, the whole flow condition of the whole flow case is tested, and the concurrent test is conducted on part of the interfaces in the test process, so that the test effect of all the interfaces related to the whole flow case is guaranteed, analysis is conducted from the whole angle of the whole flow case, and analysis can be conducted from the concurrent test angle of part of the interfaces, and therefore the accuracy of the test result of the currently tested interfaces in practical application is achieved.

Description

Full-flow test method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of testing technologies, and in particular, to a full-flow testing method, device, apparatus, and storage medium.
Background
In the implementation process of automatic test, the system is tested in a mode of triggering batch tasks mainly aiming at the concurrent test of a single interface so as to verify the stability and reliability of the system under high load.
Usually, a tester can utilize a professional performance testing tool to simulate a scene that a plurality of users call interfaces at the same time, detect whether concurrent problems such as thread safety, deadlock and the like exist in the current scene, evaluate whether indexes such as response time, throughput, resource utilization rate and the like of a system under different loads accord with expectations, and achieve a testing effect.
However, in the testing process, the concurrent test is only performed on a single interface, and the overall stability of the practical application environment where the interface is located cannot be determined through the test, so that the current testing mode has corresponding drawbacks, and whether the stability and reliability of the currently tested interface in practical application meet the expected standard cannot be accurately determined.
Content of the application
The main purpose of the application is to provide a full-flow test method, a device, equipment and a storage medium, which aim to solve the technical problem that whether the stability and reliability of the interface currently tested meet the expected standards in actual application cannot be accurately determined.
In order to achieve the above object, the present application provides a full-flow test method, which includes the following steps:
acquiring a full-flow case to be tested, wherein the full-flow case comprises at least two interfaces to be tested;
acquiring concurrent test instructions, wherein the concurrent test instructions are instructions for designating concurrent tests on part of interfaces;
and according to the concurrent test instruction, carrying out corresponding test on each interface in the whole flow case to obtain a test result.
Optionally, the step of performing corresponding test on each interface in the full-flow case according to the concurrent test instruction to obtain a test result includes:
determining a target interface to be tested concurrently in the full-flow case and an execution interface to be tested in the full-flow according to the concurrent test instruction, wherein the flow test is a single test and the concurrent test is a plurality of tests;
determining the test sequence of the target interface and the execution interface in the full-flow case;
and according to the test sequence, sequentially carrying out corresponding tests on all interfaces in the whole flow case to obtain a test result.
Optionally, the test result includes a concurrent test result;
when the interface to be tested currently is determined to be the target interface according to the test sequence, the step of testing each interface in the full-flow case correspondingly according to the concurrent test instruction to obtain a test result includes:
and according to the concurrency test instruction, a preset concurrency number of cases to be concurrency is called, and according to the cases to be concurrency, the target interface is subjected to concurrency test, and a concurrency test result is obtained.
Optionally, the step of calling a preset concurrency number of cases to be concurrency according to the concurrency test instruction includes:
according to the concurrency test instruction, corresponding cases to be concurrency are called from a preset case library, and whether the number of the called cases to be concurrency is equal to the preset concurrency number is determined;
if not, repeatedly calling corresponding cases to be concurrent from the preset case library until the number of the cases to be concurrent is the preset concurrent number.
Optionally, after the step of determining the target interface to be tested concurrently in the full-flow case according to the concurrent test instruction, the method further includes:
Determining label information corresponding to the target interface, and acquiring configuration information matched with the label information;
if the configuration information needs to be provided with a message packet, performing packet grouping operation on the configuration information according to the corresponding definition information of the target interface to obtain the message packet;
and sending the message group packet to the target interface through a corresponding protocol.
Optionally, the test result includes a flow test result;
when determining that the interface to be tested is the execution interface according to the test sequence, sequentially performing corresponding tests on the interfaces in the whole flow case according to the test sequence to obtain a test result, wherein the method comprises the following steps:
according to the test sequence, performing flow test on the execution interface to obtain a flow test result;
and after the step of sequentially testing the interfaces in the whole flow case according to the testing sequence to obtain a testing result, the method further comprises the following steps:
determining whether the overall flow execution effect of the whole flow case meets the preset requirement according to the flow test result;
if not, carrying out exception checking on the whole flow case according to the test result to obtain an checking result.
Optionally, the step of performing exception checking on the whole flow case according to the test result to obtain an checking result includes:
determining an abnormal interface with abnormal test according to the test result;
according to the full-flow case, determining a previous interface which has adjacent sequential connection with the abnormal interface, and determining an associated interface which has a processing logic relationship with the abnormal interface;
rechecking the abnormal interface, the previous interface and the associated interface to obtain a rechecking result;
and generating a visual report based on the whole process case according to the rechecking result, and outputting the visual report to related personnel for viewing by the related personnel.
In addition, in order to achieve the above object, the present application further provides a full-flow test device, including:
the system comprises an acquisition module, a test module and a test module, wherein the acquisition module is used for acquiring a full-flow case to be tested, and the full-flow case comprises at least two interfaces to be tested;
the determining module is used for acquiring concurrent test instructions, wherein the concurrent test instructions are used for appointing to perform concurrent test on part of interfaces;
and the test module is used for sequentially testing all the interfaces in the full-flow case according to the concurrent test instruction to obtain a test result.
In addition, to achieve the above object, the present application further provides an apparatus, including: a memory, a processor, and a full-flow test program stored on the memory and executable on the processor, the full-flow test program configured to implement the steps of the full-flow test method as described above.
In addition, in order to achieve the above object, the present application further provides a computer-readable storage medium having stored thereon a full-flow test program which, when executed by a processor, implements the steps of the full-flow test method as described above.
According to the method and the device, the whole flow case to be tested is obtained, wherein the whole flow case comprises at least two interfaces to be tested, and concurrent test instructions are obtained, wherein the concurrent test instructions are instructions for appointing to conduct concurrent test on part of the interfaces, so that corresponding test can be conducted on all the interfaces in the whole flow case according to the concurrent test instructions, a test result is obtained, namely, the whole flow condition of the whole flow case is tested, and the concurrent test is conducted on part of the interfaces in the test process, so that the test effect of all the interfaces related to the whole flow case is guaranteed, analysis is conducted from the whole angle of the whole flow case, and analysis can be conducted from the concurrent test angle of part of the interfaces, and therefore the accuracy of the test result of the currently tested interfaces in practical application is achieved.
Drawings
FIG. 1 is a flow chart of a first embodiment of a full-flow test method of the present application;
FIG. 2 is a schematic diagram of a data pulling process related to a test process in an embodiment of the present application;
FIG. 3 is a flowchart of step S30 in a second embodiment of the full-flowchart testing method of the present application;
fig. 4 is a flow chart of sending packet related data in the embodiment of the present application;
fig. 5 is a schematic flow chart of a concurrent test scenario in an embodiment of the present application;
fig. 6 is a schematic diagram of a refinement flow of a concurrent test scenario in an embodiment of the present application;
FIG. 7 is a block diagram illustrating an embodiment of a full-flow test apparatus according to the present application;
fig. 8 is a schematic device structure diagram of a hardware running environment according to an embodiment of the present application.
The realization, functional characteristics and advantages of the present application will be further described with reference to the embodiments, referring to the attached drawings.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Referring to fig. 1, fig. 1 is a flow chart of a first embodiment of a full-flow test method of the present application.
In a first embodiment, the full-flow test method includes the steps of:
s10, acquiring a full-flow case to be tested, wherein the full-flow case comprises at least two interfaces to be tested.
It is understood that a full-flow case refers to a case to be tested including a complete business flow, and the full-flow case includes at least two interfaces to be tested, in which a business of multiple interfaces is generally involved, and specific transaction processing is taken as an example to illustrate, for example, a consumption transaction, a revocation transaction, etc., where in the full-flow case, the consumption interface is generally called first, and then the revocation interface is called, so as to ensure the integrity of the business.
It should be noted that, the whole process case refers to a case of all the business processes to be tested, so that when the whole process case is tested, an analysis can be performed from a global analysis angle to determine the application condition of each interface related to the whole process case, rather than the concurrent test of only a single interface in the related art, no connection between corresponding data processed by each interface is established, and thus, a deviation exists between the test result in the related art and the use condition in the actual application scenario.
S20, acquiring concurrent test instructions, wherein the concurrent test instructions are instructions for appointing to perform concurrent test on part of interfaces.
It can be understood that the concurrent test instruction is initiated by a corresponding person, and a specific test parameter is specifically selected by the person, for example, a part of interfaces are formulated to perform the concurrent test, or the number of test cases required during the concurrent test is determined, so that the corresponding concurrent test instruction can be generated.
It can be understood that the concurrent test instruction specifies that a part of interfaces need to be subjected to the concurrent test, that is, the interfaces that a part of interfaces need to be subjected to the concurrent test are limited in the full-flow case, and other interfaces are used as interfaces of the normal-flow test.
It should be noted that, the interface for performing concurrent test in each concurrent test instruction may change according to the requirements of related personnel, specifically, different limiting modes may be adopted according to the different interfaces of the business related to the full-flow case in different scenarios, for example, in an application scenario where a large amount of transaction data is generated in a part of short time, the interface for transaction data processing needs to bear a large data processing pressure, so that concurrent test needs to be performed on the interface for transaction data processing, and in a test mode, whether the reliability of the interface meets the corresponding business requirement or not is determined.
S30, according to the concurrent test instruction, carrying out corresponding test on each interface in the whole flow case to obtain a test result.
It can be understood that the concurrent test instruction can define interfaces requiring concurrent test and interfaces of other test modes, so that corresponding tests can be performed on each interface in corresponding full-flow cases according to the instruction, and test results are obtained.
The test result may include one of the following data types, for example, a performance parameter represented by the interface when the interface concurrently runs a plurality of tasks or cases, where the other one is a running parameter related to a flow between the interfaces for the corresponding interface requiring the flow test, and the other one is an overall analysis result of a full-flow case obtained by integrating test data of the interface requiring the flow test and the interface requiring the flow test, for example, an abnormal condition of the interface involved in the overall test process.
In addition, in order to implement the above-mentioned testing process of the full-flow case, in this embodiment, a corresponding system framework needs to be provided, and specifically, the concurrent testing effect of the full-flow case may be implemented based on robotframe work.
Firstly, related testers accumulate and build a large number of full-flow automation cases through robotframe works along with the continuous promotion of project implementation in daily work, so in the embodiment, the concurrent test based on the full-flow cases can be realized through the existing robotframe works so as to achieve the effects of verifying the correctness of subsequent business processing after interface concurrency and guaranteeing the correctness of database data.
Specifically, for this full-flow case, if it is known from the concurrent test instruction that the user sets to initiate 100 concurrent transaction tests based on the undo transaction, the following actions need to be implemented at this time to complete the concurrent test:
1) The performance testing component registers performance batch information, prepares cases until the number accords with the concurrent quantity, and initiates execution;
2) Waiting until the case is in line with the concurrent quantity when the case is executed to the appointed transaction step;
3) Concurrently executing, and recording message information and response time;
4) And continuing to execute the subsequent flow after concurrency.
It can be understood that, in order to implement the concurrent test, a corresponding number of cases need to be prepared, after the preparation of the cases is completed, the corresponding concurrent test is executed, corresponding data such as message information and response time are recorded, and after the concurrent test is completed, other processes are continuously executed, so that the effect of implementing the test on the whole process of the whole process cases is ensured.
It should be noted that, the robotframework cases can be reused, the selection of cases according to tags is supported, the cases are automatically copied until the concurrency requirements are met according to the concurrency quantity set by a user, threads are created for each case, then the concurrency execution is performed, after the concurrency execution of the transaction step is finished, the cases still continue to execute the subsequent steps, thus verifying the service integrity of the whole process cases after the concurrency execution of the transaction, directly multiplexing the existing automatic cases, a tester does not need to learn professional performance test tools, the learning cost of the tester is reduced, the cost for writing performance test scripts is greatly reduced, and the scene of automatic verification of the subsequent service processes after the concurrency test missing in the market is complemented. Specifically, a specific interaction flow related to the above testing process is shown in fig. 2.
According to the embodiment, the full-flow case to be tested is obtained, wherein the full-flow case comprises at least two interfaces to be tested, and concurrent test instructions are obtained, wherein the concurrent test instructions are instructions for appointing to conduct concurrent test on part of the interfaces, so that corresponding test can be conducted on all the interfaces in the full-flow case according to the concurrent test instructions, a test result is obtained, namely, the whole flow condition of the full-flow case is tested, and the concurrent test is conducted on part of the interfaces in the test process, so that the test effect of all the interfaces related to the full-flow case is guaranteed, analysis is conducted from the whole angle of the full-flow case, and analysis is conducted from the concurrent test angle of part of the interfaces, and therefore the accuracy of the test result of the currently tested interfaces in practical application is achieved.
As shown in fig. 3, a second embodiment of the full-flow test method of the present application is provided based on the first embodiment, and in this embodiment, step S30 specifically includes:
s31, determining a target interface to be tested concurrently in the whole flow case and determining an execution interface to be tested in the whole flow according to the concurrent test instruction, wherein the flow test is a single test and the concurrent test is a plurality of tests.
It can be understood that, according to the above description, the concurrent test instruction includes a target interface to be tested concurrently and also includes an execution interface to be tested in a flow, where the flow test refers to a single test, and only the integrity test of the whole flow needs to be implemented in the whole flow case, where the concurrent test is multiple tests, and multiple tests of batch cases are performed on one interface simultaneously to test parameters such as the maximum load capacity of the interface.
In addition, in this embodiment, an expansion transformation is required for the robotframe framework, all transaction transmission is implemented through a unified python code component, in the python code, a user needs to configure information such as a transmission transaction name, a transaction transmission address, and the like, and the code obtains a corresponding transmission address according to the transaction name configured by the user to transmit. The general transmission transaction processing logic is as shown in fig. 4, after the robotframe case step is executed to the transmission transaction step, the general transmission transaction processing logic enters a general transmission transaction processing module, the module obtains corresponding configuration information of the transaction according to the transaction name, if the configuration information sets that the message needs to be packaged, the packaging operation is firstly carried out according to the interface definition, the true message to be transmitted is prepared, the request message information is stored, and the request time is requested; and then transmitting according to the interface protocol, after the transmission is finished, recording response message information and calculating response time, and unpacking if unpacking is needed.
Specifically, the label information corresponding to the target interface needs to be determined first, configuration information matched with the label information is obtained, if the configuration information needs to be provided with a packet, packet grouping operation is performed on the configuration information according to corresponding definition information of the target interface, a packet is obtained, and the packet is sent to the target interface through a corresponding protocol.
It can be understood that the tag information refers to information of a corresponding transaction service required to determine a target interface, and the interface of the transaction service corresponding to the target interface can be determined through the tag information, and configuration information corresponding to the interface can be further determined.
It can be understood that when the configuration information needs to be set with a packet, the packet grouping operation can be performed on the configuration information to obtain a packet, that is, the mode is a preparation action before data transmission commonly used in the test process.
It will be appreciated that when generating a packet, it is also necessary to determine the request information of the packet, for example, the request time of the packet, and store the request information in a warehouse.
It can be understood that the protocol types can be divided into tcp, http and other protocols, so that different sending actions of the packet can be generated according to different protocols.
It can be understood that when the packet is correspondingly sent to the corresponding target interface, the request corresponding to the packet can be equivalent to the request corresponding to the packet, so as to generate corresponding information, and the response information is stored and put in storage.
It can be understood that after the packet is sent, the packet can be unpacked or the sending action can be directly finished according to the actual requirement.
S32, determining the test sequence of the target interface and the execution interface in the full-flow case.
It is understood that the test sequence refers to the sequence of the target interfaces and the execution interfaces in the full flow case, including the sequence between the target interfaces, the sequence between the execution interfaces, and the overall sequence of the target interfaces and the execution interfaces.
It should be noted that, according to the test sequence, the cases to be used for testing may be prepared in advance according to the sequence, that is, the target interface needs to be tested concurrently, that is, multiple cases need to be used for concurrent testing at the same time, so as to achieve the test effect.
And S33, sequentially carrying out corresponding tests on all interfaces in the whole flow case according to the test sequence to obtain a test result.
It can be understood that, according to the test sequence, each interface related to the whole flow case can be tested in turn according to a certain execution, for example, the concurrent test is performed on the interface a first, and after the concurrent test is completed on the interface a, the flow test is performed on the next interface B, that is, the integrity test of the flow consisting of the interface a and the interface B is completed.
When the interfaces related to the whole flow case are tested in sequence, different testing modes need to be selected according to different interfaces.
Specifically, when testing the target interface, a preset concurrent number of cases to be concurrent are required to be called according to the concurrent test instruction, and the target interface is subjected to concurrent test according to the cases to be concurrent, so that a concurrent test result is obtained.
It can be understood that concurrent testing is load testing of tasks or data that can be concurrently processed while interfacing, and thus, a corresponding number of cases to be concurrently need to be raised.
The preset concurrency number may be specifically set according to practical situations, for example, the preset concurrency number is 100.
In addition, before the concurrent test is performed on the target interface, a corresponding case to be concurrent needs to be prepared, if the target interface is determined to be an interface of the transaction service according to the configuration condition of the interface, for example, the corresponding case needs to be designed for the target interface, and in order to achieve the effect of the concurrent test, a large number of cases need to be designed, which results in low test efficiency.
Therefore, in order to avoid the above-mentioned situation, in this embodiment, by retrieving the corresponding cases to be concurrency from a preset case library according to the concurrency test instruction, determining whether the number of the retrieved cases to be concurrency is equal to the preset concurrency number, and if not, repeatedly retrieving the corresponding cases to be concurrency from the preset case library until the number of the cases to be concurrency is the preset concurrency number.
It is understood that the preset case library may be a database of case correlations accumulated by the relevant tester in daily life, and the data in the database may be generally obtained by automating full-flow case testing.
The method can extract part of data from the preset case library as a case to be concurrent, namely, the method is equivalent to extracting part of cases meeting the current test scene requirement from the preset database, so that the time for designing test cases by a tester is saved, and the test efficiency is improved.
In addition, when the to-be-concurrent cases are extracted from the preset database, there may still be cases where the requirement of the concurrent test cannot be met, that is, the number of to-be-concurrent cases obtained by extraction still cannot reach the preset concurrent number, and therefore, a manner of additionally supplementing the number of to-be-concurrent cases is also required.
Specifically, some cases in the to-be-concurrent cases extracted from the preset case library can be directly extracted again, and copied, so that the total number of the to-be-concurrent cases is increased, and meanwhile, it should be noted that, since the main purpose of performing the concurrent test in this embodiment is to test the load capacity of the interface, that is, to test the reliability of the interface in the extreme application scenario, the situations of data processing complexity and the like related to the cases can be omitted, only the number of cases capable of performing the concurrent test at the same time is considered, and therefore, the number of cases can be directly increased by copying the corresponding to-be-concurrent cases.
In summary, after receiving the concurrent test instruction of the user, a concurrent test batch information is recorded, and the concurrent batch number (generated randomly and guaranteed to be unique), the concurrent transaction name and the concurrent number of the user are recorded, and meanwhile, the information is injected into the robotframe global variable.
In addition, the label is selected from the case library according to the label selected by the user, the case labeled with the label is put into a list, after all cases are selected, whether the number of the cases in the list accords with the concurrency number is judged, if the number does not accord with the concurrency number requirement, the cases in the list are repeatedly added until the concurrency number is met when each case thread is created, concurrency execution is initiated, and a concurrency signal is set to be 0.
In the case execution process, whether the current execution step is a transaction step is judged, and if not, the execution is continued. If the current transaction name is the concurrent transaction name configured by the concurrent tool, judging whether the current transaction name is the transaction step, and if not, continuing to execute. If the concurrent transaction step is performed, a concurrent counter of a concurrent testing tool is informed to be increased by 1, related information of the concurrent transaction is put in storage, and information such as a concurrent request message, a transaction name, a case name and the like is recorded. The case enters a waiting state and begins to monitor for concurrent signals from the concurrent test tool, as shown in fig. 5.
In addition, after all cases are executed to the concurrent transaction step, the concurrent counter of the concurrent test tool reaches the concurrent quantity requirement, the concurrent signal is set to be 1, and after all cases monitor the change of the concurrent signal, the concurrent execution is continued by the vertical horse at the same time, so that the effect that all cases are executed concurrently for the transaction is achieved. After the concurrent transaction step is completed, a response message and response time of the current transaction are recorded. And after the concurrent transaction step is finished, all cases continue to execute the rest steps of the cases, and the correctness of the subsequent business of the concurrent transaction is verified. As shown in fig. 6.
Besides the above flow for performing concurrent test on the target interface, the method further includes performing flow test on the corresponding execution interface, specifically, performing flow test on the execution interface according to the test sequence to obtain a flow test result, and determining whether the overall flow execution effect of the whole flow case meets the preset requirement according to the flow test result, so that if not, performing exception check on the whole flow case according to the test result to obtain an check result.
It can be understood that when the flow test is performed on the corresponding execution interfaces according to the test sequence, the test action mainly refers to performing a monitoring test on the flow condition of each interface related to the full flow case, that is, the whole flow is tested for one time, so as to determine the interfaces that may have abnormality or cannot meet the load requirement according to the result of the whole test.
The preset requirements can be set according to the actual requirements of the user or the scenes to be handled by the whole process case, for example, the level of the maximum load of the interface, the number of the maximum batch concurrent tasks, and the like.
When the presence of the abnormality is determined in the current test result, that is, the corresponding interface with the abnormality is required to be determined for further investigation, so as to obtain the corresponding investigation interface.
Specifically, in the process of checking, the overall flow of the interfaces related to the whole flow case needs to be comprehensively judged, namely, an abnormal interface with testing abnormality is determined according to the testing result, a previous interface which is in adjacent sequence connection with the abnormal interface is determined according to the whole flow case, and an associated interface which has a processing logic relation with the abnormal interface is determined, so that the abnormal interface, the previous interface and the associated interface can be subjected to rechecking, a rechecking result is obtained, a visual report based on the whole flow case is generated according to the rechecking result, and the visual report is output to related personnel for checking.
It can be understood that in the process of checking, when an interface with an abnormality is determined, the interface is first used as an abnormal interface, and the interface with a sequential relationship and a processing logic relationship with the abnormal interface is analyzed and considered together.
The adjacent sequence connection refers to the connection condition of the sequence relation of the front and back execution with the abnormal interface, the sequence of the test to be executed of each interface of the abnormal interface in the whole flow case can be determined according to the connection condition, and the previous interface with the sequence relation with the abnormal interface can be determined, namely, the interface which executes the test before the abnormal interface is preferentially locked.
The processing logic relationship mainly refers to a business logic relationship of a business condition corresponding to an abnormal interface, for example, business processes such as payment, money drawing and account discharging may be involved in a transaction business, corresponding associated amount data exists in the business processes, that is, the amounts corresponding to three kinds of business are required to be consistent, and if one of the business corresponding interfaces is abnormal, whether the interface corresponding to the business corresponding to the abnormal interface has the processing logic relationship is required to be considered to be abnormal.
In conclusion, the abnormal interface, the previous interface and the associated interface with the processing logic relationship can be rechecked, so that a corresponding rechecked result is obtained.
The rechecking process can adopt test contents consistent with those of the first test, concurrent cases for testing and the like, so that the time length required by the rechecking process is reduced.
The visual report based on the full-flow case can be generated according to the rechecking result and output to related personnel for viewing, and it is noted that the visual report is generated based on the full-flow case, and the report can relate to the execution sequence of each interface in the corresponding full-flow case, so that the related personnel can conveniently view the test result, and the overall efficiency of the related personnel test is further improved.
According to the concurrent test instruction, the method comprises the steps of determining a target interface to be tested concurrently in the whole flow case and determining an execution interface to be tested in the whole flow, wherein the flow test is a single test and the concurrent test is a plurality of tests; determining the test sequence of the target interface and the execution interface in the full-flow case; and according to the test sequence, carrying out corresponding tests on all the interfaces in the whole flow case in turn to obtain test results, so that different test modes can be adopted according to different conditions of the interfaces involved in the whole flow case, and further, the test diversity is ensured to cater to different test application scenes.
In addition, the embodiment of the application further provides a full-flow testing device, referring to fig. 7, where the full-flow testing device includes:
the system comprises an acquisition module 10, a test module and a test module, wherein the acquisition module is used for acquiring a full-flow case to be tested, and the full-flow case comprises at least two interfaces to be tested;
the determining module 20 is configured to obtain a concurrent test instruction, where the concurrent test instruction is a concurrent test instruction for designating a portion of the interfaces;
and the test module 30 is configured to test each interface in the full-flow case in sequence according to the concurrent test instruction, so as to obtain a test result.
According to the embodiment, the full-flow case to be tested is obtained, wherein the full-flow case comprises at least two interfaces to be tested, and concurrent test instructions are obtained, wherein the concurrent test instructions are instructions for appointing to conduct concurrent test on part of the interfaces, so that corresponding test can be conducted on all the interfaces in the full-flow case according to the concurrent test instructions, a test result is obtained, namely, the whole flow condition of the full-flow case is tested, and the concurrent test is conducted on part of the interfaces in the test process, so that the test effect of all the interfaces related to the full-flow case is guaranteed, analysis is conducted from the whole angle of the full-flow case, and analysis is conducted from the concurrent test angle of part of the interfaces, and therefore the accuracy of the test result of the currently tested interfaces in practical application is achieved.
It should be noted that each module in the above apparatus may be used to implement each step in the above method, and achieve a corresponding technical effect, which is not described herein again.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a device of a hardware running environment according to an embodiment of the present application.
As shown in fig. 8, the apparatus may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 8 is not limiting of the apparatus and may include more or fewer components than shown, or certain components may be combined, or a different arrangement of components.
As shown in fig. 8, an operating system, a network communication module, a user interface module, and a full-flow test program may be included in a memory 1005, which is a computer storage medium.
In the device shown in fig. 8, the network interface 1004 is mainly used for data communication with an external network; the user interface 1003 is mainly used for receiving an input instruction of a user; the apparatus calls the full-flow test program stored in the memory 1005 by the processor 1001, and performs the following operations:
acquiring a full-flow case to be tested, wherein the full-flow case comprises at least two interfaces to be tested;
acquiring concurrent test instructions, wherein the concurrent test instructions are instructions for designating concurrent tests on part of interfaces;
and according to the concurrent test instruction, carrying out corresponding test on each interface in the whole flow case to obtain a test result.
Further, the processor 1001 may call the full-flow test program stored in the memory 1005, and further perform the following operations:
determining a target interface to be tested concurrently in the full-flow case and an execution interface to be tested in the full-flow according to the concurrent test instruction, wherein the flow test is a single test and the concurrent test is a plurality of tests;
Determining the test sequence of the target interface and the execution interface in the full-flow case;
and according to the test sequence, sequentially carrying out corresponding tests on all interfaces in the whole flow case to obtain a test result.
Further, the processor 1001 may call the full-flow test program stored in the memory 1005, and further perform the following operations:
when the interface to be tested currently is determined to be the target interface according to the test sequence, the step of testing each interface in the full-flow case correspondingly according to the concurrent test instruction to obtain a test result includes:
and according to the concurrency test instruction, a preset concurrency number of cases to be concurrency is called, and according to the cases to be concurrency, the target interface is subjected to concurrency test, and a concurrency test result is obtained.
Further, the processor 1001 may call the full-flow test program stored in the memory 1005, and further perform the following operations:
according to the concurrency test instruction, corresponding cases to be concurrency are called from a preset case library, and whether the number of the called cases to be concurrency is equal to the preset concurrency number is determined;
if not, repeatedly calling corresponding cases to be concurrent from the preset case library until the number of the cases to be concurrent is the preset concurrent number.
Further, the processor 1001 may call the full-flow test program stored in the memory 1005, and further perform the following operations:
determining label information corresponding to the target interface, and acquiring configuration information matched with the label information;
if the configuration information needs to be provided with a message packet, performing packet grouping operation on the configuration information according to the corresponding definition information of the target interface to obtain the message packet;
and sending the message group packet to the target interface through a corresponding protocol.
Further, the processor 1001 may call the full-flow test program stored in the memory 1005, and further perform the following operations:
when determining that the interface to be tested is the execution interface according to the test sequence, sequentially performing corresponding tests on the interfaces in the whole flow case according to the test sequence to obtain a test result, wherein the method comprises the following steps:
according to the test sequence, performing flow test on the execution interface to obtain a flow test result;
determining whether the overall flow execution effect of the whole flow case meets the preset requirement according to the flow test result;
if not, carrying out exception checking on the whole flow case according to the test result to obtain an checking result.
Further, the processor 1001 may call the full-flow test program stored in the memory 1005, and further perform the following operations:
determining an abnormal interface with abnormal test according to the test result;
according to the full-flow case, determining a previous interface which has adjacent sequential connection with the abnormal interface, and determining an associated interface which has a processing logic relationship with the abnormal interface;
rechecking the abnormal interface, the previous interface and the associated interface to obtain a rechecking result;
and generating a visual report based on the whole process case according to the rechecking result, and outputting the visual report to related personnel for viewing by the related personnel.
According to the embodiment, the full-flow case to be tested is obtained, wherein the full-flow case comprises at least two interfaces to be tested, and concurrent test instructions are obtained, wherein the concurrent test instructions are instructions for appointing to conduct concurrent test on part of the interfaces, so that corresponding test can be conducted on all the interfaces in the full-flow case according to the concurrent test instructions, a test result is obtained, namely, the whole flow condition of the full-flow case is tested, and the concurrent test is conducted on part of the interfaces in the test process, so that the test effect of all the interfaces related to the full-flow case is guaranteed, analysis is conducted from the whole angle of the full-flow case, and analysis is conducted from the concurrent test angle of part of the interfaces, and therefore the accuracy of the test result of the currently tested interfaces in practical application is achieved.
In addition, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a full-flow test program, and the full-flow test program realizes the following operations when being executed by a processor:
acquiring a full-flow case to be tested, wherein the full-flow case comprises at least two interfaces to be tested;
acquiring concurrent test instructions, wherein the concurrent test instructions are instructions for designating concurrent tests on part of interfaces;
and according to the concurrent test instruction, carrying out corresponding test on each interface in the whole flow case to obtain a test result.
According to the embodiment, the full-flow case to be tested is obtained, wherein the full-flow case comprises at least two interfaces to be tested, and concurrent test instructions are obtained, wherein the concurrent test instructions are instructions for appointing to conduct concurrent test on part of the interfaces, so that corresponding test can be conducted on all the interfaces in the full-flow case according to the concurrent test instructions, a test result is obtained, namely, the whole flow condition of the full-flow case is tested, and the concurrent test is conducted on part of the interfaces in the test process, so that the test effect of all the interfaces related to the full-flow case is guaranteed, analysis is conducted from the whole angle of the full-flow case, and analysis is conducted from the concurrent test angle of part of the interfaces, and therefore the accuracy of the test result of the currently tested interfaces in practical application is achieved.
It should be noted that, when the computer readable storage medium is executed by the processor, each step in the method may be further implemented, and meanwhile, the corresponding technical effects are achieved, which is not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (10)

1. The full-flow test method is characterized by comprising the following steps of:
acquiring a full-flow case to be tested, wherein the full-flow case comprises at least two interfaces to be tested;
acquiring concurrent test instructions, wherein the concurrent test instructions are instructions for designating concurrent tests on part of interfaces;
and according to the concurrent test instruction, carrying out corresponding test on each interface in the whole flow case to obtain a test result.
2. The full-flow test method as set forth in claim 1, wherein the step of performing a corresponding test on each interface in the full-flow case according to the concurrent test instruction to obtain a test result includes:
determining a target interface to be tested concurrently in the full-flow case and an execution interface to be tested in the full-flow according to the concurrent test instruction, wherein the flow test is a single test and the concurrent test is a plurality of tests;
Determining the test sequence of the target interface and the execution interface in the full-flow case;
and according to the test sequence, sequentially carrying out corresponding tests on all interfaces in the whole flow case to obtain a test result.
3. The full-flow test method of claim 2, wherein the test results comprise concurrent test results;
when the interface to be tested currently is determined to be the target interface according to the test sequence, the step of testing each interface in the full-flow case correspondingly according to the concurrent test instruction to obtain a test result includes:
and according to the concurrency test instruction, a preset concurrency number of cases to be concurrency is called, and according to the cases to be concurrency, the target interface is subjected to concurrency test, and a concurrency test result is obtained.
4. The full-process testing method according to claim 3, wherein the step of retrieving a preset number of concurrent cases to be concurrent according to the concurrent test instruction includes:
according to the concurrency test instruction, corresponding cases to be concurrency are called from a preset case library, and whether the number of the called cases to be concurrency is equal to the preset concurrency number is determined;
If not, repeatedly calling corresponding cases to be concurrent from the preset case library until the number of the cases to be concurrent is the preset concurrent number.
5. The full-flow test method as claimed in claim 4, wherein after said step of determining a target interface to be concurrently tested in said full-flow case according to said concurrent test instruction, said method further comprises:
determining label information corresponding to the target interface, and acquiring configuration information matched with the label information;
if the configuration information needs to be provided with a message packet, performing packet grouping operation on the configuration information according to the corresponding definition information of the target interface to obtain the message packet;
and sending the message group packet to the target interface through a corresponding protocol.
6. The full-flow test method of claim 2, wherein the test results comprise flow test results;
when determining that the interface to be tested is the execution interface according to the test sequence, sequentially performing corresponding tests on the interfaces in the whole flow case according to the test sequence to obtain a test result, wherein the method comprises the following steps:
According to the test sequence, performing flow test on the execution interface to obtain a flow test result;
and after the step of sequentially testing the interfaces in the whole flow case according to the testing sequence to obtain a testing result, the method further comprises the following steps:
determining whether the overall flow execution effect of the whole flow case meets the preset requirement according to the flow test result;
if not, carrying out exception checking on the whole flow case according to the test result to obtain an checking result.
7. The full-flow test method as claimed in claim 6, wherein said step of performing anomaly investigation on said full-flow case according to said test result to obtain an investigation result comprises:
determining an abnormal interface with abnormal test according to the test result;
according to the full-flow case, determining a previous interface which has adjacent sequential connection with the abnormal interface, and determining an associated interface which has a processing logic relationship with the abnormal interface;
rechecking the abnormal interface, the previous interface and the associated interface to obtain a rechecking result;
and generating a visual report based on the whole process case according to the rechecking result, and outputting the visual report to related personnel for viewing by the related personnel.
8. A full-flow test device, characterized in that the full-flow test device comprises:
the system comprises an acquisition module, a test module and a test module, wherein the acquisition module is used for acquiring a full-flow case to be tested, and the full-flow case comprises at least two interfaces to be tested;
the determining module is used for acquiring concurrent test instructions, wherein the concurrent test instructions are used for appointing to perform concurrent test on part of interfaces;
and the test module is used for sequentially testing all the interfaces in the full-flow case according to the concurrent test instruction to obtain a test result.
9. A full-flow test apparatus, the full-flow test apparatus comprising: a memory, a processor and a full-flow test program stored on the memory and executable on the processor, the full-flow test program configured to implement the steps of the full-flow test method of any one of claims 1 to 7.
10. A storage medium, wherein a program for realizing the full-flow test method is stored on the storage medium, and the program for realizing the full-flow test method is executed by a processor to realize the steps of the full-flow test method according to any one of claims 1 to 7.
CN202311263006.3A 2023-09-27 2023-09-27 Full-flow test method, device, equipment and storage medium Pending CN117389866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311263006.3A CN117389866A (en) 2023-09-27 2023-09-27 Full-flow test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311263006.3A CN117389866A (en) 2023-09-27 2023-09-27 Full-flow test method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117389866A true CN117389866A (en) 2024-01-12

Family

ID=89465789

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311263006.3A Pending CN117389866A (en) 2023-09-27 2023-09-27 Full-flow test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117389866A (en)

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
CN108521353B (en) Processing method and device for positioning performance bottleneck and readable storage medium
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
CN111475417A (en) Automatic testing method, device, equipment and storage medium
CN107526676B (en) Cross-system test method and device
CN111159049A (en) Automatic interface testing method and system
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN111258913A (en) Automatic algorithm testing method and device, computer system and readable storage medium
CN107045475B (en) Test method and device
CN111522738A (en) Test method and device of micro-service system, storage medium and electronic equipment
CN111897724A (en) Automatic testing method and device suitable for cloud platform
CN114064208A (en) Method and device for detecting application service state, electronic equipment and storage medium
CN113961332A (en) Method and device for realizing workflow engine, electronic equipment and storage medium
CN115686540A (en) RPA control method and system based on Hongmong system
CN114546738A (en) Server general test method, system, terminal and storage medium
CN111159023A (en) Test method, test device, electronic equipment and computer readable storage medium
CN114564374A (en) Operator performance evaluation method and device, electronic equipment and storage medium
CN110267215A (en) A kind of data detection method, equipment and storage medium
CN113238935A (en) Application testing method, system, device, medium, and computer program product
CN117389866A (en) Full-flow test method, device, equipment and storage medium
CN112131127B (en) Interface testing method, device and system and electronic equipment
CN113986753A (en) Interface test method, device, equipment and storage medium
CN113656313A (en) Automatic test processing method and device
CN111639022A (en) Transaction testing method and device, storage medium and electronic device

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