CN105468527A - Test method and device of assembly in application - Google Patents

Test method and device of assembly in application Download PDF

Info

Publication number
CN105468527A
CN105468527A CN201510900544.8A CN201510900544A CN105468527A CN 105468527 A CN105468527 A CN 105468527A CN 201510900544 A CN201510900544 A CN 201510900544A CN 105468527 A CN105468527 A CN 105468527A
Authority
CN
China
Prior art keywords
test
assignment component
information
test result
application
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
CN201510900544.8A
Other languages
Chinese (zh)
Other versions
CN105468527B (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 CN201510900544.8A priority Critical patent/CN105468527B/en
Publication of CN105468527A publication Critical patent/CN105468527A/en
Application granted granted Critical
Publication of CN105468527B publication Critical patent/CN105468527B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a test method and device of an assembly in application. According to the embodiment of the invention, when testing the appointed assembly in the application, a stored first configuration file is read; the first configuration file is used for defining the operation of the test operation information needed to be executed in the test and defining test strategy information needed to be used in the test; the appointed assembly in the application is tested according to the first configuration file so as to obtain the test result of the appointed assembly. According to the technical solution provided by the embodiment of the invention, mixed model type application can be tested; and the blank of the prior art is recovered.

Description

The method of testing of assembly and device in a kind of application
[technical field]
The present invention relates to field of computer technology, particularly relate to method of testing and the device of assembly in a kind of application.
[background technology]
At present, application comprises the application of local class (NativeAPP) and mixed mode applications (HybridAPP) two type.Wherein, the test of this locality application can be the test of the response time end to end to application, and this test result can as the foundation of evaluate application performance, the internal memory etc. that power consumption and application as application take.
In prior art, the method of Test Application is all applied for this locality, mixed mode applications is to comprise various assembly in mixed mode applications with local very large difference of applying, so the method for testing of local application cannot be applied in mixed mode applications, therefore, at present also not for the method for testing of mixed mode applications, how to carry out test to mixed mode applications is problem demanding prompt solution.
[summary of the invention]
In view of this, embodiments provide method of testing and the device of assembly in a kind of application, can realize, to the test of assembly in the application of mixed mode class, compensate for the blank of prior art.
The one side of the embodiment of the present invention, provides the method for testing of assembly in a kind of application, comprising:
When assignment component in application is tested, read the first configuration file stored, the test operation information of the operation that needs perform when described first configuration file comprises for defining test and for defining test time needs uses Test Strategy information;
According to described first configuration file, the assignment component in application is tested, to obtain the test result of described assignment component.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, described to application in assignment component test time, read store the first configuration file before, described method also comprises:
For the assignment component in application generates described test operation information, and generate the second configuration file according to described test operation information;
For the assignment component in application generates described Test Strategy information, and load described second configuration file according to described assignment component, and according to described test operation information and described second configuration file, generate described first configuration file;
Store described first configuration file.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, and described test operation information comprises: the attribute of an element in the page that sequence of operation, action type, described assignment component represent and the recognition method of described element.
Aspect as above and arbitrary possible implementation, there is provided a kind of implementation further, described Test Strategy information comprises: test scene information, collecting sample number, overtime configuration information, whether notify the configuration information of test result and whether represent the configuration information of test result.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, tests, to obtain the test result of described assignment component, comprising according to described first configuration file to the assignment component in application:
According to described sequence of operation, determine the element needing in the page that described assignment component represents to identify;
According to described attribute of an element, and the described element in the page utilizing described recognition method to represent described assignment component identifies;
According to described action type, to the element executable operations identified;
Record and store described element and be performed the moment of operation, described assignment component and after described operation, represent time interval between other pages complete moment and two moment, using the test result as described assignment component.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, and described test configurations information also comprises input value;
The described element executable operations to identifying, comprising: in the element identified, insert described input value.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, described method also comprises:
If described test scene information is non-caching scene, removing process is carried out to data cached in described application; Or,
If the number of the test result of described assignment component reaches described collecting sample number, stop the test to the assignment component in application; Or,
After the element executable operations identified, if according to overtime configuration information, judge to reach overtime duration and described assignment component does not show other pages after described operation, stop the test to the assignment component in application, and output alarm information.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, described method also comprises:
Whether notify that if described the configuration information of test result is for needs notice test result, is sent to appointment mailbox by described test result; Or,
If the configuration information representing test result no represents test result for needs, and described test result is sent to background server, so that background server represents described test result.
The one side of the embodiment of the present invention, provides the proving installation of assembly in a kind of application, comprising:
Test driver module, during for testing the assignment component in application, reads the first configuration file stored, and utilizes described first configuration file to drive testing execution module; The test operation information of the operation that needs perform when described first configuration file comprises for defining test and for defining test time needs uses Test Strategy information;
Testing execution module, for by after described Test driver module drive, tests, to obtain the test result of described assignment component the assignment component in application according to described first configuration file.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, and described device also comprises component configuration module, test configurations module and the first memory module;
Described component configuration module, for generating described test operation information for the assignment component in application, and generates the second configuration file according to described test operation information;
Described test configurations module, for generating described Test Strategy information for the assignment component in application, and load described second configuration file according to described assignment component, and according to described test operation information and described second configuration file, generate described first configuration file;
Described first memory module, for storing described first configuration file.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, and described test operation information comprises: the attribute of an element in the page that sequence of operation, action type, described assignment component represent and the recognition method of described element.
Aspect as above and arbitrary possible implementation, there is provided a kind of implementation further, described Test Strategy information comprises: test scene information, collecting sample number, overtime configuration information, whether notify the configuration information of test result and whether represent the configuration information of test result.
Aspect as above and arbitrary possible implementation, provide a kind of implementation, described testing execution module further, specifically for: according to described sequence of operation, determine the element needing in the page that described assignment component represents to identify; According to described attribute of an element, and the described element in the page utilizing described recognition method to represent described assignment component identifies; According to described action type, to the element executable operations identified;
Described device also comprises: data processing module, be performed the moment of operation, described assignment component for recording described element after described operation, represent time interval between other pages complete moment and two moment, using the test result as described assignment component, and the test result of described assignment component is stored in the second memory module.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, and described test configurations information also comprises input value;
When described testing execution module is used for the element executable operations identified, specifically for: in the element identified, insert described input value.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, described device also comprises: interface module, if be non-caching scene for described test scene information, carries out removing process to data cached in described application; Or,
Described testing execution module, also for: if the number of the test result of described assignment component reaches described collecting sample number, stop the test of assignment component in application; Or, also for after the element executable operations identified, if according to overtime configuration information, judge to reach overtime duration and described assignment component does not show other pages after described operation, stop the test to the assignment component in application, and output alarm information.
Aspect as above and arbitrary possible implementation, a kind of implementation is provided further, for described, whether described data processing module, if also notify that the configuration information of test result is for needs notice test result, is sent to appointment mailbox by described test result; Or, if represent test result for the no configuration information representing test result for needs, described test result is sent to background server, so that background server represents described test result.
As can be seen from the above technical solutions, the embodiment of the present invention has following beneficial effect:
When the embodiment of the present invention is by testing the assignment component in application, read the first configuration file stored, the test operation information of the operation that needs perform when described first configuration file comprises for defining test and for defining test time needs uses Test Strategy information; Thus, according to described first configuration file, the assignment component in application is tested, to obtain the test result of described assignment component.Therefore, the technical scheme that the embodiment of the present invention provides can realize, automatically to the test of assembly in the application of mixed mode class, compensate for the blank of prior art.
[accompanying drawing explanation]
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of the embodiment one of the method for testing of assembly in the application that provides of the embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the embodiment two of the method for testing of assembly in the application that provides of the embodiment of the present invention;
Fig. 3 is the exemplary plot of the test frame of the application component that the embodiment of the present invention provides;
Fig. 4 is the generation exemplary plot of the test operation information that the embodiment of the present invention provides;
Fig. 5 is the exemplary plot of generation first configuration file that the embodiment of the present invention provides;
Fig. 6 is the exemplary plot of the method for testing of assignment component in the application that provides of the embodiment of the present invention;
Fig. 7 is the functional block diagram of the embodiment one of the proving installation of assembly in the application that provides of the embodiment of the present invention;
Fig. 8 is the functional block diagram of the embodiment two of the proving installation of assembly in the application that provides of the embodiment of the present invention;
Fig. 9 is the functional block diagram of the embodiment three of the proving installation of assembly in the application that provides of the embodiment of the present invention;
Figure 10 is the functional block diagram of the embodiment four of the proving installation of assembly in the application that provides of the embodiment of the present invention.
[embodiment]
Technical scheme for a better understanding of the present invention, is described in detail the embodiment of the present invention below in conjunction with accompanying drawing.
Should be clear and definite, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
The term used in embodiments of the present invention is only for the object describing specific embodiment, and not intended to be limiting the present invention." one ", " described " and " being somebody's turn to do " of the singulative used in the embodiment of the present invention and appended claims is also intended to comprise most form, unless context clearly represents other implications.
Should be appreciated that term "and/or" used herein is only a kind of incidence relation describing affiliated partner, can there are three kinds of relations in expression, and such as, A and/or B, can represent: individualism A, exists A and B simultaneously, these three kinds of situations of individualism B.In addition, character "/" herein, general expression forward-backward correlation is to the relation liking a kind of "or".
Although should be appreciated that may adopt in embodiments of the present invention term first, second etc. configuration file is described, these configuration files should not be limited to these terms.These terms are only used for configuration file to be distinguished from each other out.Such as, when not departing from embodiment of the present invention scope, the first configuration file also can be called as the second configuration file, and similarly, the second configuration file also can be called as the first configuration file.
Depend on linguistic context, word as used in this " if " can be construed as into " ... time " or " when ... time " or " in response to determining " or " in response to detection ".Similarly, depend on linguistic context, phrase " if determination " or " if detecting (the conditioned disjunction event of statement) " can be construed as " when determining " or " in response to determining " or " when detecting (the conditioned disjunction event of statement) " or " in response to detection (the conditioned disjunction event of statement) ".
Embodiment one
The embodiment of the present invention provides the method for testing of assembly in a kind of application, please refer to Fig. 1, the schematic flow sheet of the embodiment one of the method for testing of assembly in its application provided for the embodiment of the present invention, and as shown in the figure, the method comprises the following steps:
S101, when testing the assignment component in application, reads the first configuration file stored, the test operation information of the operation that needs perform when described first configuration file comprises for defining test and for defining test time needs uses Test Strategy information.
S102, tests, to obtain the test result of described assignment component the assignment component in application according to described first configuration file.
Embodiment two
The embodiment of the present invention gives the method for testing of assembly in a kind of application, please refer to Fig. 2, the schematic flow sheet of the embodiment two of the method for testing of assembly in its application provided for the embodiment of the present invention, as shown in the figure, in embodiment one before step S101, described method of testing can also comprise the following steps:
S100, for the assignment component in application generates described test operation information, and generate the second configuration file according to described test operation information, and, for the assignment component in application generates described Test Strategy information, and load described second configuration file according to described assignment component, and according to described test operation information and described second configuration file, generate described first configuration file; Store described first configuration file.
Embodiment three
Based on the method for testing of assembly in the application that above-described embodiment two provides, the concrete methods of realizing of the embodiment of the present invention to S100 is described.This step specifically can comprise:
Please refer to Fig. 3, the exemplary plot of the test frame of its application component provided for the embodiment of the present invention, as shown in the figure, can comprise: Configuration Framework and test frame; Wherein Configuration Framework can comprise: component configuration module, test configurations module; Test frame can comprise: the first memory module, Test driver module, testing execution module, data processing module and the second memory module.
In the embodiment of the present invention, described component configuration module is used for according to the setting of user in component configuration module, generates corresponding test operation information.This arranges and can comprise: the action type of each operation in setting operation order, setting operation order, setting operation for element and the recognition method of each element.Accordingly, component configuration module is arranged according to these, and the test operation information of generation can comprise: the attribute of an element in the page that sequence of operation, action type, described assignment component represent and the recognition method of described element.
In addition, if operation for element be input frame, user also needs to arrange input value, like this, also needs to comprise input value in described test operation information.
Optionally, described test operation information can also comprise operation instructions information.
In the embodiment of the present invention, application to be tested is mixed mode applications, such as, as shown in Figure 3, application to be tested can comprise some assemblies, each assembly for realizing a business function of this application, as certain application can comprise following assembly: T10 assembly, movie sets, hotel's assembly, take out assembly, upper door assembly etc.
Be understandable that, in the embodiment of the present invention, if desired the response time end to end of certain assignment component in this application is tested, corresponding test operation information can be generated for assignment component, test operation information be used for described testing execution module to this assignment component response time tests end to end time, the operation of analog subscriber in the assignment component of application, to realize automatic test.
It should be noted that, response time end to end of assignment component refers to moment of executable operations on the element in assignment component and assignment component and shows time interval between new page.
Please refer to Fig. 4, the generation exemplary plot of its test operation information provided for the embodiment of the present invention, as shown in the figure, take assignment component as movie sets be example, sequence of operation comprises step 1, step 2, step 3, step 4, corresponding action type is included in the input operation in input frame, clicking operation, clicking operation, clicking operation, wherein, input operation has corresponding input value " the international film city in Shanghai ", clicking operation does not have corresponding input value, each operation for attribute of an element be respectively: the international film city in Shanghai, Android micro-figure text view control (android.widget.TextView), preferential booking, android.widget.TextView, wherein, the descriptive information of each operation correspondence is: find the international film city in Shanghai, enter the international film city in Shanghai, enter preferential booking, select seat.According to above-mentioned setting, test operation information can be generated, and by test operation information with scripting object representation (JavaScriptObjectNotation, JSON) format record is in the second configuration file, the second configuration file required for generation, the second configuration file of generation first can store designated storage location in the server.
As shown in Figure 3, in the embodiment of the present invention, described test configurations module is used for according to the setting of user in test configurations module, generates corresponding Test Strategy information.This arranges and can comprise: the setting of test scene, the setting of collecting sample number, time-out are arranged, the setting of assignment component, whether notify the setting of test result and whether represent the setting of test result.
Accordingly, described Test Strategy information comprises: test scene information, collecting sample number, overtime configuration information, whether notify the configuration information of test result and whether represent the configuration information of test result.
In a concrete implementation procedure, test scene information comprises cache farm scape and non-caching scene, because the response time end to end tested out under two kinds of scenes is completely different, therefore arranges by this response time can detected under different scene.Wherein, if buffer memory scene, then when testing application middle finger locking assembly, what can retain in application is data cached; If non-caching scene, when testing application middle finger locking assembly, what can not retain in application is data cached, therefore needs to carry out to data cached in application removings and processes, thus can simulate application use scenes first after mounting.
In a concrete implementation procedure, described collecting sample number is equivalent to test cut-off condition, if the number of the test result of described assignment component reaches this collecting sample number, then stops the test to the assignment component in application.
In a concrete implementation procedure, described time-out arranges and can comprise setting and whether enable waiting-timeout mechanism, and if enable waiting-timeout mechanism, overtime duration is set.Like this, in the process that assignment component is tested, after executable operations, according to overtime configuration information, start timing, if after reaching overtime duration, described assignment component does not also show other pages after described operation, then stop the test to the assignment component in application, and output alarm information.
In a concrete implementation procedure, can also arrange and whether notify test result, if the configuration information of no notice test result is needs notice test result, then needs after testing, described test result is sent to appointment mailbox; Otherwise, if the configuration information of no notice test result notifies test result for not needing, then do not send test result.
In a concrete implementation procedure, can also arrange and whether represent test result, if the configuration information representing test result no represents test result for needs, described test result is sent to background server, so that background server represents described test result, otherwise, whether represent the configuration information of test result for not need to represent test result, then do not send test result to background server.
Please refer to Fig. 5, the exemplary plot of its generation first configuration file provided for the embodiment of the present invention, as shown in the figure, test configurations module can also receive the assignment component that user is arranged, thus can determine need test be application in which assembly, and test configurations module can according to this assignment component, the chained address of automatic generation access services device, and then load above-mentioned storage the second configuration file in the server from this chained address, then by generate Test Strategy information also with JSON format record in this second configuration file, generate new configuration file, the embodiment of the present invention is called the first configuration file.
Embodiment four
Based on the method for testing of assembly in the application that above-described embodiment one and embodiment two provide, the concrete methods of realizing of the embodiment of the present invention to S101 and S102 is described.This step specifically can comprise:
Please refer to Fig. 6, the exemplary plot of the method for testing of assignment component in its application provided for the embodiment of the present invention, as shown in the figure, in the embodiment of the present invention, when needing to test the assignment component in application, Test driver module reads the first configuration file of storage from memory module, then testing execution module is driven according to this first configuration file, driven to make testing execution module and obtained the first configuration file that Test driver module imports into, and then testing execution module can according to the first configuration file of input, assignment component in application is tested, to obtain test result.
Illustrate, testing execution module is tested the assignment component in application according to described first configuration file, can include but not limited to the method obtaining the test result of described assignment component:
First, testing execution module can first according to sequence of operation, determine the element needing in the page that assignment component represents to identify, then, testing execution module can according to this attribute of an element, and the element in the page utilizing described recognition method to represent described assignment component identifies, the element in the page represented with assignment component in position application.Then, testing execution module according to described action type, can perform the operation corresponding with this action type to the element identified; Finally, be performed the moment of operation, described assignment component by element described in data processing module record after described operation, represent time interval between other pages complete moment and two moment, between these two moment and two moment, interval is as the test result of assignment component in the application required for the embodiment of the present invention, and can be stored the test result of this assignment component by the second memory module.
Be understandable that, testing execution module can according to test configurations information, the operation of the element in the page that automatic imitation user represents at assignment component, to make assignment component can represent the different page, thus can record the response time end to end in operation.
In a concrete implementation procedure, data processing module according to the test result of assignment component, can generate the file of comma separated value (Comma-SeparatedValues, CSV) form, and is stored in the second memory module by this file.Such as, this second memory module can be safe digital card (SecureDigitalMemoryCard, SD card).
In a concrete implementation procedure, the element of record can be performed the moment of operation, described assignment component after described operation, represent time interval between other pages complete moment and two moment by data processing module, is stored in the second memory module with the form of data stream.Such as, data processing module can the data shown in record sheet 1.
HomePageRT BeginTime 11:21.3 EndTime 11:25.7 4458
HomePageRT BeginTime 11:48.0 EndTime 11:51.5 3568
MoviePage BeginTime 12:07.8 EndTime 12:12.8 5080
HomePageRT BeginTime 12:26.3 EndTime 12:30.4 4033
MoviePage BeginTime 12:45.9 EndTime 12:47.6 1681
MovieDetailPage BeginTime 12:58.3 EndTime 13:04.7 6387
HomePageRT BeginTime 13:13.3 EndTime 13:16.1 2830
MoviePage BeginTime 13:32.3 EndTime 13:34.1 1816
MovieDetailPage BeginTime 13:44.9 EndTime 13:51.3 6398
HomePageRT BeginTime 14:00.4 EndTime 14:03.1 2739
MoviePage BeginTime 14:19.1 EndTime 14:21.1 1971
MovieDetailPage BeginTime 14:31.8 EndTime 14:38.3 6418
Table 1
As shown in table 1, first row data are the title of assignment component in application; Secondary series data and the 3rd column data represent that in the page that assignment component represents, element is performed the moment of operation, 4th row and the 5th column data represent assignment component represent after described operation other pages complete when, 6th column data represents the time interval between two moment, i.e. response time end to end.Wherein, this time interval records in units of millisecond.
Alternatively, in one of the present embodiment possible implementation, if described test configurations information also comprises input value, and the element identified is input frame, then can insert described input value in the element identified.
Alternatively, in one of the present embodiment possible implementation, as shown in Figure 6, if described test scene information is non-caching scene, then the first configuration file obtained is sent to application by testing execution module, this application can calling interface module, and the first configuration file is transferred to this interface module, like this, according to the first configuration file, interface module can know that test scene information is non-caching scene, and removing process is carried out to data cached in described application, the scene after installing first with simulation application, namely there is no data cached scene in application.
Such as, described interface module can be Android debugging bridge (AndroidDebugBridge, ADB) shell (shell) interface.
Alternatively, in one of the present embodiment possible implementation, described testing execution module is in the process of testing assignment component, can count the test result of assignment component, if detect, the number of the test result of described assignment component reaches the collecting sample number of setting, then stop the test to the assignment component in application.
Alternatively, in one of the present embodiment possible implementation, described testing execution module is in the process of testing assignment component, after the element executable operations identified, start to carry out timing, if according to overtime configuration information, judge to reach overtime duration, but described assignment component does not also show other pages after described operation, then testing execution module stops the test to the assignment component in application, and output alarm information.
Alternatively, in one of the present embodiment possible implementation, as shown in Figure 6, whether notify that if described the configuration information of test result is for needs notice test result, then the first configuration file obtained is sent to application by testing execution module, this application can calling data processing module, and the first configuration file is transferred to this data processing module, like this, data processing module is according to the first configuration information, know and need to notify test result, then described test result is sent to appointment mailbox.
Be understandable that, if pre-set email address, then according to this email address, test result can be sent to appointment mailbox, so that user can obtain this test result.Or, if do not arrange email address in advance, can after being completed display reminding information, in order to be completed, so that user can obtain test result according to this information from the second memory module.
Alternatively, in one of the present embodiment possible implementation, as shown in Figure 6, if the configuration information representing test result no represents test result for needs, data processing module, according to the first configuration information, is known and is needed to represent test result, then call the interface that background server provides, described test result is sent to background server, so that background server represents described test result.
In a concrete implementation procedure, the test result of assignment component directly can be sent to background server by data processing module, and background server represents this test result, as represented the test result shown in table 1.Or broken line graph or data plot also according to this test result generating folding line chart or data plot, can be sent to background server by data processing module, represent broken line graph or data plot to make background server.The ways of presentation of the embodiment of the present invention to test result is not particularly limited.
The embodiment of the present invention provides the device embodiment realizing each step and method in said method embodiment further.
Fig. 7 is the functional block diagram of the embodiment one of the proving installation of assembly in the application that provides of the embodiment of the present invention, and as shown in Figure 7, described proving installation comprises:
Test driver module 70, during for testing the assignment component in application, reads the first configuration file stored, and utilizes described first configuration file to drive testing execution module; The test operation information of the operation that needs perform when described first configuration file comprises for defining test and for defining test time needs uses Test Strategy information;
Testing execution module 71, for by after described Test driver module drive, tests, to obtain the test result of described assignment component the assignment component in application according to described first configuration file.
Fig. 8 is the functional block diagram of the embodiment two of the proving installation of assembly in the application that provides of the embodiment of the present invention, and as shown in Figure 8, described proving installation can also comprise: component configuration module 72, test configurations module 73 and the first memory module 74;
Described component configuration module 72, for generating described test operation information for the assignment component in application, and generates the second configuration file according to described test operation information;
Described test configurations module 73, for generating described Test Strategy information for the assignment component in application, and load described second configuration file according to described assignment component, and according to described test operation information and described second configuration file, generate described first configuration file;
Described first memory module 74, for storing described first configuration file.
In a concrete implementation procedure, described test operation information comprises: the attribute of an element in the page that sequence of operation, action type, described assignment component represent and the recognition method of described element.
In a concrete implementation procedure, described Test Strategy information comprises: test scene information, collecting sample number, overtime configuration information, whether notify the configuration information of test result and whether represent the configuration information of test result.
In a concrete implementation procedure, described test configurations information also comprises input value; Described testing execution module 71 for during to the element executable operations identified, specifically for: in the element identified, insert described input value.
Fig. 9 is the functional block diagram of the embodiment three of the proving installation of assembly in the application that provides of the embodiment of the present invention, and as shown in Figure 9, described proving installation can also comprise data processing module 75 and the second memory module 76;
Described testing execution module 71, specifically for: according to described sequence of operation, determine the element needing in the page that described assignment component represents to identify; According to described attribute of an element, and the described element in the page utilizing described recognition method to represent described assignment component identifies; According to described action type, to the element executable operations identified;
Described device also comprises: data processing module 75, be performed the moment of operation, described assignment component for recording described element after described operation, represent time interval between other pages complete moment and two moment, using the test result as described assignment component, and the test result of described assignment component is stored in the second memory module 76.
Figure 10 is the functional block diagram of the embodiment four of the proving installation of assembly in the application that provides of the embodiment of the present invention, and as shown in Figure 10, described proving installation can also comprise: interface module 77.
Interface module 77, if be non-caching scene for described test scene information, carries out removing process to data cached in described application; Or,
Described testing execution module 71, also for: if the number of the test result of described assignment component reaches described collecting sample number, stop the test of assignment component in application; Or, also for after the element executable operations identified, if according to overtime configuration information, judge to reach overtime duration and described assignment component does not show other pages after described operation, stop the test to the assignment component in application, and output alarm information.
In a concrete implementation procedure, for described, whether described data processing module 75, if also notify that the configuration information of test result is for needs notice test result, is sent to appointment mailbox by described test result; Or, if represent test result for the no configuration information representing test result for needs, described test result is sent to background server, so that background server represents described test result.
Because each unit in the embodiment of device can perform the method shown in Fig. 1 and Fig. 2, the part that the present embodiment is not described in detail, can with reference to the related description to Fig. 1 and Fig. 2.
The technical scheme of the embodiment of the present invention has following beneficial effect:
When the embodiment of the present invention is by testing the assignment component in application, read the first configuration file stored, the test operation information of the operation that needs perform when described first configuration file comprises for defining test and for defining test time needs uses Test Strategy information; Thus, according to described first configuration file, the assignment component in application is tested, to obtain the test result of described assignment component.Therefore, the technical scheme that the embodiment of the present invention provides can realize, automatically to the test of assembly in the application of mixed mode class, compensate for the blank of prior art.
In the embodiment of the present invention, can test the response time end to end of assembly in the application of mixed mode class, therefore, it is possible to greater efficiency complete test, and reduce testing cost, and provide reliable and foundation accurately for the Performance Evaluation of mixed mode class application, facilitate optimization and renewal that user applies mixed mode class, improve renewal and the efficiency of research and development of the application of mixed mode class.
The embodiment of the present invention can realize the test result storing assembly in the application of mixed mode class automatically, thus can compare between the test result of the different editions of assembly, so that user understands the performance trend of assembly in application, determines optimisation strategy.
The embodiment of the present invention can realize the test result recording assembly in the application of mixed mode class automatically, and test result can be supplied to user, makes user can understand the test result of assembly in the application of mixed mode class in time, clearly.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiment provided by the present invention, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, is only a kind of logic function and divides, and actual can have other dividing mode when realizing, such as, multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the 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 unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that hardware also can be adopted to add SFU software functional unit realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprising some instructions in order to make a computer installation (can be personal computer, server, or network equipment etc.) or processor (Processor) perform the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (Read-OnlyMemory, ROM), random access memory (RandomAccessMemory, RAM), magnetic disc or CD etc. various can be program code stored medium.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (16)

1. a method of testing for assembly in applying, it is characterized in that, described method comprises:
When assignment component in application is tested, read the first configuration file stored, the test operation information of the operation that needs perform when described first configuration file comprises for defining test and for defining test time needs uses Test Strategy information;
According to described first configuration file, the assignment component in application is tested, to obtain the test result of described assignment component.
2. method according to claim 1, is characterized in that, described to application in assignment component test time, read store the first configuration file before, described method also comprises:
For the assignment component in application generates described test operation information, and generate the second configuration file according to described test operation information;
For the assignment component in application generates described Test Strategy information, and load described second configuration file according to described assignment component, and according to described test operation information and described second configuration file, generate described first configuration file;
Store described first configuration file.
3. method according to claim 2, is characterized in that, described test operation information comprises: the attribute of an element in the page that sequence of operation, action type, described assignment component represent and the recognition method of described element.
4. method according to claim 3, is characterized in that, described Test Strategy information comprises: test scene information, collecting sample number, overtime configuration information, whether notify the configuration information of test result and whether represent the configuration information of test result.
5. method according to claim 4, is characterized in that, tests, to obtain the test result of described assignment component, comprising according to described first configuration file to the assignment component in application:
According to described sequence of operation, determine the element needing in the page that described assignment component represents to identify;
According to described attribute of an element, and the described element in the page utilizing described recognition method to represent described assignment component identifies;
According to described action type, to the element executable operations identified;
Record and store described element and be performed the moment of operation, described assignment component and after described operation, represent time interval between other pages complete moment and two moment, using the test result as described assignment component.
6. method according to claim 5, is characterized in that,
Described test configurations information also comprises input value;
The described element executable operations to identifying, comprising: in the element identified, insert described input value.
7. the method according to claim 5 or 6, is characterized in that, described method also comprises:
If described test scene information is non-caching scene, removing process is carried out to data cached in described application; Or,
If the number of the test result of described assignment component reaches described collecting sample number, stop the test to the assignment component in application; Or,
After the element executable operations identified, if according to overtime configuration information, judge to reach overtime duration and described assignment component does not show other pages after described operation, stop the test to the assignment component in application, and output alarm information.
8. the method according to claim 5 or 6, is characterized in that, described method also comprises:
Whether notify that if described the configuration information of test result is for needs notice test result, is sent to appointment mailbox by described test result; Or,
If the configuration information representing test result no represents test result for needs, and described test result is sent to background server, so that background server represents described test result.
9. a proving installation for assembly in applying, it is characterized in that, described device comprises:
Test driver module, during for testing the assignment component in application, reads the first configuration file stored, and utilizes described first configuration file to drive testing execution module; The test operation information of the operation that needs perform when described first configuration file comprises for defining test and for defining test time needs uses Test Strategy information;
Testing execution module, for by after described Test driver module drive, tests, to obtain the test result of described assignment component the assignment component in application according to described first configuration file.
10. device according to claim 9, is characterized in that, described device also comprises component configuration module, test configurations module and the first memory module;
Described component configuration module, for generating described test operation information for the assignment component in application, and generates the second configuration file according to described test operation information;
Described test configurations module, for generating described Test Strategy information for the assignment component in application, and load described second configuration file according to described assignment component, and according to described test operation information and described second configuration file, generate described first configuration file;
Described first memory module, for storing described first configuration file.
11. devices according to claim 10, is characterized in that, described test operation information comprises: the attribute of an element in the page that sequence of operation, action type, described assignment component represent and the recognition method of described element.
12. devices according to claim 11, is characterized in that, described Test Strategy information comprises: test scene information, collecting sample number, overtime configuration information, whether notify the configuration information of test result and whether represent the configuration information of test result.
13. devices according to claim 12, is characterized in that,
Described testing execution module, specifically for: according to described sequence of operation, determine the element needing in the page that described assignment component represents to identify; According to described attribute of an element, and the described element in the page utilizing described recognition method to represent described assignment component identifies; According to described action type, to the element executable operations identified;
Described device also comprises: data processing module, be performed the moment of operation, described assignment component for recording described element after described operation, represent time interval between other pages complete moment and two moment, using the test result as described assignment component, and the test result of described assignment component is stored in the second memory module.
14. devices according to claim 13, is characterized in that, described test configurations information also comprises input value;
When described testing execution module is used for the element executable operations identified, specifically for: in the element identified, insert described input value.
15. devices according to claim 13 or 14, is characterized in that,
Described device also comprises: interface module, if be non-caching scene for described test scene information, carries out removing process to data cached in described application; Or,
Described testing execution module, also for: if the number of the test result of described assignment component reaches described collecting sample number, stop the test of assignment component in application; Or, also for after the element executable operations identified, if according to overtime configuration information, judge to reach overtime duration and described assignment component does not show other pages after described operation, stop the test to the assignment component in application, and output alarm information.
16. devices according to claim 13 or 14, is characterized in that,
For described, whether described data processing module, if also notify that the configuration information of test result is for needs notice test result, is sent to appointment mailbox by described test result; Or, if represent test result for the no configuration information representing test result for needs, described test result is sent to background server, so that background server represents described test result.
CN201510900544.8A 2015-12-09 2015-12-09 The test method and device of component in a kind of application Active CN105468527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510900544.8A CN105468527B (en) 2015-12-09 2015-12-09 The test method and device of component in a kind of application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510900544.8A CN105468527B (en) 2015-12-09 2015-12-09 The test method and device of component in a kind of application

Publications (2)

Publication Number Publication Date
CN105468527A true CN105468527A (en) 2016-04-06
CN105468527B CN105468527B (en) 2018-09-04

Family

ID=55606258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510900544.8A Active CN105468527B (en) 2015-12-09 2015-12-09 The test method and device of component in a kind of application

Country Status (1)

Country Link
CN (1) CN105468527B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851370A (en) * 2019-11-20 2020-02-28 北京小米移动软件有限公司 Program testing method and device, and storage medium
CN117093466A (en) * 2023-10-19 2023-11-21 腾讯科技(深圳)有限公司 Performance test method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090199047A1 (en) * 2008-01-31 2009-08-06 Yahoo! Inc. Executing software performance test jobs in a clustered system
CN102880535A (en) * 2012-07-24 2013-01-16 北京播思软件技术有限公司 Wireless automation testing device and method used for mobile equipment
CN103399810A (en) * 2013-08-01 2013-11-20 北京安兔兔科技有限公司 Method and device for evaluating performance of mobile terminal and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090199047A1 (en) * 2008-01-31 2009-08-06 Yahoo! Inc. Executing software performance test jobs in a clustered system
CN102880535A (en) * 2012-07-24 2013-01-16 北京播思软件技术有限公司 Wireless automation testing device and method used for mobile equipment
CN103399810A (en) * 2013-08-01 2013-11-20 北京安兔兔科技有限公司 Method and device for evaluating performance of mobile terminal and mobile terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851370A (en) * 2019-11-20 2020-02-28 北京小米移动软件有限公司 Program testing method and device, and storage medium
CN110851370B (en) * 2019-11-20 2024-04-26 北京小米移动软件有限公司 Program testing method and device and storage medium
CN117093466A (en) * 2023-10-19 2023-11-21 腾讯科技(深圳)有限公司 Performance test method and device, electronic equipment and storage medium
CN117093466B (en) * 2023-10-19 2024-01-16 腾讯科技(深圳)有限公司 Performance test method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN105468527B (en) 2018-09-04

Similar Documents

Publication Publication Date Title
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
US9454467B2 (en) Method and apparatus for mining test coverage data
KR102537875B1 (en) Method and apparatus for dinamically injecting fault for vehicle ecu software test
CN110659256B (en) Multi-computer room synchronization method, computing device and computer storage medium
US20170115969A1 (en) System and method for automatically generating device drivers for run time environments
CN104424094A (en) Method and device for obtaining abnormal information and intelligent terminal device
CN103049371A (en) Testing method and testing device of Android application programs
CN104182335A (en) Software testing method and device
CN102402479B (en) For the intermediate representation structure of static analysis
CN100498715C (en) Method for simulating IPMI by BIOS
CN105653438B (en) The striding course automated testing method and device of Android device
CN107608609B (en) Event object sending method and device
JP2017084082A (en) Simulation device, test scenario file creation method, and test method using test scenario file
US11003570B2 (en) Performing a mirror test for localization testing
CN106528429A (en) UI testing method and device
CN109032947A (en) For the test method of operating system, device, equipment and storage medium
EP2883134A1 (en) Executable software specification generation
CN113518187B (en) Video editing method and device
CN105468527A (en) Test method and device of assembly in application
CN112395182A (en) Automatic testing method, device, equipment and computer readable storage medium
CN105373339A (en) Hard disk data copy method and system
US20160283050A1 (en) Adaptive tour interface engine
CN112860587A (en) UI automatic test method and device
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
KR102103590B1 (en) Method for automatic test of program compatibility and apparatus using the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant