CN103023717B - A kind of server performance method of testing across language - Google Patents

A kind of server performance method of testing across language Download PDF

Info

Publication number
CN103023717B
CN103023717B CN201210489982.6A CN201210489982A CN103023717B CN 103023717 B CN103023717 B CN 103023717B CN 201210489982 A CN201210489982 A CN 201210489982A CN 103023717 B CN103023717 B CN 103023717B
Authority
CN
China
Prior art keywords
test
language
data
function
encryption
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.)
Expired - Fee Related
Application number
CN201210489982.6A
Other languages
Chinese (zh)
Other versions
CN103023717A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201210489982.6A priority Critical patent/CN103023717B/en
Publication of CN103023717A publication Critical patent/CN103023717A/en
Application granted granted Critical
Publication of CN103023717B publication Critical patent/CN103023717B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of server performance method of testing across language, be applied to server performance test, solve the contradiction between test machine and test script performance.High-level objects language is used to carry out the preliminary treatment of the encoded/encrypted of data; When needs carry out sending/receiving data, the built-in function of invoked procedure written send/receive, and the function of use procedure language carries out arrangement, the display of instant data.In this way, to use elementary process language to test to greatest extent, only use high-level objects language to carry out preliminary treatment, few variable in test loop generates as far as possible, reduces test machine pressure, and realize the object of encryption/encoding function to reach.

Description

A kind of server performance method of testing across language
Technical field
The present invention relates to a kind of server test method, particularly relate to a kind of server performance method of testing across language.
Background technology
Current existing server performance method of testing, most test for page end or game end, its principle be by simulant-client and service end agreement, carry out high concurrent pressure or for a long time connection test.Test time, due to test machine to carry out simultaneously height concurrent/test for a long time, need the immediate status etc. of test result being preserved, arranges display performance simultaneously.Therefore test script is generally simple and efficient, carries out and simply send/receive, the performance pressures to test machine during to reduce test as far as possible.Test language is also the procedural language of language as C using direct contact bottom layer, the OO JAVA/C++ of few use.
But along with the development of science and technology, these original method of testings, progressively expose some defects: the first, cannot resolve some novel coding transfer methods, as the data format specifications of these character streams of Protocol Buffers, the compression specification that gzip is such; The second, under various circumstances encrypted transmission has difficulties.As the cipher mode that Developmental Engineer oneself in android writes, usually can refer to the public library/class of JAVA, usually can not find corresponding bag in other language, this causes simulation to generate difficulty data; If the 3rd client returned content is through encryption/coding, the result is also very difficult; If the 4th uses OO high-level language (JAVA/C++ etc.) to enter performance test comprehensively, owing to using a lot of public libraries in test process, test machine is probably caused to realize high concurrent, do not test the peak performance of server, such test result is not just in all senses.
These defects expose the performance tradeoff of test machine and test script: test machine general performance is not very good (compared with server), and object based programming takies a large amount of resources, therefore in order to the performance of server can be tested out, object based programming can not be used comprehensively; And along with the development of science and technology, the data transfer mode of a large amount of encryption/coding produces, require to use Object--oriented method to carry out resolving/decoded data during test.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, a kind of server performance method of testing across language is provided, test to use elementary process language to greatest extent, high-level objects language is only used to carry out preliminary treatment, few variable in test loop generates as far as possible, reduce test machine pressure to reach, and realize the object of encryption/encoding function.
In order to achieve the above object, the technical solution used in the present invention is, a kind of server performance method of testing across language, is applied to server performance test, comprises the following steps:
Step 1, introduce packaged procedure function class, introduce encryption/coding function;
The character string of the data that step 2, predefine storage return;
The container of the decoded storage of step 3, predefine, this container can preserve decoded content;
Step 4, acquisition test data, be stored in an array, called after original data set by all test datas;
Step 5, judge whether to be encrypted initial data/to encode;
Step 6, if desired encrypt/coding, use all data of encryption/encryption algorithm to original data set to encode, be stored in a new array, called after test data set, if do not encode, then directly uses original data set;
Step 7, preliminary treatment complete, and start circulating pressure test;
If step 8 without the need to encryption, then randomly draws the member of an original data set as test data; If need encryption, then randomly draw the member of a test array as test data;
Step 9, transmission detecting information;
Step 10, the content returned is stored in character string;
Step 11, if desired to returned content decoding, then call decoding functions, and the content after having decoded be stored in container;
Whether step 12, basis need decoding, by obtaining the content of character string/container, judge whether this test is passed through;
Step 13, call instant messages collect function, preserve instant messages;
Step 14, judge whether test terminate, if do not terminate, jump to step 8;
Terminate if step 15 is tested, stop script test.
Further, also comprise before step 1 procedural language function is encapsulated.
Further, described procedural language function comprises transmitting/receiving data function and instant messages collects function.
Further, described instant messages comprises hits, throughput, network traffics and test errors information.
Compared with prior art, the invention has the beneficial effects as follows: the transmission problem solving encoded/encrypted; Use OO programming, there is good extendibility; All test datas are carried out preliminary treatment, the compiled test data when initialization.Simplifying the script in cyclic process in a large number, alleviating the pressure that test machine produces because using object oriented language; The class of use procedure language in cyclic process, has simply fast characteristic.Not only alleviate the burden of test machine, also greatly reduce the possibility that test script is made mistakes simultaneously.
Accompanying drawing explanation
Fig. 1 is method flow diagram of the present invention.
Embodiment
Purport of the present invention is to overcome the deficiencies in the prior art, provides a kind of server performance method of testing across language, solves the contradiction between test machine and test script performance.The present invention uses high-level objects language (JAVA/C++) to carry out the preliminary treatment of the encoded/encrypted of data; When needs carry out sending/receiving data, the built-in function of invoked procedure written send/receive, and the function of use procedure language carries out arrangement, the display of instant data.In this way, to use elementary process language to test to greatest extent, only use high-level objects language to carry out preliminary treatment, few variable in test loop generates as far as possible, reduces test machine pressure, and realize the object of encryption/encoding function to reach.
Be described in detail, to be interpretated more in-depth technical characteristic of the present invention and advantage with reference to accompanying drawing below in conjunction with embodiment.
In order to realize this method, needing the class of the elementary process language encapsulation first obtained, and calling in the script of high-level language.Wherein, the encapsulation process language function of needs is as follows: the function of transmitting/receiving data; Collect the function of instant messages, comprise hits, throughput, network traffics, error number etc.By introducing the class that these have encapsulated, and obtaining the class of algorithms of encryption/coding from exploitation, introducing in high-level language, just can realize the performance test across language.
As shown in Figure 1, a kind of server performance method of testing across language, is applied to server performance test, comprises the following steps method flow diagram of the present invention:
Step 1, introduce packaged procedure function class, introduce encryption/coding function;
The character string of the data that step 2, predefine storage return;
The container of the decoded storage of step 3, predefine, this container can preserve decoded content;
Step 4, acquisition test data, be stored in an array, called after original data set by all test datas;
Step 5, judge whether to be encrypted initial data/to encode;
Step 6, if desired encrypt/coding, use all data of encryption/encryption algorithm to original data set to encode, be stored in a new array, called after test data set, if do not encode, then directly uses original data set;
Step 7, preliminary treatment complete, and start circulating pressure test;
If step 8 without the need to encryption, then randomly draws the member of an original data set as test data; If need encryption, then randomly draw the member of a test array as test data;
Step 9, transmission detecting information;
Step 10, the data returned by server are stored in character string, and these data are binary character stream;
Step 11, if desired to returned content decoding, then call decoding functions, and the content after having decoded be stored in container;
Whether step 12, basis need decoding, by obtaining the content of character string/container, judge whether this test is passed through;
Step 13, call instant messages collect function, preserve instant messages;
Step 14, judge whether test terminate, if do not terminate, jump to step 8;
Terminate if step 15 is tested, stop script test.
Further, also comprise before step 1 procedural language function is encapsulated.
Further, described procedural language function comprises transmitting/receiving data function and instant messages collects function.
Further, described instant messages comprises hits, throughput, network traffics and test errors information.
The invention solves the transmission problem of encoded/encrypted; Use OO programming, there is good extendibility; All test datas are carried out preliminary treatment, the compiled test data when initialization.Simplifying the script in cyclic process in a large number, alleviating the pressure that test machine produces because using object oriented language; The class of use procedure language in cyclic process, has simply fast characteristic.Not only alleviate the burden of test machine, also greatly reduce the possibility that test script is made mistakes simultaneously.
Above content is in conjunction with concrete optimal way further description made for the present invention, should not assert that specific embodiment of the invention is confined to above explanation.For those skilled in the art, without departing from the inventive concept of the premise, some simple deduction or replace can also be made, within the protection range that the claim that all should be considered as being submitted to by the present invention is determined.

Claims (3)

1., across a server performance method of testing for language, be applied to server performance test, comprise the following steps:
Step 1, introduce packaged procedure function class, introduce encryption/coding function;
The character string of the data that step 2, predefine storage return;
The container of the decoded storage of step 3, predefine, this container can preserve decoded content;
Step 4, acquisition test data, be stored in an array, called after original data set by all test datas;
Step 5, judge whether to be encrypted initial data/to encode;
Step 6, if desired encrypt/coding, use all data of encryption/encryption algorithm to original data set to encode, be stored in a new array, called after test data set, if do not encode, then directly uses original data set;
Step 7, preliminary treatment complete, and start circulating pressure test;
If step 8 without the need to encryption, then randomly draws the member of an original data set as test data; If need encryption, then randomly draw the member of a test array as test data;
Step 9, transmission detecting information;
Step 10, the data returned by server are stored in character string, and these data are binary character stream;
Step 11, if desired to returned content decoding, then call decoding functions, and the content after having decoded be stored in container;
Whether step 12, basis need decoding, by obtaining the content of character string/container, judge whether this test is passed through;
Step 13, call instant messages collect function, preserve instant messages;
Step 14, judge whether test terminate, if do not terminate, jump to step 8;
Terminate if step 15 is tested, stop script test;
Also comprise before step 1 and procedural language function is encapsulated.
2. the server performance method of testing across language according to claim 1, is characterized in that: described procedural language function comprises transmitting/receiving data function and instant messages collects function.
3. the server performance method of testing across language according to claim 2, is characterized in that: described instant messages comprises hits, throughput, network traffics and test errors information.
CN201210489982.6A 2012-11-27 2012-11-27 A kind of server performance method of testing across language Expired - Fee Related CN103023717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210489982.6A CN103023717B (en) 2012-11-27 2012-11-27 A kind of server performance method of testing across language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210489982.6A CN103023717B (en) 2012-11-27 2012-11-27 A kind of server performance method of testing across language

Publications (2)

Publication Number Publication Date
CN103023717A CN103023717A (en) 2013-04-03
CN103023717B true CN103023717B (en) 2015-08-05

Family

ID=47971869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210489982.6A Expired - Fee Related CN103023717B (en) 2012-11-27 2012-11-27 A kind of server performance method of testing across language

Country Status (1)

Country Link
CN (1) CN103023717B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1561036A (en) * 2004-02-24 2005-01-05 华中科技大学 Network station server performance test system based on TPC-W benchmark
CN101068172A (en) * 2007-06-14 2007-11-07 中兴通讯股份有限公司 Equipment testing device and method
CN101141319A (en) * 2007-05-23 2008-03-12 中兴通讯股份有限公司 Function operation packaging based automatization test script implementing method and apparatus
CN101145130A (en) * 2007-08-02 2008-03-19 中兴通讯股份有限公司 Simple network management protocol software test device and test method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7159021B2 (en) * 2002-06-27 2007-01-02 Microsoft Corporation System and method for testing peer-to-peer network applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1561036A (en) * 2004-02-24 2005-01-05 华中科技大学 Network station server performance test system based on TPC-W benchmark
CN101141319A (en) * 2007-05-23 2008-03-12 中兴通讯股份有限公司 Function operation packaging based automatization test script implementing method and apparatus
CN101068172A (en) * 2007-06-14 2007-11-07 中兴通讯股份有限公司 Equipment testing device and method
CN101145130A (en) * 2007-08-02 2008-03-19 中兴通讯股份有限公司 Simple network management protocol software test device and test method

Also Published As

Publication number Publication date
CN103023717A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
TWI598765B (en) Data protection methods and devices
CN104283853B (en) A kind of method, terminal device and network equipment for improving Information Security
CN103458087A (en) Remote mobile phone test experiencing method based on RTMP
CN104503780A (en) Method and device for providing application channel packet
CN105848145A (en) WIFI intelligent configuration method and device
CN105141567B (en) Interaction data processing method and system, the exchange method of terminal applies and server-side
CN102857393B (en) Message simulation based non-public cryptographic algorithm SSL (secure sockets layer) VPN (virtual private network) equipment performance testing method
CN104424497B (en) A kind of method and device that dynamic two-dimension code generates
CN103368673B (en) Conformance testing adapter based on TTCN-3
CN106293688B (en) A kind of processing method of web-page requests, device and system
CN105025102A (en) Network storage and calling method and storage system of 3D printing model file
CN105354505A (en) Image adaption method and electronic device
CN202159435U (en) Study machine for dispensing mobile education resources
CN108737353B (en) Data encryption method and device based on data analysis system
CN105138399A (en) Cross-platform mobile Web application runtime engine
CN103023717B (en) A kind of server performance method of testing across language
CN103391291A (en) Codec based on terminal consistency testing system and coding and decoding method
CN114095781A (en) Multimedia data processing method and device, electronic equipment and storage medium
CN101917709A (en) Short message service hardware encryption transmission system based on chaos algorithm
CN107229844B (en) Detect method, apparatus, server-side and the client of SWF file caller
CN102487526B (en) Protocol conformance test method and system thereof
CN104836598A (en) Method, device and system of business processing based on near field communication
CN104661043A (en) Method, device and system for transmitting transport stream
CN116244359B (en) Test data gathering device, method and equipment
CN105450711B (en) Realize the method and system that first terminal and second terminal are bound automatically

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
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150805

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