CN103455422B - Software function automated testing method - Google Patents

Software function automated testing method Download PDF

Info

Publication number
CN103455422B
CN103455422B CN201310390590.9A CN201310390590A CN103455422B CN 103455422 B CN103455422 B CN 103455422B CN 201310390590 A CN201310390590 A CN 201310390590A CN 103455422 B CN103455422 B CN 103455422B
Authority
CN
China
Prior art keywords
configuration item
testing
script
software
testing tool
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
CN201310390590.9A
Other languages
Chinese (zh)
Other versions
CN103455422A (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.)
Shanghai Feixun Data Communication Technology 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 CN201310390590.9A priority Critical patent/CN103455422B/en
Publication of CN103455422A publication Critical patent/CN103455422A/en
Application granted granted Critical
Publication of CN103455422B publication Critical patent/CN103455422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of software function automated testing method, including:The step of determining software under testing configuration item;The step of software under testing configuration item script is write according to the software under testing configuration item;The step of determining testing tool configuration item;According to the testing tool configuration item, the step of writing testing tool configuration item script;The step of software under testing configuration item script is synthesized into automatized script with the testing tool configuration item script;The step of building test environment;The step of automatized script is performed in the test environment and test result is checked.Preferably, the software under testing configuration item and the testing tool configuration item can be divided into parameter configuration and operative configuration.Pre-preparation needed for the present invention makes test early stage is few, only need to determine operating process, write automation mechanized operation script;And the present invention is applied widely, script is unrelated with test content, only relevant with operating procedure, all can be used using the other field of same steps.

Description

