CN102855175B - Automated testing method and device - Google Patents

Automated testing method and device Download PDF

Info

Publication number
CN102855175B
CN102855175B CN201110177482.4A CN201110177482A CN102855175B CN 102855175 B CN102855175 B CN 102855175B CN 201110177482 A CN201110177482 A CN 201110177482A CN 102855175 B CN102855175 B CN 102855175B
Authority
CN
China
Prior art keywords
test
according
virtual user
client
automated
Prior art date
Application number
CN201110177482.4A
Other languages
Chinese (zh)
Other versions
CN102855175A (en
Inventor
姚明军
Original Assignee
北京新媒传信科技有限公司
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 北京新媒传信科技有限公司 filed Critical 北京新媒传信科技有限公司
Priority to CN201110177482.4A priority Critical patent/CN102855175B/en
Publication of CN102855175A publication Critical patent/CN102855175A/en
Application granted granted Critical
Publication of CN102855175B publication Critical patent/CN102855175B/en

Links

Abstract

The invention provides a kind of automated testing method, relate to automatization testing technique field, comprising: according to the client preset and Virtual User corresponding to protocol generation; For each Virtual User constructor method; According to the Virtual User generated and method of operating generating test use case thereof; Test case according to generating is built automated test frame and writes test script.In the present invention, according to the client preset and Virtual User corresponding to protocol generation, the test that various client carries out protocol signaling rank can be simulated, writing of test case, test frame and test script is completed according to use-case process invocation respective virtual user, also secondary development can be carried out on the basis of test case, development and testing framework according to the actual requirements, so just, be provided with great dirigibility, ensure that at any time with demand synchronous development test script, drastically increase the maintainability of code.

Description

Automated testing method and device

Technical field

The present invention relates to automatization testing technique field, particularly relate to a kind of automated testing method and device.

Background technology

In software test, usually, after devising test case and pass through evaluation, perform test by tester step by step according to the code described in test case, compare with the actual result obtained and expected result.In order to save manpower, time or hardware resource, improving testing efficiency, just introducing the concept of automatic test.Automatic test is a kind of process artificial behavioral test driven being converted into machine execution.

Automatic test and software development process are inherently the same, utilize automated test tool (being equivalent to SDK (Software Development Kit)), through the analysis (demand analysis in software process) to testing requirement, design automatic test cases (requirement specification in software process), thus build the framework (Outline Design in software process) of automatic test, design and write test script (detailed design and coding), the correctness of test script, thus complete this cover test script (namely major function is the application software of test).

The exploitation of automatic test script is generally once tested by manual operation, uses the recording function of automated test tool simultaneously, carried out operation note is got off, generate test script.The script playback success ratio that this technology generates is lower, and later maintenance is also more difficult, cannot simulate a large number of users, can not meet the test of server end.

Summary of the invention

(1) technical matters that will solve

The technical problem to be solved in the present invention is, for above-mentioned defect, how to provide a kind of automated testing method and device, it can simulate a large number of users, can meet client's diversity test of server end.

(2) technical scheme

For solving the problems of the technologies described above, the invention provides a kind of automated testing method, comprising:

Step B: according to the client preset and Virtual User corresponding to protocol generation;

Step C: be each Virtual User constructor method;

Step D: according to the Virtual User generated and method of operating generating test use case thereof;

Step e: the test case according to generating is built automated test frame and writes test script.

Wherein, before step B, described automated testing method comprises further:

Steps A: client and client application agreement are set.

Wherein, after step e, described automated testing method comprises further:

Step F: according to the test case amendment automated test frame generated and test script.

Wherein, described client comprises cell-phone customer terminal or pc client.

Wherein, the operating system of described cell-phone customer terminal includes but not limited to Symbian or Android.

Wherein, described client application agreement includes but not limited to Http agreement or Session Initiation Protocol.

Wherein, described method of operating comprises interpolation good friend, deletes good friend or invite good friend.

Present invention also offers a kind of automatic test device, comprising:

Virtual User generation unit, for according to the client preset and Virtual User corresponding to protocol generation;

Method of operating tectonic element, for being each Virtual User constructor method;

Test cases technology unit, for according to generate Virtual User and method of operating generating test use case;

Test frame and test script generation unit, for building automated test frame according to the test case generated and write test script.

Wherein, described automatic test device comprises further: client and client application agreement setting unit, for arranging client and client application agreement.

Wherein, described automatic test device comprises further:

Test frame and test script amendment unit, for revising automated test frame and test script according to the test case generated.

(3) beneficial effect

The invention discloses a kind of automated testing method and device, according to the client preset and Virtual User corresponding to protocol generation, the test that various client carries out protocol signaling rank can be simulated, writing of test case, test frame and test script is completed according to use-case process invocation respective virtual user, also secondary development can be carried out on the basis of test case, development and testing framework according to the actual requirements, so just, be provided with great dirigibility, ensure that at any time with demand synchronous development test script, drastically increase the maintainability of code.Virtual User can infinitely create in theory, can simulate a large number of users parallel work-flow, can also realize the test of server end performance and load.

Accompanying drawing explanation

Fig. 1 is the process flow diagram of the automated testing method described in the embodiment of the present invention;

Fig. 2 is the structural representation of the automatic test device described in the embodiment of the present invention.

Embodiment

Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples for illustration of the present invention, but are not used for limiting the scope of the invention.

As shown in Figure 1, automated testing method of the present invention comprises:

Steps A: client and client application agreement are set;

Described client can be cell-phone customer terminal or pc client, and the operating system of described cell-phone customer terminal can include but not limited to Symbian or Android (Android).Namely, the operating system of described cell-phone customer terminal can include but not limited to Java1.0, Symbian1.0, Symbian3.2, Java3.2, PPC (PocketPC) 3.2, Symbian2.0/2.1/2.2/32.0/3.1, Java2.1/2.2/3.0/3.1 or PPC2.1/2.2/3.0/3.1, and the operating system of described pc client can include but not limited to PCV4; Described client application agreement comprises Http agreement and Session Initiation Protocol and various upgraded version thereof, namely includes but not limited to Http, SIP-C1.0, Mcp2.0 (i.e. SIP-C4.0), Mcp1.0 (i.e. SIP-C2.0) or SIP-C4.0;

Step B: according to the client arranged and Virtual User corresponding to protocol generation;

In this step, specifically according to the corresponding relation generating virtual user of following table 1.

Table 1 Virtual User generates table

As described in Table 1, this step specifically comprises: generate corresponding Virtual User J2meUser according to client Java1.0 and agreement Http, corresponding Virtual User SymbianUser is generated according to client Symbian1.0 and agreement SIP-C1.0, according to client Symbian3.2, Java3.2 or PPC3.2 and agreement Mcp2.0 (i.e. SIP-C4.0) generates corresponding Virtual User MapUser, according to client Symbian2.0/2.1/2.2/32.0/3.1, Java2.1/2.2/3.0/3.1 or PPC2.1/2.2/3.0/3.1 and agreement Mcp1.0 (i.e. SIP-C2.0) generates corresponding Virtual User McpUser, corresponding Virtual User PcUser is generated according to client rs PC V4 and agreement SIP-C4.0.

Step C: be each Virtual User constructor method;

Described method of operating comprises adds good friend, deletion good friend or invites good friend etc.

Step D: according to the Virtual User generated and method of operating generating test use case thereof;

Such as, initialising subscriber A and user B is SymbianUser respectively, and after user A and user B logs in, it is good friend that user A adds user B.

In this step, C# language can be used with the Form generation test case of dll file, and realize across language and platform invoke, reusability is stronger.

Step e: the test case according to generating is built automated test frame and writes test script;

If when larger variation occurs demand, automated testing method of the present invention also comprises:

Step F: according to the test case amendment automated test frame generated and test script.

If no special instructions, the order in above-mentioned various step combination all performs according to the order of English alphabet.

Pass through above-mentioned steps, according to the client preset and Virtual User corresponding to protocol generation, the test that various client carries out protocol signaling rank can be simulated, writing of test case, test frame and test script is completed according to use-case process invocation respective virtual user, also secondary development can be carried out on the basis of test case, development and testing framework according to the actual requirements, so just, be provided with great dirigibility, ensure that at any time with demand synchronous development test script, drastically increase the maintainability of code.Virtual User can infinitely create in theory, can simulate a large number of users parallel work-flow, can also realize the test of server end performance and load.

As shown in Figure 2, corresponding with above-mentioned automated testing method, automatic test device of the present invention comprises:

Virtual User generation unit, for according to the client preset and Virtual User corresponding to protocol generation;

Method of operating tectonic element, for being each Virtual User constructor method;

Test cases technology unit, for according to generate Virtual User and method of operating generating test use case;

Test frame and test script generation unit, for building automated test frame according to the test case generated and write test script.

Further, described automatic test device comprises:

Client and client application agreement setting unit, for arranging client and client application agreement;

Further, described automatic test device comprises:

Test frame and test script amendment unit, for revising automated test frame and test script according to the test case generated.

In sum, the invention discloses a kind of automated testing method and device, according to the client preset and Virtual User corresponding to protocol generation, the test that various client carries out protocol signaling rank can be simulated, test case is completed according to use-case process invocation respective virtual user, writing of test frame and test script, also secondary development can be carried out on the basis of test case, development and testing framework according to the actual requirements, so just, be provided with great dirigibility, ensure that at any time with demand synchronous development test script, drastically increase the maintainability of code.Virtual User can infinitely create in theory, can simulate a large number of users parallel work-flow, can also realize the test of server end performance and load.

Above embodiment is only for illustration of the present invention; and be not limitation of the present invention; the those of ordinary skill of relevant technical field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all equivalent technical schemes also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (9)

1. an automated testing method, is characterized in that, comprising:
Step B: according to the operating system of the client preset and the Virtual User of application protocol generation correspondence;
Step C: be each Virtual User constructor method, described method of operating comprises adds good friend, deletion good friend or invites good friend;
Step D: use C# language with the Form generation test case of dll file according to the Virtual User generated and method of operating thereof;
Step e: the test case according to generating is built automated test frame and writes test script.
2. automated testing method according to claim 1, is characterized in that, before step B, comprises further:
Steps A: client and client application agreement are set.
3. automated testing method according to claim 1, is characterized in that, after step e, comprises further:
Step F: according to the test case amendment automated test frame generated and test script.
4. the automated testing method according to any one of claim 1-3, is characterized in that, described client comprises cell-phone customer terminal or pc client.
5. automated testing method according to claim 4, is characterized in that, the operating system of described cell-phone customer terminal comprises Symbian or Android.
6. the automated testing method according to any one of claim 1-3, is characterized in that, described client application agreement comprises Http agreement or Session Initiation Protocol.
7. an automatic test device, is characterized in that, comprising:
Virtual User generation unit, the operating system of client preset for basis and the Virtual User of application protocol generation correspondence;
Method of operating tectonic element, for being each Virtual User constructor method, described method of operating comprises adds good friend, deletion good friend or invites good friend;
Test cases technology unit, for using C# language with the Form generation test case of dll file according to the Virtual User generated and method of operating thereof;
Test frame and test script generation unit, for building automated test frame according to the test case generated and write test script.
8. automatic test device according to claim 7, is characterized in that, comprises further: client and client application agreement setting unit, for arranging client and client application agreement.
9. the automatic test device according to claim 7 or 8, is characterized in that, comprises further:
Test frame and test script amendment unit, for revising automated test frame and test script according to the test case generated.
CN201110177482.4A 2011-06-28 2011-06-28 Automated testing method and device CN102855175B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110177482.4A CN102855175B (en) 2011-06-28 2011-06-28 Automated testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110177482.4A CN102855175B (en) 2011-06-28 2011-06-28 Automated testing method and device

Publications (2)

Publication Number Publication Date
CN102855175A CN102855175A (en) 2013-01-02
CN102855175B true CN102855175B (en) 2016-04-06

Family

ID=47401779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110177482.4A CN102855175B (en) 2011-06-28 2011-06-28 Automated testing method and device

Country Status (1)

Country Link
CN (1) CN102855175B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795711A (en) * 2014-01-10 2014-05-14 宁波金信通讯技术有限公司 Automated test method and system based on mobile phone client sides
CN104375934B (en) * 2014-10-22 2017-05-03 江苏科技大学 Method for testing reliability of Android mobile phone software
CN107404426A (en) * 2016-05-20 2017-11-28 阿里巴巴集团控股有限公司 The method, apparatus and electronic equipment of batch addition good friend in immediate communication tool
CN106597144B (en) * 2016-11-18 2019-05-17 国电南瑞科技股份有限公司 The planned function detecting method of centralized FA transmitted based on simulation

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339534A (en) * 2008-06-17 2009-01-07 金蝶软件(中国)有限公司 Software test apparatus and test method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7725772B2 (en) * 2007-07-18 2010-05-25 Novell, Inc. Generic template to autogenerate reports for software target testing

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339534A (en) * 2008-06-17 2009-01-07 金蝶软件(中国)有限公司 Software test apparatus and test method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于Web应用的性能测试研究;苏波;《中国优秀硕士学位论文全文数据库信息科技辑》;20080315(第3期);第11-12,43-46页 *
基于客户端的网络服务性能测试模型及工具实现;陈伍一等;《全国第16届计算机科学与技术应用(CACIS)学术会议论文集 》;20040801;第1033-1038页 *

Also Published As

Publication number Publication date
CN102855175A (en) 2013-01-02

Similar Documents

Publication Publication Date Title
Jabbari et al. What is DevOps? A systematic mapping study on definitions and practices
US8762113B2 (en) Method and apparatus for load testing online server systems
Anand et al. An orchestrated survey of methodologies for automated software test case generation
CN102222012B (en) For the static type checking of external data source
Amalfitano et al. A gui crawling-based technique for android mobile application testing
Van Breugel et al. Models and Verification of BPEL
Parejo et al. Multi-objective test case prioritization in highly configurable systems: A case study
US8954922B2 (en) Service emulator substituting for backend components to satisfy needs of front end components
CN104536899B (en) A kind of software deployment and its maintaining method based on Intelligent cluster
CN105373401B (en) Software package method for automatically releasing and system
Ali et al. A state-based approach to integration testing based on UML models
CN104038605B (en) The method of telephone POS payment terminal transaction test
CN101241467B (en) Automatized white box test system and method facing to WEB application
Edwards et al. Analysis of the effectiveness of global virtual teams in software engineering projects
CN105138448A (en) Method and device for page test at front end
CN103425574B (en) A kind of method and device of test application program
CN103543993B (en) Application builds method and system
US20060117222A1 (en) Test agent architecture
Easterbrook Climate change: a grand software challenge
CN104407980A (en) Mobile application automated testing device and method
CN102708050A (en) Method and system for testing mobile application
Nguyen et al. FRASAD: A framework for model-driven IoT Application Development
Köksal A survey of network simulators supporting wireless networks
WO2007001108A1 (en) System for providing feature-oriented software product line engineering environment
CN106933745A (en) WEB automatic interface testing methods and system

Legal Events

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