CN102855182A - Web system test method and device - Google Patents

Web system test method and device Download PDF

Info

Publication number
CN102855182A
CN102855182A CN2011103377059A CN201110337705A CN102855182A CN 102855182 A CN102855182 A CN 102855182A CN 2011103377059 A CN2011103377059 A CN 2011103377059A CN 201110337705 A CN201110337705 A CN 201110337705A CN 102855182 A CN102855182 A CN 102855182A
Authority
CN
China
Prior art keywords
test
sut
system under
flow process
under test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011103377059A
Other languages
Chinese (zh)
Other versions
CN102855182B (en
Inventor
谷云
李磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Lohas Online (beijing) Network Technology 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 Lohas Online (beijing) Network Technology Co Ltd filed Critical Lohas Online (beijing) Network Technology Co Ltd
Priority to CN201110337705.9A priority Critical patent/CN102855182B/en
Publication of CN102855182A publication Critical patent/CN102855182A/en
Application granted granted Critical
Publication of CN102855182B publication Critical patent/CN102855182B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a Web system test method and a device. The Web system test method includes that a execution trigger of a test case is received, the test case is specific to a system to be tested, a process packaging packet which corresponds to a process operated on a non-tested system is selected according to a process which is contained in the test case and operated on the non-tested system, a test sequence is formed by the selected process packaging packet, the process packaging packet comprises an operation which performs packaging based on network protocol and is specific to the non-tested system, the test sequence is executed, and the executed result of the test sequence is converted to information which can be recognized by the tested system. By means of the scheme, the operation process which is irrelevant to the tested system is packaged in advance in a network protocol mode, data or states required by the test are automatically obtained from other systems through the execution of the process packaging packet, so that testers can avoid or reduce operations of a third party system which is irrelevant to test objects, and the entire test efficiency is improved.

Description

A kind of Web system detection method and device
Technical field
The application relates to technical field of internet application, particularly relates to a kind of Web system detection method and device.
Background technology
In the exploitation and debug process of website, the test job of developing content is even more important.At present, the function of a lot of websites becomes more and more perfect, and corresponding test job also just becomes more complicated.In the face of day by day complicated testing requirement, corresponding a variety of automated test tools have appearred also, to improve testing efficiency.
In the prior art, a kind of Web automated testing method commonly used is based on the automated testing method that page elements is controlled, this method is controlled web page element by recording the means such as analysis, Code location, reach the purpose of analog subscriber operation, this class testing instrument comprises Selenium, Watir etc.
But the problem that this method of testing exists is: need the complete user's operating process of simulation, even if for tester and unconcerned part, also must realize in test case.For example, for E-business applications, current need to the test third-party intermediary payment system, because payment system itself will be come into contacts with various external systems, shopping website system for example, bank system of web etc., the operation of these internal system is that payment system needn't be concerned about, for the test of payment system, the content of need being concerned about is the core logic of himself inside, and and these external systems between interface, but in the test process of reality, the tester often will carry out many operations in these external systems first, just can finish the front preparation of test, to go to the logic testing branch of expection.
As seen, the existing automated testing method of controlling based on page elements when being applied to fairly large Web test, often needing to waste the part that a large amount of time and manpower are not paid close attention in test itself, thereby causes whole testing efficiency low.
Summary of the invention
For solving the problems of the technologies described above, the embodiment of the present application provides a kind of Web system detection method and device, and to improve testing efficiency, technical scheme is as follows:
The application provides a kind of Web system detection method, comprising:
The execution that receives test case triggers, and described test case is the test case for system under test (SUT);
According to the flow process that runs on non-system under test (SUT) that comprises in the described test case, select and the described corresponding flow process wrapper of flow process that runs on non-system under test (SUT), and utilize selected flow process wrapper to consist of cycle tests; In the described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based encapsulates;
Carry out described cycle tests;
The execution result of cycle tests is converted to the discernible information of system under test (SUT).
According to a kind of implementation of the application, after consisting of cycle tests, also comprise:
In cycle tests, add test parameter.
According to a kind of implementation of the application, the described test parameter that adds in cycle tests comprises:
Utilize the test parameter that defines in the described test case, and/or currently finished the result that test process obtains, test parameter is transmitted in the operation in the flow process wrapper.
According to a kind of implementation of the application, the described test parameter that adds in cycle tests comprises:
For the operation in the flow process wrapper generates test parameter at random.
According to a kind of implementation of the application, described execution result with cycle tests is converted to the discernible information of system under test (SUT), comprising:
Create and be used for analog subscriber at the logging status cookie of system under test (SUT);
According to the execution result of cycle tests, obtain the user historical behavior information corresponding with establishment cookie.
According to a kind of implementation of the application, after the execution result with cycle tests is converted to the discernible information of system under test (SUT), also comprise:
Information after the conversion is sent to system under test (SUT), to continue implementation of test cases.
The application also provides a kind of Web opening machine system test device, comprising:
The test case trigger module is used for receiving the execution triggering of test case, and described test case is the test case for system under test (SUT);
The cycle tests composition module for the flow process that runs on non-system under test (SUT) that comprises according to described test case, is selected and the described corresponding flow process wrapper of flow process that runs on non-system under test (SUT), and utilizes selected flow process wrapper to consist of cycle tests; In the described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based encapsulates;
The cycle tests execution module is used for carrying out described cycle tests;
The execution result modular converter is used for the execution result of cycle tests is converted to the discernible information of system under test (SUT).
According to a kind of implementation of the application, said apparatus also comprises:
Test parameter adds module, is used for adding test parameter at the cycle tests that described cycle tests composition module consists of.
According to a kind of implementation of the application, described test parameter adds module, comprising:
The test parameter transfer unit is used for the test parameter utilize described test case to define, and/or has currently finished the result that test process obtains, and test parameter is transmitted in the operation in the flow process wrapper.
According to a kind of implementation of the application, described test parameter adds module, comprising:
The test parameter generation unit is used to the operation in the flow process wrapper to generate at random test parameter.
According to a kind of implementation of the application, described execution result modular converter comprises:
The cookie creating unit is used for creating for the logging status cookie of analog subscriber at system under test (SUT);
The information acquisition unit is used for the execution result according to cycle tests, obtains the user historical behavior information corresponding with establishment cookie.
According to a kind of implementation of the application,, described device also comprises:
Information sending module is used for the information after the conversion being sent to system under test (SUT), to continue implementation of test cases after described execution result modular converter is converted to the discernible information of system under test (SUT) with the execution result of cycle tests.
The technical scheme that the embodiment of the present application provides, real needs for test, the operating process that the general is a large amount of and system under test (SUT) is irrelevant in advance is encapsulated with the form of procotol, when in test process, needing to call these operations, directly utilize the flow process wrapper to consist of cycle tests and execution, thereby can automatically test required data or state from other system's acquisition, to avoid or to reduce the tester to the operation of the irrelevant third party system of these and tested object, improve whole testing efficiency.
Description of drawings
In order to be illustrated more clearly in the embodiment of the present application or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, the accompanying drawing that the following describes only is some embodiment that put down in writing among the application, for those of ordinary skills, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the test architecture schematic diagram of the embodiment of the present application;
Fig. 2 is a kind of process flow diagram of the Web system detection method of the embodiment of the present application;
Fig. 3 is the second process flow diagram of the Web system detection method of the embodiment of the present application;
Fig. 4 is the third process flow diagram of the Web system detection method of the embodiment of the present application;
Fig. 5 is a kind of structural representation of the Web opening machine system test device of the embodiment of the present application;
Fig. 6 is the second structural representation of the Web opening machine system test device of the embodiment of the present application;
Fig. 7 is the third structural representation of the Web opening machine system test device of the embodiment of the present application.
Embodiment
A kind of Web system detection method that at first the embodiment of the present application is provided describes, and the method can may further comprise the steps:
The execution that receives test case triggers, and described test case is the test case for system under test (SUT);
According to the flow process that runs on non-system under test (SUT) that comprises in the described test case, select and the described corresponding flow process wrapper of flow process that runs on non-system under test (SUT), and utilize selected flow process wrapper to consist of cycle tests; In the described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based encapsulates;
Carry out described cycle tests;
The execution result of cycle tests is converted to the discernible information of system under test (SUT).
The executive agent of above-mentioned steps, it can be a proving installation that can communicate with system under test (SUT) and non-system under test (SUT), Figure 1 shows that the test architecture schematic diagram according to the embodiment of the present application, wherein proving installation 100 is to arrange for system under test (SUT) 200, and purpose is the automatic test of realizing system under test (SUT) 200.Simultaneously, proving installation 100 can also carry out alternately with one or more non-systems under test (SUT) 300 (non-system under test (SUT) a as shown in Figure 1, the non-system under test (SUT) n of non-system under test (SUT) b......), fundamental purpose is to trigger the operation that needs to run on these non-systems under test (SUT) 300 in the testing process, the request of these operations of operation is sent to corresponding non-system under test (SUT) 300, and obtain the operation result of these operations from non-system under test (SUT) 300, thereby obtain testing required data or state for system under test (SUT) 100.
In actual applications, proving installation 100 can be arranged in same entity with system under test (SUT) 200, for example the server at system under test (SUT) 200 places; Proving installation 100 also can be the entity that is independent of system under test (SUT) 200, and for example, employing one independently test terminal is tested the server at system under test (SUT) 200 places, and this test terminal can directly be connected or connect by network with system under test (SUT) 200.
In addition, in actual applications, system under test (SUT) 200 and each non-system under test (SUT) 300 general corresponding the different system in the network, for example related shopping website system, intermediary's payment system, bank system of web etc. in the E-business applications, proving installation 100 generally is to be connected by the non-system under test (SUT) 300 of network and each, and packaged in the flow process wrapper all be operation for non-system under test (SUT), so these action needs encapsulate based on certain procotol.Mode commonly used is based on HTTP (HyperText Transfer Protocol, HTML (Hypertext Markup Language)) operation is encapsulated, can certainly adopt other mode to encapsulate, for example based on RPC (Remote Procedure Call Protocol, remote procedure call protocol), the mode such as Socket communication encapsulates etc., the embodiment of the present application does not need this to limit.
The Web system detection method that the embodiment of the present application provides, real needs for test, the operating process that the general is a large amount of and system under test (SUT) is irrelevant in advance is encapsulated with the form of procotol, when in test process, needing to call these operations, directly utilize the flow process wrapper to consist of cycle tests and execution, thereby can automatically test required data or state from other system's acquisition, to avoid or to reduce the tester to the operation of the irrelevant third party system of these and tested object, improve whole testing efficiency.
In order to make those skilled in the art person understand better technical scheme among the application, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is described in detail, obviously, described embodiment only is the application's part embodiment, rather than whole embodiment.Based on the embodiment among the application, the every other embodiment that those of ordinary skills obtain should belong to the scope that the application protects.
Figure 2 shows that the schematic flow sheet of a kind of Web system detection method that the application provides, the method can may further comprise the steps:
S101, the execution that receives test case triggers;
According to concrete testing requirement, the tester can be with the various test case input test devices that design, and trigger proving installation and carry out this test case.Certainly, the test case content also can pre-save in proving installation, in this case, the tester only needs in this step to trigger condition of proving installation input, to trigger the execution of certain test case.In the Web of reality system, corresponding trigger condition can be to click certain page elements of the Web page, for example connection, button etc.
At present, among a lot of large-scale Web, often need to be cooperated by a plurality of systems and realize, and from the angle of system development, the exploitation of these systems generally also is independently, test is just for wherein some systems.Therefore, here the test case of mentioning, although may relate to the operation for a plurality of systems within it in holding, but the purpose of test is for some specific systems, in the embodiment of the present application, this specific system is become system under test (SUT), other system related in the test case is called non-system under test (SUT).
For example, in E-business applications, a basic online transaction requirements of process relates to shopping website system, intermediary's payment system, three systems of bank system of web.These systems itself are by different mechanism's exploitation and operation.Suppose whether the current test intermediary's payment system wherein that needs can normally realize its function in the transaction flow on the net, and then intermediary's payment system is current system under test (SUT).On the other hand, in order to simulate a complete online transaction flow process, in the test case for intermediary's payment system, may need to comprise calling shopping website system and bank system of web, yet these parts are not test institute real concern, therefore shopping website system and bank system of web are called non-system under test (SUT) here.
S102 according to the flow process that runs on non-system under test (SUT) that comprises in the described test case, selects corresponding flow process wrapper, and utilizes selected flow process wrapper to consist of cycle tests;
Defined some flow processs in test case, wherein a part is only need to be (being designated hereinafter simply as the category-A flow process) of current system under test (SUT) operation, and another part then needs to run on non-system under test (SUT) (being designated hereinafter simply as the category-B flow process).For current test, what really pay close attention to is the category-A flow process, but in order to allow system under test (SUT) reach the state that can move the category-A flow process, often needs at first to carry out one or more category-B flow processs.That is to say, the category-B flow process can be regarded as the first order condition of operation category-A flow process.
In the scheme that the application provides, run on the flow process of non-system under test (SUT) for needs, in advance one or more operations are encapsulated, forming some flow process wrappers is stored in the proving installation, in test process, these flow process wrappers can directly be called, and when a flow process wrapper is called, test macro will sequentially be carried out the wherein various operations of definition according to the content of flow process wrapper.By calling these wrappers, can realize fast first order condition, make system under test (SUT) reach the state that can move the category-A flow process.
Still describe as an example of E-business applications example, suppose that current is to test for payment system, yet before the associative operation of carrying out " payment ", at first need to exist buying behavior, for example realizes buying behavior, further need to there be buyer user, seller user, commodity etc. again, and obtain the operation of these states, all will finish in the shopping website system.Therefore, can according to the demand of reality, these operations that run on the shopping website system be encapsulated.
For example, for " seller user publishing commodity " this flow process, it comprises following 4 kinds of operations:
1) seller user logs in
2) seller user is run a shop
3) seller user creates merchandise news
4) seller user is added with commodity
Because " publishing commodity " this extent for multiplexing that operates in the various tests is very high, therefore can directly top kind operation be encapsulated, consist of the wrapper of " publishing commodity ".When this wrapper is called, can automatic sequence carry out above-mentioned 4 kinds of operations, and produce the ID of commodity, also namely be equivalent to finish the flow process of " publishing commodity ".
Certainly, except " publishing commodity ", flow processs such as " buyer user buys commodity ", " buyer user's return of goods " can encapsulate respectively.The content of concrete encapsulation can be definite according to business demand and the extent for multiplexing in the test of practical application, and the embodiment of the present application does not need this to limit.
Because proving installation is to be connected with non-system under test (SUT) by network, and packaged in the flow process wrapper all be operation for non-system under test (SUT), therefore these action needs encapsulate based on certain procotol, encapsulate such as modes such as utilizing HTTP, RPC, the embodiment of the present application does not need to limit to the specific implementation of encapsulation.
Proving installation is at first analyzed the content of test case after step S101 receives test case execution triggering.Determine which flow process is need to be need to run on (being the category-B flow process) of non-system under test (SUT) for the category-B flow process in (being the category-A flow process), which flow process of current system under test (SUT) operation only, then for the category-B flow process, select the one or more flow process wrappers corresponding with it, if selected a plurality of wrappers, then also should further determine the execution sequence of these wrappers, then utilize selected one or more flow process wrapper to consist of cycle tests.
S103 carries out described cycle tests;
In this step, proving installation will be carried out the cycle tests that consists of in step S102, if comprised a plurality of flow process wrappers in cycle tests, then after previous flow process wrapper is finished, its execution result will be passed to the flow process wrapper of back.
For example, in a cycle tests, two flow process wrappers of " seller user publishing commodity " and " buyer user buys commodity " have been called, then after executing " seller user publishing commodity " this flow process wrapper, namely obtained commodity ID, these commodity ID and seller user ID will be passed in the flow process wrapper of " buyer user buys commodity ", and " purchase " of follow-up execution operation namely is based on the operation that this seller user ID and these commodity ID carry out.After " buyer user buys commodity " this flow process wrapper is finished, will produce a Transaction Information, the particular content of this information can comprise: buyer's user ID, seller user ID, commodity ID, knockdown price, Payment Methods etc.So far, cycle tests is finished, and therefore, this Transaction Information is the execution result of whole cycle tests namely.
S104 is converted to the discernible information of system under test (SUT) with the execution result of cycle tests.
According to the description of front as can be known, related operation in the cycle tests is actually carried out in non-system under test (SUT).And utilize procotol that various operations are encapsulated, can realize that the non-system under test (SUT) of local proving installation triggering far-end is carried out various operations.After cycle tests was finished, execution result also can return local proving installation.
But the execution result that non-system under test (SUT) returns can not directly be identified by system under test (SUT).Therefore in this step, also need execution result is changed, can proceed to guarantee the follow-up flow process for system under test (SUT).
Because Web uses and generally is based on the browser realization, therefore can utilize cookie to realize the conversion of execution result.Cookie refers to that the website is in order to distinguish user identity, to carry out Process Tracking and be stored in data on the subscriber's local terminal, in the embodiment of the present application, proving installation is after receiving the execution result that non-system under test (SUT) returns, at first according to the content of execution result and follow-up test needs, create cookie, with the logging status of analog subscriber at system under test (SUT); Then, further according to the execution result of cycle tests, obtain the user historical behavior information corresponding with establishment cookie, these information are follow-up can be used for passing to system under test (SUT), to continue the testing process on system under test (SUT).
For example, currently obtained the Transaction Information that the shopping website system returns, and need to test the buyer's payment function, then can be according to buyer user's ID, create cookie, with the logging status of simulation buyer user in payment system, then, can be as required, other information in the execution result are passed to payment system, these information can comprise for example dealing money, Payment Methods, seller user ID etc., that is to say, with before the buyer user in the behavioural information of shopping website system, pass to payment system corresponding to this buyer user's cookie, so which behavior was payment system all carried out before can identifying this user in purchase system, current what state that is in, what next step need to do, etc.
Wherein, user's historical behavior information is passed to system under test (SUT), can adopt the mode of the cookie that creates before directly user profile being write, for example, after creating buyer user cookie, further with buyer user's historical behavior information as parameter read-in cookie, like this, payment system just can identify the information that is used for carrying out the continuation payment flow process for this buyer user.For example: with who seller user reached transaction, current how much amount of money of needs payment, adopted which kind of modes of payments etc. before this buyer user.So far, payment system has obtained a user's logging status, and has obtained the data such as payment, the modes of payments, payment object, has satisfied the first order condition that payment function is tested, and follow-uply just can further test payment function.
The method of above-mentioned transmission user historical behavior information relatively is applicable to the less situation of information that need to transmit.Excessive for fear of cookie file, in the application's another kind of implementation, also can pass through URL (Universal Resource Locator, URL(uniform resource locator)) carries, user's historical behavior information is passed to system under test (SUT), in the process of transmission of information, need to identify certain cookie's that entrained information creates before being aimed at, so just can be mapped user's behavioural information and user, so that system under test (SUT) is identified.
Certainly, those skilled in the art it will also be appreciated that other the scheme that is used for transmitting family historical behavior information, for example send to system under test (SUT) by simple GET, POST order carry information, these modes can be distinguished independent the use, the use that yet can mutually combine, the embodiment of the present application does not need this to limit.
As seen, use the Web system detection method that the embodiment of the present application provides, the operating process that the general is a large amount of and system under test (SUT) is irrelevant in advance is encapsulated with the form of procotol, when in test process, needing to call these operations, directly utilize the flow process wrapper to consist of cycle tests and execution, thereby can be automatically obtain test required data or state from other system, to avoid or to reduce the tester to these operations with the irrelevant third party system of tested object, improve the testing efficiency of integral body
Referring to shown in Figure 3, in the application's another kind of implementation, the Web system detection method that provides can may further comprise the steps:
S101, the execution that receives test case triggers;
S102 according to the flow process that runs on non-system under test (SUT) that comprises in the described test case, selects corresponding flow process wrapper, and utilizes selected flow process wrapper to consist of cycle tests;
S105 adds test parameter in cycle tests;
S103 carries out described cycle tests;
S104 is converted to the discernible information of system under test (SUT) with the execution result of cycle tests.
Compare with last embodiment, the present embodiment has increased new step S105 between step S102 and step S103.The below mainly is described in detail this step:
In test process, sometimes in order to realize the different routing of same testing process, for example, when buyer user's payment function is tested, may be for specific buyer user, specific seller user, specific commodity etc., in this case, can realize by the mode of in cycle tests, adding test parameter.
For cycle tests adds test parameter two kinds of implementations are arranged: a kind of mode is according to current existing data, and test parameter is transmitted in the operation in the flow process wrapper.For example, defined test parameter in the test case is directly passed to operation in the flow process wrapper; Perhaps, before cycle tests is carried out, may finish some other testing process, the resulting result of these flow processs also can pass to the operation in the flow process wrapper.
The mode that another kind of cycle tests adds test parameter is, automatically be that operation in the flow process wrapper generates test parameter by proving installation, owing to being the different routing that will realize same testing process, therefore can adopt the mode of random generation test parameter here, for example, when each execution cycle tests, generate at random different user ID, commodity ID etc., to realize more comprehensively test operation.
Correspondingly, in this enforcement, performed cycle tests is construed as the cycle tests that has added test parameter among the step S103.Step S101, S102, S104 are then identical with last embodiment, no longer are repeated in this description here.
Referring to shown in Figure 4, in another embodiment of the application, after step S104, can further include following steps:
S106 is sent to system under test (SUT) with the information after the conversion, to continue implementation of test cases.
After step 104 is finished, in fact finished the preparation of the first order condition that system under test (SUT) is tested.Can send system under test (SUT) with the discernible form of system under test (SUT) this moment with the current state that obtains at non-system under test (SUT) of institute or data, operates in the testing process of system under test (SUT) to continue execution, finishes whole test
S107 shows output to the information that obtains after the conversion.
In order to make the tester can understand at any time the situation of carrying out of test, after step 104 is finished, also the information after the conversion can be shown output, for example play up with the form of the Web page, check by browser for the tester.
Need to prove, the sequencing that step S106 and S107 do not carry out, the two can distinguish independent the execution, also can carry out simultaneously.In addition, although it will be appreciated by persons skilled in the art that in Fig. 4 and not shown, however the step S105 in also can comprising in the present embodiment in the embodiment.
Corresponding to top embodiment of the method, the application also provides a kind of Web opening machine system test device, this device correspondence and the proving installation 100 shown in Fig. 1, and referring to shown in Figure 5, this device specifically can comprise with lower module:
Test case trigger module 110 is used for receiving the execution triggering of test case, and described test case is the test case for system under test (SUT);
According to concrete testing requirement, the tester can be with the various test case input test devices that design, and trigger proving installation and carry out this test case.Certainly, the test case content also can pre-save in proving installation, in this case, the tester is by to trigger condition of test case trigger module 110 inputs, to trigger the execution of certain test case.In the Web of reality system, corresponding trigger condition can be to click certain page elements of the Web page, for example connection, button etc.
Here the test case of mentioning, although may relate to the operation for a plurality of systems within it in holding, but the purpose of test is for some specific systems, in the embodiment of the present application, this specific system is become system under test (SUT), other system related in the test case is called non-system under test (SUT).
Cycle tests composition module 120, for the flow process that runs on non-system under test (SUT) that comprises according to described test case, select and the described corresponding flow process wrapper of flow process that runs on non-system under test (SUT), and utilize selected flow process wrapper to consist of cycle tests; In the described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based encapsulates;
Defined some flow processs in test case, wherein a part is only need to be (being designated hereinafter simply as the category-A flow process) of current system under test (SUT) operation, and another part then needs to run on non-system under test (SUT) (being designated hereinafter simply as the category-B flow process).For current test, what really pay close attention to is the category-A flow process, but in order to allow system under test (SUT) reach the state that can move the category-A flow process, often needs at first to carry out one or more category-B flow processs.That is to say, the category-B flow process can be regarded as the first order condition of operation category-A flow process.
In the scheme that the application provides, run on the flow process of non-system under test (SUT) for needs, in advance one or more operations are encapsulated, forming some flow process wrappers is stored in the proving installation, in test process, these flow process wrappers can directly be called, and when a flow process wrapper is called, test macro will sequentially be carried out the wherein various operations of definition according to the content of flow process wrapper.By calling these wrappers, can realize fast first order condition, make system under test (SUT) reach the state that can move the category-A flow process.
Because proving installation is to be connected with non-system under test (SUT) by network, and packaged in the flow process wrapper all be operation for non-system under test (SUT), therefore these action needs encapsulate based on certain procotol, encapsulate such as modes such as utilizing HTTP, RPC, the embodiment of the present application does not need to limit to the specific implementation of encapsulation.
Cycle tests composition module 120 is at first analyzed the content of test case.Determine which flow process is need to be (being the category-B flow process) that need to run on non-system under test (SUT) in (being the category-A flow process), which flow process of current system under test (SUT) operation only, then for the category-B flow process, select the one or more flow process wrappers corresponding with it, if selected a plurality of wrappers, then also should further determine the execution sequence of these wrappers, then utilize selected one or more flow process wrapper to consist of cycle tests.
Cycle tests execution module 130 is used for carrying out described cycle tests;
The effect of cycle tests execution module 130 is to carry out the cycle tests that is made of cycle tests composition module 120, if in cycle tests, comprised a plurality of flow process wrappers, then after previous flow process wrapper is finished, its execution result will be passed to the flow process wrapper of back.
Execution result modular converter 140 is used for the execution result of cycle tests is converted to the discernible information of system under test (SUT).
According to the description of front as can be known, related operation in the cycle tests is actually carried out in non-system under test (SUT).And utilize procotol that various operations are encapsulated, can realize that the non-system under test (SUT) of local proving installation triggering far-end is carried out various operations.After cycle tests was finished, execution result also can return local proving installation.
But the execution result that non-system under test (SUT) returns can not directly be identified by system under test (SUT).Therefore execution result modular converter 140 will be changed execution result, can proceed to guarantee the follow-up flow process for system under test (SUT).
The Web opening machine system test device that the embodiment of the present application provides is for the system under test (SUT) setting, and purpose is to realize the system under test (SUT) automatic test.Simultaneously, this device can also carry out alternately with one or more non-systems under test (SUT), fundamental purpose is to trigger the operation that needs to run on these non-systems under test (SUT) in the testing process, the request of these operations of operation is sent to corresponding non-system under test (SUT), and obtain the operation result of these operations from non-system under test (SUT), thereby obtain testing required data or state for system under test (SUT).
In actual applications, Web opening machine system test device and system under test (SUT) can be arranged in same entity, for example the server at system under test (SUT) place; Also can be the entity that is independent of system under test (SUT), for example, employing one independently test terminal be tested the server at system under test (SUT) place, and this test terminal can directly be connected or connect by network with system under test (SUT).In addition, generally speaking, this Web opening machine system test device is connected by the non-system under test (SUT) of network and each.
The Web opening machine system test device that the embodiment of the present application provides, real needs for test, the operating process that the general is a large amount of and system under test (SUT) is irrelevant in advance is encapsulated with the form of procotol, when in test process, needing to call these operations, directly utilize the flow process wrapper to consist of cycle tests and execution, thereby can automatically test required data or state from other system's acquisition, to avoid or to reduce the tester to the operation of the irrelevant third party system of these and tested object, improve whole testing efficiency.
Wherein, above-mentioned execution result modular converter 140 specifically can comprise:
The cookie creating unit is used for creating cookie, with the logging status of analog subscriber at system under test (SUT);
The information acquisition unit is used for the execution result according to cycle tests, obtains the user historical behavior information corresponding with establishment cookie.
Wherein, the information acquisition unit can be with directly user profile being write the before mode of the cookie that creates, in order to follow-up user's historical behavior information is passed to system under test (SUT), also can carry or by simple GET, the POST order mode of carrying, user's historical behavior information is passed to system under test (SUT) by URL.These modes can be distinguished independent the use, the use that also can mutually combine, and the embodiment of the present application does not need this to limit.
Referring to shown in Figure 6, the Web opening machine system test device that the application provides can further include:
Test parameter adds module 150, is used for adding test parameter at the cycle tests that described cycle tests composition module 120 consists of.To realize the different routing of same testing process
In a kind of embodiment of the application, can add configuration testing parameter transfer unit in the module 150 at test parameter, be used for transmitting test parameter according to current existing data to the operation of flow process wrapper.For example: utilize the test parameter that defines in the test case to transmit test parameter to the operation in the flow process wrapper, perhaps utilize the current result that test process obtains that finished, test parameter is transmitted in operation in the flow process wrapper, certainly, also can utilize simultaneously above-mentioned dual mode to transmit test parameter to the operation in the flow process wrapper.
In a kind of embodiment of the application, can add configuration testing parameter generating unit in the module 150 at test parameter, be used to the operation in the flow process wrapper to generate at random test parameter.
Referring to shown in Figure 7, the Web opening machine system test device that the application provides can also comprise:
Information sending module 160 is used for the information after the conversion being sent to system under test (SUT), to continue implementation of test cases after described execution result modular converter 140 is converted to the discernible information of system under test (SUT) with the execution result of cycle tests.
Show output module 170, be used for after described execution result modular converter 140 is converted to the discernible information of system under test (SUT) with the execution result of cycle tests, the information that obtains after the conversion being shown output.
Wherein, above-mentioned information sending module 160 and demonstration output module 170 can be disposed at separately respectively in the Web opening machine system test device, also can be disposed at simultaneously in the Web opening machine system test device, and the embodiment of the present application does not need this to limit.In addition, it will be understood by those skilled in the art that, although also not shown in Fig. 7, yet the test parameter in also can comprising in the present embodiment in the embodiment adds module 150, with by in cycle tests, adding the mode of test parameter, realize the different routing of same testing process.
For the convenience of describing, be divided into various unit with function when describing above device and describe respectively.Certainly, when implementing the application, can in same or a plurality of softwares and/or hardware, realize the function of each unit.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the application and can realize by the mode that software adds essential general hardware platform.Based on such understanding, the part that the application's technical scheme contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the storage medium, such as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the application or embodiment.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and identical similar part is mutually referring to getting final product between each embodiment, and each embodiment stresses is difference with other embodiment.Especially, for device embodiment, because its basic simlarity is in embodiment of the method, so describe fairly simplely, relevant part gets final product referring to the part explanation of embodiment of the method.Device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, namely can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select according to the actual needs wherein some or all of module to realize the purpose of the present embodiment scheme.Those of ordinary skills namely can understand and implement in the situation that do not pay creative work.
The application can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can in distributed computing environment, put into practice the application, in these distributed computing environment, be executed the task by the teleprocessing equipment that is connected by communication network.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
The above only is the application's embodiment; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the application's principle; can also make some improvements and modifications, these improvements and modifications also should be considered as the application's protection domain.

