CN102855182B - A kind of Web system test method and device - Google Patents

A kind of Web system test method and device Download PDF

Info

Publication number
CN102855182B
CN102855182B CN201110337705.9A CN201110337705A CN102855182B CN 102855182 B CN102855182 B CN 102855182B CN 201110337705 A CN201110337705 A CN 201110337705A CN 102855182 B CN102855182 B CN 102855182B
Authority
CN
China
Prior art keywords
test
sut
flow process
system under
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.)
Active
Application number
CN201110337705.9A
Other languages
Chinese (zh)
Other versions
CN102855182A (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
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and 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

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

This application discloses a kind of Web system test method and device.A kind of Web system test method comprises: what receive test case performs triggering, and described test case is the test case for system under test (SUT); According to the flow process running on non-system under test (SUT) comprised in described test case, select and the flow process wrapper corresponding to the described flow process running on non-system under test (SUT), and the flow process wrapper selected by utilizing forms cycle tests; In described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based carries out encapsulating; Perform described cycle tests; The execution result of cycle tests is converted to the discernible information of system under test (SUT).The operating process had nothing to do with system under test (SUT) is encapsulated with the form of procotol by application such scheme in advance, automatically data needed for test or state is obtained from other system by performing flow process wrapper, these and tested object to be had nothing to do the operation of Third party system to avoid or to reduce tester, improve integrated testability efficiency.

Description

A kind of Web system test method and device
Technical field
The application relates to technical field of internet application, particularly relates to a kind of Web system test method and device.
Background technology
In the exploitation and debug process of website, the test job of exploitation content is even more important.At present, the function of a lot of website becomes more and more perfect, and corresponding test job also just becomes more complicated.In the face of day by day complicated testing requirement, correspondingly also there is a variety of automated test tool, to improve testing efficiency.
In prior art, a kind of conventional Web automated testing method is the automated testing method based on page elements manipulation, this method is by recording the means manipulation web page elements such as analysis, Code location, reach the object of analog subscriber operation, this kind of testing tool comprises Selenium, Watir etc.
But this method of testing Problems existing is: need to simulate complete user operation flow process, even if for tester and unconcerned part, also must realize in test case.Such as, for E-business applications, current needs tests third-party broker payment system, because payment system itself will be come into contacts with various external system, such as shopping website system, bank system of web etc., the operation of these internal system is that payment system need not be concerned about, for the test of payment system, the content that needs are concerned about is the core logic of himself inside, and and these external systems between interface, but in the test process of reality, tester often first will carry out many operations in these external systems, just can complete the preparation before test, to go to the logic testing branch of expection.
Visible, the existing automated testing method based on page elements manipulation, when being applied to fairly large Web test, often needs the part that waste a large amount of time and manpower are not paid close attention in test itself, thus causes overall 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 test method and device, and to improve testing efficiency, technical scheme is as follows:
The application provides a kind of Web system test method, comprising:
What receive test case performs triggering, and described test case is the test case for system under test (SUT);
According to the flow process running on non-system under test (SUT) comprised in described test case, select and the flow process wrapper corresponding to the described flow process running on non-system under test (SUT), and the flow process wrapper selected by utilizing forms cycle tests; In described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based carries out encapsulating;
Perform 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 formation cycle tests, also comprise:
Test parameter is added in cycle tests.
According to a kind of implementation of the application, describedly in cycle tests, add test parameter, comprising:
Utilize the test parameter defined in described test case, and/or the current result having completed test process and obtained, transmit test parameter to the operation in flow process wrapper.
According to a kind of implementation of the application, describedly in cycle tests, add test parameter, comprising:
For the operation stochastic generation test parameter in flow process wrapper.
According to a kind of implementation of the application, the described execution result by cycle tests is converted to the discernible information of system under test (SUT), comprising:
Create and be used for the logging status cookie of analog subscriber at system under test (SUT);
According to the execution result of cycle tests, obtain the user historical behavior information corresponding with created cookie.
According to a kind of implementation of the application, after the execution result of cycle tests is converted to the discernible information of system under test (SUT), also comprise:
Information after conversion is sent to system under test (SUT), to continue implementation of test cases.
The application also provides a kind of Web system proving installation, comprising:
Test case trigger module, perform triggering for what receive test case, described test case is the test case for system under test (SUT);
Cycle tests composition module, for according to the flow process running on non-system under test (SUT) comprised in described test case, select and the flow process wrapper corresponding to the described flow process running on non-system under test (SUT), and the flow process wrapper selected by utilizing forms cycle tests; In described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based carries out encapsulating;
Cycle tests execution module, for performing described cycle tests;
Execution result modular converter, for being converted to the discernible information of system under test (SUT) by the execution result of cycle tests.
According to a kind of implementation of the application, said apparatus also comprises:
Test parameter adds module, for adding test parameter in the cycle tests of described cycle tests composition module formation.
According to a kind of implementation of the application, described test parameter adds module, comprising:
Test parameter transfer unit, for utilizing the test parameter defined in described test case, and/or the current result having completed test process and obtained, transmit test parameter to the operation in flow process wrapper.
According to a kind of implementation of the application, described test parameter adds module, comprising:
Test parameter generation unit, for being the operation stochastic generation test parameter in flow process wrapper.
According to a kind of implementation of the application, described execution result modular converter, comprising:
Cookie creating unit, for creating for the logging status cookie of analog subscriber at system under test (SUT);
Information obtainment unit, for the execution result according to cycle tests, obtains the user historical behavior information corresponding with created cookie.
According to a kind of implementation of the application, described device also comprises:
Information sending module, after the execution result of cycle tests being converted to the discernible information of system under test (SUT) at described execution result modular converter, is sent to system under test (SUT), to continue implementation of test cases by the information after conversion.
The technical scheme that the embodiment of the present application provides, for the real needs of test, in advance the operating process that a large amount of and system under test (SUT) have nothing to do is encapsulated with the form of procotol, when needing to call these operations in test process, flow process wrapper is directly utilized to form cycle tests and perform, thus automatically can obtain data needed for test or state from other system, these and tested object to be had nothing to do the operation of Third party system to avoid or to reduce tester, improve overall testing efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present application or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, the accompanying drawing that the following describes is only some embodiments recorded in the application, for those of ordinary skill in the art, other accompanying drawing can also be obtained according to these accompanying drawings.
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 test method of the embodiment of the present application;
Fig. 3 is the second process flow diagram of the Web system test method of the embodiment of the present application;
Fig. 4 is the third process flow diagram of the Web system test method of the embodiment of the present application;
Fig. 5 is a kind of structural representation of the Web system proving installation of the embodiment of the present application;
Fig. 6 is the second structural representation of the Web system proving installation of the embodiment of the present application;
Fig. 7 is the third structural representation of the Web system proving installation of the embodiment of the present application.
Embodiment
First be described a kind of Web system test method that the embodiment of the present application provides, the method can comprise the following steps:
What receive test case performs triggering, and described test case is the test case for system under test (SUT);
According to the flow process running on non-system under test (SUT) comprised in described test case, select and the flow process wrapper corresponding to the described flow process running on non-system under test (SUT), and the flow process wrapper selected by utilizing forms cycle tests; In described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based carries out encapsulating;
Perform 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 carry out communicating 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 arranges for system under test (SUT) 200, and object realizes the automatic test to system under test (SUT) 200.Simultaneously, proving installation 100 can also carry out alternately with one or more non-system 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 triggers the operation needing to run on these non-systems under test (SUT) 300 in testing process, the request running these operations 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, thus data needed for obtaining system under test (SUT) 100 is tested or state.
In actual applications, proving installation 100 and system under test (SUT) 200 can be arranged in same entity, the such as server at system under test (SUT) 200 place; Proving installation 100 also can be the entity independent of system under test (SUT) 200, and such as, the employing one independently server of test terminal to system under test (SUT) 200 place is tested, and this test terminal can be directly connected with system under test (SUT) 200 or be connected by network.
In addition, in actual applications, system under test (SUT) 200 and each non-system under test (SUT) 300 generally correspond to the different system in network, such as, in E-business applications involved shopping website system, broker payment system, bank system of web etc., proving installation 100 is generally be connected by the non-system under test (SUT) 300 of network and each, and packaged in flow process wrapper be all operation for non-system under test (SUT), therefore these action needs encapsulate based on certain procotol.Conventional mode is based on HTTP (HyperTextTransferProtocol, HTML (Hypertext Markup Language)) operation is encapsulated, other mode can certainly be adopted to encapsulate, such as based on RPC (RemoteProcedureCallProtocol, remote procedure call protocol), the mode such as Socket communication carries out encapsulating etc., the embodiment of the present application does not need this to limit.
The Web system test method that the embodiment of the present application provides, for the real needs of test, in advance the operating process that a large amount of and system under test (SUT) have nothing to do is encapsulated with the form of procotol, when needing to call these operations in test process, flow process wrapper is directly utilized to form cycle tests and perform, thus automatically can obtain data needed for test or state from other system, these and tested object to be had nothing to do the operation of Third party system to avoid or to reduce tester, improve overall testing efficiency.
Technical scheme in the application is understood better in order to make those skilled in the art person, 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 is only some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, the every other embodiment that those of ordinary skill in the art obtain, all should belong to the scope of the application's protection.
Figure 2 shows that the schematic flow sheet of a kind of Web system test method that the application provides, the method can comprise the following steps:
S101, what receive test case performs triggering;
According to concrete testing requirement, the various test case input test devices that tester can will design, and trigger test device performs this test case.Certainly, test case content also can be stored in proving installation in advance, and in this case, tester in this step, simply need to proving installation and inputs a trigger condition, to trigger the execution of certain test case.In the Web system of reality, corresponding trigger condition can be click certain page elements of Web page, such as connection, button etc.
At present, in a lot of large-scale Web, often need to be undertaken cooperating realizing by multiple system, and from the angle of system development, the exploitation of these systems is also generally independently, and test is just for some systems wherein.Therefore, here mentioned test case, although the operation for multiple system may be related within it in holding, but the object 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 involved in test case is called non-system under test (SUT).
Such as, in E-business applications, a basic online transaction requirements of process relates to shopping website system, broker payment system, bank system of web three systems.These systems inherently to be developed by different mechanisms and are runed.Suppose whether the current test broker payment system wherein that needs normally can realize its function in online transaction flow process, then broker payment system is current system under test (SUT).On the other hand, in order to simulate a complete online transaction flow process, for in the test case of broker payment system, may need to comprise calling shopping website system and bank system of web, but 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 running on non-system under test (SUT) comprised in described test case, selects corresponding flow process wrapper, and the flow process wrapper selected by utilizing forms cycle tests;
In test case, define some flow processs, wherein a part is (hereinafter referred to as the category-A flow process) that only need to run at current system under test (SUT), and another part then needs to run on non-system under test (SUT) (hereinafter referred to as category-B flow process).For current test, what really pay close attention to is category-A flow process, but in order to allow system under test (SUT) reach the state can running category-A flow process, often needs first to perform one or more category-B flow process.That is, category-B flow process can be regarded as the first sequence condition running category-A flow process.
In the scheme that the application provides, for needing the flow process running on non-system under test (SUT), in advance one or more operation is encapsulated, forming some flow process wrappers is stored in proving installation, in test process, these flow process wrappers can directly be called, and when a flow process wrapper is called, the content order according to flow process wrapper is performed the various operations wherein defined by test macro.By calling these wrappers, first sequence condition can be realized fast, making system under test (SUT) reach the state can running category-A flow process.
Still be described for E-business applications, suppose that current is will test for payment system, but before the associative operation performing " payment ", first need to there is buying behavior, for example realizes buying behavior, need again to there is buyer user, seller user, commodity etc. further, and obtain the operation of these states, all will complete in shopping website system.Therefore, can according to the demand of reality, the operation these being run on shopping website system encapsulates.
Such as, 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 by commodity
The extent for multiplexing that this operates in various test due to " publishing commodity " is very high, therefore can directly kind operation be above encapsulated, and forms the wrapper of " publishing commodity ".When this wrapper is called, automatic sequence can performs above-mentioned 4 kinds of operations, and produce the ID of commodity, also namely be equivalent to the flow process completing " publishing commodity ".
Certainly, except " publishing commodity ", such as the flow process such as " buyer user buys commodity ", " buyer user's return of goods " can encapsulate respectively.The content of concrete encapsulation can be determined according to the extent for multiplexing in the business demand of practical application and test, and the embodiment of the present application does not need this to limit.
Because proving installation is connected with non-system under test (SUT) by network, and packaged in flow process wrapper be all operation for non-system under test (SUT), therefore these action needs encapsulate based on certain procotol, such as utilize the modes such as HTTP, RPC to encapsulate, the specific implementation of the embodiment of the present application to encapsulation does not need to limit.
Proving installation, after step S101 receives test case execution triggering, is first analyzed the content of test case.Determine which flow process only needs (i.e. category-A flow process), which flow process run at current system under test (SUT) to be need to run on non-system under test (SUT) (i.e. category-B flow process) for category-B flow process, then for category-B flow process, select the one or more flow process wrappers corresponding with it, if have selected multiple wrapper, then also should determine the execution sequence of these wrappers further, then utilize selected one or more flow process wrappers to form cycle tests.
S103, performs described cycle tests;
In this step, proving installation will perform cycle tests formed in step s 102, if contain multiple flow process wrapper in cycle tests, then after previous flow process wrapper is finished, its execution result will be passed to flow process wrapper below.
Such as, in a cycle tests, have invoked " seller user publishing commodity " and " buyer user buys commodity " two flow process wrappers, then after executing " seller user publishing commodity " this flow process wrapper, namely commodity ID is obtained, these commodity ID and seller user ID will be passed in the flow process wrapper of " buyer user buys commodity ", and namely " purchase " operation of follow-up execution is the operation carried out based on this seller user ID and these commodity ID.After " buyer user buys commodity " this flow process wrapper is finished, by generation 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, therefore, and the execution result of this Transaction Information i.e. whole cycle tests.
S104, is converted to the discernible information of system under test (SUT) by the execution result of cycle tests.
According to description above, operation involved in cycle tests, actually performs in non-system under test (SUT).And utilizing procotol to encapsulate various operation, the non-system under test (SUT) that can realize local proving installation triggering far-end performs various operation.After cycle tests is finished, execution result also can return local proving installation.
But, the execution result that non-system under test (SUT) returns can not by directly identify by system under test (SUT).Therefore in this step, also need to change execution result, to ensure that the follow-up flow process for system under test (SUT) can proceed.
All realize based on browser because Web application is general, cookie therefore can be utilized to realize the conversion of execution result.Cookie refers to that website is in order to distinguish user identity, carry out Process Tracking and the data be stored on user local terminal, in the embodiment of the present application, proving installation is after receiving the execution result that non-system under test (SUT) returns, first according to content and the follow-up test needs of execution result, 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 user's historical behavior information corresponding with created cookie, follow-up may be used for of these information passes to system under test (SUT), to continue the testing process on system under test (SUT).
Such as, the current Transaction Information having obtained shopping website system and returned, and need to test the payment function of the buyer, then can according to the ID of buyer user, create cookie, to simulate the logging status of buyer user in payment system, then, can be as required, other information in execution result are passed to payment system, these information can comprise such as dealing money, Payment Methods, seller user ID etc., that is, by before buyer user in the behavioural information of shopping website system, cookie corresponding to this buyer user passes to payment system, make payment system can identify this user before in purchase system, all carried out which behavior, currently be in any state, next step needs what does, etc..
Wherein, user's historical behavior information is passed to system under test (SUT), can to adopt before directly user profile being write create the mode of cookie, such as, after creating buyer user cookie, further using the historical behavior information of buyer user as parameter read-in cookie, like this, payment system just can identify the information for carrying out continuation payment flow process for this buyer user.Such as: who seller user to have reached transaction before this buyer user with, current needs pay how much amount of money, adopt which kind of modes of payments etc.So far, payment system has obtained the logging status of a user, and obtains the data such as payment, the modes of payments, payment object, meets the first sequence condition of testing payment function, follow-uply just can test payment function further.
The method of above-mentioned transmission user historical behavior information, compares the less situation of information being applicable to needs and transmitting.In order to avoid cookie file is excessive, in the another kind of implementation of the application, also URL (UniversalResourceLocator can be passed through, URL(uniform resource locator)) carry, user's historical behavior information is passed to system under test (SUT), in the process of transmission of information, needs to identify certain cookie's created before entrained information is aimed at, so just the behavioural information of user and user can be mapped, so that system under test (SUT) identifies.
Certainly, those skilled in the art it will also be appreciated that other the scheme for transmitting family historical behavior information, such as send to system under test (SUT) by simple GET, POST order carry information, these modes can independently use, can be combined with each other, the embodiment of the present application does not need this to limit yet.
Visible, the Web system test method that application the embodiment of the present application provides, in advance the operating process that a large amount of and system under test (SUT) have nothing to do is encapsulated with the form of procotol, when needing to call these operations in test process, flow process wrapper is directly utilized to form cycle tests and perform, thus automatically can obtain data needed for test or state from other system, these and tested object to be had nothing to do the operation of Third party system to avoid or to reduce tester, improve overall testing efficiency
Shown in Figure 3, in the another kind of implementation of the application, the Web system test method provided can comprise the following steps:
S101, what receive test case performs triggering;
S102, according to the flow process running on non-system under test (SUT) comprised in described test case, selects corresponding flow process wrapper, and the flow process wrapper selected by utilizing forms cycle tests;
S105, adds test parameter in cycle tests;
S103, performs described cycle tests;
S104, is converted to the discernible information of system under test (SUT) by the execution result of cycle tests.
Compared with previous embodiment, the present embodiment adds new step S105 between step S102 and step S103.Main below this step to be described in detail:
In test process, sometimes in order to realize the different routing of same testing process, such as, when testing buyer user's payment function, may need for specific buyer user, specific seller user, specific commodity etc., in this case, can be realized by the mode of adding test parameter in cycle tests.
Two kinds of implementations are had: a kind of mode is according to current existing data, transmits test parameter to the operation in flow process wrapper for cycle tests adds test parameter.Such as, the test parameter defined in test case is directly passed to the operation in flow process wrapper; Or before cycle tests performs, may complete some other testing process, the result obtained of these flow processs, also can pass to the operation in flow process wrapper.
The mode that another kind of cycle tests adds test parameter is, by the operation generation test parameter that proving installation is in flow process wrapper automatically, owing to being to realize the different routing to same testing process, therefore the mode of stochastic generation test parameter can be adopted here, such as, when each execution cycle tests, user ID, commodity ID etc. that stochastic generation is different, to realize test operation more comprehensively.
Correspondingly, in this enforcement, cycle tests performed in step S103 is construed as the cycle tests that with the addition of test parameter.Step S101, S102, S104 are then identical with previous embodiment, here no longer repeated description.
Shown in Figure 4, in another embodiment of the application, after step s 104, can further include following steps:
S106, is sent to system under test (SUT), to continue implementation of test cases by the information after conversion.
After step 104 is finished, in fact complete the preparation to the first sequence condition that system under test (SUT) is tested.Now can by the current state that obtains at non-system under test (SUT) or data send system under test (SUT) with the discernible form of system under test (SUT), to continue to perform the testing process operating in system under test (SUT), complete whole test
S107, carries out display translation to the information obtained after conversion.
That can understand test at any time to make tester carries out situation, after step 104 is finished, also the information after conversion can be carried out display translation, such as, play up with the form of Web page, checked for tester by browser.
It should be noted that, the sequencing that step S106 and S107 does not perform, the two can independently perform, and also can perform simultaneously.In addition, although it will be appreciated by persons skilled in the art that in the diagram and not shown, but the step S105 in an embodiment can also be comprised in the present embodiment.
Corresponding to embodiment of the method above, the application also provides a kind of Web system proving installation, this device correspondence and the proving installation 100 shown in Fig. 1, and shown in Figure 5, this device specifically can comprise with lower module:
Test case trigger module 110, perform triggering for what receive test case, described test case is the test case for system under test (SUT);
According to concrete testing requirement, the various test case input test devices that tester can will design, and trigger test device performs this test case.Certainly, test case content also can be stored in proving installation in advance, and in this case, tester is by inputting a trigger condition to test case trigger module 110, to trigger the execution of certain test case.In the Web system of reality, corresponding trigger condition can be click certain page elements of Web page, such as connection, button etc.
Here mentioned test case, although the operation for multiple system may be related within it in holding, but the object 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 involved in test case is called non-system under test (SUT).
Cycle tests composition module 120, for according to the flow process running on non-system under test (SUT) comprised in described test case, select and the flow process wrapper corresponding to the described flow process running on non-system under test (SUT), and the flow process wrapper selected by utilizing forms cycle tests; In described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based carries out encapsulating;
In test case, define some flow processs, wherein a part is (hereinafter referred to as the category-A flow process) that only need to run at current system under test (SUT), and another part then needs to run on non-system under test (SUT) (hereinafter referred to as category-B flow process).For current test, what really pay close attention to is category-A flow process, but in order to allow system under test (SUT) reach the state can running category-A flow process, often needs first to perform one or more category-B flow process.That is, category-B flow process can be regarded as the first sequence condition running category-A flow process.
In the scheme that the application provides, for needing the flow process running on non-system under test (SUT), in advance one or more operation is encapsulated, forming some flow process wrappers is stored in proving installation, in test process, these flow process wrappers can directly be called, and when a flow process wrapper is called, the content order according to flow process wrapper is performed the various operations wherein defined by test macro.By calling these wrappers, first sequence condition can be realized fast, making system under test (SUT) reach the state can running category-A flow process.
Because proving installation is connected with non-system under test (SUT) by network, and packaged in flow process wrapper be all operation for non-system under test (SUT), therefore these action needs encapsulate based on certain procotol, such as utilize the modes such as HTTP, RPC to encapsulate, the specific implementation of the embodiment of the present application to encapsulation does not need to limit.
First cycle tests composition module 120 is analyzed the content of test case.Determine which flow process only needs (i.e. category-A flow process), which flow process run at current system under test (SUT) to be need to run on non-system under test (SUT) (i.e. category-B flow process), then for category-B flow process, select the one or more flow process wrappers corresponding with it, if have selected multiple wrapper, then also should determine the execution sequence of these wrappers further, then utilize selected one or more flow process wrappers to form cycle tests.
Cycle tests execution module 130, for performing described cycle tests;
The effect of cycle tests execution module 130 performs the cycle tests be made up of cycle tests composition module 120, if contain multiple flow process wrapper in cycle tests, then after previous flow process wrapper is finished, its execution result will be passed to flow process wrapper below.
Execution result modular converter 140, for being converted to the discernible information of system under test (SUT) by the execution result of cycle tests.
According to description above, operation involved in cycle tests, actually performs in non-system under test (SUT).And utilizing procotol to encapsulate various operation, the non-system under test (SUT) that can realize local proving installation triggering far-end performs various operation.After cycle tests is finished, execution result also can return local proving installation.
But, the execution result that non-system under test (SUT) returns can not by directly identify by system under test (SUT).Therefore execution result modular converter 140 will be changed execution result, to ensure that the follow-up flow process for system under test (SUT) can proceed.
The Web system proving installation that the embodiment of the present application provides, be arrange for system under test (SUT), object realizes system under test (SUT) automatic test.Simultaneously, this device can also carry out alternately with one or more non-system under test (SUT), fundamental purpose triggers the operation needing to run on these non-systems under test (SUT) in testing process, the request running these operations is sent to corresponding non-system under test (SUT), and obtain the operation result of these operations from non-system under test (SUT), thus data needed for obtaining system under test (SUT) is tested or state.
In actual applications, Web system proving installation and system under test (SUT) can be arranged in same entity, such as the server at system under test (SUT) place; Also can be the entity independent of system under test (SUT), such as, the employing one independently server of test terminal to system under test (SUT) place be tested, and this test terminal can be directly connected with system under test (SUT) or be connected by network.In addition, generally, this Web system proving installation is connected by the non-system under test (SUT) of network and each.
The Web system proving installation that the embodiment of the present application provides, for the real needs of test, in advance the operating process that a large amount of and system under test (SUT) have nothing to do is encapsulated with the form of procotol, when needing to call these operations in test process, flow process wrapper is directly utilized to form cycle tests and perform, thus automatically can obtain data needed for test or state from other system, these and tested object to be had nothing to do the operation of Third party system to avoid or to reduce tester, improve overall testing efficiency.
Wherein, above-mentioned execution result modular converter 140, specifically can comprise:
Cookie creating unit, for creating cookie, with the logging status of analog subscriber at system under test (SUT);
Information obtainment unit, for the execution result according to cycle tests, obtains the user historical behavior information corresponding with created cookie.
Wherein, information obtainment unit can with before directly user profile being write create the mode of cookie, so that follow-up, user's historical behavior information is passed to system under test (SUT), also the mode can carried by URL or be carried by simple GET, POST order, passes to system under test (SUT) by user's historical behavior information.These modes can independently use, and also can be combined with each other, and the embodiment of the present application does not need this to limit.
Shown in Figure 6, the Web system proving installation that the application provides, can further include:
Test parameter adds module 150, for adding test parameter in the cycle tests of described cycle tests composition module 120 formation.To realize the different routing of same testing process
In a kind of embodiment of the application, configuration testing Parameter transfer unit in module 150 can be added at test parameter, for transmitting test parameter according to current existing data to the operation in flow process wrapper.Such as: utilize the test parameter defined in test case to transmit test parameter to the operation in flow process wrapper, or utilize the current result having completed test process and obtained, test parameter is transmitted to the operation in flow process wrapper, certainly, above-mentioned two kinds of modes also can be utilized to transmit test parameter to the operation in flow process wrapper simultaneously.
In a kind of embodiment of the application, configuration testing parameter generating unit in module 150 can be added at test parameter, for being the operation stochastic generation test parameter in flow process wrapper.
Shown in Figure 7, the Web system proving installation that the application provides, can also comprise:
Information sending module 160, after the execution result of cycle tests being converted to the discernible information of system under test (SUT) at described execution result modular converter 140, is sent to system under test (SUT), to continue implementation of test cases by the information after conversion.
Display translation module 170, after the execution result of cycle tests being converted to the discernible information of system under test (SUT) at described execution result modular converter 140, carries out display translation to the information obtained after conversion.
Wherein, above-mentioned information sending module 160 and display translation module 170, can individually be configured in Web system proving installation, also can be configured in Web system proving installation simultaneously, 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 in the figure 7 and not shown, but the test parameter that also can comprise in the present embodiment in an embodiment adds module 150, in the mode by adding test parameter in cycle tests, realize the different routing of same testing process.
For convenience of description, various unit is divided into describe respectively with function when describing above device.Certainly, the function of each unit can be realized in same or multiple software and/or hardware when implementing the application.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the mode that the application can add required general hardware platform by software and realizes.Based on such understanding, the technical scheme of the application can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in 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, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for device embodiment, because it is substantially similar to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.Device embodiment described above is only schematic, the wherein said unit illustrated as separating component or can may not be and physically separates, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of module wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
The application can describe in the general context of computer executable instructions, such as program module.Usually, program module comprises the routine, program, object, assembly, data structure etc. that perform particular task or realize particular abstract data type.Also can put into practice the application in a distributed computing environment, in these distributed computing environment, be executed the task by the remote processing devices be connected by communication network.In a distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium comprising memory device.
The above is only the embodiment of the application; it should be pointed out that for those skilled in the art, under the prerequisite not departing from the application's principle; can also make some improvements and modifications, these improvements and modifications also should be considered as the protection domain of the application.

Claims (12)

1. a Web system test method, is characterized in that, comprising:
What receive test case performs triggering, and described test case is the test case for system under test (SUT);
According to the flow process running on non-system under test (SUT) comprised in described test case, select and the flow process wrapper corresponding to the described flow process running on non-system under test (SUT), and the flow process wrapper selected by utilizing forms cycle tests; In described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based carries out encapsulating;
Perform 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 formation cycle tests, also comprises:
Test parameter is added in cycle tests.
3. method according to claim 2, is characterized in that, describedly in cycle tests, adds test parameter, comprising:
The test parameter defined in described test case is passed to the operation in flow process wrapper; And/or,
Complete result that test process obtains to have passed to operation in flow process wrapper as test parameter using current.
4. method according to claim 2, is characterized in that, describedly in cycle tests, adds test parameter, comprising:
For the operation stochastic generation test parameter in flow process wrapper.
5. method according to claim 1, is characterized in that, the described execution result by cycle tests is converted to the discernible information of system under test (SUT), comprising:
Create and be used for the logging status cookie of analog subscriber at system under test (SUT);
According to the execution result of cycle tests, obtain the user historical behavior information corresponding with created cookie.
6. method according to claim 1, is characterized in that, after the execution result of cycle tests is converted to the discernible information of system under test (SUT), also comprises:
Information after conversion is sent to system under test (SUT), to continue implementation of test cases.
7. a Web system proving installation, is characterized in that, comprising:
Test case trigger module, perform triggering for what receive test case, described test case is the test case for system under test (SUT);
Cycle tests composition module, for according to the flow process running on non-system under test (SUT) comprised in described test case, select and the flow process wrapper corresponding to the described flow process running on non-system under test (SUT), and the flow process wrapper selected by utilizing forms cycle tests; In described flow process wrapper, comprise the operation for non-system under test (SUT) that agreement Network Based carries out encapsulating;
Cycle tests execution module, for performing described cycle tests;
Execution result modular converter, for being converted to the discernible information of system under test (SUT) by the execution result of cycle tests.
8. device according to claim 7, is characterized in that, also comprises:
Test parameter adds module, for adding test parameter in the cycle tests of described cycle tests composition module formation.
9. device according to claim 8, is characterized in that, described test parameter adds module, comprising:
Test parameter transfer unit, for the test parameter defined in described test case being passed to the operation in flow process wrapper, and/or has completed result that test process obtains to have passed to operation in flow process wrapper as test parameter using current.
10. device according to claim 8, is characterized in that, described test parameter adds module, comprising:
Test parameter generation unit, for being the operation stochastic generation test parameter in flow process wrapper.
11. devices according to claim 7, is characterized in that, described execution result modular converter, comprising:
Cookie creating unit, for creating for the logging status cookie of analog subscriber at system under test (SUT);
Information obtainment unit, for the execution result according to cycle tests, obtains the user historical behavior information corresponding with created cookie.
12. devices according to claim 7, is characterized in that, described device also comprises:
Information sending module, after the execution result of cycle tests being converted to the discernible information of system under test (SUT) at described execution result modular converter, is sent to system under test (SUT), to continue implementation of test cases by the information after conversion.
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.7 2011-06-28
CN201110176437 2011-06-28
CN2011101764377 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 CN102855182A (en) 2013-01-02
CN102855182B true 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)

