Test method and apparatus

A test method and test device technology, applied in the computer field, can solve problems such as consuming manpower and material resources, and achieve the effect of improving performance test efficiency

Inactive Publication Date: 2016-06-01
SHENZHEN TENCENT COMP SYST CO LTD
View PDF6 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the prior art, the detection of a certain function of the software consumes a lot of manpower and material resources through manual repeated detection of specific functions.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Test method and apparatus
  • Test method and apparatus
  • Test method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0037] figure 2 Shows a flow chart of a test method, such as figure 2 As shown, the method of this embodiment is used to test an application program running in a terminal, and the method includes the following steps:

[0038] Step S101: Load a first timer at the function entry of the application program, where the first timer is used to obtain the first time of the terminal.

[0039] The function is a function in a programming language. These statements in the function procedure are used to accomplish some meaningful work-usually processing text, controlling input or calculating values. By introducing the function name and required parameters into the program code, the function can be executed (or called) in the program. It can be known that each function of the application program is implemented by functions of different applications.

[0040] In this embodiment, the first timer is used to test the additional unit of the function, and is used to obtain the real-time time when th...

no. 2 example

[0055] This embodiment provides a test method. This embodiment is similar to the first embodiment, except that: image 3 As shown, the method further includes after step S105:

[0056] Step S201: Load a counter corresponding to the function name according to the function name, where the counter is used to count the number of invocations of the function of the application program.

[0057] Further, the data of the counter is stored in the corresponding position of the function name in the log of the application program.

[0058] The counter is used to record the number of times the function is called. It can be known that if the function has been called, the counter has already been assigned. In an example, if the function is loaded for the first time, a counter of the function can be created in the log. For example, you can directly use Arabic numerals to store the counter value.

[0059] Step S202: Update the value of the counter.

[0060] Update the value of the counter, for exampl...

no. 3 example

[0064] This embodiment provides a test method. This embodiment is similar to the second embodiment, except that: Figure 4 As shown, after step S202, it further includes:

[0065] Step S301: Load a counter corresponding to the function name according to the function name, where the counter is used to count the number of invocations of the function of the application program.

[0066] In one example, the average call time is obtained by dividing the sum of each call time of the function by the value in the counter.

[0067] Step S302: Store the average calling time and the longest calling time of the function of the application program in correspondence with the function name.

[0068] In one embodiment, the average calling time and the longest calling time of the function of the application are stored in the log corresponding to the application, and the average calling time and the longest calling time are written into the log in. It can be known that the average call time and maximu...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a test method and apparatus, which are used for testing an application running in a terminal. The test method in one embodiment can comprise the following steps of loading a first timer at a function entry of the application, wherein the first timer is used for obtaining first time of the terminal; loading a second timer at a function termination part of the application, wherein the second timer is used for obtaining second time of the terminal; executing a function name acquisition instruction at the function termination part of the application to obtain a function name of a function of the application; according to the first time and the second time, calculating call time of the function of the application; and correspondingly storing the call time and the function name. According to the method, a test unit can be automatically loaded and the test efficiency can be improved.

Description

Technical field [0001] The invention relates to the field of computer technology, in particular to a testing method and device. Background technique [0002] With the popularization of electronic equipment, in order to meet more needs of users, there are more and more terminal software. The management and testing of software in electronic equipment is becoming more and more important. In the prior art, regarding the detection of a certain function of the software, manual repeated detection of specific functions consumes a lot of manpower and material resources. Therefore, improving the efficiency of performance detection is an urgent problem to be solved. Summary of the invention [0003] In view of this, the present invention provides a testing method and device, which can effectively improve the efficiency of performance testing. [0004] A test method, the method includes the following steps: [0005] Loading a first timer at the function entry of the application program, where...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 马识佳
Owner SHENZHEN TENCENT COMP SYST CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products