Claims (12)

1. a Web system detection method is characterized in that, comprising:
The execution that receives test case triggers, and described test case is the test case for system under test (SUT);
According to the flow process that runs on non-system under test (SUT) that comprises in the described test case, select and the described corresponding flow process wrapper of flow process that runs on non-system under test (SUT), and utilize selected flow process wrapper to consist of cycle tests; In the described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based encapsulates;
Carry out described cycle tests;
The execution result of cycle tests is converted to the discernible information of system under test (SUT).
2. method according to claim 1 is characterized in that, after consisting of cycle tests, also comprises:
In cycle tests, add test parameter.
3. method according to claim 2 is characterized in that, the described test parameter that adds in cycle tests comprises:
Utilize the test parameter that defines in the described test case, and/or currently finished the result that test process obtains, test parameter is transmitted in the operation in the flow process wrapper.
4. method according to claim 2 is characterized in that, the described test parameter that adds in cycle tests comprises:
For the operation in the flow process wrapper generates test parameter at random.
5. method according to claim 1 is characterized in that, described execution result with cycle tests is converted to the discernible information of system under test (SUT), comprising:
Create and be used for analog subscriber at the logging status cookie of system under test (SUT);
According to the execution result of cycle tests, obtain the user historical behavior information corresponding with establishment cookie.
6. method according to claim 1 is characterized in that, after the execution result with cycle tests is converted to the discernible information of system under test (SUT), also comprises:
Information after the conversion is sent to system under test (SUT), to continue implementation of test cases.
7. a Web opening machine system test device is characterized in that, comprising:
The test case trigger module is used for receiving the execution triggering of test case, and described test case is the test case for system under test (SUT);
The cycle tests composition module for the flow process that runs on non-system under test (SUT) that comprises according to described test case, is selected and the described corresponding flow process wrapper of flow process that runs on non-system under test (SUT), and utilizes selected flow process wrapper to consist of cycle tests; In the described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based encapsulates;
The cycle tests execution module is used for carrying out described cycle tests;
The execution result modular converter is used for the execution result of cycle tests is converted to the discernible information of system under test (SUT).
8. device according to claim 7 is characterized in that, also comprises:
Test parameter adds module, is used for adding test parameter at the cycle tests that described cycle tests composition module consists of.
9. device according to claim 8 is characterized in that, described test parameter adds module, comprising:
The test parameter transfer unit is used for the test parameter utilize described test case to define, and/or has currently finished the result that test process obtains, and test parameter is transmitted in the operation in the flow process wrapper.
10. device according to claim 8 is characterized in that, described test parameter adds module, comprising:
The test parameter generation unit is used to the operation in the flow process wrapper to generate at random test parameter.
11. device according to claim 7 is characterized in that, described execution result modular converter comprises:
The cookie creating unit is used for creating for the logging status cookie of analog subscriber at system under test (SUT);
The information acquisition unit is used for the execution result according to cycle tests, obtains the user historical behavior information corresponding with establishment cookie.
12. device according to claim 7 is characterized in that, described device also comprises:
Information sending module is used for the information after the conversion being sent to system under test (SUT), to continue implementation of test cases after described execution result modular converter is converted to the discernible information of system under test (SUT) with the execution result of cycle tests.
CN201110337705.9A 2011-06-28 2011-10-31 A kind of Web system test method and device Active CN102855182B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110337705.9A CN102855182B (en) 2011-06-28 2011-10-31 A kind of Web system test method and device

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201110176437 2011-06-28
CN2011101764377 2011-06-28
CN201110176437.7 2011-06-28
CN201110337705.9A CN102855182B (en) 2011-06-28 2011-10-31 A kind of Web system test method and device