Families Citing this family (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
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
CN112783788B (en) * 2021-02-05 2023-12-05 北京同邦卓益科技有限公司 Test system, 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系统测试技术研究;梁红洲;《科技广场》;20070101(第1期);全文 *

Also Published As

Publication number Publication date
CN102855182A (en) 2013-01-02

Similar Documents

Publication Publication Date Title
CN102855182B (en) A kind of Web system test method and device
US11068383B2 (en) Service oriented architecture infrastructure for business process verification and systems integrated testing
US7992127B2 (en) Method and system of encapsulating web site transactions for computer-aided generation of web services
CN110032511A (en) A kind of interface test method and interface testing equipment
CN102244594A (en) Network emulation in manual and automated testing tools
US9978047B2 (en) Integrating payment aggregators with e-commerce platform
US8689186B2 (en) Execution of a BPEL process by simulating partners
JP5751561B2 (en) Application store system and development method using the application store system
CN109684571A (en) A kind of collecting method and device, storage medium
CN109034962A (en) A kind of information interacting method and system
Endo et al. Web services composition testing: a strategy based on structural testing of parallel programs
CN108572912A (en) A kind of continuous integrating method, apparatus, electronic equipment and storage medium
Hellerstein et al. ETE: A customizable approach to measuring end-to-end response times and their components in distributed systems
Royo et al. Towards blockchain-based Internet of Things systems for energy smart contracts with constrained hardware devices and cloud infrastructure
Meng et al. An ad-hoc workflow system architecture based on mobile agents and rule-based processing
KR20180122111A (en) Service and method for providing performance of event planning online with offline
CN112559278B (en) Method and device for acquiring operation data
Poorazizi et al. Evaluation ofWeb Processing Service Frameworks
US8046678B2 (en) Employing partial evaluation to provide a page
Pop et al. A cyber-physical systems oriented platform using web services
Yu Applying software wrapping on performance monitoring of web services
CN108932785A (en) A kind of lottery ticket micro services call method, system and mobile intelligent terminal
Probert et al. CORBA-based e-commerce application testing architecture
Oliha Assessing the performability of a fault tolerant architecture for web services solution using software fault injection
CN101990000A (en) method and system for accessing software sales platform

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