CN103064785A - Method and device for detection of terminal performance - Google Patents

Method and device for detection of terminal performance Download PDF

Info

Publication number
CN103064785A
CN103064785A CN2012105132578A CN201210513257A CN103064785A CN 103064785 A CN103064785 A CN 103064785A CN 2012105132578 A CN2012105132578 A CN 2012105132578A CN 201210513257 A CN201210513257 A CN 201210513257A CN 103064785 A CN103064785 A CN 103064785A
Authority
CN
China
Prior art keywords
test case
class
test
full frame
execution
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
CN2012105132578A
Other languages
Chinese (zh)
Other versions
CN103064785B (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 Qihoo Technology 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 CN201210513257.8A priority Critical patent/CN103064785B/en
Publication of CN103064785A publication Critical patent/CN103064785A/en
Application granted granted Critical
Publication of CN103064785B publication Critical patent/CN103064785B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for detection of terminal performance. The method includes building a test information base class and a test execution base class. The test information base class is used for describing test case information. The test execution base class is used for executing a test case. A corresponding test case information class is derived from the test information base class, and a corresponding test case execution class is derived from the test execution base class aiming at the test case. Parameter transferred in a constructor by a test case information class comprises test case execution class names of current test cases. A corresponding test case object is obtained by conducting instantiation on the test case information class. A corresponding test case execution class is obtained according to corresponding test case execution class name aiming at the test case object, and the obtained test case execution class is called to execute a corresponding test case. The method and the device are capable of reducing development period of products and improving product development efficiency.

Description

A kind of detection method of terminal capabilities and device
Technical field
The present invention relates to technical field of measurement and test, be specifically related to a kind of detection method and device of terminal capabilities.
Background technology
Along with the rise of mobile Internet, the portable terminals such as smart mobile phone have become one of indispensable instrument in people's daily life gradually.Yet at present, the portable terminal of producer's Development and Production that each are different is had nothing in common with each other, thereby also can't be directly the different mobile terminal of variant producer be compared, and can't do the performance of the different mobile terminal of variant producer and assess and carry out type selecting.
For the problems referred to above, more existing testing softwares can test the performance of portable terminal more all sidedly, are convenient to the assessment of comparing of the performance of the different mobile terminal of variant producer.The performance of the portable terminal that can test at present specifically can comprise: CPU integer performance, CPU floating-point performance, 2D(two dimension, Two Dimensions) drawing performance, 3D(three-dimensional, Three Dimensions) drawing performance, database performance, SD card (safe digital card, Secure Digital Memory Card) speed etc.
Because the usually corresponding test case of a kind of terminal capabilities is so the test of terminal capabilities often needs to carry out the test of a plurality of test cases.The detection method of existing terminal capabilities is generally, write corresponding code segment for a test case, wherein the code segment between the test case has certain association (code segment such as next test case need to depend on execution result of a upper test case etc.).
Adopt the detection method of existing terminal capabilities, the required numerous steps of testing process probably all need to change if testing requirement has occured to change, and this just relates to whole code segment and changes.For example, if need to adjust the execution sequence of a plurality of test cases, then need to adjust the position of a plurality of code segments of the test case that is associated, make mistakes than being easier to; And for example, if need to increase new test case, then need again to write a corresponding code segment of complete testing process, and the operation that complete testing process relates to is very many, for example can comprise initialization, time control, interface control, detecting and evaluating algorithms etc.In a word, the detection method of existing terminal capabilities has dumb and the poor problem of extendability, like this, if use the detection method of existing terminal capabilities in product development process, then increases easily the construction cycle of product, reduces the development efficiency of product.
In a word, need the urgent technical matters that solves of those skilled in the art to be exactly: the construction cycle how can reduce product, the development efficiency of raising product.
Summary of the invention
In view of the above problems, the present invention has been proposed in order to a kind of detection method and device of a kind of terminal capabilities that overcomes the problems referred to above or address the above problem at least in part are provided.
According to one aspect of the present invention, a kind of detection method of terminal capabilities is provided, comprising:
Create detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases;
For test case, derive corresponding test case info class from described detecting information base class, and, derive corresponding test case from described test execution base class and carry out class; Wherein, the parameter transmitted in constructed fuction of described test case info class comprises that the test case of current test case carries out the class title;
Described test case info class is carried out instantiation obtain corresponding test case object;
For described test case object, carry out test case corresponding to class name acquiring according to its corresponding test case and carry out class, and call the test case execution class of obtaining and carry out corresponding test case.
Alternatively, described method also comprises:
The test case object that instantiation is obtained is added into tabulation, and the original execution of test case object is not masked as and carries out in the described tabulation;
Obtaining execute flag from described tabulation is unenforced test case object;
For described unenforced test case object, carry out test case corresponding to class name acquiring according to its associated test case and carry out class, and call the test case execution class of obtaining and carry out corresponding test case; The execute flag that complete test case object is corresponding is executed.
Alternatively, described test execution base class comprises: the non-full frame test base class that is used for carrying out the full frame test base class of full frame test case and is used for carrying out non-full frame test case; Wherein, described full frame test base class is derived from by the Activity class of Android system;
Then described test case execution class comprises: carry out class and carry out class from the derivative non-full frame test case of described non-full frame test base class from the derivative full frame test case of described full frame test base class.
Whether include current test case in the information of described test case is the detection method of full frame test case;
Then the described test case of obtaining of calling is carried out the step that class is carried out the test of terminal capabilities, comprising:
Whether current test case is the detection method of full frame test case in the described test case object by calling, and detects whether the corresponding test case of described test case object is full frame test case;
When the corresponding test case of described test case object is full frame test case, calls corresponding full frame test case execution class and carry out corresponding test case;
When the corresponding test case of described test case object is non-full frame test case, calls corresponding non-full frame test case execution class and carry out corresponding test case.
Alternatively, the described step of calling the test of corresponding full frame test case execution class execution terminal capabilities comprises:
Create and start the object of a full frame test class from current active, carry out corresponding test case by the object of this full frame test class, and return corresponding test result to current active;
Current active is obtained the test result that the object of this new full frame test class returns.
Alternatively, described test of calling corresponding non-full frame test case execution class execution terminal capabilities comprises:
Described non-full frame test case execution class is carried out instantiation obtain corresponding non-full frame test case object;
Create the background test thread, described non-full frame test case object transfer is advanced this background test thread;
Start the corresponding test case of this background test thread execution.
Alternatively, the member function of described test execution base class comprises: the testing process function that is used for describing testing process; Carry out class from the derivative test case of described test execution base class and cover described testing process function to carry out the testing process of corresponding test case.
Alternatively, the member function of described test execution base class comprises one or more in the following testing attribute function: be used for describing carrying out and need before the current test case first of time of waiting for to wait for function, wheel for the execution wheel number of describing current test case is counted function, and be used for to describe carrying out every the wheel needs before the current test case second of time of waiting for to wait for function;
Carry out class from the derivative test case of described test execution base class and cover described testing attribute function to carry out the testing attribute of corresponding test case.
According to another aspect of the present invention, a kind of pick-up unit of terminal capabilities is provided, comprising:
The base class creation module is suitable for creating detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases;
Derive from module, be suitable for for test case, derive corresponding test case info class from described detecting information base class, and, derive corresponding test case from described test execution base class and carry out class; Wherein, the parameter transmitted in constructed fuction of described test case info class comprises that the test case of current test case carries out the class title;
The instantiation module is suitable for that described test case info class is carried out instantiation and obtains corresponding test case object;
Object is carried out the class acquisition module, is suitable for for described test case object, carries out test case corresponding to class name acquiring according to its corresponding test case and carries out class; And
Object test case execution module is suitable for calling the test case execution class of obtaining and carries out corresponding test case.
The detection method of a kind of terminal capabilities of the present invention and device have following beneficial effect:
The present invention according to the abstract detecting information base class that obtains for the information of describing test case of the detection attribute of terminal capabilities, reaches the test execution base class that is used for implementation of test cases by adopting OO method; Like this, the instance object that only needs to be used the derived class of the derived class of described detecting information base class and test execution base class for test case can be carried out arbitrarily test case, and the scheduling of a plurality of test cases only need be dispatched the instance object of the derived class of corresponding described detecting information base class and got final product; Therefore, adopt the solution of the present invention, if variation has occured testing requirement, then only need to change corresponding instance object and get final product.For example, if need to adjust the execution sequence of a plurality of test cases, only the execution sequence of the instance object of the derived class of the corresponding described detecting information base class of a plurality of test cases of need adjustment gets final product, and need not to adjust concrete code segment, also just can avoid occurring the phenomenon that code segment is made mistakes; And for example, if need to increase new test case, the instance object that only needs to be used the derived class of the derived class of described detecting information base class and test execution base class for this new test case gets final product, and need not again to write a corresponding code segment of complete testing process; In a word, the testing scheme of terminal capabilities of the present invention can carry out a plurality of test cases neatly, and, easily any increase of adaptive testing use-case, deletion or order are adjusted, and in a word, the present invention can improve dirigibility and the extendability of terminal capabilities test.
In product development process, use the detection method of terminal capabilities of the present invention, the construction cycle that then can reduce product, the development efficiency of raising product.
Above-mentioned explanation only is the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of instructions, and for 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.
Description of drawings
By reading hereinafter detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skills.Accompanying drawing only is used for the purpose of preferred implementation is shown, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts with identical reference symbol.In the accompanying drawings:
Fig. 1 shows according to an embodiment of the invention a kind of process flow diagram of detection method of terminal capabilities;
Fig. 2 shows according to an embodiment of the invention a kind of process flow diagram of detection method of terminal capabilities;
Fig. 3 shows according to an embodiment of the invention a kind of process flow diagram of detection method of terminal capabilities;
Fig. 4 shows according to an embodiment of the invention a kind of structural drawing of pick-up unit of terminal capabilities;
Fig. 5 shows according to an embodiment of the invention a kind of process flow diagram of testing result display packing of terminal capabilities;
Fig. 6 shows a kind of according to an embodiment of the invention exhibiting method synoptic diagram of terminal capabilities testing result;
Fig. 7 shows a kind of according to an embodiment of the invention exhibiting method synoptic diagram of terminal capabilities testing result; And
Fig. 8 shows a kind of according to an embodiment of the invention structural drawing of demonstration device of terminal capabilities testing result.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in the accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
With reference to Fig. 1, show according to an embodiment of the invention a kind of process flow diagram of detection method of terminal capabilities, specifically can comprise:
Step 101, establishment detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases;
Step 102, for test case, derive corresponding test case info class from described detecting information base class, and, derive corresponding test case from described test execution base class and carry out class; Wherein, the parameter transmitted in constructed fuction of the described test case info class test case that specifically can include current test case is carried out the class title;
Step 103, described test case info class is carried out instantiation obtain corresponding test case object;
Step 104, for described test case object, carry out test case corresponding to class name acquiring according to its corresponding test case and carry out class, and call the test case of obtaining and carry out class and carry out corresponding test case.
The embodiment of the invention can be applied to smart mobile phone, panel computer, notebook computer, PDA(personal digital assistant, Personal DigitalAssistant) detection of mobile terminal performance such as, can be applied to the detection of the fixed terminal performances such as desktop computer, the embodiment of the invention is not limited concrete terminal yet.
What the detection method of existing terminal capabilities adopted is processor-oriented design, and the procedure-oriented here analyzes the needed step of dealing with problems exactly, then with function these steps is realized step by step, calls successively one by one just passable in the time of use.Detection for terminal capabilities, such behavior has been dispersed in numerous steps in processor-oriented design, be conducive to the designer and carry out various simplification according to actual conditions, but the shortcoming with extendability and very flexible, be in particular in: if variation has occured testing requirement, then the required numerous steps of testing process probably all need to change, this just relates to whole code segment and changes etc., and whole code segment is changed the construction cycle that increases easily product, reduces the development efficiency of product.
And the employing of the detection method of terminal capabilities of the present invention is OO design, the object-oriented here is to resolve into each object consisting of problem transaction, the purpose of setting up object is not in order to finish a step, but in order to describe the behavior of certain things in whole step of dealing with problems.In OO design, the such behavior of the detection of terminal capabilities only may occur in example object, so if variation has occured testing requirement, then only need to change corresponding instance object and get final product, it is local changing.
In specific implementation, the present invention according to the abstract detecting information base class that obtains for the information of describing test case of the detection attribute of terminal capabilities, reaches the test execution base class that is used for implementation of test cases by adopting OO abstract method; Like this, by adopting OO inheritance method, the instance object that only needs to be used the derived class of the derived class of described detecting information base class and test execution base class for test case can be carried out arbitrarily test case.
Wherein, for the abstract detecting information base class that obtains, can be by describe the information of test case with member variable and member function; For the abstract test execution base class that obtains, can be by describe the execution information of test case with member variable and member function, here can comprise concrete testing process in the execution information of test case, for example, a complete testing process specifically can comprise: initialization, time control, interface control, detecting and evaluating algorithms, Free up Memory etc.
In a preferred embodiment of the present invention, the member function of described test execution base class specifically can comprise: the testing process function that is used for describing testing process; Carry out class from the derivative test case of described test execution base class and cover described testing process function to carry out the testing process of corresponding test case.
According to inheritance mechanism, for derive corresponding test case info class from described detecting information base class, it can inherit member variable and the member function of described detecting information base class automatically, and it can also transmit by constructed fuction the parameter of corresponding test case; Here, the parameter of test case specifically can include the test case execution class title of current test case.
In addition, be appreciated that, according to inheritance mechanism, test case info class and test case are carried out class as subclass, when deriving from, the member function that can cover as required parent is realized the private information of corresponding test case, and for example, test case is carried out class can carry out evaluation and test flow algorithm of corresponding test case etc. in the testing process function.
Because the test case info class is to derive from from described detecting information base class, it is to derive from from described test execution base class that test case is carried out class, like this, the instance object that is used described test case info class and test case execution class can be carried out arbitrarily test case.
The present invention has following advantage:
Adopt the solution of the present invention, if variation has occured testing requirement, then only need to change corresponding instance object and get final product.
For example, if need to adjust the execution sequence of a plurality of test cases, only the execution sequence of the instance object of the derived class of the corresponding described detecting information base class of a plurality of test cases of need adjustment gets final product, and need not to adjust concrete code segment, also just can avoid occurring the phenomenon that code segment is made mistakes;
And for example, if need to increase new test case, the instance object that only needs to be used the derived class of the derived class of described detecting information base class and test execution base class for this new test case gets final product, and need not again to write a corresponding code segment of complete testing process;
In a word, the testing scheme of terminal capabilities of the present invention can carry out a plurality of test cases neatly, and, easily any increase of adaptive testing use-case, deletion or order are adjusted, and in a word, the present invention can improve dirigibility and the extendability of terminal capabilities test.
With reference to Fig. 2, show according to an embodiment of the invention a kind of process flow diagram of detection method of terminal capabilities, specifically can comprise:
Step 201, establishment detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases;
Step 202, for test case, derive corresponding test case info class from described detecting information base class, and, derive corresponding test case from described test execution base class and carry out class; Wherein, the parameter transmitted in constructed fuction of the described test case info class test case that specifically can include current test case is carried out the class title;
Step 203, described test case info class is carried out instantiation obtain corresponding test case object;
Step 204, the test case object that instantiation is obtained are added into tabulation, and the original execution of test case object is not masked as and carries out in the described tabulation;
Step 205, to obtain execute flag from described tabulation be unenforced test case object;
Step 206, for described unenforced test case object, carry out test case corresponding to class name acquiring according to its associated test case and carry out class, and call the test case of obtaining and carry out class and carry out corresponding test case; The execute flag that complete test case object is corresponding is executed.
The embodiment of the invention is added into tabulation with all test case objects, in the testing process of terminal capabilities, only need obtain one by one unenforced test case object, and find corresponding test case to carry out class, the terminal capabilities testing result that just can obtain wanting by carrying out corresponding test case for the test case object that obtains.In specific implementation, can obtain by the mode of traversal of lists that to obtain execute flag in the described tabulation be unenforced test case object.And, be appreciated that and can after executing a test case object, its execute flag be revised as executed.
With reference to Fig. 3, show according to an embodiment of the invention a kind of process flow diagram of detection method of terminal capabilities, specifically can comprise:
Step 301, establishment detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases; Described test execution base class specifically can comprise: the non-full frame test base class that is used for carrying out the full frame test base class of full frame test case and is used for carrying out non-full frame test case; Wherein, described full frame test base class is derived from by the Activity class of Android system; Whether specifically can include current test case in the information of described test case is the detection method of full frame test case;
Step 302, for test case, derive corresponding test case info class from described detecting information base class, and, derive corresponding test case from described test execution base class and carry out class; Wherein, the parameter transmitted in constructed fuction of the described test case info class test case that specifically can include current test case is carried out the class title; Described test case is carried out class and specifically can be comprised: carry out class and carry out class from the derivative non-full frame test case of described non-full frame test base class from the derivative full frame test case of described full frame test base class;
Step 303, described test case info class is carried out instantiation obtain corresponding test case object;
Step 304, for described test case object, carry out test case corresponding to class name acquiring according to its corresponding test case and carry out class;
Step 305, whether current test case is the detection method of full frame test case in the described test case object by calling, and detects whether the corresponding test case of described test case object is full frame test case;
Step 306, when the corresponding test case of described test case object is full frame test case, call corresponding full frame test case and carry out class and carry out corresponding test case;
Step 307, when the corresponding test case of described test case object is non-full frame test case, call corresponding non-full frame test case and carry out class and carry out corresponding test case.
Present portable terminal uses Android operating system mostly, and is at first movable to Activity(in the Android operating system) principle describe.In the Android operating system, an Activity is an application component, and it can be used for providing a screen, and it also can be used for alternately to finish a certain task, such as the email that dials, takes pictures, sends, see map etc.; Usually, each Activity is given a window, can draw user interface at this above the window, and window is full of screen usually, but also can float on less than screen on other window.
The performance of the portable terminal that can test at present specifically can comprise: CPU integer performance, CPU floating-point performance, 2D drawing performance, 3D drawing performance, database performance, storage system etc.Wherein, the test of 2D drawing performance, 3D drawing performance belongs to the full frame test in foreground, and the full frame test in foreground need to move in the Activity of oneself; And the performance tests such as CPU integer performance, CPU floating-point performance, database, storage system belong to the non-full frame test in backstage, and the non-full frame test in backstage need to not move in the Activity of oneself.
Therefore, the embodiment of the invention takes out be used to the full frame test base class of carrying out full frame test case with for the non-full frame test base class of carrying out non-full frame test case according to the testing attribute of terminal capabilities; And, owing to full frame test base class need to move in the Activity of oneself, so need to be derived from by the Activity class of Android system; In addition, can also for test case, send corresponding full frame test case to carry out class and non-full frame test case execution class from full frame test base class and non-full frame test base class, and it is called to carry out corresponding test case.
Need to prove, because described detecting information base class can be by describing the information of test case with member variable and member function, so whether in actual applications, can adopt member function to describe current test case is the detection method of full frame test case.For example, in a kind of application example of the present invention, whether can adopt member function public Boolean isBackground () to detect current test case is full frame test case, if, then return false, expression is full frame test case, otherwise returns true, the full frame test case of expression right and wrong.Like this, step 305 just can use the pointer of described test case object to call this member function, and returns corresponding result.
In a preferred embodiment of the present invention, the described step 306 of calling the test of corresponding full frame test case execution class execution terminal capabilities specifically can comprise:
Step S101, create and start the object of a full frame test class from current active, carry out corresponding test case by the object of this full frame test class, and return corresponding test result to current active;
Step S 102, current active are obtained the test result that the object of this new full frame test class returns.
Here, current active is used for representing the caller of full frame test case execution class, and this current activity generally shows as for the main window that shows test interface; Carry out in the invoked procedure of class in full frame test case, this current activity is mainly used in starting the required Activity of full frame test by the object that creates and start a full frame test class, and, wait for that the object of this full frame test class returns corresponding test result.
In specific implementation, can pass through startActivityForResult (Intent intent, int requestCode) created and started a full frame test class from current active object.Wherein, Intent is the intention class of Android, intent is an object of intention class, it is used for transmitting the required parameter of object that starts a full frame test class, specifies the class name (this class name also is that test case is carried out class name in the step 304) of the object that the full frame test class that need to start is arranged in this parameter; The value of requestCode is self-defining, can be used for identifying the object of the full frame test class that needs start.
For full frame test class, because deriving from from described full frame test base class for test case, it obtains, so its description has concrete testing process; The object of this full frame test class can obtain according to full frame test class instantiation, and it can according to described testing process, carry out corresponding test case.
In specific implementation, the object of this full frame test class can pass through setResult (int resultCode, Intent data) preserves test result, and onActivityResult (the int requestCode by calling current active, int resultCode, Intent data) returns the test result of preserving.Wherein, if the object of this full frame test class may have several different test results to return, can be identified differentiation with the resultCode parameter, data is used for the data that expression is returned, onActivityResult (int requestCode, int resultCode, Intent data) be the call back function of current active.
Further, current active can be according to resultCode parameter and data parameter, obtains the test result that the object of this new full frame test class returns.
In another kind of preferred embodiment of the present invention, the described step 307 of calling the test of corresponding non-full frame test case execution class execution terminal capabilities specifically can comprise:
Step S201, described non-full frame test case is carried out class carry out instantiation and obtain corresponding non-full frame test case object;
Step S202, establishment background test thread advance this background test thread with described non-full frame test case object transfer;
Step S203, start the corresponding test case of this background test thread execution.
Suppose that the name that described non-full frame test case is carried out class is called BackgroundTest, the pointer of current test case object is pointer, then step S201 can realize by BackgroundTester tester=pointer.getBackgroundTester (intent), wherein, intent be responsible for to single job in using action, action relates to data, additional data is described;
Because non-full frame test is at running background, in order to upgrade at the not influencing front stage interface, so needing a background test thread finishes, in a kind of application example of the present invention, step S202 can realize by BackgroundTestThread thread=newBackgroundTestThread (tester).Wherein, BackgroundTestThread is from the derivative thread class of Thread class, and, in the process of the object thread of instantiation BackgroundTestThread, can in the constructed fuction of BackgroundTestThread, transmit described non-full frame test case object, tested in run () method by described non-full frame test case object, and notice interface, foreground; Here, run () method moves thread under a kind of circulation always, until do not satisfy condition.
Step S203 can realize that by thread.start () after carrying out thread.start (), thread can automatically perform run () method; Be appreciated that carrying out thread.start () before, can also be set to maximum by the priority of thread.setPriority (Thread.MAX_PRIORITY) thread, make its preferential execution.
In said method embodiment, the description of each embodiment of the method is all emphasized particularly on different fields, there is not the part that describes in detail in certain embodiment of the method, can get final product referring to the associated description of additive method embodiment.
And what those skilled in the art were easy to expect is: it all is feasible that the combination in any of said method embodiment is used, but this instructions has not just described in detail one by one at this as space is limited.
At last, what need to replenish is, in a preferred embodiment of the present invention, the member function of described test execution base class specifically can comprise one or more in the following testing attribute function: be used for describing carrying out and need before the current test case first of time of waiting for to wait for function, wheel for the execution wheel number of describing current test case is counted function, and be used for to describe carrying out every the wheel needs before the current test case second of time of waiting for to wait for function;
Carry out class from the derivative test case of described test execution base class and cover described testing attribute function to carry out the testing attribute of corresponding test case.
In actual applications, a test case may need to test many wheels.Take the test of CPU floating-point performance as example, more stable in order to make test result, just need several wheels of carrying out more; Also namely, in the embodiment of the invention, carry out the wheel number for be same test case; The second wait function is every stand-by period of taking turns between the test case namely;
In addition, because the individual character of test case, may need certain hour to do homework, all calculate standby work accurately such as work such as the initialization in the testing process and Free up Memories, therefore, in order to improve the stability of test result, first waits for that function can be used for representing the stand-by period between the different test cases.
Be appreciated that those skilled in the art can arrange described first and wait for function and time numerical value corresponding to the second stand-by period according to the time needs, the present invention is not limited this.
In addition, for the ease of the monitoring of tester for test, in another kind of preferred embodiment of the present invention, can also include the descriptor of current test case in the information of described test case;
Then described method can also comprise:
Step S301, obtain the descriptor of test case corresponding to described test case object;
The descriptor of step S302, test case that described test case object is corresponding is shown on the test interface;
Progress msg on step S303, the described test interface of renewal.
The member function getTitle () that supposes the detecting information base class is used for returning the test case description, the pointer of supposing current test case object is pointer, so, step S301 can realize by String tag=pointer.getTitle (), step 302 can be passed through txtItem.setText (String.format (strProgressArg, tag, index, list.size ())) realize that step S303 can realize by benchHandler.post (progressUpdater).Wherein,
TxtItem is a TextView control;
SetText () is used for arranging the literal that wish will show;
BenchHandler is a Message Processing Handler, because non-UI(user interface, User Interface) can not upgrade the UI control in the thread, so must process by message;
Post () is used for sending a message;
ProgressUpdater is a UpdateProgressHandler, it derives from from Runnable, be the another kind of implementation of Java thread, post () needs a Runnable object as parameter, and its concrete effect is exactly to notify benchHandler to upgrade the interface.
This preferred embodiment is by showing the descriptor of test case and the implementation progress information of test case at test interface, to realize the monitoring of test.
For making those skilled in the art understand better the present invention, provide according to an embodiment of the invention a kind of example of detection method of terminal capabilities at this, specifically can comprise:
Step S401, establishment detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases; Described test execution base class specifically can comprise: the non-full frame test base class that is used for carrying out the full frame test base class of full frame test case and is used for carrying out non-full frame test case; Wherein, described full frame test base class is derived from by the Activity class of Android system; Whether specifically can include current test case in the information of described test case is the detection method of full frame test case;
With reference to table 1, show the example of the member variable of a kind of according to an embodiment of the invention detecting information base class Case.
Table 1
The member variable title The member variable type Member variable is described
Tag String The test case title
Package String Test case bag name
BACKGROUNDTESTER BackgroundTester The object of BackgroundTester
tester Tester The object of Tester
mRepeatNow Integer The repeated test number of times
Intent Intent Be used for preserving the parameter of transmitting
context Context Context
With reference to table 2, show the example of the member function of a kind of according to an embodiment of the invention detecting information base class Case.
Table 2
Figure BDA00002524467200121
Figure BDA00002524467200131
With reference to table 3, show the example of the member function of a kind of according to an embodiment of the invention full frame test base class and non-full frame test base class.
Table 3
The member function title The member function name type Member function is described
getTag() String Evaluation and test use-case Tag is set
sleepBeforeStart() int First waits for function
sleepBetweenRound int Second waits for function
oneRound() void The testing process function
Step S402, for test case, derive corresponding test case info class from described detecting information base class, derive corresponding full frame test case from described full frame test base class and carry out class, and, derive corresponding full frame test case from described full frame test base class and carry out class; Wherein, the parameter transmitted in constructed fuction of the described test case info class test case that specifically can include current test case is carried out the class title;
The below illustrates the implementation procedure that derives corresponding test case info class from described detecting information base class respectively take the test case of 2D performance and CPU integer as example:
Detecting information base class derivation 1,
A newly-built Case2D class, for the information of describing the corresponding test case of 2D performance, such derives from detecting information base class Case.
Figure BDA00002524467200132
Figure BDA00002524467200141
Detecting information base class derivation 2,
A newly-built CaseCPUInteger class, for the information of describing the corresponding test case of CPU integer performance, such derives from detecting information base class Case.
Figure BDA00002524467200142
Suppose that full frame test base class is Tester, the below is take the corresponding test case of 2D performance as example, explanation derives the example that corresponding full frame test case is carried out class OpenGLTest from described full frame test base class, owing to be full frame test case, OpenGLTest derives from and has realized the corresponding interface of parent Tester and grandfather's class Activity from the Tester class:
Figure BDA00002524467200151
Figure BDA00002524467200161
Suppose that non-full frame test base class is BackgroundTester, the below illustrates from described non-full frame test base class to derive the example that corresponding non-full frame test case is carried out class TesterCPUInteger take the corresponding test case of CPU integer performance as example:
Figure BDA00002524467200162
Step S403, described test case info class is carried out instantiation obtain corresponding test case object;
At this, describe with the example that is instantiated as of the corresponding test case info class of 2D performance and CPU integer performance:
Case?graphics2d=new?Case2D(this);
Case?cpuint=new?CaseCPUInteger(this);
Also namely, graphics2d and cpuint are respectively 2D performance and test case object corresponding to CPU integer performance.
Step S404, the test case object that instantiation is obtained are added into tabulation, and the original execution of test case object is not masked as and carries out in the described tabulation;
Step S405, to obtain execute flag from described tabulation be unenforced test case object;
Step S406, for described unenforced test case object, carry out test case corresponding to class name acquiring according to its associated test case and carry out class;
Need to prove that owing to call the constructed fuction of class when instance object, with the example that is instantiated as of Case2D, its constructed fuction is as follows:
Case2D(Context?context){
super(context,"Case2D","OpenGLTest",1,1);
}
Wherein, context, " Case2D ", " OpenGLTest ", 1,1 is the parameter of transmitting in constructed fuction, wherein, " Case2D " is the title of test case, and " OpenGLTest " carries out the class title for test case, carries out class so can obtain corresponding test case.
Step S407, utilize the pointer of described unenforced test case object, obtain the descriptor of test case corresponding to described test case object, the descriptor of the test case that described test case object is corresponding is shown on the test interface, and upgrades the progress msg on the described test interface;
Step S408, utilize the pointer of described unenforced test case object, call whether current test case is the detection method of full frame test case in the described test case object, detect whether the corresponding test case of described unenforced test case object is full frame test case;
Step S409, when the corresponding test case of described unenforced test case object is full frame test case, call corresponding full frame test case and carry out class and carry out corresponding test case;
Step S410, when the corresponding test case of described unenforced test case object is non-full frame test case, call corresponding non-full frame test case and carry out class and carry out corresponding test case.
The correlative code example of step S408-step S410 is as follows:
Figure BDA00002524467200171
Figure BDA00002524467200181
With reference to Fig. 4, show according to an embodiment of the invention a kind of structural drawing of pick-up unit of terminal capabilities, specifically can comprise:
Base class creation module 401 is suitable for creating detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases;
Derive from module 402, be suitable for for test case, derive corresponding test case info class from described detecting information base class, and, derive corresponding test case from described test execution base class and carry out class; Wherein, the parameter transmitted in constructed fuction of described test case info class comprises that the test case of current test case carries out the class title;
Instantiation module 403 is suitable for that described test case info class is carried out instantiation and obtains corresponding test case object;
Object is carried out class acquisition module 404, is suitable for for described test case object, carries out test case corresponding to class name acquiring according to its corresponding test case and carries out class; And
Object test case execution module 405 is suitable for calling the test case execution class of obtaining and carries out corresponding test case.
In a preferred embodiment of the present invention, described device can also comprise:
Object adds module, and the test case object that is suitable for instantiation is obtained is added into tabulation, and the original execution of test case object is not masked as and carries out in the described tabulation;
Do not carry out the object acquisition module, being suitable for obtaining from described tabulation execute flag is unenforced test case object;
Do not carry out the object execution module, be suitable for for described unenforced test case object, carry out test case corresponding to class name acquiring according to its associated test case and carry out class, and call the test case execution class of obtaining and carry out corresponding test case.
In another kind of preferred embodiment of the present invention, described test execution base class specifically can comprise: the non-full frame test base class that is used for carrying out the full frame test base class of full frame test case and is used for carrying out non-full frame test case; Wherein, described full frame test base class is derived from by the Activity class of Android system;
Then described test case execution class specifically can comprise: carry out class and carry out class from the derivative non-full frame test case of described non-full frame test base class from the derivative full frame test case of described full frame test base class.
Whether can also include current test case in the information of described test case is the detection method of full frame test case;
Then described object test case execution module 405 specifically can comprise:
Full frame detection sub-module is suitable for whether current test case is the detection method of full frame test case in the described test case object by calling, and detects whether the corresponding test case of described test case object is full frame test case;
The full frame submodule that calls is suitable for when the corresponding test case of described test case object is full frame test case, calls corresponding full frame test case execution class and carries out corresponding test case;
The non-full frame submodule that calls is suitable for when the corresponding test case of described test case object is non-full frame test case, calls corresponding non-full frame test case execution class and carries out corresponding test case.
In another preferred embodiment of the present invention, the described full frame submodule that calls specifically can comprise:
The Object Creation unit is suitable for creating and starting from current active the object of a full frame test class, carries out corresponding test case by the object of this full frame test class, and returns corresponding test result to current active; And
Acquiring unit is suitable for current active and obtains the test result that the object of this new full frame test class returns as a result.
In a preferred embodiment of the present invention, the described non-full frame submodule that calls specifically can comprise:
Non-full frame instantiation unit is suitable for that described non-full frame test case execution class is carried out instantiation and obtains corresponding non-full frame test case object;
The thread creation transfer unit is suitable for creating the background test thread, and described non-full frame test case object transfer is advanced this background test thread; And
The thread start unit is suitable for starting the corresponding test case of this background test thread execution.
In another kind of preferred embodiment of the present invention, the member function of described test execution base class specifically can comprise: the testing process function that is used for describing testing process; Carry out class from the derivative test case of described test execution base class and cover described testing process function to carry out the testing process of corresponding test case.
In another preferred embodiment of the present invention, the member function of described test execution base class specifically can comprise one or more in the following testing attribute function: be used for describing carrying out and need before the current test case first of time of waiting for to wait for function, wheel for the execution wheel number of describing current test case is counted function, and be used for to describe carrying out every the wheel needs before the current test case second of time of waiting for to wait for function;
Then in specific implementation, can carry out class from the derivative test case of described test execution base class and cover described testing attribute function to carry out the testing attribute of corresponding test case.
With reference to Fig. 5, show according to an embodiment of the invention a kind of process flow diagram of testing result display packing of terminal capabilities, specifically can comprise:
Step 501, establishment detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases;
Step 502, for test case, derive corresponding test case info class from described detecting information base class, and, derive corresponding test case from described test execution base class and carry out class; Wherein, the parameter transmitted in constructed fuction of described test case info class comprises that the test case of current test case carries out the class title;
Step 503, described test case info class is carried out instantiation obtain corresponding test case object;
Step 504, for described test case object, carry out test case corresponding to class name acquiring according to its corresponding test case and carry out class, and call the test case execution class of obtaining and carry out corresponding test case, obtain corresponding terminal capabilities testing result;
The request of the terminal capabilities detection triggers on step 505, the User interface represents described terminal capabilities testing result.
In a kind of application example of the present invention, the trigger request of the terminal capabilities testing result on can the User interface represents described terminal capabilities testing result on the UI of current terminal, checks for the user; The user can be known the performance of current terminal according to the described described terminal capabilities testing result that represents, for example, the described terminal capabilities testing result of current terminal can be used as the user and whether buys one of factor of current terminal, perhaps, the described terminal capabilities testing result of a plurality of terminals can be used as one of comparison factor of a plurality of terminal capabilities.In a word, the present invention can be by representing the terminal capabilities testing result, to show more real terminal capabilities testing result of feedback to the user.
Need to prove, the request of the terminal capabilities detection triggers on the user interface can operate generation by users such as mouse, keyboard, touch gestures, and this user operates specifically and can obtain for the interface element that button on the user interface etc. has a Trigger Function.
With reference to Fig. 6, show a kind of according to an embodiment of the invention exhibiting method synoptic diagram of terminal capabilities testing result, wherein, the user can send database performance by " beginning scoring " button on the interface and detect the request that triggers, the invention process can be asked according to this detection of the related terminal capabilities of execution in step 601-604 so, the detection progress of while display terminal performance on the interface, wherein 87% is exactly an example that detects progress.After sending this request, " beginning scoring " button on the interface becomes " stopping scoring " button, is appreciated that the user can stop the detection of current database performance by clicking " stopping scoring " button.In addition, after the detection progress reaches 100%, the present invention can show corresponding terminal capabilities testing result automatically, perhaps, the request (as clicking other button except " beginning scoring " button or " stopping to mark " button) of the terminal capabilities detection triggers of the present invention on can the User interface, represent corresponding terminal capabilities testing result, after reaching 100% in the detection progress, " stopping scoring " button on the interface becomes " checking scoring " button, be appreciated that the user can come representing of triggering terminal performance test results by clicking " checking scoring " button.
Be appreciated that described terminal capabilities testing result can represent separately the testing result of certain terminal capabilities, also can represent the testing result of a plurality of terminal capabilities; Perhaps, when successively carrying out the corresponding test case of a plurality of terminal capabilities, also can successively represent the testing result of these a plurality of terminal capabilities; In a word, the present invention is not limited concrete ways of presentation.
With reference to Fig. 7, show a kind of according to an embodiment of the invention exhibiting method synoptic diagram of terminal capabilities testing result, it represents the testing result of the terminal capabilities form with score, the terminal capabilities that represents specifically can comprise: CPU integer performance, CPU floating-point performance, 2D drawing performance, 3D drawing performance, database IO(input and output, Input/output) score of the performances such as performance, SD card writing speed, SD card reading speed, and the total points of terminal capabilities (score of overall performance).
In some embodiments of the invention, detect client and the terminal capabilities testing result of current terminal can be reported the detection server, and, detect server and the terminal capabilities testing result of multiple terminal sample can also be handed down to the detection client, represent to the user by detecting client, know terminal capabilities testing result rank in the multiple terminal sample of current mobile terminal etc. to make things convenient for the user.
Be appreciated that those skilled in the art can adopt various ways of presentation with described terminal capabilities testing result in various positions, the embodiment of the invention to described terminal capabilities testing result represent the position and concrete ways of presentation is not limited.
With reference to Fig. 8, show according to an embodiment of the invention a kind of structural drawing of testing result display device of terminal capabilities, specifically can comprise:
Base class creation module 801 is suitable for creating detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases;
Derive from module 802, be suitable for for test case, derive corresponding test case info class from described detecting information base class, and, derive corresponding test case from described test execution base class and carry out class; Wherein, the parameter transmitted in constructed fuction of described test case info class comprises that the test case of current test case carries out the class title;
Instantiation module 803 is suitable for that described test case info class is carried out instantiation and obtains corresponding test case object;
Object is carried out class acquisition module 804, is suitable for for described test case object, carries out test case corresponding to class name acquiring according to its corresponding test case and carries out class;
Object test case execution module 805 is suitable for calling the test case execution class of obtaining and carries out corresponding test case; And
Result presentation module 806 is used for the request of the terminal capabilities detection triggers on the User interface, represents described terminal capabilities testing result.
In specific implementation, base class creation module 801, derivation module 802, instantiation module 803, object execution class acquisition module 804 and object test case execution module 805 can be positioned at various computer systems or server end, and these three modules cooperate the detection of finishing database performance; Result presentation module 806 can be arranged in various displays, is used for representing described database performance testing result; Wherein, described computer system or display can be positioned on the portable terminals such as smart mobile phone, panel computer, notebook computer, PDA, also can be positioned on the fixed terminals such as desktop computer.
Intrinsic not relevant with any certain computer, virtual system or miscellaneous equipment with demonstration at this algorithm that provides.Various general-purpose systems also can be with using based on the teaching at this.According to top description, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.Should be understood that and to utilize various programming languages to realize content of the present invention described here, and the top description that language-specific is done is in order to disclose preferred forms of the present invention.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be put into practice in the situation of these details not having.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the description to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes in the above.Yet the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires the more feature of feature clearly put down in writing than institute in each claim.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate clearly thus this embodiment into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different from this embodiment the module in the equipment among the embodiment.Can be combined into a module or unit or assembly to the module among the embodiment or unit or assembly, and can be divided into a plurality of submodules or subelement or sub-component to them in addition.In such feature and/or process or unit at least some are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless in addition clearly statement, disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces in this instructions (comprising claim, summary and the accompanying drawing followed).
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included among other embodiment, the combination of the feature of different embodiment means and is within the scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, perhaps realizes with the software module of moving at one or more processor, and perhaps the combination with them realizes.It will be understood by those of skill in the art that and to use in practice microprocessor or digital signal processor (DSP) to realize according to some or all some or repertoire of parts in the equipment of the embodiment of the invention.The present invention can also be embodied as be used to part or all equipment or the device program (for example, computer program and computer program) of carrying out method as described herein.Such realization program of the present invention can be stored on the computer-readable medium, perhaps can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, and perhaps provides at carrier signal, perhaps provides with any other form.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment in the situation of the scope that does not break away from claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed in element or step in the claim.Being positioned at word " " before the element or " one " does not get rid of and has a plurality of such elements.The present invention can realize by means of the hardware that includes some different elements and by means of the computing machine of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to come imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title with these word explanations.

Claims (14)

1. the detection method of a terminal capabilities is characterized in that, comprising:
Create detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases;
For test case, derive corresponding test case info class from described detecting information base class, and, derive corresponding test case from described test execution base class and carry out class; Wherein, the parameter transmitted in constructed fuction of described test case info class comprises that the test case of current test case carries out the class title;
Described test case info class is carried out instantiation obtain corresponding test case object;
For described test case object, carry out test case corresponding to class name acquiring according to its corresponding test case and carry out class, and call the test case execution class of obtaining and carry out corresponding test case.
2. the method for claim 1 is characterized in that, also comprises:
The test case object that instantiation is obtained is added into tabulation, and the original execution of test case object is not masked as and carries out in the described tabulation;
Obtaining execute flag from described tabulation is unenforced test case object;
For described unenforced test case object, carry out test case corresponding to class name acquiring according to its associated test case and carry out class, and call the test case execution class of obtaining and carry out corresponding test case; The execute flag that complete test case object is corresponding is executed.
3. the method for claim 1 is characterized in that, described test execution base class comprises: the non-full frame test base class that is used for carrying out the full frame test base class of full frame test case and is used for carrying out non-full frame test case; Wherein, described full frame test base class is derived from by the Activity class of Android system;
Then described test case execution class comprises: carry out class and carry out class from the derivative non-full frame test case of described non-full frame test base class from the derivative full frame test case of described full frame test base class.
Whether include current test case in the information of described test case is the detection method of full frame test case;
Then the described test case of obtaining of calling is carried out the step that class is carried out the test of terminal capabilities, comprising:
Whether current test case is the detection method of full frame test case in the described test case object by calling, and detects whether the corresponding test case of described test case object is full frame test case;
When the corresponding test case of described test case object is full frame test case, calls corresponding full frame test case execution class and carry out corresponding test case;
When the corresponding test case of described test case object is non-full frame test case, calls corresponding non-full frame test case execution class and carry out corresponding test case.
4. method as claimed in claim 3 is characterized in that, the described step of calling the test of corresponding full frame test case execution class execution terminal capabilities comprises:
Create and start the object of a full frame test class from current active, carry out corresponding test case by the object of this full frame test class, and return corresponding test result to current active;
Current active is obtained the test result that the object of this new full frame test class returns.
5. method as claimed in claim 3 is characterized in that, described test of calling corresponding non-full frame test case execution class execution terminal capabilities comprises:
Described non-full frame test case execution class is carried out instantiation obtain corresponding non-full frame test case object;
Create the background test thread, described non-full frame test case object transfer is advanced this background test thread;
Start the corresponding test case of this background test thread execution.
6. the method for claim 1 is characterized in that, the member function of described test execution base class comprises: the testing process function that is used for describing testing process; Carry out class from the derivative test case of described test execution base class and cover described testing process function to carry out the testing process of corresponding test case.
7. the method for claim 1, it is characterized in that, the member function of described test execution base class comprises one or more in the following testing attribute function: be used for describing carrying out and need before the current test case first of time of waiting for to wait for function, wheel for the execution wheel number of describing current test case is counted function, and be used for to describe carrying out every the wheel needs before the current test case second of time of waiting for to wait for function;
Carry out class from the derivative test case of described test execution base class and cover described testing attribute function to carry out the testing attribute of corresponding test case.
8. the pick-up unit of a terminal capabilities is characterized in that, comprising:
The base class creation module is suitable for creating detecting information base class and test execution base class; Wherein, described detecting information base class is used for describing the information of test case, and described test execution base class is used for implementation of test cases;
Derive from module, be suitable for for test case, derive corresponding test case info class from described detecting information base class, and, derive corresponding test case from described test execution base class and carry out class; Wherein, the parameter transmitted in constructed fuction of described test case info class comprises that the test case of current test case carries out the class title;
The instantiation module is suitable for that described test case info class is carried out instantiation and obtains corresponding test case object;
Object is carried out the class acquisition module, is suitable for for described test case object, carries out test case corresponding to class name acquiring according to its corresponding test case and carries out class; And
Object test case execution module is suitable for calling the test case execution class of obtaining and carries out corresponding test case.
9. device as claimed in claim 8 is characterized in that, also comprises:
Object adds module, and the test case object that is suitable for instantiation is obtained is added into tabulation, and the original execution of test case object is not masked as and carries out in the described tabulation;
Do not carry out the object acquisition module, being suitable for obtaining from described tabulation execute flag is unenforced test case object;
Do not carry out the object execution module, be suitable for for described unenforced test case object, carry out test case corresponding to class name acquiring according to its associated test case and carry out class, and call the test case execution class of obtaining and carry out corresponding test case; The execute flag that complete test case object is corresponding is executed.
10. device as claimed in claim 8 is characterized in that, described test execution base class comprises: the non-full frame test base class that is used for carrying out the full frame test base class of full frame test case and is used for carrying out non-full frame test case; Wherein, described full frame test base class is derived from by the Activity class of Android system;
Then described test case execution class comprises: carry out class and carry out class from the derivative non-full frame test case of described non-full frame test base class from the derivative full frame test case of described full frame test base class.
Whether also include current test case in the information of described test case is the detection method of full frame test case;
Then described object test case execution module comprises:
Full frame detection sub-module is suitable for whether current test case is the detection method of full frame test case in the described test case object by calling, and detects whether the corresponding test case of described test case object is full frame test case;
The full frame submodule that calls is suitable for when the corresponding test case of described test case object is full frame test case, calls corresponding full frame test case execution class and carries out corresponding test case;
The non-full frame submodule that calls is suitable for when the corresponding test case of described test case object is non-full frame test case, calls corresponding non-full frame test case execution class and carries out corresponding test case.
11. device as claimed in claim 10 is characterized in that, the described full frame submodule that calls comprises:
The Object Creation unit is suitable for creating and starting from current active the object of a full frame test class, carries out corresponding test case by the object of this full frame test class, and returns corresponding test result to current active;
Acquiring unit is suitable for current active and obtains the test result that the object of this new full frame test class returns as a result.
12. device as claimed in claim 10 is characterized in that, the described non-full frame submodule that calls comprises:
Non-full frame instantiation unit is suitable for that described non-full frame test case execution class is carried out instantiation and obtains corresponding non-full frame test case object;
The thread creation transfer unit is suitable for creating the background test thread, and described non-full frame test case object transfer is advanced this background test thread;
The thread start unit is suitable for starting the corresponding test case of this background test thread execution.
13. device as claimed in claim 8 is characterized in that, the member function of described test execution base class comprises: the testing process function that is used for describing testing process; Carry out class from the derivative test case of described test execution base class and cover described testing process function to carry out the testing process of corresponding test case.
14. device as claimed in claim 8, it is characterized in that, the member function of described test execution base class comprises one or more in the following testing attribute function: be used for describing carrying out and need before the current test case first of time of waiting for to wait for function, wheel for the execution wheel number of describing current test case is counted function, and be used for to describe carrying out every the wheel needs before the current test case second of time of waiting for to wait for function;
Carry out class from the derivative test case of described test execution base class and cover described testing attribute function to carry out the testing attribute of corresponding test case.
CN201210513257.8A 2012-12-04 2012-12-04 A kind of detection method of terminal capabilities and device Expired - Fee Related CN103064785B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210513257.8A CN103064785B (en) 2012-12-04 2012-12-04 A kind of detection method of terminal capabilities and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210513257.8A CN103064785B (en) 2012-12-04 2012-12-04 A kind of detection method of terminal capabilities and device

Publications (2)

Publication Number Publication Date
CN103064785A true CN103064785A (en) 2013-04-24
CN103064785B CN103064785B (en) 2016-03-30

Family

ID=48107418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210513257.8A Expired - Fee Related CN103064785B (en) 2012-12-04 2012-12-04 A kind of detection method of terminal capabilities and device

Country Status (1)

Country Link
CN (1) CN103064785B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933517A (en) * 2017-12-19 2019-06-25 成都鼎桥通信技术有限公司 Test method, device and equipment based on android system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1677365A (en) * 2004-03-31 2005-10-05 微软公司 Test case inheritance controlled via attributes
US20080270840A1 (en) * 2007-04-25 2008-10-30 Samsung Electronics Co., Ltd. Device and method for testing embedded software using emulator
CN101635645A (en) * 2009-08-28 2010-01-27 中兴通讯股份有限公司 Method and device for managing network topology
CN101984416A (en) * 2010-11-02 2011-03-09 中兴通讯股份有限公司 Method and device for generating test case

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1677365A (en) * 2004-03-31 2005-10-05 微软公司 Test case inheritance controlled via attributes
US20080270840A1 (en) * 2007-04-25 2008-10-30 Samsung Electronics Co., Ltd. Device and method for testing embedded software using emulator
CN101635645A (en) * 2009-08-28 2010-01-27 中兴通讯股份有限公司 Method and device for managing network topology
CN101984416A (en) * 2010-11-02 2011-03-09 中兴通讯股份有限公司 Method and device for generating test case

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933517A (en) * 2017-12-19 2019-06-25 成都鼎桥通信技术有限公司 Test method, device and equipment based on android system

Also Published As

Publication number Publication date
CN103064785B (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN103019900A (en) Method and device for displaying detection results of terminal performance
EP3053028A1 (en) Rendering interpreter for visualizing data provided from restricted environment container
CN103155428A (en) Apparatus and method for adaptive gesture recognition in portable terminal
KR101783049B1 (en) Generating user help information for customised user interfaces
CN112099790A (en) Method, device and equipment for determining page theme and storage medium
US11151314B2 (en) Extensible grid layout
US20230004362A1 (en) Code execution and data processing pipeline
CN103809864A (en) Method and device for switching interfaces dynamically
US20170177330A1 (en) Logical level difference detection between software revisions
US20110307520A1 (en) Reflection over objects
US11537392B2 (en) Dynamic review of software updates after pull requests
US10289219B2 (en) Communicating with an unsupported input device
US11663245B2 (en) Initial loading of partial deferred object model
CN103034503A (en) Script executing method, system and browser
US11256603B2 (en) Generating and attributing unique identifiers representing performance issues within a call stack
CN103064785B (en) A kind of detection method of terminal capabilities and device
CN114510334A (en) Class instance calling method and device, electronic equipment and automatic driving vehicle
Dantas et al. Towards aspect-oriented programming for context-aware systems: A comparative study
CN114115908A (en) Instruction set generation method, program analysis method, device and storage medium
CN103049313A (en) Label closing device and method for browser
CN103049507A (en) Label adding device and method for browser
CN115686506A (en) Data display method and device, electronic equipment and storage medium
US9471569B1 (en) Integrating information sources to create context-specific documents
CN112487314A (en) Building search method and device based on knowledge graph and storage medium
US11997154B1 (en) Systems and methods for visualizing digital content

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220725

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160330