Publications (2)

Publication Number Publication Date
CN102855182A true CN102855182A (en) 2013-01-02
CN102855182B CN102855182B (en) 2016-03-02

Family

ID=47401785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110337705.9A Active CN102855182B (en) 2011-06-28 2011-10-31 A kind of Web system test method and device

Country Status (1)

Country Link
CN (1) CN102855182B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375140A (en) * 2016-08-22 2017-02-01 腾讯科技(深圳)有限公司 Pressure testing method and device
CN107102923A (en) * 2017-04-14 2017-08-29 广东浪潮大数据研究有限公司 The method of testing that a kind of automatic carry out BMC Web user additions and deletions change
CN107797918A (en) * 2017-03-13 2018-03-13 平安科技(深圳)有限公司 Method of testing and test device
CN108595312A (en) * 2017-12-29 2018-09-28 瑞庭网络技术(上海)有限公司 A kind of automatic performance method and device of modelling customer behavior
CN110362486A (en) * 2019-07-08 2019-10-22 北京长城华冠汽车科技股份有限公司 Cycle tests construction method and device and automated testing method and system
CN112783788A (en) * 2021-02-05 2021-05-11 北京同邦卓益科技有限公司 Test system, test method, electronic device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6604209B1 (en) * 2000-09-29 2003-08-05 Sun Microsystems, Inc. Distributed component testing in an enterprise computer system
CN1540892A (en) * 2003-11-03 2004-10-27 中国科学院计算技术研究所 Transmission method for testing computer network protocol
CN101110734A (en) * 2007-08-24 2008-01-23 福建星网锐捷网络有限公司 Automatization test approach and system
CN101232410A (en) * 2005-10-14 2008-07-30 中国移动通信集团公司 System and method for testing WAP gateway performance
CN101471819A (en) * 2007-12-29 2009-07-01 中国移动通信集团公司 Test system, test method, management domain and operation domain
CN102012863A (en) * 2010-11-23 2011-04-13 中国科学技术大学 Reaction type system testing method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6604209B1 (en) * 2000-09-29 2003-08-05 Sun Microsystems, Inc. Distributed component testing in an enterprise computer system
CN1540892A (en) * 2003-11-03 2004-10-27 中国科学院计算技术研究所 Transmission method for testing computer network protocol
CN101232410A (en) * 2005-10-14 2008-07-30 中国移动通信集团公司 System and method for testing WAP gateway performance
CN101110734A (en) * 2007-08-24 2008-01-23 福建星网锐捷网络有限公司 Automatization test approach and system
CN101471819A (en) * 2007-12-29 2009-07-01 中国移动通信集团公司 Test system, test method, management domain and operation domain
CN102012863A (en) * 2010-11-23 2011-04-13 中国科学技术大学 Reaction type system testing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁红洲: "Web系统测试技术研究", 《科技广场》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375140A (en) * 2016-08-22 2017-02-01 腾讯科技(深圳)有限公司 Pressure testing method and device
CN107797918A (en) * 2017-03-13 2018-03-13 平安科技(深圳)有限公司 Method of testing and test device
CN107797918B (en) * 2017-03-13 2020-05-05 平安科技(深圳)有限公司 Test method and test device
CN107102923A (en) * 2017-04-14 2017-08-29 广东浪潮大数据研究有限公司 The method of testing that a kind of automatic carry out BMC Web user additions and deletions change
CN108595312A (en) * 2017-12-29 2018-09-28 瑞庭网络技术(上海)有限公司 A kind of automatic performance method and device of modelling customer behavior
CN110362486A (en) * 2019-07-08 2019-10-22 北京长城华冠汽车科技股份有限公司 Cycle tests construction method and device and automated testing method and system
CN112783788A (en) * 2021-02-05 2021-05-11 北京同邦卓益科技有限公司 Test system, test method, electronic device, and storage medium
CN112783788B (en) * 2021-02-05 2023-12-05 北京同邦卓益科技有限公司 Test system, method, electronic device and storage medium

Also Published As

Publication number Publication date
CN102855182B (en) 2016-03-02

Similar Documents

Publication Publication Date Title
US7992127B2 (en) Method and system of encapsulating web site transactions for computer-aided generation of web services
CN102855182B (en) A kind of Web system test method and device
CN102244594B (en) At the networks simulation technology manually and in automatic testing instrument
CN103927253A (en) Multiple browser compatibility testing method and system
CN107783899A (en) The method of testing of the H5 pages, device and computer equipment in application program
CN104579822A (en) Automatic performance test system and method of mobile application based on Http protocol
US8689186B2 (en) Execution of a BPEL process by simulating partners
CN101399821A (en) Recording/reproducing system, recorder/player, and method
CN103136095A (en) Method, device and system of test application program interface
CN107797911A (en) Method and apparatus for testing HTTP interface
CN109684571A (en) A kind of collecting method and device, storage medium
CN107203470B (en) Page adjustment method and device
CN107483443A (en) advertisement information processing method, client, storage medium and electronic equipment
CN110363576A (en) User is guided to complete the method, apparatus and electronic equipment of financial product registration
CN102662838B (en) The adjustment method of Flash and system in a kind of browser
CN106101191A (en) A kind of Web access method, client and service end
CN101409731A (en) Remote control method for household electrical equipment through IE
US20120296691A1 (en) System and Method for Designing and Executing Subject-State Engine Workflows
CN108628742A (en) System performance testing method and apparatus
CN110334000A (en) A kind of test method based on MOCK technology
US8082487B2 (en) Method to prevent access of web applications from bookmarked links
Machado et al. JWSPerf: A performance benchmarking utility with support to multiple web services implementations
US20140379906A1 (en) Method for tracking user interaction with a web page
KR102303182B1 (en) Automated Test Network System and Automated Test Method
CN112559278B (en) Method and device for acquiring operation data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: BAIDU IN LINE NETWORK TECHNOLOGY CO LTD (BEOJING)

Free format text: FORMER OWNER: LEHO ONLINE (BEIJING) NETWORK TECHNOLOGY CO., LTD.

Effective date: 20131028

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20131028

Address after: 100085 Beijing, Haidian District, No. ten on the street Baidu building, No. 10

Applicant after: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd.

Address before: 100085, Baidu building, 10 floor, ten Street, Beijing, Haidian District, 4 AW

Applicant before: LOHAS online (Beijing) Network Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant