CN102855175A - Automated testing method and automated testing device - Google Patents

Automated testing method and automated testing device Download PDF

Info

Publication number
CN102855175A
CN102855175A CN2011101774824A CN201110177482A CN102855175A CN 102855175 A CN102855175 A CN 102855175A CN 2011101774824 A CN2011101774824 A CN 2011101774824A CN 201110177482 A CN201110177482 A CN 201110177482A CN 102855175 A CN102855175 A CN 102855175A
Authority
CN
China
Prior art keywords
test
client
automated testing
virtual user
automated
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
CN2011101774824A
Other languages
Chinese (zh)
Other versions
CN102855175B (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 Feinno Communication Technology Co Ltd
Original Assignee
Beijing Feinno Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Feinno Communication Technology Co Ltd filed Critical Beijing Feinno Communication Technology Co Ltd
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
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides an automated testing method, which relates to the technical field of automated testing. The method comprises the following steps of: generating corresponding virtual users according to a preset client side and a preset protocol; establishing an operation method for each virtual user; generating a test case according to the generated virtual users and the operation method of the virtual users; and building an automated testing framework according to the generated test case and compiling a testing script. According to the method provided by the invention, the virtual users are generated according to the preset client side and the preset protocol, testing of a protocol signaling level by various client sides can be simulated, according to the case flow, the corresponding virtual users can be called to compile the test case, the testing framework and the testing script, and a secondary development also can be executed based on the test case so as to develop the testing framework according to the actual demands, and thus, the method is high in flexibility, development of the testing script in synchronization with the needs at any time is guaranteed, and the maintainability of codes is improved greatly.

Description

Automated testing method and device
Technical field
The present invention relates to the automatization testing technique field, relate in particular to a kind of automated testing method and device.
Background technology
In software test, usually, having designed test case and by after evaluating, having carried out step by step test by the tester according to the rules of describing in the test case, compare with actual result and the expected result that obtains.In order to save manpower, time or hardware resource, improve testing efficiency, just introduced the concept of automatic test.Automatic test is that the artificial behavioral test that drives is converted into a kind of process that machine is carried out.
Automatic test is the same with software development process from essence, to utilize automated test tool (being equivalent to SDK (Software Development Kit)), through the analysis (demand analysis in the software process) to testing requirement, design automatic test cases (requirement specification in the software process), thereby build the framework (Outline Design in the software process) of automatic test, design and write test script (detailed design and coding), the correctness of test script, thus this cover test script (being that major function is the application software of test) finished.
The exploitation of automatic test script generally is by once test of manual operation, uses simultaneously the recording function of automated test tool, and the operation note of carrying out is got off, and generates test script.The script playback success ratio that this technology generates is lower, and later maintenance is also relatively more difficult, can't simulate a large number of users, can not satisfy the test of server end.
Summary of the invention
The technical matters that (one) will solve
The technical problem to be solved in the present invention is, for defects, how to provide a kind of automated testing method and device, and it can simulate a large number of users, can satisfy 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 default client and Virtual User corresponding to protocol generation;
Step C: be each Virtual User constructor method;
Step D: according to the Virtual User and the method for operating generating test use case thereof that generate;
Step e: build automated test frame and write test script according to the test case that generates.
Wherein, before step B, described automated testing method further comprises:
Steps A: client and client application agreement are set.
Wherein, after step e, described automated testing method further comprises:
Step F: revise automated test frame and test script according to the test case that generates.
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, remove buddy or invites the good friend.
The present invention also provides a kind of automatic test device, comprising:
The Virtual User generation unit is used for according to default client and Virtual User corresponding to protocol generation;
The method of operating tectonic element is used to each Virtual User constructor method;
The test case generation unit is used for according to the Virtual User and the method for operating generating test use case thereof that generate;
Test frame and test script generation unit are used for building automated test frame and writing test script according to the test case that generates.
Wherein, described automatic test device further comprises: client and client application agreement setting unit are used for arranging client and client application agreement.
Wherein, described automatic test device further comprises:
Test frame and test script are revised the unit, are used for revising automated test frame and test script according to the test case that generates.
(3) beneficial effect
The invention discloses a kind of automated testing method and device, according to default client and Virtual User corresponding to protocol generation, can simulate various clients and carry out other test of protocol signaling level, finish writing of test case, test frame and test script according to use-case process invocation respective virtual user, also can carry out secondary development on the basis of test case, development and testing framework according to the actual requirements, so just, had great dirigibility, guaranteed at any time and the synchronous development and testing script of demand, greatly improved 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.
Description of drawings
Fig. 1 is the process flow diagram of the described automated testing method of the embodiment of the invention;
Fig. 2 is the structural representation of the described automatic test device of the embodiment of the invention.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used for explanation 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 (Pocket PC) 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 (being SIP-C4.0), Mcp1.0 (being SIP-C2.0) or SIP-C4.0;
Step B: according to the client and Virtual User corresponding to protocol generation that arrange;
In this step, specifically according to the corresponding relation generating virtual user of following table 1.
Figure BDA0000071827450000041
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, generate corresponding Virtual User SymbianUser according to client Symbian1.0 and agreement SIP-C1.0, according to client Symbian3.2, Java3.2 or PPC3.2 and agreement Mcp2.0 (being SIP-C4.0) generate 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 (being SIP-C2.0) generate corresponding Virtual User McpUser, generate corresponding Virtual User PcUser 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, remove buddy or invites good friend etc.
Step D: according to the Virtual User and the method for operating generating test use case thereof that generate;
For example, initialization user A and user B are SymbianUser respectively, and after user A and user B logged in, it was the good friend that user A adds user B.
In this step, can use C# language with the form generating test use case of dll file, realize striding language and platform invoke, reusability is stronger.
Step e: build automated test frame and write test script according to the test case that generates;
If when larger change occured demand, automated testing method of the present invention also comprised:
Step F: revise automated test frame and test script according to the test case that generates.
If no special instructions, the order in the above-mentioned various step combination is all carried out according to the order of English alphabet.
Pass through above-mentioned steps, according to default client and Virtual User corresponding to protocol generation, can simulate various clients and carry out other test of protocol signaling level, finish writing of test case, test frame and test script according to use-case process invocation respective virtual user, also can carry out secondary development on the basis of test case, development and testing framework according to the actual requirements, so just, had great dirigibility, guaranteed at any time and the synchronous development and testing script of demand, greatly improved 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:
The Virtual User generation unit is used for according to default client and Virtual User corresponding to protocol generation;
The method of operating tectonic element is used to each Virtual User constructor method;
The test case generation unit is used for according to the Virtual User and the method for operating generating test use case thereof that generate;
Test frame and test script generation unit are used for building automated test frame and writing test script according to the test case that generates.
Further, described automatic test device comprises:
Client and client application agreement setting unit are used for arranging client and client application agreement;
Further, described automatic test device comprises:
Test frame and test script are revised the unit, are used for revising automated test frame and test script according to the test case that generates.
In sum, the invention discloses a kind of automated testing method and device, according to default client and Virtual User corresponding to protocol generation, can simulate various clients and carry out other test of protocol signaling level, finish writing of test case, test frame and test script according to use-case process invocation respective virtual user, also can carry out secondary development on the basis of test case, development and testing framework according to the actual requirements, so just, had great dirigibility, guaranteed at any time and the synchronous development and testing script of demand, greatly improved 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 only is used for explanation the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; in the situation that does not break away from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (10)

1. an automated testing method is characterized in that, comprising:
Step B: according to default client and Virtual User corresponding to protocol generation;
Step C: be each Virtual User constructor method;
Step D: according to the Virtual User and the method for operating generating test use case thereof that generate;
Step e: build automated test frame and write test script according to the test case that generates.
2. automated testing method according to claim 1 is characterized in that, before step B, further comprises:
Steps A: client and client application agreement are set.
3. automated testing method according to claim 1 is characterized in that, after step e, further comprises:
Step F: revise automated test frame and test script according to the test case that generates.
4. each described automated testing method is characterized in that according to claim 1-3, and 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 includes but not limited to Symbian or Android.
6. each described automated testing method is characterized in that according to claim 1-3, and described client application agreement includes but not limited to Http agreement or Session Initiation Protocol.
7. each described automated testing method is characterized in that according to claim 1-3, and described method of operating comprises adds good friend, remove buddy or invite the good friend.
8. an automatic test device is characterized in that, comprising:
The Virtual User generation unit is used for according to default client and Virtual User corresponding to protocol generation;
The method of operating tectonic element is used to each Virtual User constructor method;
The test case generation unit is used for according to the Virtual User and the method for operating generating test use case thereof that generate;
Test frame and test script generation unit are used for building automated test frame and writing test script according to the test case that generates.
9. automated testing method according to claim 8 is characterized in that, further comprises: client and client application agreement setting unit are used for arranging client and client application agreement.
10. according to claim 8 or 9 described automated testing methods, it is characterized in that, further comprise:
Test frame and test script are revised the unit, are used for revising automated test frame and test script according to the test case that generates.
CN201110177482.4A 2011-06-28 2011-06-28 Automated testing method and device Active 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 true CN102855175A (en) 2013-01-02
CN102855175B CN102855175B (en) 2016-04-06

Family

ID=47401779

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN102855175B (en)

Cited By (7)

* 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
CN104375934A (en) * 2014-10-22 2015-02-25 江苏科技大学 Method for testing reliability of Android mobile phone software
CN106597144A (en) * 2016-11-18 2017-04-26 国电南瑞科技股份有限公司 Centralized FA planning function detection method based on simulated transmission
CN107404426A (en) * 2016-05-20 2017-11-28 阿里巴巴集团控股有限公司 The method, apparatus and electronic equipment of batch addition good friend in immediate communication tool
CN108075938A (en) * 2016-11-17 2018-05-25 迈普通信技术股份有限公司 A kind of automated testing method and device
CN110850234A (en) * 2019-11-21 2020-02-28 南京能云电力科技有限公司 Automatic detection system and detection method for fault indicator
CN112203082A (en) * 2020-09-27 2021-01-08 深圳创维-Rgb电子有限公司 Data driving frame test method of virtual key value, television and readable storage medium

Citations (2)

* 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
US20090024874A1 (en) * 2007-07-18 2009-01-22 Novell, Inc. Generic template to autogenerate reports for software target testing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090024874A1 (en) * 2007-07-18 2009-01-22 Novell, Inc. Generic template to autogenerate reports for software target testing
CN101339534A (en) * 2008-06-17 2009-01-07 金蝶软件(中国)有限公司 Software test apparatus and test method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
苏波: "基于Web应用的性能测试研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
郑炜等: "《软件工程》", 30 November 2010 *
陈伍一等: "基于客户端的网络服务性能测试模型及工具实现", 《全国第16届计算机科学与技术应用(CACIS)学术会议论文集 》 *
黎连业等: "《软件测试与测试技术》", 31 May 2009 *

Cited By (10)

* 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
CN104375934A (en) * 2014-10-22 2015-02-25 江苏科技大学 Method for testing reliability of Android mobile phone software
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
CN108075938A (en) * 2016-11-17 2018-05-25 迈普通信技术股份有限公司 A kind of automated testing method and device
CN106597144A (en) * 2016-11-18 2017-04-26 国电南瑞科技股份有限公司 Centralized FA planning function detection method based on simulated transmission
CN106597144B (en) * 2016-11-18 2019-05-17 国电南瑞科技股份有限公司 The planned function detecting method of centralized FA transmitted based on simulation
CN110850234A (en) * 2019-11-21 2020-02-28 南京能云电力科技有限公司 Automatic detection system and detection method for fault indicator
CN110850234B (en) * 2019-11-21 2021-12-17 南京能云电力科技有限公司 Automatic detection system and detection method for fault indicator
CN112203082A (en) * 2020-09-27 2021-01-08 深圳创维-Rgb电子有限公司 Data driving frame test method of virtual key value, television and readable storage medium

Also Published As

Publication number Publication date
CN102855175B (en) 2016-04-06

Similar Documents

Publication Publication Date Title
CN102855175A (en) Automated testing method and automated testing device
US20150227449A1 (en) Method and device for developing, compiling and debugging
CN103198009B (en) A kind of universal testing method, system and related device
CN102141960B (en) Automatic test method based on Android
CN102866944B (en) Pressure testing system and method
CN108829378A (en) A kind of development approach of application software, device and electronic equipment
CN107168749A (en) A kind of Compilation Method, device, equipment and computer-readable recording medium
Wainer et al. Studying performance of DEVS modeling and simulation environments using the DEVStone benchmark
CN101841515A (en) Target variable protocol data unit codec code automatic generation implementation method
CN106202685B (en) A kind of software and hardware cooperating simulation accelerator operation environmental structure method and apparatus
CN110275831A (en) The mock data verification method and device of protocol interface
CN104573287A (en) Digital simulation framework design method based on interface binding unified model
CN109871241A (en) A kind of configuration method of Cross-environment application server
CN103473072A (en) Mobile cloud computing application program development method
CN107092559A (en) Test platform middleware, test system and method based on Jmeter
CN114816370A (en) Method for splitting SDK static library at iOS end at any fine granularity
CN103425469A (en) Method for generating mobile game codes based on MDA technology
KR100811468B1 (en) System and method for ensuring stability of server application by load test
Brumbulli et al. SDL code generation for network simulators
Wotawa et al. Fifty shades of grey in SOA testing
Sirjani et al. A front-end tool for automated abstraction and modular verification of actor-based models
Lee et al. VULCAN: architecture-model-based workbench for product line engineering
CN115291840A (en) Model-driven block chain development life cycle development method
Kovše et al. Eclipse plug-in for spin and st2msc tools-tool presentation
CN105786882B (en) A kind of tables of data mark generates, method for writing data and device

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
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building A block 5 layer

Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.