CN105204994B - A kind of automated testing method and system - Google Patents

A kind of automated testing method and system Download PDF

Info

Publication number
CN105204994B
CN105204994B CN201510600044.2A CN201510600044A CN105204994B CN 105204994 B CN105204994 B CN 105204994B CN 201510600044 A CN201510600044 A CN 201510600044A CN 105204994 B CN105204994 B CN 105204994B
Authority
CN
China
Prior art keywords
test
script
code block
management end
test case
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.)
Active
Application number
CN201510600044.2A
Other languages
Chinese (zh)
Other versions
CN105204994A (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.)
Shenzhen Guoxin artificial intelligence Co.,Ltd.
Original Assignee
Shanghai Feixun Data 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510600044.2A priority Critical patent/CN105204994B/en
Publication of CN105204994A publication Critical patent/CN105204994A/en
Application granted granted Critical
Publication of CN105204994B publication Critical patent/CN105204994B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Tests Of Electronic Circuits (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of automated testing methods, include the following steps:One script for corresponding to a plurality of test cases is provided and a management end is provided, test case script is resolved into a plurality of code blocks by management end, and each code block corresponds to a test case;Management end provides a selection interface for being associated with a plurality of code blocks, and according to user in the selection result of selection interface, the corresponding code block of selection result is sent to a test lead.The beneficial effects of the present invention are, test lead is realized under management end control to the automatic test of test case, not only easy to operate but also execution efficiency is high, and management to script is facilitated by resolving into code block and code block being corresponded to test case the script of test case.

Description

A kind of automated testing method and system
Technical field
The present invention relates to field of communication technology more particularly to a kind of automated testing method and systems.
Background technology
Test and management tool is being referred in software development process, and testing requirement, plan, use-case and implementation process are carried out Management, the tool handled into line trace software defect.By using test and management tool, tester or developer can be with More easily record and monitor each test activity, the stage as a result, the defects of finding out software and mistake, record in test activity It identifies defects of and recommendation on improvement.By using test and management tool, test case can be answered by multiple test activities or stage With test analysis report and statistical report form can be exported.Some test and management tools can preferably support cooperating, share Central database supports concurrent testing and record, so as to greatly improve testing efficiency.But existing test and management system cannot Automatic test cases are realized well, and such as to the management of scripted code, the support and automatic passback for performing tool interface are surveyed Test result appoint there are problems.
Invention content
The above problem existing for automatic test is realized to test case for the prior art, one kind is now provided and is aimed at Test cases automated execution is tested and manages a kind of convenient automated testing method and system.
Specific technical solution is as follows:
A kind of automated testing method, includes the following steps:
Step S1, one script for corresponding to a plurality of test cases is provided, the test case script is resolved into a plurality of Code block, each code block correspond to a test case;
Step S2, one management end is provided, the management end provides a selection interface for being associated with a plurality of code blocks, According to user in the selection result of the selection interface, the corresponding code block of the selection result is sent to a test lead;
The code block received is reverted to executable script by step S3, described test lead, and according to the foot The corresponding test case of this acquisition script and by performing the corresponding survey of script described in the Script controlling Example on probation performs test.
Preferably, in the step S1, a storage unit is provided to store the code block, the test case and The code block and the correspondence of the test case.
Preferably, in the step S2, the selection interface is WEB interface or gui interface.
Preferably, it in the step S2, further includes, the management end is sent out in by the corresponding code block of the selection result When sending to the test lead, send one and perform signal to the test lead.
Preferably, in the step S3, the test lead provides what a detection unit sent to detect the management end The execution signal and the code block.
Preferably, in the step S3, the test lead is extensive by the code block received according to the execution signal It is multiple to read the corresponding test case in the storage unit into the executable script, and according to the script.
Preferably, in the step S3 after each test case is finished, the test lead will be finished The corresponding test result of the test case be sent to the management end.
Preferably, in the step S3, include the following steps:
Step S31, the test lead detects whether the management end sends the code block, if not repeatedly step S31;
Step S32, described test lead receives the code block, and combines and add the matching foot by the code block This File header information;
Step S33, corresponding parameter in the script is changed according to the test condition of the test lead;
Step S34, start a test cell according to corresponding with the script in the script reading storage unit Test case, and tested accordingly.
Preferably, the detection unit detects whether the management end sends the execution signal and described by socket Code block.
Preferably, the storage unit is database.
It further includes, a kind of automatization test system, wherein, including:
Script resolving cell, the script to correspond to a plurality of test cases by one resolve into a plurality of code blocks, and make Each code block corresponds to a test case;
One management end, to provide a selection interface for being associated with a plurality of code blocks and according to user in The selection result of the selection interface sends the corresponding code block of the selection result;
One test lead connects the management end, to receive the code block that the management end is sent, by what is received The code block reverts to executable script, and obtains the corresponding test case of the script according to the script, with And perform test by performing the corresponding test case of script described in the Script controlling.
Preferably, a storage unit is further included, the storage unit connects the script resolving cell, the management respectively End and the test lead, to store the code block, the test case and the code block and the test case Correspondence.
Above-mentioned technical proposal has the following advantages that or advantageous effect:The test lead under management end control is realized to use test The automatic test of example, not only easy to operate but also execution efficiency is high, by the way that the script of test case is resolved into code block simultaneously And code block is corresponded into test case and facilitates management to script.
Description of the drawings
With reference to appended attached drawing, more fully to describe the embodiment of the present invention.However, appended attached drawing be merely to illustrate and It illustrates, and is not meant to limit the scope of the invention.
Fig. 1 is a kind of flow chart of the embodiment of automated testing method of the present invention;
Fig. 2 is the flow chart for the embodiment that test test case is performed in a kind of automated testing method of the present invention;
Fig. 3 is a kind of structure diagram of the embodiment of automatization test system of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art obtained under the premise of creative work is not made it is all its His embodiment, shall fall within the protection scope of the present invention.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the present invention can phase Mutually combination.
The invention will be further described in the following with reference to the drawings and specific embodiments, but not as limiting to the invention.
Technical solution of the present invention includes a kind of existing automated testing method.
As shown in Figure 1, a kind of automated testing method embodiment, specifically includes following steps:
Step S1, one script for corresponding to a plurality of test cases is provided, test case script is resolved into a plurality of codes Block, each code block correspond to a test case;
Step S2, a management end is provided, management end provides a selection interface for being associated with a plurality of code blocks, according to using The corresponding code block of selection result is sent to a test lead by person in the selection result of selection interface;
Step S3, the code block received is reverted to executable script by test lead, and obtains script pair according to script The test case answered and the corresponding test case of script is controlled to perform test by perform script.
In above-mentioned technical proposal, by the way that the script for corresponding to a plurality of test cases is resolved into a plurality of code blocks and every A code block corresponds to a test case, and passes through test case that management end chosen in selection interface by test case corresponding generation Code block is sent to test lead, and the code block received is reverted to executable script and correspond to obtain according to script and surveyed by test lead Example on probation completes the test to corresponding test case, it is achieved thereby that in management end control according to the corresponding test case of script The lower test lead of system is to the automatic test of test case
In a kind of preferably embodiment, in step S1, a storage unit is provided to store code block, test case And code block and the correspondence of test case.It is further preferred that storage unit can be database.
In a kind of preferably embodiment, in step S2, selection interface is WEB interface or gui interface.
As a kind of preferred implementation, pass through WEB interface in the present invention or gui interface selects clicking trigger test case Execution, may be replaced by that daily timing performs or event performs.
It in a kind of preferably embodiment, in step s 2, further includes, management end is in by the corresponding code of selection result When block is sent to test lead, sends one and perform signal to test lead.
As a kind of preferred implementation, management end is TESTLINK test and management systems.It is further preferred that storage unit It can be realized by the MYSQL database integrated in TESTLINK test and management systems.
In a kind of preferably embodiment, in step S3, test lead provides a detection unit and is sent out to detection management end The execution signal and code block sent.
In a kind of preferably embodiment, in step S3, test lead is extensive by the code block received according to signal is performed It is multiple to read corresponding test case in storage unit into executable script, and according to script.
In a kind of preferably embodiment, in step S3 after each test case is finished, test lead will perform The corresponding test result of test case finished is sent to management end.
In a kind of preferably embodiment, detection unit whether sent by socket detection management end perform signal and Code block.
As a kind of preferred embodiment, test lead can be computer.It is further preferred that test cell can be fortune The ROBOT FRAMEWORK automatization test systems of row on computers.
In a kind of preferably embodiment, as shown in Fig. 2, in step S3, include the following steps:
Step S31, whether test lead detection management end sends code block, if not repeatedly step S31;
Step S32, test lead receives code block, and code block is combined and added the File header information of matching script;
Step S33, corresponding parameter in script is changed according to the test condition of test lead;
Step S34, start a test cell and test case corresponding with script in storage unit is read according to script, go forward side by side The corresponding test of row.
It is illustrated below with a kind of specific embodiment, is computer based on test lead, detection unit is operates in Under the embodiment of ROBOT FRAMEWORK automatization test systems on computer, based on the implementation that detection unit is socket Under example, the detection unit on test lead once receives the execution signal and the corresponding code block of test case of management end transmission, Test lead preserves the code block received to local, and further code block is combined and added the file header of matching script Information is changed according to the test condition of test lead in script after corresponding parameter, and test lead starts test cell according to script Test case corresponding with script in storage unit is read, and is tested accordingly, the survey that last test end will be finished The corresponding test result of example on probation is sent to management end.
As shown in figure 3, further included in technical scheme of the present invention, a kind of automatization test system, wherein, including:
Script resolving cell 1, the script to correspond to a plurality of test cases by one resolve into a plurality of code blocks, and make Each code block corresponds to a test case;
One management end 2, to provide a selection interface for being associated with a plurality of code blocks and according to user in selection The selection result at interface sends the corresponding code block of selection result;
One test lead 3, connection management end 2 are extensive by the code block received to receive the code block of the transmission of management end 2 It is multiple to obtain the corresponding test case of script and by perform script control script pair into executable script, and according to script The test case answered performs test.
On the basis of above-mentioned technical proposal, further, a storage unit 4 is further included, storage unit 4 connects script respectively Resolving cell, management end and test lead, to store, code block, test case and code block are corresponding with test case to close System.
Above-mentioned technical proposal has the following advantages that or advantageous effect:The test lead under management end control is realized to use test The automatic test of example, not only easy to operate but also execution efficiency is high, by the way that the script of test case is resolved into code block simultaneously And code block is corresponded into test case and facilitates management to script.
It these are only preferred embodiments of the present invention, not thereby limit embodiments of the present invention and protection domain, it is right For those skilled in the art, it should can appreciate that and all be replaced with being equal made by description of the invention and diagramatic content It changes and obviously changes obtained scheme, should all include within the scope of the present invention.

Claims (9)

1. a kind of automated testing method, which is characterized in that include the following steps:
Step S1, one script for corresponding to a plurality of test cases is provided, the test case script is resolved into a plurality of codes Block, each code block correspond to a test case;
Step S2, one management end is provided, the management end provides a selection interface for being associated with a plurality of code blocks, according to The corresponding code block of the selection result is sent to a test lead by user in the selection result of the selection interface;
The code block received is reverted to executable script, and obtain according to the script by step S3, described test lead It takes the corresponding test case of the script and is used by performing the corresponding test of script described in the Script controlling Example performs test;
In the step S3, include the following steps:
Step S31, the test lead detects whether the management end sends the code block, if not repeatedly step S31;
Step S32, described test lead receives the code block, and combines and add the matching script by the code block File header information;
Step S33, corresponding parameter in the script is changed according to the test condition of the test lead;
Step S34, start a test cell and test corresponding with the script in the storage unit is read according to the script Use-case, and tested accordingly.
2. automated testing method according to claim 1, which is characterized in that in the step S1, provide a storage unit To store the correspondence of the code block, the test case and the code block and the test case.
3. automated testing method according to claim 1, which is characterized in that in the step S2, the selection interface is WEB interface or gui interface.
4. automated testing method according to claim 1, which is characterized in that in the step S2, further include, the pipe When the corresponding code block of the selection result is sent to the test lead by reason end, sends one and perform signal to the test lead.
5. automated testing method according to claim 4, which is characterized in that in the step S3, the test lead provides One detection unit is detecting the execution signal and the code block that the management end is sent;Or in the step S3, The test lead provides a detection unit to detect the execution signal and the code block that the management end is sent, described Detection unit detects whether the management end sends the execution signal and the code block by socket.
6. automated testing method according to claim 2, which is characterized in that in the step S3, the test lead according to The code block received is reverted to the executable script, and according to being read the script by the execution signal The corresponding test case in storage unit.
7. automated testing method according to claim 1, which is characterized in that used in the step S3 in each test After example is finished, the corresponding test result of the test case being finished is sent to the management by the test lead End.
8. a kind of automatization test system, which is characterized in that including:
Script resolving cell, the script to correspond to a plurality of test cases by one resolve into a plurality of code blocks, and make each The code block corresponds to a test case;
One management end, to provide a selection interface for being associated with a plurality of code blocks and according to user in described The selection result of selection interface sends the corresponding code block of the selection result;
One test lead connects the management end, to receive the code block that the management end is sent, described in receiving Code block reverts to executable script, and obtains the corresponding test case of the script, Yi Jitong according to the script It crosses and performs the corresponding test case of script described in the Script controlling and perform test.
9. automatization test system according to claim 8, which is characterized in that further include a storage unit, the storage is single Member connects the script resolving cell, the management end and the test lead respectively, to store the code block, the test Use-case and the code block and the correspondence of the test case.
CN201510600044.2A 2015-09-18 2015-09-18 A kind of automated testing method and system Active CN105204994B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510600044.2A CN105204994B (en) 2015-09-18 2015-09-18 A kind of automated testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510600044.2A CN105204994B (en) 2015-09-18 2015-09-18 A kind of automated testing method and system

Publications (2)

Publication Number Publication Date
CN105204994A CN105204994A (en) 2015-12-30
CN105204994B true CN105204994B (en) 2018-06-29

Family

ID=54952688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510600044.2A Active CN105204994B (en) 2015-09-18 2015-09-18 A kind of automated testing method and system

Country Status (1)

Country Link
CN (1) CN105204994B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107305527B (en) * 2016-04-22 2020-05-19 腾讯科技(深圳)有限公司 Code file processing method and device
CN112363907A (en) * 2020-09-14 2021-02-12 杭州大搜车汽车服务有限公司 Test method and device for Dubbo interface, electronic device and storage medium
CN113806220A (en) * 2021-08-23 2021-12-17 北京天融信网络安全技术有限公司 Method, system, terminal and storage medium for executing test script
CN114116503A (en) * 2021-12-01 2022-03-01 中科新松有限公司 Test method, test device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530231A (en) * 2013-10-12 2014-01-22 北京京东尚科信息技术有限公司 Application program testing method and system based on service process control
CN103678093A (en) * 2012-08-30 2014-03-26 腾讯科技(深圳)有限公司 Automatic testing framework and testing method
CN104407973A (en) * 2014-11-25 2015-03-11 珠海格力电器股份有限公司 Automatic unit test realizing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8826239B2 (en) * 2010-10-06 2014-09-02 International Business Machines Corporation Asynchronous code testing in integrated development environment (IDE)

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678093A (en) * 2012-08-30 2014-03-26 腾讯科技(深圳)有限公司 Automatic testing framework and testing method
CN103530231A (en) * 2013-10-12 2014-01-22 北京京东尚科信息技术有限公司 Application program testing method and system based on service process control
CN104407973A (en) * 2014-11-25 2015-03-11 珠海格力电器股份有限公司 Automatic unit test realizing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Testlink操作详解;kemwu;《https://wenku.baidu.com/view/12dacc6948d7c1c708a145c8.html?from=search》;20130522;第1-17页 *

Also Published As

Publication number Publication date
CN105204994A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
CN105204994B (en) A kind of automated testing method and system
CN105718371B (en) A kind of regression testing method, apparatus and system
CN103365770B (en) Mobile terminal software test macro and method for testing software
CN101145993B (en) A multi-point access interface test method and its test system
CN106033393B (en) A kind of applied program testing method and system and mobile terminal
CN109361562B (en) Automatic testing method based on associated network equipment access
CN103198010A (en) Software testing method, device and system
CN106445755B (en) A kind of server automated test method of whole machine cabinet
US20150169288A1 (en) System operation tracing method on distributed system
CN103678093A (en) Automatic testing framework and testing method
CN103761185B (en) A kind of automatization test system and method
CN104123519A (en) System for automatically detecting electronic products through two-dimension codes and method thereof
CN107302476A (en) A kind of automated testing method and system for testing asynchronous interactive system
CN102110053A (en) Random testing method based on Android
CN105760296A (en) Automation testing control method, device and terminal
CN104750612B (en) Method of testing and device are carried out to file operation
CN103731663B (en) The testing method of a kind of intelligent television and device
CN107193730A (en) A kind of interface test method of automation
CN109559054B (en) Electric power engineering construction information processing system
CN105301450A (en) Distribution network fault automatic diagnosis method and system
CN105204991A (en) Internet of things test method and device
CN108508477B (en) Seismic data acquisition system and method
CN104283610A (en) Multistage passive optical network fault monitoring system and implementation method thereof
CN109186666A (en) Detection method, device, computer equipment and the storage medium of equipment
CN110928796B (en) Automatic test platform

Legal Events

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

Effective date of registration: 20201124

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co., Ltd

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201221

Address after: 8319 Yanshan Road, Bengbu City, Anhui Province

Patentee after: Bengbu Lichao Information Technology Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co., Ltd

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210316

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: 8319 Yanshan Road, Bengbu City, Anhui Province

Patentee before: Bengbu Lichao Information Technology Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210628

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Patentee after: Shenzhen Guoxin artificial intelligence Co.,Ltd.

Address before: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee before: Huzhou YingLie Intellectual Property Operation Co.,Ltd.