Software function automated testing method
Technical field
The present invention relates to a kind of method of testing, more particularly to a kind of automatic software test method.
Background technology
Now, the development of network equipment product function is more and more perfect, increasingly enriches, while this is user-friendly, Also imply that the test job to tester brings more pressure.Come from the software test of current network equipment product See, often test One function, it is necessary to be pre-configured with equipment under test, then build test environment and configuration testing instrument, perform And test result is checked, start next test item after finally resetting equipment under test.Flower is needed so as to result in tester The action for doing an as above circulation that expense great effort is repeated, and the work of this repetition causes the probability increase of error, It is unfavorable for program development automatization testing technique imperative.Existing automatization testing technique is relatively limited, applicable software model Enclose narrow, once the type change or parameter of tested software have changed, need to just redesign progress, very flexible.
The content of the invention
The shortcoming of prior art in view of the above, it is an object of the invention to provide a kind of software function automatic test Method, for solving in the prior art that the Experience of Software Testing Work duplication of labour is more, error rate high, very flexible the problem of.
In order to achieve the above objects and other related objects, the present invention provides a kind of software function automated testing method, bag Include:The step of determining software under testing configuration item;The step of software under testing configuration item script is write according to the software under testing configuration item Suddenly;The step of determining testing tool configuration item;According to the testing tool configuration item, the step of testing tool configuration item script is write Suddenly;The step of software under testing configuration item script is synthesized into automatized script with the testing tool configuration item script;Build The step of test environment;The step of automatized script is performed in the test environment and test result is checked.
Preferably, the software under testing configuration item and the testing tool configuration item can be divided into parameter configuration and behaviour Make configuration item.
As described above, the software function automated testing method of the present invention, has the advantages that:Test needed for early stage Pre-preparation it is few, only need to determine operating process, write automation mechanized operation script;And applied widely, script of the invention It is unrelated with test content, it is only relevant with operating procedure, all it can be used using the other field of same steps, so that flexibility is more It is good.
Brief description of the drawings
Fig. 1 is shown as the software function automated testing method flow chart of the present invention.
Embodiment
Illustrate embodiments of the present invention below by way of specific instantiation, those skilled in the art can be by this specification Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through specific realities different in addition The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints with application, without departing from Various modifications or alterations are carried out under the spirit of the present invention.
Refer to accompanying drawing.It should be noted that the diagram provided in the present embodiment only illustrates the present invention in a schematic way Basic conception, then in schema only display with relevant component in the present invention rather than according to component count during actual implement, shape Shape and size are drawn, and it is actual when implementing kenel, quantity and the ratio of each component can be a kind of random change, and its component cloth Office's kenel may also be increasingly complex.
Test configurations and test case of the present invention according to required for different test items determine operating procedure, write corresponding Automatic test script realizes test automation.This method has accomplished that test is multiple on the premise of test accuracy rate is not reduced Miscellaneous degree reduction, it is simple to operate, resource and testing time are saved, testing cost is reduced.The present invention is discussed in detail with reference to Fig. 1 The embodiment of software function automated testing method, so that those skilled in the art being capable of the more detailed principle for understanding invention.
For convenience of description, Fig. 1 embodiment with test home router bandwidth control function citing, but the present invention it is soft Part automated testing method is equally applicable to test other softwares.
In Fig. 1, step S1 represents to determine software under testing configuration item content.Configuration item can include parameter configuration and operation Configuration item.In this example, software under testing is home router bandwidth control function, so parameter configuration can include:Log in road By the user name and password of device administration page, bandwidth value;Operative configuration can include logging in the router administration page, open band Wide control function.
Step S2 represents to write software under testing configuration item script according to the configuration item of determination.It is described in detail below and writes test The step of bandwidth capability configuration item script and method, it is other to analogize with method the step of write other configurations script.Root The configuration item determined according to step S1, the script that can write test configurations is as follows:
Wherein " $ oIE=_ IECreate (" 192.168.1.1 ") " analog subscriber opens the management of router by browser In control interface, this example, the management control interface of router is, by browser, to input 192.168.1.1 in address field, then Carriage return.
“ControlFocus($download_title,"","Edit1")
ControlSetText($download_title,"","Edit1","admin")
ControlFocus($download_title,"","Edit2")
ControlSetText($download_title,"","Edit2","admin")”
The partial simulation is filled in router administration control interface in the operation of user's sentence password, this example, keeper User's sentence password of user is " admin ".
" ControlClick ($ download_title, " ", " Button2 ", " ") " represents that operation is submitted in simulation.
Step S3 represents to determine the configuration item of testing tool.In this example, test be router bandwidth control function, institute It is to play stream software with one of testing tool.Stream software of beating conventional at present is IxChariot, with traditional physical layer test not Together, IxChariot is by simulating various real network application flows come test network and the network equipment.The benefit so done It is to be able to verify that the performance of network or the network equipment in specific application, because for any network or the network equipment, such as Really it is if in practical application, performance is good, and that is one can consider that the everyway of this network system is good , this is also the characteristics of application layer is tested place.Below to simplify explanation, only exemplified by the part configuration item of air exercise stream software.Survey The configuration item of trial work tool can also be divided into two major classes of parameter configuration and operative configuration.For beating stream Software Testing Tool, Parameter configuration can include:Source IP address, target ip address, protocol type.Operative configuration can include:Beat stream soft Stream is beaten in part, newly-built stream, execution.
Step S4 represents the testing tool configuration item according to determination, writes testing tool script.Only for beating stream in this example Software section configuration item is illustrated.According to configuration item, the part script write is as follows:
Step S5 represents that the automatic test script that will be write synthesizes an automatized script, or volume unravels silk into one Executable file.In this example, using AutoIt compilation tools, software configuration item script will be surveyed and testing tool configuration item script is compiled It is translated into an automated execution file.When synthesis automatized script or volume unravel silk into executable file, for different test wrappers Border or operation platform(E.g. Linux or Windows), specific operation can be different, and those skilled in the art can To be adjusted according to actual conditions.
Step S6 represents to build test environment.Test environment includes software environment and hardware environment.Hardware environment includes frame If server, router to be measured, connecting network and building topology etc.;Software environment includes installation operation system, sets necessary Operational factor etc..
Step S7 represents execution automatized script, checks test result.
When the version of software changes, it is only necessary to which repeat step S6 can complete new test.Above step has been Into a wheel test.As can be seen that above method can not only complete automatic test, and by the configuration item of software under testing and survey The test item of trial work tool is separated, and defines respectively, script is write respectively, is then synthesized again.It so can to greatest extent shield and treat Test script changes caused by surveying the change of software, so as to farthest reuse test script.
In summary, the pre-preparation needed for test early stage of the invention is few, only need to determine operating process, writes automation behaviour Make script;And the present invention is applied widely, script is unrelated with test content, only relevant with operating procedure, using identical The other field of step all can be used, so that flexibility is more preferable.So, the present invention effectively overcomes of the prior art a variety of scarce Put and have high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, not for the limitation present invention.It is any ripe Know the personage of this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as Into all equivalent modifications or change, should by the present invention claim be covered.

Claims (3)

1. a kind of software function automated testing method, it is characterised in that including:
The step of determining software under testing configuration item, the software under testing configuration item includes software under testing parameter configuration and to be measured soft Part operative configuration;The software function automated testing method is used for test router bandwidth control function, described to be measured soft Part parameter configuration includes user name, password and bandwidth value;The software under testing operative configuration includes logging in router administration The page, opens bandwidth control function;
The step of software under testing configuration item script is write according to the software under testing configuration item;
The software under testing configuration item script is:
Wherein, " $ oIE=_IECreate (" 192.168.1.1 ") " analog subscriber opens the management control of router by browser Interface processed;
“ControlFocus($download_title,"","Edit1")
ControlSetText($download_title,"","Edit1","admin")
ControlFocus($download_title,"","Edit2")
ControlSetText ($ download_title, " ", " Edit2 ", " admin ") " simulations connect in router administration control The operation of username and password is filled in mouthful, administrator username and password is " admin ";
Operation is submitted in " ControlClick ($ download_title, " ", " Button2 ", " ") " simulation;
The step of determining testing tool configuration item, the testing tool includes playing stream software, and the testing tool configuration item includes Testing tool parameter configuration and testing tool operative configuration;The testing tool parameter configuration includes source IP address, mesh Mark IP address and protocol type;The testing tool operative configuration includes beating stream software, newly-built stream described in opening and performed Beat stream;
According to the testing tool configuration item, the step of writing testing tool configuration item script;
The step of software under testing configuration item script is synthesized into automatized script with the testing tool configuration item script;
The step of building test environment;
The step of automatized script is performed in the test environment and test result is checked.
2. software function automated testing method according to claim 1, it is characterised in that described by the software under testing In the step of configuration item script synthesizes automatized script with the testing tool configuration item script, the automatized script includes can Perform file.
3. software function automated testing method according to claim 1, it is characterised in that the test environment of building In step, the test environment include software environment and hardware environment, the hardware environment include server, router to be measured, With network equipment topology;The software environment includes operating system and operational factor.
CN201310390590.9A 2013-08-30 2013-08-30 Software function automated testing method Active CN103455422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310390590.9A CN103455422B (en) 2013-08-30 2013-08-30 Software function automated testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310390590.9A CN103455422B (en) 2013-08-30 2013-08-30 Software function automated testing method

Publications (2)

Publication Number Publication Date
CN103455422A CN103455422A (en) 2013-12-18
CN103455422B true CN103455422B (en) 2017-08-04

Family

ID=49737822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310390590.9A Active CN103455422B (en) 2013-08-30 2013-08-30 Software function automated testing method

Country Status (1)

Country Link
CN (1) CN103455422B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761185B (en) * 2014-01-14 2016-06-22 烽火通信科技股份有限公司 A kind of automatization test system and method
CN103995773B (en) * 2014-02-28 2019-11-22 上海斐讯数据通信技术有限公司 A kind of automatic test approach of url filtering function
CN104219689B (en) * 2014-09-16 2017-11-14 京信通信系统(中国)有限公司 LTE radio communications air protocol software self-measuring device and method
CN104866423B (en) * 2015-05-20 2018-04-20 中国科学院空间应用工程与技术中心 The test method and system of a kind of software configuration item
CN105007196A (en) * 2015-07-29 2015-10-28 上海斐讯数据通信技术有限公司 HTTP protocol-based automatic testing method and system
CN109344069A (en) * 2018-09-30 2019-02-15 福建星瑞格软件有限公司 A kind of the synergetic office work method and synergetic office work platform of software automated testing
CN113760430A (en) * 2021-08-23 2021-12-07 成都安恒信息技术有限公司 Graphic program substitution method for operation and maintenance auditing system based on automatic
CN115567340B (en) * 2022-09-22 2024-04-26 重庆长安汽车股份有限公司 CAN bus test engineering generation method, device, equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852176A (en) * 2005-11-18 2006-10-25 华为技术有限公司 Network communication apparatus protocol testing system and method
CN101046763A (en) * 2006-03-29 2007-10-03 盛趣信息技术(上海)有限公司 Implementing method of automatic test system based on scenario
CN101719062A (en) * 2009-11-27 2010-06-02 浪潮集团山东通用软件有限公司 Implementing method for executing test design by script
CN102354200A (en) * 2011-06-10 2012-02-15 大唐移动通信设备有限公司 Method and device for automatic test through control instrument
CN202339542U (en) * 2011-03-21 2012-07-18 中国工商银行股份有限公司 Software product test system
CN102799511A (en) * 2012-06-30 2012-11-28 成都西可科技有限公司 Android-based automatic test method and system
CN103139006A (en) * 2011-12-05 2013-06-05 上海博腾信息科技有限公司 Web service based automated testing device and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852176A (en) * 2005-11-18 2006-10-25 华为技术有限公司 Network communication apparatus protocol testing system and method
CN101046763A (en) * 2006-03-29 2007-10-03 盛趣信息技术(上海)有限公司 Implementing method of automatic test system based on scenario
CN101719062A (en) * 2009-11-27 2010-06-02 浪潮集团山东通用软件有限公司 Implementing method for executing test design by script
CN202339542U (en) * 2011-03-21 2012-07-18 中国工商银行股份有限公司 Software product test system
CN102354200A (en) * 2011-06-10 2012-02-15 大唐移动通信设备有限公司 Method and device for automatic test through control instrument
CN103139006A (en) * 2011-12-05 2013-06-05 上海博腾信息科技有限公司 Web service based automated testing device and method
CN102799511A (en) * 2012-06-30 2012-11-28 成都西可科技有限公司 Android-based automatic test method and system

Also Published As

Publication number Publication date
CN103455422A (en) 2013-12-18

Similar Documents

Publication Publication Date Title
CN103455422B (en) Software function automated testing method
Lu et al. Unlocking the power of OPNET modeler
US9754059B2 (en) Graphical design verification environment generator
Siraj et al. Network simulation tools survey
CN105100127B (en) For verifying the device and method using deployment topologies in cloud computing environment
CN104573287B (en) The Digital Simulation frame design method of unified model is bound based on interface
US20140129173A1 (en) Application Component Testing
Rampfl Network simulation and its limitations
CN108933713A (en) The method, apparatus and service server of sandbox debugging are realized based on shadow link
CN109710506A (en) A kind of terminal APP spreadability test method and device based on tree traversal
CN108809755A (en) The home gateway automatic test approach and system of compatible command row and WEB interface
CN106202685A (en) A kind of software and hardware cooperating simulation accelerator operation environmental structure method and apparatus
CN103455672B (en) A kind of FPGA emulation testing use-case automatization homing method
CN107943690A (en) A kind of platform and method for disposing compatibility test environment
Banerjee et al. OPNET: a new paradigm for simulation of advanced communication systems
US20140057231A1 (en) Break-fix simulator
US10310962B2 (en) Infrastructure rule generation
CN111382065B (en) Verification flow management system and method based on test template
CN108228965A (en) A kind of emulation verification method of storage unit, device and equipment
Perrone et al. On the automation of computer network simulators
RAJA Study of various network simulators
Knight et al. An automated system for emulated network experimentation
CN104301150B (en) A kind of method for configuring network equipment
US10386806B2 (en) Method for connecting models of technical systems in a testing device equipped for control unit development
US10116527B2 (en) Methods and apparatuses for validating network packet brokers

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
PP01 Preservation of patent right

Effective date of registration: 20180313

Granted publication date: 20170804

PP01 Preservation of patent right
PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20210313

Granted publication date: 20170804

PP01 Preservation of patent right
PP01 Preservation of patent right

Effective date of registration: 20210313

Granted publication date: 20170804

PD01 Discharge of preservation of patent

Date of cancellation: 20240313

Granted publication date: 20170804