CN105630674A - Test method and device capable of aiming at interface - Google Patents

Test method and device capable of aiming at interface Download PDF

Info

Publication number
CN105630674A
CN105630674A CN201510958963.7A CN201510958963A CN105630674A CN 105630674 A CN105630674 A CN 105630674A CN 201510958963 A CN201510958963 A CN 201510958963A CN 105630674 A CN105630674 A CN 105630674A
Authority
CN
China
Prior art keywords
interface
application
tested
test
test case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510958963.7A
Other languages
Chinese (zh)
Inventor
王军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510958963.7A priority Critical patent/CN105630674A/en
Publication of CN105630674A publication Critical patent/CN105630674A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Abstract

The embodiment of the invention provides a test method and device capable of aiming at an interface. The method comprises the following steps: calling a test case; calling the interface of an application to be tested, and obtaining the interface information of the application to be tested; and when the interface succeeds in returning, operating through the test case in the interface of the application to be tested according to the interface information. The embodiment of the invention lowers test complexity, in addition, an automatic test is realized through the interface information fed back from the application to be tested, a manual test is avoided, an error probability is lowered, and test efficiency is improved.

Description

A kind of method of testing for interface and device
Technical field
The present invention relates to technical field of measurement and test, particularly relate to a kind of method of testing for interface and a kind of test device for interface.
Background technology
Along with the extensive use of smart machine, step into the mobile Internet epoch now.
For strengthening the function of system, the quantity of current application exponentially formula increases, and the safety of application, reliability, functional etc. has been affected by very big concern and challenge, and the application automatic test on different devices for magnanimity also just seems abnormal important.
Test is to ensure that the important means of application quality, by testing the requirement that can verify whether the indexs such as the function of application, performance, reliability meet regulation, the mistake in application can be found to greatest extent, thus reducing the mistake left in application by system, tight test.
The Application comparison such as input method as shown in Figure 1 are special, and its user interface is not realize with standard control, but by the mode of pinup picture from painting interface.
Although part interface control can obtain the position of button, such as 1 to 9 button by coordinates computed, empty key, enter key etc.
But, the candidate character strings such as such as " hello ", " you number ", " you dare " is dynamically change, depends on the key assignments of input, cannot pass through to calculate to obtain.
It addition, the mode of coordinates computed also needs to consider the situation of different resolution, more complicated, it is easy to make mistakes.
As can be seen here, automatic test cannot realize, and can only rely on tester and be performed manually by test.
But, can there is substantial amounts of repetition, uninteresting operation in manual test, it is easy to makeing mistakes, testing efficiency is low.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide a kind of a kind of method of testing for interface and a kind of test device for interface accordingly overcoming the problems referred to above or solving the problems referred to above at least in part.
According to one aspect of the present invention, it is provided that a kind of method of testing for interface, including:
Call test case;
Call the interface of application to be tested, obtain the interface information of application to be tested;
When described interface returns successfully, it is operated in the interface of application to be tested according to described interface information by described test case.
Alternatively, described by including that described test case is operated in the interface of application to be tested according to described interface information:
In described interface information, the interface element specified is searched by described test case;
The operation that described interface element is specified.
Alternatively, described interface information includes interface element text, interface element coordinate;
The described step being searched the interface element specified by described test case in described interface information is included:
Extract test object text in described test case;
Search the interface element text with described object text matches;
The described step to the operation that described interface element is specified includes:
The interface element coordinate that described interface element text is corresponding carries out the operation specified.
Alternatively, also include:
Obtain the operating result after being operated in the interface of application to be tested;
Relatively described operating result and the expected results in described test case, it is thus achieved that test result.
Alternatively, also include:
Test report is generated for described test result.
Alternatively, also include:
When described interface returns unsuccessfully, generate test report.
Alternatively, before the interface that calls application to be tested described, the step of interface information obtaining application to be tested, described method also includes:
It is operated in the interface of application to be tested by described test case.
Alternatively, the interface of application to be tested is generate based on IDL;
Communicated by interprocess communication and application to be tested;
The operation carried out in the interface of application to be tested includes following one or more:
Click, length is pressed, slip.
According to a further aspect in the invention, it is provided that a kind of test device for interface, including:
Test case calling module, is suitable to call test case;
Application interface calling module, is suitable to call the interface of application to be tested, obtain the interface information of application to be tested;
Test module, is suitable to, when described interface returns successfully, be operated according to described interface information by described test case in the interface of application to be tested.
Alternatively, described test module is further adapted for:
In described interface information, the interface element specified is searched by described test case;
The operation that described interface element is specified.
Alternatively, described interface information includes interface element text, interface element coordinate;
Described test module is further adapted for:
Extract test object text in described test case;
Search the interface element text with described object text matches;
Described test module is further adapted for:
The interface element coordinate that described interface element text is corresponding carries out the operation specified.
Alternatively, also include:
Operating result acquisition module, is suitable to obtain the operating result after being operated in the interface of application to be tested;
Test result obtains module, is suitable to operating result described in comparison and the expected results in described test case, it is thus achieved that test result.
Alternatively, also include:
First test report generation module, is suitable to generate test report for described test result.
Alternatively, also include:
Second test report generation module, is suitable to when described interface returns unsuccessfully, generates test report.
Alternatively, also include:
Interface operation module, is suitable to be operated in the interface of application to be tested by described test case.
Alternatively, the interface of application to be tested is generate based on IDL;
Communicated by interprocess communication and application to be tested;
The operation carried out in the interface of application to be tested includes following one or more:
Click, length is pressed, slip.
The embodiment of the present invention calls the interface of application to be tested, embodiment obtains the interface information of its interface element and carries out interface detection, guarantee can obtain the value of the dynamically interface element of change in real time, owing to being the interface information of application to be tested self feedback, its coordinate need not be calculated, and then the problem avoiding resolution, reduce the complexity of test, in addition, automatic test is achieved by testing the interface information of application self feedback, avoid manual test, reduce the probability made mistakes, improve the efficiency of test.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, and can be practiced according to the content of description, and in order to above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit those of ordinary skill in the art be will be clear from understanding. Accompanying drawing is only for illustrating the purpose of preferred implementation, and is not considered as limitation of the present invention. And in whole accompanying drawing, it is denoted by the same reference numerals identical parts. In the accompanying drawings:
Fig. 1 illustrates the exemplary plot of a kind of interface of input method;
Fig. 2 illustrates the flow chart of steps of a kind of according to an embodiment of the invention method of testing embodiment 1 for interface;
Fig. 3 illustrates the structured flowchart of a kind of according to an embodiment of the invention test;
Fig. 4 illustrates the flow chart of steps of a kind of according to an embodiment of the invention method of testing embodiment 2 for interface;
Fig. 5 illustrates the structured flowchart of a kind of according to an embodiment of the invention test device embodiment 1 for interface; And
Fig. 6 illustrates the structured flowchart of a kind of according to an embodiment of the invention test device embodiment 2 for interface.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings. Although accompanying drawing showing the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should do not limited by embodiments set forth here. On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
With reference to Fig. 2, it is shown that the flow chart of steps of a kind of according to an embodiment of the invention method of testing embodiment 1 for interface, specifically may include steps of:
Step 201, calls test case;
In embodiments of the present invention, the interface information being obtained application to be tested by interface carries out UI (user interface, UserInterface) test, it is possible to cover multiple test platform, such as Android (Android), IOS, WindowsPhone, Windows etc.
For making those skilled in the art be more fully understood that the embodiment of the present invention, in embodiments of the present invention, Android is illustrated as a kind of example of test platform.
In android system, it is possible to apply multiple automated test frame, for instance, Robotium, MoneyRunner, UIAutomator, Monkey etc.
For making those skilled in the art be more fully understood that the embodiment of the present invention, illustrate using UIAutomator as the example of automated test frame below.
UIAutomator provides assembly and the API (ApplicationProgrammingInterface of one group of UI test, application programming interface), after UI test guarantees that being applied in sequence of user operates, such as input through keyboard, click tools hurdle, menu, dialog box, picture or other UI controls, return correct UI output.
When setup test time, application to be measured is likely to but without being published on market, but should have APK (AndroidPackage, the installation kit) file of this application, it is possible to application to be tested be installed in mobile equipment by ADB instrument or other instruments.
UIAutomator test cases (Testcase) is inherited to UiAutomatorTestCase class.
And UiAutomatorTestCase Similar integral is to junit.framework.TestCase class, it is possible to compare test result by the Assert class of JUnit.
When UI tests, default one or more test cases (TestCase) can be called, it is one group of test input, execution condition and the expected results worked out for certain special objective, in order to tests certain Program path or examines whether meet certain particular demands.
In actual applications, test case can include following one or more contents:
1) Apply Names;
2) application version (build number);
3) functional module name;
4) being briefly described of test case, purpose that namely this use-case performs or method;
5) reference information (being easy to follow the tracks of and reference) of test case;
6) dependence between this test test case and other test cases;
7) precondition of this test case, namely performs the condition that this use-case have to meet, such as the access rights to data base;
8) numbering (ID) of test case, as can be dbase write a Chinese character in simplified form-functional device writes a Chinese character in simplified form-NO.;
9) step number, operating procedure describe, test data description;
10) expected results.
Step 202, calls the interface of application to be tested, obtains the interface information of application to be tested;
The application embodiment of the present invention, interface can be added in advance in application to be tested, the interface of application to be tested is generate based on IDL, can define the communication interface between process by this interface, and this interface of application call carrying out testing obtains the interface information of current interface.
Wherein, the application carrying out testing is communicated by interprocess communication (interprocesscommunication, IPC) and application to be tested.
As indicated with 2, in android system, the interface of application to be tested is define based on AIDL (AndroidInterfaceDefinitionLanguage, Android interface description language), and this interface of application call carrying out testing obtains the interface information of application current interface to be tested.
For values of some some dynamic changes on UI interface, the candidate character strings such as " hello " as shown in Figure 1, " you number ", " you dare ", the value of these changes can not be calculated by the embodiment of the present invention, but is obtained by calling interface.
Step 203, when described interface returns successfully, is operated according to described interface information by described test case in the interface of application to be tested.
In embodiments of the present invention, interface can be synchronization call, judges whether successfully according to return value, and return value is not return successfully empty expression.
And then, it is possible to call test case and adopt the analog subscriber operation on the interface of application to be tested of the interface information of application to be tested feedback.
Such as, for the candidate character strings such as " hello " as shown in Figure 1, " you number ", " you dare ", it is possible to click " hello " on interface, " hello " upper screen is selected.
In a kind of alternative embodiment of the present invention, step 203 can include following sub-step:
Sub-step S11, searches the interface element specified by described test case in described interface information;
Sub-step S12, the operation that described interface element is specified.
Interface information can include interface element text, interface element coordinate, in addition to this it is possible to the information such as whether visible, currently highlighted candidate if including button.
In implementing, it is possible to extract test object text in test case, search the interface element text with this object text matches, the interface element coordinate that this interface element text is corresponding carries out the operation specified.
Wherein, the operation carried out in the interface of application to be tested can include following one or more:
Click, length is pressed, slip.
The embodiment of the present invention calls the interface of application to be tested, embodiment obtains the interface information of its interface element and carries out interface detection, guarantee can obtain the value of the dynamically interface element of change in real time, owing to being the interface information of application to be tested self feedback, its coordinate need not be calculated, and then the problem avoiding resolution, reduce the complexity of test, in addition, automatic test is achieved by testing the interface information of application self feedback, avoid manual test, reduce the probability made mistakes, improve the efficiency of test.
With reference to Fig. 4, it is shown that the flow chart of steps of a kind of according to an embodiment of the invention method of testing embodiment 2 for interface, specifically may include steps of:
Step 401, calls test case;
Step 402, is operated in the interface of application to be tested by described test case;
In embodiments of the present invention, for accelerating testing progress, for the interface element that some are fixing, it is possible to directly calculate its position, calling directly to its operation specified in test case, analog subscriber operates.
Such as, the position of the numeral keys of 0-9 as shown in Figure 1 is relatively fixed, can directly calculate its position, call test case analog subscriber and click " 6 ", " 4 ", " 4 ", " 2 ", " 6 ", afterwards, input method application finds the candidate character strings such as " hello ", " you number ", " you dare ".
It should be noted that these fixing interface elements can also the interface calling test application, obtain application to be tested interface information after be operated again, this is not any limitation as by the embodiment of the present invention.
Such as, the interface of input method can be called, the position of the numeral keys of acquisition 0-9 as shown in Figure 1, recall test case analog subscriber and click " 6 ", " 4 ", " 4 ", " 2 ", " 6 ", afterwards, input method application finds the candidate character strings such as " hello ", " you number ", " you dare ".
Step 403, calls the interface of application to be tested, obtains the interface information of application to be tested;
Step 404, when described interface returns unsuccessfully, generates test report;
In embodiments of the present invention, interface can be synchronization call, judges whether successfully according to return value, and return value is return unsuccessfully empty expression.
If returning unsuccessfully, then can directly generating test report, prompting interface is abnormal, malloc failure malloc.
Step 405, when described interface returns successfully, is operated according to described interface information by described test case in the interface of application to be tested;
Step 406, obtains the operating result after being operated in the interface of application to be tested;
Step 407, relatively described operating result and the expected results in described test case, it is thus achieved that test result;
Step 408, generates test report for described test result.
In embodiments of the present invention, after simulating user operation, then can obtain the operating result in the interface of application to be tested, compare with the expected results preset in test case.
If operating result is consistent with expected results, then test case success can be represented, if operating result and expected results are not inconsistent, then test case failure can be represented.
Such as, some test case needs to shield operation, then can pass through other approach and capture the word of upper screen and intended word contrasts; Some test case need not go up screen operation, then directly obtain candidate character strings, contrast with intended candidate character strings.
Test result for test case, it is possible to generate test report, including the test case success or failure returned with expected results contrast according to operating result, in each test case execution process, more detailed logging of record etc., allows tester check.
For embodiment of the method, in order to be briefly described, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the embodiment of the present invention is not by the restriction of described sequence of movement, because according to the embodiment of the present invention, some step can adopt other orders or carry out simultaneously. Secondly, those skilled in the art also should know, embodiment described in this description belongs to preferred embodiment, necessary to the involved action not necessarily embodiment of the present invention.
With reference to Fig. 5, it is shown that the structured flowchart of a kind of according to an embodiment of the invention test device embodiment 1 for interface, specifically can include such as lower module:
Test case calling module 501, is suitable to call test case;
Application interface calling module 502, is suitable to call the interface of application to be tested, obtain the interface information of application to be tested;
Test module 503, is suitable to, when described interface returns successfully, be operated according to described interface information by described test case in the interface of application to be tested.
In a kind of alternative embodiment of the present invention, described test module 503 can be adapted to:
In described interface information, the interface element specified is searched by described test case;
The operation that described interface element is specified.
In implementing, described interface information can include interface element text, interface element coordinate;
Described test module 503 can be adapted to:
Extract test object text in described test case;
Search the interface element text with described object text matches;
Described test module 503 can be adapted to:
The interface element coordinate that described interface element text is corresponding carries out the operation specified.
In implementing, the interface of application to be tested can be generate based on IDL;
Can be communicated by interprocess communication and application to be tested;
The operation carried out in the interface of application to be tested can include following one or more:
Click, length is pressed, slip.
With reference to Fig. 6, it is shown that the structured flowchart of a kind of according to an embodiment of the invention test device embodiment 2 for interface, specifically can include such as lower module:
Test case calling module 601, is suitable to call test case;
Interface operation module 602, is suitable to be operated in the interface of application to be tested by described test case.
Application interface calling module 603, is suitable to call the interface of application to be tested, obtain the interface information of application to be tested;
Second test report generation module 604, is suitable to when described interface returns unsuccessfully, generates test report;
Test module 605, is suitable to, when described interface returns successfully, be operated according to described interface information by described test case in the interface of application to be tested;
Operating result acquisition module 606, is suitable to obtain the operating result after being operated in the interface of application to be tested;
Test result obtains module 607, is suitable to operating result described in comparison and the expected results in described test case, it is thus achieved that test result;
First test report generation module 608, is suitable to generate test report for described test result.
For device embodiment, due to itself and embodiment of the method basic simlarity, so what describe is fairly simple, relevant part illustrates referring to the part of embodiment of the method.
Not intrinsic to any certain computer, virtual system or miscellaneous equipment relevant in algorithm and the display of this offer. Various general-purpose systems can also with use based on together with this teaching. As described above, the structure constructed required by this kind of system is apparent from. Additionally, the present invention is also not for any certain programmed language. It is understood that, it is possible to utilize various programming language to realize the content of invention described herein, and the description above language-specific done is the preferred forms in order to disclose the present invention.
In description mentioned herein, describe a large amount of detail. It is to be appreciated, however, that embodiments of the invention can be put into practice when not having these details. In some instances, known method, structure and technology it are not shown specifically, in order to do not obscure the understanding of this description.
Similarly, it is to be understood that, one or more in order to what simplify that the disclosure helping understands in each inventive aspect, herein above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or descriptions thereof sometimes. But, the method for the disclosure should be construed to and reflect an intention that namely the present invention for required protection requires feature more more than the feature being expressly recited in each claim. More precisely, as the following claims reflect, inventive aspect is in that all features less than single embodiment disclosed above. Therefore, it then follows claims of detailed description of the invention are thus expressly incorporated in this detailed description of the invention, wherein each claim itself as the independent embodiment of the present invention.
Those skilled in the art are appreciated that, it is possible to carry out the module in the equipment in embodiment adaptively changing and they being arranged in one or more equipment different from this embodiment. Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition. Except at least some in such feature and/or process or unit excludes each other, it is possible to adopt any combination that all processes or the unit of all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment are combined. Unless expressly stated otherwise, each feature disclosed in this specification (including adjoint claim, summary and accompanying drawing) can be replaced by the alternative features providing purpose identical, equivalent or similar.
In addition, those skilled in the art it will be appreciated that, although embodiments more described herein include some feature included in other embodiments rather than further feature, but the combination of the feature of different embodiment means to be within the scope of the present invention and form different embodiments. Such as, in the following claims, the one of any of embodiment required for protection can mode use in any combination.
The all parts embodiment of the present invention can realize with hardware, or realizes with the software module run on one or more processor, or realizes with their combination. It will be understood by those of skill in the art that the some or all functions for the some or all parts in the test equipment at interface that microprocessor or digital signal processor (DSP) can be used in practice to realize according to embodiments of the present invention. The present invention is also implemented as part or all the equipment for performing method as described herein or device program (such as, computer program and computer program). The program of such present invention of realization can store on a computer-readable medium, or can have the form of one or more signal. Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment without departing from the scope of the appended claims. In the claims, any reference marks that should not will be located between bracket is configured to limitations on claims. Word " comprises " and does not exclude the presence of the element or step not arranged in the claims. Word "a" or "an" before being positioned at element does not exclude the presence of multiple such element. The present invention by means of including the hardware of some different elements and can realize by means of properly programmed computer. In the unit claim listing some devices, several in these devices can be through same hardware branch and specifically embody. Word first, second and third use do not indicate that any order. Can be title by these word explanations.
The embodiment of the invention discloses A1, a kind of method of testing for interface, including:
Call test case;
Call the interface of application to be tested, obtain the interface information of application to be tested;
When described interface returns successfully, it is operated in the interface of application to be tested according to described interface information by described test case.
A2, method as described in A1, described by including that described test case is operated in the interface of application to be tested according to described interface information:
In described interface information, the interface element specified is searched by described test case;
The operation that described interface element is specified.
A3, method as described in A2, described interface information includes interface element text, interface element coordinate;
The described step being searched the interface element specified by described test case in described interface information is included:
Extract test object text in described test case;
Search the interface element text with described object text matches;
The described step to the operation that described interface element is specified includes:
The interface element coordinate that described interface element text is corresponding carries out the operation specified.
A4, method as described in A1 or A2 or A3, also include:
Obtain the operating result after being operated in the interface of application to be tested;
Relatively described operating result and the expected results in described test case, it is thus achieved that test result.
A5, method as described in A4, also include:
Test report is generated for described test result.
A6, method as described in A1 or A2 or A3 or A5, also include:
When described interface returns unsuccessfully, generate test report.
A7, method as described in A1 or A2 or A3 or A5, before the interface calling application to be tested described, the step of interface information obtaining application to be tested, described method also includes:
It is operated in the interface of application to be tested by described test case.
A8, method as described in A1 or A2 or A3 or A5,
The interface of application to be tested is generate based on IDL;
Communicated by interprocess communication and application to be tested;
The operation carried out in the interface of application to be tested includes following one or more:
Click, length is pressed, slip.
The embodiment of the invention also discloses B9, a kind of test device for interface, including:
Test case calling module, is suitable to call test case;
Application interface calling module, is suitable to call the interface of application to be tested, obtain the interface information of application to be tested;
Test module, is suitable to, when described interface returns successfully, be operated according to described interface information by described test case in the interface of application to be tested.
B10, device as described in B9, described test module is further adapted for:
In described interface information, the interface element specified is searched by described test case;
The operation that described interface element is specified.
B11, device as described in B10, described interface information includes interface element text, interface element coordinate;
Described test module is further adapted for:
Extract test object text in described test case;
Search the interface element text with described object text matches;
Described test module is further adapted for:
The interface element coordinate that described interface element text is corresponding carries out the operation specified.
B12, device as described in B9 or B10 or B11, also include:
Operating result acquisition module, is suitable to obtain the operating result after being operated in the interface of application to be tested;
Test result obtains module, is suitable to operating result described in comparison and the expected results in described test case, it is thus achieved that test result.
B13, device as described in B12, also include:
First test report generation module, is suitable to generate test report for described test result.
B14, device as described in B9 or B10 or B11 or B13, also include:
Second test report generation module, is suitable to when described interface returns unsuccessfully, generates test report.
B15, device as described in B9 or B10 or B11 or B13, also include:
Interface operation module, is suitable to be operated in the interface of application to be tested by described test case.
B16, device as described in B9 or B10 or B11 or B13,
The interface of application to be tested is generate based on IDL;
Communicated by interprocess communication and application to be tested;
The operation carried out in the interface of application to be tested includes following one or more: click, length is pressed, slip.

Claims (10)

1. for the method for testing at interface, including:
Call test case;
Call the interface of application to be tested, obtain the interface information of application to be tested;
When described interface returns successfully, it is operated in the interface of application to be tested according to described interface information by described test case.
2. the method for claim 1, it is characterised in that described by including that described test case is operated in the interface of application to be tested according to described interface information:
In described interface information, the interface element specified is searched by described test case;
The operation that described interface element is specified.
3. method as claimed in claim 2, it is characterised in that described interface information includes interface element text, interface element coordinate;
The described step being searched the interface element specified by described test case in described interface information is included:
Extract test object text in described test case;
Search the interface element text with described object text matches;
The described step to the operation that described interface element is specified includes:
The interface element coordinate that described interface element text is corresponding carries out the operation specified.
4. the method as described in claim 1 or 2 or 3, it is characterised in that also include:
Obtain the operating result after being operated in the interface of application to be tested;
Relatively described operating result and the expected results in described test case, it is thus achieved that test result.
5. method as claimed in claim 4, it is characterised in that also include:
Test report is generated for described test result.
6. the method as described in claim 1 or 2 or 3 or 5, it is characterised in that also include:
When described interface returns unsuccessfully, generate test report.
7. the method as described in claim 1 or 2 or 3 or 5, it is characterised in that before the interface that calls application to be tested described, the step of interface information obtaining application to be tested, described method also includes:
It is operated in the interface of application to be tested by described test case.
8. the method as described in claim 1 or 2 or 3 or 5, it is characterised in that
The interface of application to be tested is generate based on IDL;
Communicated by interprocess communication and application to be tested;
The operation carried out in the interface of application to be tested includes following one or more:
Click, length is pressed, slip.
9. for the test device at interface, including:
Test case calling module, is suitable to call test case;
Application interface calling module, is suitable to call the interface of application to be tested, obtain the interface information of application to be tested;
Test module, is suitable to, when described interface returns successfully, be operated according to described interface information by described test case in the interface of application to be tested.
10. device as claimed in claim 9, it is characterised in that described test module is further adapted for:
In described interface information, the interface element specified is searched by described test case;
The operation that described interface element is specified.
CN201510958963.7A 2015-12-17 2015-12-17 Test method and device capable of aiming at interface Pending CN105630674A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510958963.7A CN105630674A (en) 2015-12-17 2015-12-17 Test method and device capable of aiming at interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510958963.7A CN105630674A (en) 2015-12-17 2015-12-17 Test method and device capable of aiming at interface

Publications (1)

Publication Number Publication Date
CN105630674A true CN105630674A (en) 2016-06-01

Family

ID=56045644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510958963.7A Pending CN105630674A (en) 2015-12-17 2015-12-17 Test method and device capable of aiming at interface

Country Status (1)

Country Link
CN (1) CN105630674A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106970876A (en) * 2017-03-13 2017-07-21 北京云知声信息技术有限公司 Method for testing software, device, test manuscript generation method and device
CN107122301A (en) * 2017-04-27 2017-09-01 武汉斗鱼网络科技有限公司 Interface detection method and device
CN107506296A (en) * 2017-07-19 2017-12-22 北京金山安全软件有限公司 Input method testing method and device, electronic equipment and storage medium
CN108959068A (en) * 2018-06-04 2018-12-07 广州视源电子科技股份有限公司 Software interface test method, equipment and storage medium
CN111930629A (en) * 2020-08-14 2020-11-13 工银科技有限公司 Page testing method and device, electronic equipment and storage medium
CN112711525A (en) * 2019-10-25 2021-04-27 中国移动通信集团浙江有限公司 UI test and interface test cooperative test method and device and computing equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053911A (en) * 2010-12-30 2011-05-11 东莞宇龙通信科技有限公司 Automated testing method and system based on Android and mobile terminal
CN103164300A (en) * 2011-12-13 2013-06-19 腾讯科技(深圳)有限公司 Mobile terminal touch screen automatic testing method and device
US20130219307A1 (en) * 2012-02-21 2013-08-22 Artisan Mobile, Inc. System and method for runtime user interface management
CN103914375A (en) * 2013-01-07 2014-07-09 百度国际科技(深圳)有限公司 Method and device for testing owner-drawing interface software
CN104461892A (en) * 2014-12-15 2015-03-25 北京国双科技有限公司 User-defined control acquiring method and device
CN104794050A (en) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 Application program test method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053911A (en) * 2010-12-30 2011-05-11 东莞宇龙通信科技有限公司 Automated testing method and system based on Android and mobile terminal
CN103164300A (en) * 2011-12-13 2013-06-19 腾讯科技(深圳)有限公司 Mobile terminal touch screen automatic testing method and device
US20130219307A1 (en) * 2012-02-21 2013-08-22 Artisan Mobile, Inc. System and method for runtime user interface management
CN103914375A (en) * 2013-01-07 2014-07-09 百度国际科技(深圳)有限公司 Method and device for testing owner-drawing interface software
CN104794050A (en) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 Application program test method, device and system
CN104461892A (en) * 2014-12-15 2015-03-25 北京国双科技有限公司 User-defined control acquiring method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106970876A (en) * 2017-03-13 2017-07-21 北京云知声信息技术有限公司 Method for testing software, device, test manuscript generation method and device
CN107122301A (en) * 2017-04-27 2017-09-01 武汉斗鱼网络科技有限公司 Interface detection method and device
CN107122301B (en) * 2017-04-27 2020-04-10 武汉斗鱼网络科技有限公司 Interface testing method and device
CN107506296A (en) * 2017-07-19 2017-12-22 北京金山安全软件有限公司 Input method testing method and device, electronic equipment and storage medium
CN108959068A (en) * 2018-06-04 2018-12-07 广州视源电子科技股份有限公司 Software interface test method, equipment and storage medium
CN108959068B (en) * 2018-06-04 2022-04-22 广州视源电子科技股份有限公司 Software interface testing method, device and storage medium
CN112711525A (en) * 2019-10-25 2021-04-27 中国移动通信集团浙江有限公司 UI test and interface test cooperative test method and device and computing equipment
CN112711525B (en) * 2019-10-25 2023-12-26 中国移动通信集团浙江有限公司 Collaborative testing method and device for UI test and interface test and computing equipment
CN111930629A (en) * 2020-08-14 2020-11-13 工银科技有限公司 Page testing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105630674A (en) Test method and device capable of aiming at interface
CN107908541B (en) Interface testing method and device, computer equipment and storage medium
US9740585B2 (en) Flexible configuration and control of a testing system
CN105094783B (en) method and device for testing stability of android application
Griebe et al. A model-based approach to test automation for context-aware mobile applications
US9632754B2 (en) Auto generation and linkage of source code to test cases
US10049031B2 (en) Correlation of violating change sets in regression testing of computer software
CN111124919A (en) User interface testing method, device, equipment and storage medium
EP3208716A1 (en) System and method for coverage-based automated test case augmentation for design models
CN104536889A (en) Method and system for testing user interface, use case management platform and operating terminal
US8904352B2 (en) Systems and methods for processing source code during debugging operations
CN105389262B (en) A kind of method and apparatus generating Test Suggestion for interface detection
CN104572463A (en) Method and device for testing interface information
CN105589805A (en) Method and device for generating code coverage rate report
CN105630670A (en) Code coverage rate test method and device
CN106095501A (en) A kind of application section arranging method and device
CN112231213A (en) Web automatic testing method, system, storage medium and terminal equipment
CN106776327A (en) A kind of application program regression testing method and device
JP2014021982A (en) Iterative generation of symbolic test drivers for object-oriented languages
US10830818B2 (en) Ensuring completeness of interface signal checking in functional verification
CN112100078A (en) Method, device and equipment for generating interface test case
CN106919431B (en) Code comparison method, equipment and system in continuous integration
US20180365132A1 (en) Adaptive software testing
US9176846B1 (en) Validating correctness of expression evaluation within a debugger
CN114185791A (en) Method, device and equipment for testing data mapping file and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160601

RJ01 Rejection of invention patent application after publication