CN106528418B - A kind of test method and device - Google Patents
A kind of test method and device Download PDFInfo
- Publication number
- CN106528418B CN106528418B CN201610972705.9A CN201610972705A CN106528418B CN 106528418 B CN106528418 B CN 106528418B CN 201610972705 A CN201610972705 A CN 201610972705A CN 106528418 B CN106528418 B CN 106528418B
- Authority
- CN
- China
- Prior art keywords
- target
- target interface
- interface program
- current
- parameter
- 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.)
- Active
Links
- 238000010998 test method Methods 0.000 title claims abstract description 8
- 238000012360 testing method Methods 0.000 claims abstract description 97
- 230000005540 biological transmission Effects 0.000 claims abstract description 68
- 238000012545 processing Methods 0.000 claims description 30
- 230000001960 triggered effect Effects 0.000 claims description 2
- 238000000034 method Methods 0.000 abstract description 19
- 230000008569 process Effects 0.000 description 10
- 239000002184 metal Substances 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present invention provides a kind of test method and devices, wherein method includes: S0: according to the incidence relation in software under testing between at least two interface routines, at least one test case of the corresponding software under testing of setting;S1: parsing current test case, to correspond at least two target interface programs of current test case in the determination software under testing, and determines the logical order of at least two target interfaces program;S2: configured transmission is obtained, and each described target interface program is successively called according to the logical order, so that the target interface program called for the first time exports the corresponding target component of current goal interface routine according to the configured transmission, and the interface routine for calling n-th exports the target component for the interface routine that corresponding n-th is called according to the target component of the target interface program output of (n-1)th calling, wherein, n is the integer greater than 1.According to the technical solution of the present invention, testing efficiency can be improved.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a testing method and a testing device.
Background
With the continuous development of computer technology, a great variety of application software is greatly increased, and in order to ensure that the application software has high availability, corresponding tests on business functions of the application software are generally required before the application software is released to determine whether the application software has defects.
When testing functions of application software, not only automatic testing needs to be performed on a User Interface (UI) layer on a User side, but also testing reliability of each Interface program in the application software.
Therefore, when each interface program of the application software is tested, transmission parameters need to be provided for each interface program, a large amount of testing time is consumed, and the testing efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a test method and a test device, which can improve the test efficiency.
In a first aspect, the present invention provides a test method, comprising:
s0: setting at least one test case corresponding to the software to be tested according to the incidence relation between at least two interface programs in the software to be tested;
s1: analyzing the current test case to determine at least two target interface programs corresponding to the current test case in the software to be tested and determine the logic sequence of the at least two target interface programs;
s2: and acquiring transmission parameters, and sequentially calling each target interface program according to the logic sequence so as to enable the target interface program called for the first time to output the target parameters corresponding to the current target interface program according to the transmission parameters, and enable the interface program called for the nth time to output the target parameters corresponding to the interface program called for the nth time according to the target parameters output by the target interface program called for the (n-1) th time, wherein n is an integer greater than 1.
Preferably, the first and second electrodes are formed of a metal,
the determining a logical order of the at least two target interface programs further comprises: determining path information corresponding to the at least two target interface programs respectively, and forming a sequence queue by using the path information corresponding to the at least two target interface programs respectively according to the logic sequence of the at least two target interface programs;
the sequentially calling each target interface program according to the logic sequence of the at least two target interface programs comprises:
traversing the sequence queue, and when traversing to the current path information in the sequence queue, determining a sequence bit m of the current path information in the sequence queue, wherein m is an integer greater than 0;
judging whether the sequence bit m is equal to 1, if so, calling a corresponding target interface program according to the current path information so that the current target interface program outputs a corresponding target parameter according to the transmission parameter; otherwise, determining a target parameter output by the target interface program called at the (m-1) th time, and taking the current target parameter as a reference transmission parameter; and calling the corresponding target interface program according to the current path information so that the current target interface program outputs the corresponding target parameter according to the reference transmission parameter.
Preferably, the first and second electrodes are formed of a metal,
the path information includes an interface name, and/or a storage address.
Preferably, the method further comprises the following steps:
acquiring standard parameters corresponding to the transmission parameters;
judging whether the standard parameters are the same as target parameters output by the target interface program called for the last time, if not, determining that at least one target interface is unreliable in at least two target interface programs corresponding to the current test case; otherwise, determining that each interface program corresponding to the current test case is reliable.
In a second aspect, an embodiment of the present invention provides a testing apparatus, including:
the device comprises a setting module, a test execution module and a test execution module, wherein the setting module is used for setting at least one test case corresponding to software to be tested according to the incidence relation between at least two interface programs in the software to be tested;
the analysis processing module is used for analyzing the current test case to determine at least two target interface programs corresponding to the current test case in the software to be tested and determine the logic sequence of the at least two target interface programs;
and the calling processing module is used for acquiring transmission parameters and calling each target interface program in sequence according to the logic sequence so as to enable the target interface program called for the first time to output the target parameters corresponding to the current target interface program according to the transmission parameters and enable the interface program called for the nth time to output the target parameters corresponding to the interface program called for the nth time according to the target parameters output by the target interface program called for the (n-1) th time, wherein n is an integer greater than 1.
Preferably, the first and second electrodes are formed of a metal,
the analysis processing module is further configured to determine path information corresponding to the at least two target interface programs, and form a sequence queue according to a logic sequence of the at least two target interface programs by using the path information corresponding to the at least two target interface programs;
the call processing module comprises: the device comprises a traversing subunit, a judging subunit, a first processing subunit and a second processing subunit; wherein,
the traversal subunit is configured to traverse the sequence queue, and determine a sequence bit m of the current path information in the sequence queue when traversing the current path information in the sequence queue, where m is an integer greater than 0;
the judging subunit is configured to judge whether the sequence bit m is equal to 1, and if yes, trigger the first processing subunit; otherwise, triggering the second processing subunit;
the first processing subunit is configured to call a corresponding target interface program according to the current path information, so that the current target interface program outputs a corresponding target parameter according to the transmission parameter;
the second processing subunit is used for determining a target parameter output by the target interface program called at the (m-1) th time and taking the current target parameter as a reference transmission parameter; and calling the corresponding target interface program according to the current path information so that the current target interface program outputs the corresponding target parameter according to the reference transmission parameter.
Preferably, the first and second electrodes are formed of a metal,
the path information includes an interface name, and/or a storage address.
Preferably, the first and second electrodes are formed of a metal,
further comprising: the device comprises an acquisition module, a judgment module, a first determination module and a second determination module; wherein,
the acquisition module is used for acquiring standard parameters corresponding to the transmission parameters;
the judging module is used for judging whether the standard parameter is the same as a target parameter output by a target interface program called for the last time, and if not, the first determining module is triggered; otherwise, triggering the second determination module;
the first determining module is used for determining that at least one target interface is unreliable in at least two target interface programs corresponding to the current test case;
and the second determining module is used for determining that each interface program corresponding to the current test case is reliable.
The embodiment of the invention provides a testing method and a device, in the method, at least one testing case corresponding to software to be tested is set according to the incidence relation between at least two interface programs in the software to be tested, the set testing case is analyzed, at least two target interface programs corresponding to the current testing case in the software to be tested and the logic sequence of the testing case can be determined, correspondingly, after transmission parameters are obtained, each target interface program of the software to be tested can be sequentially called according to the logic sequence, so that the target interface program with the logic sequence arranged at the head can output the corresponding target parameters according to the transmission parameters, meanwhile, in two adjacent target interface programs in the logic sequence, the target parameters output by one target interface program with the sequence bit relatively front can be used as reference transmission parameters to be provided for one target interface program with the sequence bit relatively back, the target parameters corresponding to the current target interface program are output by the next target interface program, namely, the target parameters output by part of the target interface programs can be shared to other target interface programs as reference transmission parameters, and the transmission parameters corresponding to each target interface program do not need to be provided for each target interface program, so that the test time is saved, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a testing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another testing method provided by an embodiment of the invention;
FIG. 3 is a diagram illustrating a structure of a sequence queue according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a testing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another testing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another testing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a testing method, including:
s0: setting at least one test case corresponding to the software to be tested according to the incidence relation between at least two interface programs in the software to be tested;
s1: analyzing the current test case to determine at least two target interface programs corresponding to the current test case in the software to be tested and determine the logic sequence of the at least two target interface programs;
s2: and acquiring transmission parameters, and sequentially calling each target interface program according to the logic sequence so as to enable the target interface program called for the first time to output the target parameters corresponding to the current target interface program according to the transmission parameters, and enable the interface program called for the nth time to output the target parameters corresponding to the interface program called for the nth time according to the target parameters output by the target interface program called for the (n-1) th time, wherein n is an integer greater than 1.
In the above embodiment of the present invention, at least one test case corresponding to at least two interface programs in the software to be tested is set according to the association relationship between the at least two interface programs, the set test case is analyzed, so as to determine at least two target interface programs corresponding to the current test case in the software to be tested and the logic sequence thereof, and accordingly, after the transmission parameters are obtained, each target interface program of the software to be tested can be sequentially called according to the logic sequence, so that the target interface program with the logic sequence arranged at the head can output the corresponding target parameters according to the transmission parameters, meanwhile, in two adjacent target interface programs in the logic sequence, the target parameter output by the target interface program with the sequence position relatively at the head can be provided as the reference transmission parameter to the target interface program with the sequence position relatively at the back, so that the target interface program with the sequence position at the back outputs the target parameter corresponding to the current target interface program, that is, the target parameters output by part of the target interface programs can be shared as reference transmission parameters to other target interface programs, and the transmission parameters corresponding to each target interface program do not need to be provided for each target interface program, so that the test time is saved, and the test efficiency is improved.
Specifically, in order to sequentially call at least two target interfaces corresponding to a current test case and simultaneously provide a reference transmission parameter output by one interface program as a reference transmission parameter to another interface program associated with the interface program, in an embodiment of the present invention, the determining a logic sequence of the at least two target interface programs further includes: determining path information corresponding to the at least two target interface programs respectively, and forming a sequence queue by using the path information corresponding to the at least two target interface programs respectively according to the logic sequence of the at least two target interface programs;
the sequentially calling each target interface program according to the logic sequence of the at least two target interface programs comprises:
traversing the sequence queue, and when traversing to the current path information in the sequence queue, determining a sequence bit m of the current path information in the sequence queue, wherein m is an integer greater than 0;
judging whether the sequence bit m is equal to 1, if so, calling a corresponding target interface program according to the current path information so that the current target interface program outputs a corresponding target parameter according to the transmission parameter; otherwise, determining a target parameter output by the target interface program called at the (m-1) th time, and taking the current target parameter as a reference transmission parameter; and calling the corresponding target interface program according to the current path information so that the current target interface program outputs the corresponding target parameter according to the reference transmission parameter.
Specifically, in an embodiment of the present invention, the path information includes an interface name, and/or a storage address.
Furthermore, in order to facilitate a user to determine whether at least two target interface programs corresponding to a current test case are reliable when testing the software to be tested according to the set test case, an embodiment of the present invention further includes:
acquiring standard parameters corresponding to the transmission parameters;
judging whether the standard parameters are the same as target parameters output by the target interface program called for the last time, if not, determining that at least one target interface is unreliable in at least two target interface programs corresponding to the current test case; otherwise, determining that each interface program corresponding to the current test case is reliable.
As shown in fig. 2, in order to more clearly illustrate the technical solution and advantages of the embodiment of the present invention, the following test method for testing cloud desktop management software, which is provided by the embodiment of the present invention, may include the following steps:
step 201, a user sets a corresponding business process according to the business function of the cloud desktop management system to apply for the cloud desktop by the user and an administrator to examine and approve a test case applied by the user.
It should be understood that in an actual business scenario, test cases corresponding to other business processes may also be set according to the business functions of the cloud desktop management system.
In the embodiment of the invention, a worker can set a corresponding test case according to at least two target interface programs to be called when the business process is realized and the existing incidence relation of the target interface programs in the cloud desktop management system, wherein the set test case can comprise path information corresponding to each interface program and a calling sequence of each target interface program when the business process is realized, namely a logic sequence of at least two target interfaces; for example, in a business process of a user applying for a cloud desktop and an administrator approving the cloud desktop, the user needs to call an interface program a when logging in the cloud desktop management system, the cloud desktop management system needs to call an interface program B when checking the validity of a user login parameter, the user needs to call an interface program C when submitting a cloud desktop application after logging in, and the administrator approves the user and needs to call an interface program D, a corresponding test case can be set according to the interface program A, B, C, D, and meanwhile, the test case should also record a logic sequence of the interface program A, B, C, D and path information respectively corresponding to the logic sequence.
In this embodiment of the present invention, the path information may be an interface name and/or a storage path corresponding to each target interface program, where the storage path is taken as an example, that is, an address of a Uniform Resource Locator (URL) corresponding to the current target interface program is taken as an example.
Step 202, analyzing the set test case to determine at least two target interface programs corresponding to the current test case in the cloud desktop management system, determine a logic sequence of the at least two target interface programs, and determine a storage path corresponding to each target interface program.
Here, at least two target interface programs A, B, C, D are determined, having a logical order of A-B-C-D and their corresponding URL addresses A1, B1, C1 and D1, respectively.
Step 203, according to the logic sequence of at least two target interface programs, a sequence queue is formed by using the storage addresses respectively corresponding to the at least two target interface programs.
Referring to fig. 3, the sequential queue may include a sequential bit field and a storage address field.
Step 204, obtaining transmission parameters.
Here, a user login information is acquired.
Step 205, traversing the sequence queue, and when traversing the current storage path in the sequence queue, determining the corresponding sequence bit m of the current storage path in the sequence queue.
Step 206, determine whether m is equal to 1, if not, execute step 207, otherwise execute step 208.
Step 207, the target interface program a is called according to the path information a1, so that the interface program a outputs the corresponding target parameter according to the transmission parameter.
And step 208, determining the target parameters output by the target interface program called at the (m-1) th time, and taking the current target parameters as reference transmission parameters.
Step 209, the corresponding target interface program is called according to the current storage path, so that the current target interface program outputs the corresponding target parameter according to the reference transmission parameter.
For example, after the interface program a is called to perform corresponding processing on the transmission parameter (i.e., the user login information) (for example, decrypting the corresponding ciphertext by using the user login information), a decryption result (the plaintext corresponding to the ciphertext or the prompt information indicating that the decryption has failed) is output, i.e., the interface program B can be called, the decryption result output by the interface program a can be used as the reference transmission parameter of the interface program B, and the interface program B can verify the validity of the decryption result. In the process, the interface program A and the interface program B can be simultaneously tested only by inputting one transmission parameter corresponding to the interface program A, and the transmission parameters corresponding to the interface program A and the interface program B do not need to be respectively input when the interface program A and the interface program B are respectively tested in the traditional testing method, so that the testing time is saved, and the testing efficiency is improved.
In the embodiment of the present invention, steps 205 to 209 are executed in a loop, and step 210 is not executed until the target interface program D is called.
Step 210, obtaining a standard parameter corresponding to the transmission parameter.
For example, when the correct user login information is obtained in step 204, the corresponding standard parameters should correspond to the cloud desktop application submitted by the administrator for approval; otherwise, when an incorrect user login information is obtained in step 204, the corresponding standard parameter should correspond to a cloud desktop application that is not submitted by the user and is approved by the administrator.
Step 211, determining whether the standard parameter is the same as the target parameter outputted by the target interface program D, if not, executing step 212; otherwise, step 213 is performed.
Here, it is determined whether the standard parameter is the same as the target parameter output by the interface program D.
Step 212, it is determined that at least one target interface is unreliable in at least two target interface programs corresponding to the current test case.
Step 213, determining that each interface program corresponding to the current test case is reliable.
In the embodiment of the present invention, the acquired transmission parameters and the standard parameters corresponding to the transmission parameters are both provided by the user, when the user provides correct user login information, the corresponding standard parameters should correspond to a cloud desktop application submitted by an administrator "approval pass" user, and if an interface program D, that is, a target parameter output when the administrator approves the user application, should also be "approval pass", it indicates that the interface program A, B, C, D of the cloud desktop management system is reliable at this time; otherwise, it indicates that at least one of the interface programs A, B, C and D of the cloud desktop management system is unreliable, that is, at least one interface program cannot normally execute the corresponding service.
As shown in fig. 4, an embodiment of the present invention provides a testing apparatus, including:
a setting module 401, configured to set at least one test case corresponding to software to be tested according to an association relationship between at least two interface programs in the software to be tested;
an analysis processing module 402, configured to analyze a current test case to determine at least two target interface programs corresponding to the current test case in the software to be tested, and determine a logic sequence of the at least two target interface programs;
the calling processing module 403 is configured to obtain transmission parameters, and sequentially call each target interface program according to the logic sequence, so that the target interface program called for the first time outputs a target parameter corresponding to the current target interface program according to the transmission parameters, and the interface program called for the nth time outputs a target parameter corresponding to the interface program called for the nth time according to the target parameter output by the target interface program called for the (n-1) th time, where n is an integer greater than 1.
As shown in fig. 5, in an embodiment of the present invention, the parsing module 402 is further configured to determine path information corresponding to the at least two target interface programs, and form a sequence queue according to a logic sequence of the at least two target interface programs by using the path information corresponding to the at least two target interface programs;
the call processing module 403 includes: traversing the subunit 4031, judging subunit 4032, first processing subunit 4033 and second processing subunit 4034; wherein,
the traversal subunit 4031 is configured to traverse the sequence queue, and when traversing the current path information in the sequence queue, determine a sequence bit m of the current path information in the sequence queue, where m is an integer greater than 0;
the determining subunit 4032 is configured to determine whether the sequence bit m is equal to 1, and if so, trigger the first processing subunit 4033; otherwise, triggering the second processing subunit 4034;
the first processing subunit 4033 is configured to call a corresponding target interface program according to the current path information, so that the current target interface program outputs a corresponding target parameter according to the transmission parameter;
the second processing subunit 4034 is configured to determine a target parameter output by the target interface program called in the (m-1) th time, and use the current target parameter as a reference transmission parameter; and calling the corresponding target interface program according to the current path information so that the current target interface program outputs the corresponding target parameter according to the reference transmission parameter.
In an embodiment of the present invention, the path information includes an interface name and/or a storage address.
As shown in fig. 6, in an embodiment of the present invention, the method further includes: an obtaining module 601, a judging module 602, a first determining module 603 and a second determining module 604; wherein,
the obtaining module 601 is configured to obtain a standard parameter corresponding to the transmission parameter;
the determining module 602 is configured to determine whether the standard parameter is the same as a target parameter output by a target interface program called last time, and if the standard parameter is not the same as the target parameter output by the target interface program called last time, trigger the first determining module 603; otherwise, triggering the second determining module 604;
the first determining module 603 is configured to determine that at least one target interface is unreliable in at least two target interface programs corresponding to the current test case;
the second determining module 604 is configured to determine that each interface program corresponding to the current test case is reliable.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
In summary, the embodiments of the present invention have at least the following advantages:
1. in an embodiment of the present invention, at least one test case corresponding to at least two interface programs in the software to be tested is set according to the association relationship between the at least two interface programs, the set test case is analyzed, so as to determine at least two target interface programs corresponding to a current test case in the software to be tested and the logic sequence thereof, and accordingly, after the transmission parameters are obtained, each target interface program of the software to be tested can be sequentially called according to the logic sequence, so that the target interface program with the logic sequence arranged at the head can output the corresponding target parameters according to the transmission parameters, meanwhile, in two adjacent target interface programs in the logic sequence, the target parameter output by the target interface program with the sequence position relatively at the head can be provided as the reference transmission parameter to the target interface program with the sequence position relatively at the back, so that the target interface program with the sequence position at the back outputs the target parameter corresponding to the current target interface program, that is, the target parameters output by part of the target interface programs can be shared as reference transmission parameters to other target interface programs, and the transmission parameters corresponding to each target interface program do not need to be provided for each target interface program, so that the test time is saved, and the test efficiency is improved.
2. In one embodiment of the invention, standard parameters corresponding to transmission parameters are obtained, and whether the target parameters output by the target interface program called for the last time are the same as the standard parameters or not is compared, if so, each target interface corresponding to the current test case in the software to be tested can be determined to be reliable, otherwise, at least one target interface program can be determined to be unreliable.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (4)
1. A method of testing, comprising:
setting at least one test case corresponding to the software to be tested according to the incidence relation between at least two interface programs in the software to be tested; further comprising:
analyzing the current test case to determine at least two target interface programs corresponding to the current test case in the software to be tested and determine the logic sequence of the at least two target interface programs;
acquiring transmission parameters, and sequentially calling each target interface program according to the logic sequence so as to enable the target interface program called for the first time to output target parameters corresponding to the current target interface program according to the transmission parameters, and enable the interface program called for the nth time to output target parameters corresponding to the interface program called for the nth time according to the target parameters output by the target interface program called for the (n-1) th time, wherein n is an integer greater than 1;
the determining a logical order of the at least two target interface programs further comprises: determining path information corresponding to the at least two target interface programs respectively, and forming a sequence queue by using the path information corresponding to the at least two target interface programs respectively according to the logic sequence of the at least two target interface programs;
the sequentially calling each target interface program according to the logic sequence of the at least two target interface programs comprises:
traversing the sequence queue, and when traversing to the current path information in the sequence queue, determining a sequence bit m of the current path information in the sequence queue, wherein m is an integer greater than 0;
judging whether the sequence bit m is equal to 1, if so, calling a corresponding target interface program according to the current path information so that the current target interface program outputs a corresponding target parameter according to the transmission parameter; otherwise, determining a target parameter output by the target interface program called at the (m-1) th time, and taking the current target parameter as a reference transmission parameter; and calling the corresponding target interface program according to the current path information so that the current target interface program outputs the corresponding target parameter according to the reference transmission parameter.
2. The test method according to claim 1,
the path information comprises an interface name and/or a storage address;
further comprising:
acquiring standard parameters corresponding to the transmission parameters;
judging whether the standard parameters are the same as target parameters output by the target interface program called for the last time, if not, determining that at least one target interface is unreliable in at least two target interface programs corresponding to the current test case; otherwise, determining that each interface program corresponding to the current test case is reliable.
3. A test apparatus, comprising:
the device comprises a setting module, a test execution module and a test execution module, wherein the setting module is used for setting at least one test case corresponding to software to be tested according to the incidence relation between at least two interface programs in the software to be tested;
the analysis processing module is used for analyzing the current test case to determine at least two target interface programs corresponding to the current test case in the software to be tested and determine the logic sequence of the at least two target interface programs;
the calling processing module is used for acquiring transmission parameters and calling each target interface program in sequence according to the logic sequence so that the target interface program called for the first time outputs a target parameter corresponding to the current target interface program according to the transmission parameters, and the interface program called for the nth time outputs a target parameter corresponding to the interface program called for the nth time according to the target parameter output by the target interface program called for the (n-1) th time, wherein n is an integer greater than 1;
the analysis processing module is further configured to determine path information corresponding to the at least two target interface programs, and form a sequence queue according to a logic sequence of the at least two target interface programs by using the path information corresponding to the at least two target interface programs;
the call processing module comprises: the device comprises a traversing subunit, a judging subunit, a first processing subunit and a second processing subunit; wherein,
the traversal subunit is configured to traverse the sequence queue, and determine a sequence bit m of the current path information in the sequence queue when traversing the current path information in the sequence queue, where m is an integer greater than 0;
the judging subunit is configured to judge whether the sequence bit m is equal to 1, and if yes, trigger the first processing subunit; otherwise, triggering the second processing subunit;
the first processing subunit is configured to call a corresponding target interface program according to the current path information, so that the current target interface program outputs a corresponding target parameter according to the transmission parameter;
the second processing subunit is used for determining a target parameter output by the target interface program called at the (m-1) th time and taking the current target parameter as a reference transmission parameter; and calling the corresponding target interface program according to the current path information so that the current target interface program outputs the corresponding target parameter according to the reference transmission parameter.
4. The test device of claim 3,
the path information comprises an interface name and/or a storage address;
further comprising: the device comprises an acquisition module, a judgment module, a first determination module and a second determination module; wherein,
the acquisition module is used for acquiring standard parameters corresponding to the transmission parameters;
the judging module is used for judging whether the standard parameter is the same as a target parameter output by a target interface program called for the last time, and if not, the first determining module is triggered; otherwise, triggering the second determination module;
the first determining module is used for determining that at least one target interface is unreliable in at least two target interface programs corresponding to the current test case;
and the second determining module is used for determining that each interface program corresponding to the current test case is reliable.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610972705.9A CN106528418B (en) | 2016-10-28 | 2016-10-28 | A kind of test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610972705.9A CN106528418B (en) | 2016-10-28 | 2016-10-28 | A kind of test method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106528418A CN106528418A (en) | 2017-03-22 |
CN106528418B true CN106528418B (en) | 2019-01-22 |
Family
ID=58349568
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610972705.9A Active CN106528418B (en) | 2016-10-28 | 2016-10-28 | A kind of test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106528418B (en) |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107329861B (en) * | 2017-06-12 | 2020-12-22 | 奇安信科技集团股份有限公司 | Multi-interface testing method and device |
CN109150643B (en) * | 2017-06-16 | 2022-09-23 | 创新先进技术有限公司 | Service processing abnormity detection method and device |
CN109213671B (en) * | 2017-06-30 | 2021-08-03 | 中国航发商用航空发动机有限责任公司 | Software testing method and platform thereof |
CN109426572B (en) * | 2017-08-29 | 2021-07-02 | 杭州海康威视数字技术股份有限公司 | Task processing method and device and electronic equipment |
CN107809332A (en) * | 2017-11-10 | 2018-03-16 | 中国民生银行股份有限公司 | Compound interface configures and compound interface call method, device |
CN108763071A (en) * | 2018-05-17 | 2018-11-06 | 平安科技(深圳)有限公司 | A kind of webpage test method and terminal device |
CN110737575B (en) * | 2018-07-20 | 2023-09-01 | 北京金山云网络技术有限公司 | Interface testing method and device, electronic equipment and storage medium |
CN109471796A (en) * | 2018-10-16 | 2019-03-15 | 平安证券股份有限公司 | Interface test method, device, computer equipment and storage medium |
CN109857667B (en) * | 2019-02-03 | 2021-10-08 | 苏州市龙测智能科技有限公司 | Interface automation test method, test device, test equipment and storage medium |
CN111159028B (en) * | 2019-12-23 | 2023-08-01 | 望海康信(北京)科技股份公司 | Webpage testing method and device |
CN111949537A (en) * | 2020-08-14 | 2020-11-17 | 北京锐安科技有限公司 | Interface test method, device, equipment and medium |
CN112101949B (en) * | 2020-09-18 | 2022-12-16 | 支付宝(杭州)信息技术有限公司 | Safe service request processing method and device |
CN112416763A (en) * | 2020-11-17 | 2021-02-26 | 杭州安恒信息技术股份有限公司 | Method, device and equipment for automatically testing interface and storage medium |
CN112817845A (en) * | 2021-01-26 | 2021-05-18 | 中国核电工程有限公司 | Method for verifying program coupling performance |
CN113094264B (en) * | 2021-03-31 | 2022-02-18 | 北京深思数盾科技股份有限公司 | Interface testing method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101145993A (en) * | 2007-10-11 | 2008-03-19 | 中兴通讯股份有限公司 | A multi-point access interface test method and its test system |
US7603658B2 (en) * | 2004-02-19 | 2009-10-13 | Oracle International Corporation | Application functionality for a test tool for application programming interfaces |
CN103235759A (en) * | 2013-05-15 | 2013-08-07 | 百度在线网络技术(北京)有限公司 | Method and device for generating test cases |
CN105117345A (en) * | 2015-09-23 | 2015-12-02 | 网易(杭州)网络有限公司 | Interface testing method and device for application program |
CN105138461A (en) * | 2015-09-23 | 2015-12-09 | 网易(杭州)网络有限公司 | Interface testing method and device for application program |
-
2016
- 2016-10-28 CN CN201610972705.9A patent/CN106528418B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7603658B2 (en) * | 2004-02-19 | 2009-10-13 | Oracle International Corporation | Application functionality for a test tool for application programming interfaces |
CN101145993A (en) * | 2007-10-11 | 2008-03-19 | 中兴通讯股份有限公司 | A multi-point access interface test method and its test system |
CN103235759A (en) * | 2013-05-15 | 2013-08-07 | 百度在线网络技术(北京)有限公司 | Method and device for generating test cases |
CN105117345A (en) * | 2015-09-23 | 2015-12-02 | 网易(杭州)网络有限公司 | Interface testing method and device for application program |
CN105138461A (en) * | 2015-09-23 | 2015-12-09 | 网易(杭州)网络有限公司 | Interface testing method and device for application program |
Also Published As
Publication number | Publication date |
---|---|
CN106528418A (en) | 2017-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106528418B (en) | A kind of test method and device | |
US9916224B2 (en) | Integrating quality analysis with a code review tool | |
CN111045756B (en) | Method, apparatus, computing device and medium for generating interface service | |
CN108959068B (en) | Software interface testing method, device and storage medium | |
US9547579B1 (en) | Method and apparatus for automatically detecting defects | |
US9838412B2 (en) | Computer software application self-testing | |
WO2018184361A1 (en) | Application test method, server, terminal, and storage media | |
US11119843B2 (en) | Verifying application behavior based on distributed tracing | |
US11888885B1 (en) | Automated security analysis of software libraries | |
CN111897724A (en) | Automatic testing method and device suitable for cloud platform | |
US9329979B2 (en) | Derivation of generalized test cases | |
CN111198797B (en) | Operation monitoring method and device and operation analysis method and device | |
CN110297767B (en) | Automatic execution method, device, equipment and storage medium for test cases | |
CN108763071A (en) | A kind of webpage test method and terminal device | |
CN111797026A (en) | Test case generation method and device, computer equipment and storage medium | |
US20160275000A1 (en) | System and method of automated application screen flow generation for detecting aberration in mobile application | |
US9032530B2 (en) | Correcting workflow security vulnerabilities via static analysis and virtual patching | |
US8949991B2 (en) | Testing web services that are accessible via service oriented architecture (SOA) interceptors | |
US11604724B2 (en) | Software application component testing | |
CN112084114B (en) | Method and apparatus for testing interfaces | |
CN113362173A (en) | Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium | |
US20160188443A1 (en) | Testing application internal modules with instrumentation | |
CN110618943B (en) | Security service test method and device, electronic equipment and readable storage medium | |
CN111737129B (en) | Service control method, device, computer readable medium and electronic equipment | |
CN113280847A (en) | Verification method and verification system of test device, computer equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |