CN104133764A - Response test method and response test device of application program interface - Google Patents

Response test method and response test device of application program interface Download PDF

Info

Publication number
CN104133764A
CN104133764A CN201310162574.4A CN201310162574A CN104133764A CN 104133764 A CN104133764 A CN 104133764A CN 201310162574 A CN201310162574 A CN 201310162574A CN 104133764 A CN104133764 A CN 104133764A
Authority
CN
China
Prior art keywords
application program
test
test case
response events
response
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
CN201310162574.4A
Other languages
Chinese (zh)
Other versions
CN104133764B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310162574.4A priority Critical patent/CN104133764B/en
Publication of CN104133764A publication Critical patent/CN104133764A/en
Application granted granted Critical
Publication of CN104133764B publication Critical patent/CN104133764B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a response test method and a response test device of an application program interface. The method comprises the following steps: a running application program is triggered; a test case for executing the application program is triggered in the running application program; a response event packaged in the test case runs through the execution of the test case, so that the input operation of an application interface is simulated, and the user operation is responded through the operation of the response event; and the response event is an event triggered when the application program interface monitors the input operation. The device comprises a program triggering module, a test execution module and an event running module. When the method and the device provided by the invention are adopted, the response of the application program to the input operation in the interface can be tested in a Windows Phone operating system platform.

Description

The response test method and apparatus of Application Program Interface
Technical field
The present invention relates to computer testing technology, particularly relate to a kind of response test method and apparatus of Application Program Interface.
Background technology
In the operating system platform of electronic equipment operation, usually by analog subscriber, operate the test that realizes application program.For example, in analog subscriber application programs interface, the operation of control or the clicking operation of user on Application Program Interface come the response of application programs to test.
In operating system platform for realizing the instrument black box automated test tool normally of user's input operation simulation.Yet, Windows Phone operating system platform is not supported any black box automated test tool, and the white-box testing instrument of supporting also cannot be realized user's operation simulation, and then the response that Windows Phone operating system platform cannot test application be carried out the input operation of user in interface.
Summary of the invention
Based on this, be necessary the technical matters of the response cannot test application the input operation of user in interface carried out for Windows Phone operating system platform, a kind of response test method of Application Program Interface that can the response that test application carries out the input operation in interface in Windows Phone operating system platform is provided.
In addition, be also necessary to provide a kind of response test device of Application Program Interface that can the response that test application carries out the input operation in interface in Windows Phone operating system platform.
A response test method for Application Program Interface, comprises the steps:
Triggering runs application;
In the application program of described operation, trigger the test case of carrying out described application program;
Execution by described test case moves the response events encapsulating in described test case, the input operation of application interface is simulated and operation by described response events responds described user and operates;
Described response events is the event that Application Program Interface triggers while listening to input operation.
A response test device for Application Program Interface, comprising:
Procedure triggers module, runs application for triggering;
Testing execution module, triggers the test case of carrying out described application program for the application program in described operation;
Event operation module, the response events encapsulating for the execution operation test case by test case, simulates and operation by described response events responds described user and operates with the user's operation to application interface input;
Described response events is the event that Application Program Interface triggers while listening to input operation.
The response test method and apparatus of above-mentioned Application Program Interface, triggering runs application, in the application program of this operation, trigger the test case of carrying out this application program, and then the response events encapsulating in the execution operation test case by test case, the input operation of application interface is simulated and operation response user by response events operates, because the response events of operation is the event that Application Program Interface triggers while listening to input operation, therefore, simulation and the response test to input operation of user's input operation in Application Program Interface by the operation of response events, have been realized, and then the response that Windows Phone operating system platform also can test application be carried out the input operation in interface.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the response test method of Application Program Interface in an embodiment;
Fig. 2 is the process flow diagram of the response test method of Application Program Interface in another embodiment;
Fig. 3 is the structural representation of the response test device of Application Program Interface in an embodiment;
Fig. 4 is the structural representation of the response test device of Application Program Interface in another embodiment.
Embodiment
As shown in Figure 1, in one embodiment, a kind of response test method of Application Program Interface, comprises the steps:
Step S110, triggering runs application.
In the present embodiment, the application program that triggers operation is any application being installed in Windows Phone operating system platform.For example, triggering the application program of moving can be browser, JICQ etc.
Step S130 triggers the test case of executive utility in the application program of operation.
In the present embodiment, the test case of application program is the document arranging according to the testing requirement of application program, for aspects such as some function of application programs, stability, tests.The required test of carrying out of application program is normally diversified, and therefore, the test case of application program can be a plurality of.
Step S150, the response events encapsulating in the execution operation test case by test case, to simulate the input operation of application interface and operation by response events responds described user and operates.
In the present embodiment, response events is the event that Application Program Interface triggers while listening to input operation.The input operation that Application Program Interface listens to refers to the operation that user triggers in Application Program Interface, for example, and operation, clicking operation and the slide etc. of the new Bookmark triggering in the browser of operation.
In the application program of operation, the operation interface providing for user is Application Program Interface, Application Program Interface is as UI(UserInterface, user interface) layer receives the various operations of user's input, and then application program is responded user's input operation by triggering corresponding response events.
But, due to Windows Phone operating system platform cannot analog subscriber various input operations, therefore, to cast aside UI layer, and the response events directly triggering by input operation is realized the simulation of input operation, due to input operation be with certain response events one to one, thereby also can reach the object to the response of user's input operation in test application interface by response events.
Each test case has all encapsulated at least one response events, that is to say, each test case can be all that a response events encapsulation forms, and also can combine encapsulation by a plurality of response events and form, and this will set neatly according to the demand of test.
The triggering of a response events has been equivalent to simulate user's one or more input operation at Application Program Interface, for example, one response events can be equivalent to input in Application Program Interface the operation of clicking certain button, can be to be also equivalent to the operation that user has inputted button click 1 and then button click 2 in Application Program Interface.
In the response test method of above-mentioned Application Program Interface, by response events corresponding to the input operation in Application Program Interface, realize simulation and the response test of input operation, avoided the restriction of operating system platform, make the operating system platform of which kind of type no matter all can realize simulation and the response test of input operation, improved widely the dirigibility of test.
In one embodiment, after above-mentioned steps S130, the response test method of this Application Program Interface also comprises:
Be written into the test page of application program, relevant test case and/or the test set of response events triggering when listening to input operation to application program is shown in test page.
In the present embodiment, in the application program of operation, be written into test page, all test cases of this application program and/or test set are shown in test page, by test page, can check the current test of carrying out, so that carry out various input operation simulations and response test by test page application programs interface.
Wherein, test set has encapsulated a plurality of test cases, and to adapt to the various testing requirements of not passing through, and then input operation that can test simulation user realizes the different events such as scene changes.
In one embodiment, comprising of above-mentioned steps S130:
Obtain test case selected in test page, and in the application program of operation, trigger and carry out selected test case.
In the present embodiment, the tester of application program can trigger to the arbitrary test case in test page selected operation, now, will obtain the selected test case of user, to trigger in the application program in operation, carries out this test case.
In another embodiment, above-mentioned steps S130 also comprises:
Obtain test set selected in test page, and in the application program of operation, trigger and carry out selected test set, to trigger, carry out the test case encapsulating in test set.
In the present embodiment, the tester of application program also can trigger to the arbitrary test set in test page selected operation, now, will obtain the selected test set of user, to trigger and to carry out this test set in the application program in operation, and then carry out the test case that this test set comprises.
As shown in Figure 2, in one embodiment, before above-mentioned steps S130, the response test method of this Application Program Interface also comprises the steps:
Step S210, obtains the response events collection of application program, and this response events collection comprises the response events triggering when Application Program Interface listens to user and operates.
In the present embodiment, the inevitable unique correspondence of arbitrary input operation occurring in Application Program Interface one or more response events, for example, the operation of new Bookmark that Application Program Interface occurs is the inevitable corresponding response events of new Bookmark also, therefore, can obtain the response events collection of application program, this response events collection has comprised that the user who occurs in application interface operates corresponding response events.
Further, response events set essence is the formed set of a plurality of event functions, each response events is all corresponding a certain event functions.
Step S230, encapsulates the test case of the program of being applied to the concentrated response events of response events.
In the present embodiment, according to the testing requirement in application program, one or more response events that response events is concentrated encapsulate a test case of the program that can be applied, and between the packaged test case obtaining, can comprise the response events of repetition according to demand.
Below in conjunction with a specific embodiment, elaborate the response test method of above-mentioned Application Program Interface.In this embodiment, application program be take browser as example, that is to say, browser is application program to be tested, and the response of various input operations in browser interface is tested.
Obtain in advance the response events collection of browser, this response events collection will comprise the right response events of all input operations in browser interface, the response events that response events collection is comprised encapsulates to obtain one or more test cases, in addition, also can according to demand a plurality of test cases be encapsulated as to test set.
After triggering running browser, will in browser, load test page, now, the personnel that browser is tested can check all test cases and/or test set from test page.
Obtain the selected operation of test case in test page and/or test set, and trigger and carry out selected test case and/or test set, for example, the test case that current triggering is carried out has comprised the event of opening all websites in the browser navigation page.
Execution along with test case, the event of all websites in the unlatching browser navigation page that test case comprises will correspondingly be moved, and then all websites in the automatically unlatching navigation page, and generate corresponding daily record data, the personnel of test can complete automatic test by checking browser and deriving daily record data, no longer need to spend manpower and remove to click each website, saved testing cost, and improved testing efficiency.
As shown in Figure 3, in one embodiment, a kind of response test device of Application Program Interface, comprises procedure triggers module 110, testing execution module 130 and event operation module 150.
Procedure triggers module 110, runs application for triggering.
In the present embodiment, the application program that procedure triggers module 110 triggers operation is any application being installed in Windows Phone operating system platform.For example, triggering the application program of moving can be browser, JICQ etc.
Testing execution module 130, triggers the test case of executive utility for the application program in operation.
In the present embodiment, the test case of application program is the document arranging according to the testing requirement of application program, for aspects such as some function of application programs, stability, tests.The required test of carrying out of application program is normally diversified, and therefore, the test case of application program can be a plurality of.
Event operation module 150, the response events encapsulating for the execution operation test case by test case, simulates and operation response user by response events operates with user's operation of application programs interface input.
In the present embodiment, response events is the event that Application Program Interface triggers while listening to input operation.The input operation that Application Program Interface listens to refers to the operation that user triggers in Application Program Interface, for example, and operation, clicking operation and the slide etc. of the new Bookmark triggering in the browser of operation.
In the application program of operation, the operation interface providing for user is Application Program Interface, Application Program Interface is as UI(UserInterface, user interface) layer receives the various operations of user's input, and then application program is responded user's input operation by triggering corresponding response events.
But, due to Windows Phone operating system platform cannot analog subscriber various input operations, therefore, to cast aside UI layer, and the response events directly triggering by input operation is realized the simulation of input operation, due to input operation be with certain response events one to one, thereby event operation module 150 also can reach the object to the response of user's input operation in test application interface by response events.
Each test case has all encapsulated at least one response events, that is to say, each test case can be all that a response events encapsulation forms, and also can combine encapsulation by a plurality of response events and form, and this will set neatly according to the demand of test.
The triggering of a response events has been equivalent to simulate user's one or more input operation at Application Program Interface, for example, one response events can be equivalent to input in Application Program Interface the operation of clicking certain button, can be to be also equivalent to the operation that user has inputted button click 1 and then button click 2 in Application Program Interface.
In the response test device of above-mentioned Application Program Interface, by response events corresponding to the input operation in Application Program Interface, realize simulation and the response test of input operation, avoided the restriction of operating system platform, make the operating system platform of which kind of type no matter all can realize simulation and the response test of input operation, improved widely the dirigibility of test.
In one embodiment, the response test device of above-mentioned Application Program Interface also comprises and insmoding.
Insmod for being written into the test page of application program, relevant test case and/or the test set of response events triggering when listening to input operation to Application Program Interface is shown in test page.
In the present embodiment, insmod and be written into test page in the application program of operation, all test cases of this application program and/or test set are shown in test page, by test page, can check the current test of carrying out, so that carry out various input operation simulations and response test by test page application programs interface.
Wherein, test set has encapsulated a plurality of test cases, and to adapt to the various testing requirements of not passing through, and then input operation that can test simulation user realizes the different events such as scene changes.
In one embodiment, above-mentioned testing execution module 130 is also for obtaining the selected test case of test page, and selected test case is carried out in triggering in the application program of operation.
In the present embodiment, the tester of application program can trigger to the arbitrary test case in test page selected operation, and now, testing execution module 130 will be obtained the selected test case of user, to trigger in the application program in operation, carries out this test case.
In another embodiment, above-mentioned testing execution module 130 is also for obtaining the selected test set of test page, and selected test set is carried out in triggering in the application program of operation, to trigger, carries out the test case encapsulating in test set.
In the present embodiment, the tester of application program also can trigger to the arbitrary test set in test page selected operation, now, testing execution module 130 will be obtained the selected test set of user, to trigger and to carry out this test set in the application program in operation, and then carry out the test case that this test set comprises.
As shown in Figure 4, in another embodiment, the response test device of above-mentioned Application Program Interface also comprises event set acquisition module 210 and package module 230.
Event set acquisition module 210, for obtaining the response events collection of application program, this response events collection comprises the response events triggering when Application Program Interface listens to user and operates.
In the present embodiment, the inevitable unique correspondence of arbitrary input operation occurring in Application Program Interface one or more response events, for example, the operation of new Bookmark that Application Program Interface occurs is the inevitable corresponding response events of new Bookmark also, therefore, event set acquisition module 210 can obtain the response events collection of application program, and this response events collection has comprised that the user who occurs in application interface operates corresponding response events.
Further, response events set essence is the formed set of a plurality of event functions, each response events is all corresponding a certain event functions.
Package module 230, for encapsulating the test case of the program of being applied to the concentrated response events of response events.
In the present embodiment, according to the testing requirement in application program, one or more response events that package module 230 is concentrated response events encapsulate a test case of the program that can be applied, and between the packaged test case obtaining, can comprise the response events of repetition according to demand.
The response test method and apparatus of above-mentioned Application Program Interface, triggering runs application, in the application program of this operation, trigger the test case of carrying out this application program, and then the response events encapsulating in the execution operation test case by test case, the input operation of application interface is simulated and operation response user by response events operates, because the response events of operation is the event that Application Program Interface triggers while listening to input operation, therefore, simulation and the response test to input operation of user's input operation in Application Program Interface by the operation of response events, have been realized, and then the response that Windows Phone operating system platform also can test application be carried out the input operation in interface.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, to come the hardware that instruction is relevant to complete by computer program, described program can be stored in a computer read/write memory medium, this program, when carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (10)

1. a response test method for Application Program Interface, comprises the steps:
Triggering runs application;
In the application program of described operation, trigger the test case of carrying out described application program;
Execution by described test case moves the response events encapsulating in described test case, the input operation of application interface is simulated and operation by described response events responds described user and operates;
Described response events is the event that Application Program Interface triggers while listening to input operation.
2. method according to claim 1, is characterized in that, before the step of described test case that trigger to carry out described application program in the application program of described operation, described method also comprises:
Be written into the test page of described application program, relevant test case and/or the test set of response events triggering when listening to input operation to Application Program Interface is shown in test page.
3. method according to claim 2, is characterized in that, the described step that triggers the test case of carrying out described application program in the application program of described operation comprises:
Obtain test case selected in test page, and in the application program of described operation, trigger and carry out described selected test case.
4. method according to claim 2, is characterized in that, the described step that triggers the test case of carrying out described application program in the application program of described operation also comprises:
Obtain test set selected in described test page, and in the application program of described operation, trigger and carry out described selected test set, to trigger, carry out the test case encapsulating in described test set.
5. method according to claim 1, is characterized in that, before the step of described test case that trigger to carry out described application program in the application program of described operation, described method also comprises:
Obtain the response events collection of described application program, described response events collection comprises the response events triggering when described Application Program Interface listens to user and operates;
The concentrated response events of described response events is encapsulated to the test case that obtains described application program.
6. a response test device for Application Program Interface, is characterized in that, comprising:
Procedure triggers module, runs application for triggering;
Testing execution module, triggers the test case of carrying out described application program for the application program in described operation;
Event operation module, the response events encapsulating for the execution operation test case by test case, simulates and operation by described response events responds described user and operates with the user's operation to application interface input;
Described response events is the event that Application Program Interface triggers while listening to input operation.
7. device according to claim 6, is characterized in that, described device also comprises:
Insmod, for being written into the test page of described application program, relevant test case and/or the test set of response events triggering when listening to input operation to Application Program Interface is shown in test page.
8. device according to claim 7, is characterized in that, described testing execution module is also for obtaining the selected test case of test page, and described selected test case is carried out in triggering in the application program of described operation.
9. device according to claim 7, it is characterized in that, described testing execution module is also for obtaining the selected test set of described test page, and described selected test set is carried out in triggering in the application program of described operation, to trigger, carries out the test case encapsulating in described test set.
10. device according to claim 6, is characterized in that, described device also comprises:
Event set acquisition module, for obtaining the response events collection of described application program, described response events collection comprises the response events triggering when described Application Program Interface listens to user and operates;
Package module, for encapsulating to the concentrated response events of described response events the test case that obtains described application program.
CN201310162574.4A 2013-05-03 2013-05-03 The response test method and apparatus of Application Program Interface Active CN104133764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310162574.4A CN104133764B (en) 2013-05-03 2013-05-03 The response test method and apparatus of Application Program Interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310162574.4A CN104133764B (en) 2013-05-03 2013-05-03 The response test method and apparatus of Application Program Interface

Publications (2)

Publication Number Publication Date
CN104133764A true CN104133764A (en) 2014-11-05
CN104133764B CN104133764B (en) 2018-01-23

Family

ID=51806447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310162574.4A Active CN104133764B (en) 2013-05-03 2013-05-03 The response test method and apparatus of Application Program Interface

Country Status (1)

Country Link
CN (1) CN104133764B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104820638A (en) * 2015-04-17 2015-08-05 中国电子科技集团公司第四十一研究所 Embedded whole machine automatic testing method
CN105138462A (en) * 2015-09-24 2015-12-09 武汉泰世达科技有限公司 Testing software integration frame and method for processing testing data
CN105718353A (en) * 2016-01-18 2016-06-29 深圳市同创国芯电子有限公司 Testing method, apparatus and system for graphic interface application
CN107085553A (en) * 2017-03-07 2017-08-22 深圳国泰安教育技术股份有限公司 A kind of input frame method of testing and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025686A (en) * 2007-03-22 2007-08-29 中兴通讯股份有限公司 Automation test system and test script generating and operating method
CN101339534A (en) * 2008-06-17 2009-01-07 金蝶软件(中国)有限公司 Software test apparatus and test method
CN101526919A (en) * 2009-04-29 2009-09-09 福建星网锐捷网络有限公司 Method for generating script files to test Web application software and device thereof
US20100146420A1 (en) * 2008-12-10 2010-06-10 Microsoft Corporation Gui testing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025686A (en) * 2007-03-22 2007-08-29 中兴通讯股份有限公司 Automation test system and test script generating and operating method
CN101339534A (en) * 2008-06-17 2009-01-07 金蝶软件(中国)有限公司 Software test apparatus and test method
US20100146420A1 (en) * 2008-12-10 2010-06-10 Microsoft Corporation Gui testing
CN101526919A (en) * 2009-04-29 2009-09-09 福建星网锐捷网络有限公司 Method for generating script files to test Web application software and device thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
未知: "使用Windows Mobile Test Framework进行Windows Mobile程序的自动化测试", 《HTTP://WWW.51TESTING.COM/HTML/80/N-17180.HTML》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104820638A (en) * 2015-04-17 2015-08-05 中国电子科技集团公司第四十一研究所 Embedded whole machine automatic testing method
CN105138462A (en) * 2015-09-24 2015-12-09 武汉泰世达科技有限公司 Testing software integration frame and method for processing testing data
CN105138462B (en) * 2015-09-24 2017-11-21 武汉泰世达科技有限公司 A kind of processing method of test software integrated framework and test data
CN105718353A (en) * 2016-01-18 2016-06-29 深圳市同创国芯电子有限公司 Testing method, apparatus and system for graphic interface application
CN107085553A (en) * 2017-03-07 2017-08-22 深圳国泰安教育技术股份有限公司 A kind of input frame method of testing and device
CN107085553B (en) * 2017-03-07 2020-05-19 深圳国泰安教育技术有限公司 Input box testing method and device

Also Published As

Publication number Publication date
CN104133764B (en) 2018-01-23

Similar Documents

Publication Publication Date Title
CN110442511B (en) Visual embedded point testing method and device
CN102156760B (en) Saber-based circuit failure simulation analyzing method
CN104407980A (en) Mobile application automated testing device and method
CN107133174A (en) Test case code automatically generating device and method
CN104216811A (en) Log collecting method and system of application program
CN104699598A (en) Automatic testing method, device, equipment and system
CN102819451A (en) Method and system for calling browser plug-in
CN105095062A (en) Application testing method and system
WO2015012814A1 (en) Automated generation of scripted and manual test cases
CN104166619A (en) Performance measuring method and terminal of application program
CN104133764A (en) Response test method and response test device of application program interface
CN105320595A (en) Application test method and device
CN104090259A (en) Automatic gauge test platform and method based on Python script
CN104731698A (en) Abnormal test case automatic generation processing method and device based on automatic tests
CN102375103B (en) Electronic product test device and method
CN102707712B (en) Electronic equipment fault diagnosis method and system
CN105515883A (en) Test method and system
CN109684571A (en) A kind of collecting method and device, storage medium
CN104915297A (en) APP electricity consumption automatic test method for android device
CN103631708A (en) Program testing method and program testing device
CN105224457B (en) A kind of test frame implementation method and device
CN106778264A (en) The application program analysis method and analysis system of a kind of mobile client
CN105279092A (en) Software testing method and apparatus
CN106557411B (en) Method and system for testing Hybrid application in Android system
CN117370203A (en) Automatic test method, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant