CN107896173A - Automated testing method, test equipment, automatization test system and storage medium - Google Patents

Automated testing method, test equipment, automatization test system and storage medium Download PDF

Info

Publication number
CN107896173A
CN107896173A CN201711205266.XA CN201711205266A CN107896173A CN 107896173 A CN107896173 A CN 107896173A CN 201711205266 A CN201711205266 A CN 201711205266A CN 107896173 A CN107896173 A CN 107896173A
Authority
CN
China
Prior art keywords
message
address
information
test
message information
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.)
Withdrawn
Application number
CN201711205266.XA
Other languages
Chinese (zh)
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.)
Taizhou Jiji Intellectual Property Operation 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 CN201711205266.XA priority Critical patent/CN107896173A/en
Publication of CN107896173A publication Critical patent/CN107896173A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The invention discloses a kind of automated testing method, for test equipment, including step:Open and log in the Webpage being devices under;The management address being devices under is revised as default management address and preserved;Crawl is devices under the back message of the predetermined number sent, and parses the back message and obtain message information;According to message information described in preset matching character match, address information is extracted from message information;The address information of acquisition is compared with default management address;If identical, test passes through;Otherwise, test crash.The present invention tests the modification function of the management address of equipment to be tested automatically by design automation test script, realization, simplifies difficulty of test, improves testing efficiency, while mitigates tester's work difficulty, shortens test period, reduces product cost.

Description

Automated testing method, test equipment, automatization test system and storage medium
Technical field
The present invention relates to automatization testing technique field, more particularly to it is a kind of automated testing method, test equipment, automatic Change test system and storage medium.
Background technology
The test for management address modification function items is manual test at present, and tester simply sees after the completion of configuration Whether the address network segment that lower second line of a couplet equipment obtains is identical with the management address network segment of modification, does not check field in message deeply It is whether correct.And the function is must survey item, each version must be tested, test meeting engaged test personnel repeatedly largely test Time.
The content of the invention
In order to solve the above technical problems, the present invention provides a kind of automated testing method, test equipment, automatic test system System and storage medium, function can be changed in test and management address automatically, improve testing efficiency.
Technical scheme provided by the invention is as follows:
The invention discloses a kind of automated testing method, for test equipment, including step:Open and log in tested The Webpage of equipment;The management address being devices under is revised as default management address and preserved;Crawl is devices under The back message of the predetermined number of transmission, and parse the back message and obtain message information;According to preset matching character match The message information, extracts address information from message information;The address information of acquisition is compared with default management address; If identical, test passes through;Otherwise, test crash.
Further, the step " back message for the predetermined number that crawl is devices under sending " specifically includes step Suddenly:The back message of predetermined number is captured using bootp agreements as filtering item.
Further, " according to message information described in preset matching character match, address information is extracted from message information " Specifically include:The message information is matched according to preset matching field, to position in message information where address information Line position is put;Matched from row opening position where address information according to preset matching character, extracted describedly from message information Location information.
Further, " crawl is devices under the back message of the predetermined number sent to the step, and parses described return Message is answered to obtain message information " also include step afterwards:
Default storage region, and output display line by line are arrived into message information storage.
The present invention, which is spent, discloses a kind of test equipment, including processor, is adapted for carrying out each instruction;And storage device, it is suitable to A plurality of instruction is stored, the instruction is suitable to be loaded and performed by processor:Open and log in the Webpage being devices under;Will The management address being devices under is revised as default management address and preserved;Crawl is devices under returning for the predetermined number sent Message is answered, and parses the back message and obtains message information;According to message information described in preset matching character match, from message Address information is extracted in information;The address information of acquisition is compared with default management address;If identical, test passes through; Otherwise, test crash.
Further, the instruction is particularly adapted to be loaded by processor and performed:It is pre- as filtering item crawl using bootp agreements If the back message of quantity.
Further, the instruction is further adapted for being loaded by processor and being performed:Message information storage is deposited to default Storage area domain, and output display line by line.
Further, the instruction is particularly adapted to be loaded by processor and performed:According to preset matching field to the report Literary information is matched, and is put with positioning line position where address information in message information;According to preset matching character from address information Place row opening position is matched, and the address information is extracted from message information.
Invention additionally discloses a kind of automatization test system, including it is devices under and above-mentioned test equipment;It is described tested The lan interfaces of examination equipment are connected with the network interface card of the test equipment.
A kind of storage medium is also disclosed in invention, wherein being stored with a plurality of instruction, the instruction is suitable to by processor loading simultaneously Perform:Open and log in the Webpage being devices under;The management address being devices under is revised as default management address And preserve;Crawl is devices under the back message of the predetermined number sent, and parses the back message and obtain message information; According to message information described in preset matching character match, address information is extracted from message information;By the address information of acquisition with Default management address is compared;If identical, test passes through;Otherwise, test crash.
Compared with prior art, the present invention tests equipment to be tested automatically by design automation test script, realization The modification function of management address, simplify difficulty of test, improve testing efficiency, while mitigate tester's work difficulty, shorten and survey The cycle is tried, reduces product cost.
Brief description of the drawings
Below by a manner of clearly understandable, preferred embodiment is described with reference to the drawings, the present invention is given furtherly It is bright.
Fig. 1 is a kind of key step schematic diagram of automated testing method of the present invention;
Fig. 2 is a kind of entire protocol schematic diagram of automated testing method of the present invention;
Fig. 3 is a kind of flow chart of automated testing method of the present invention.
Embodiment
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, control is illustrated below The embodiment of the present invention.It should be evident that drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing, and obtain other embodiments.
To make simplified form, part related to the present invention is only schematically show in each figure, they are not represented Its practical structures as product.In addition, so that simplified form readily appreciates, there is identical structure or function in some figures Part, one of those is only symbolically depicted, or only marked one of those.Herein, "one" is not only represented " only this ", the situation of " more than one " can also be represented.
The test script of the invention tested by design automation simultaneously starts execution, realizes the management address being devices under Change the automatic test of function.Specifically, test equipment can be computer.Before automatic test is carried out, preparation: The lan interfaces of equipment to be tested are connected by tester with the network interface card of test equipment, start test script.
Fig. 1 is a kind of key step schematic diagram of automated testing method of the present invention, as shown in figure 1, comprising the following steps:
S1, opening simultaneously log in the Webpage being devices under.
S2, the management address being devices under is revised as default management address and preserved.Specifically, default management address For tester's self-defining, for what is be compared with the address information extracted in later stage test process.
S3, crawl are devices under the back message of the predetermined number sent, and parse the back message and obtain message Information.Specifically, the crawl quantity of back message is predetermined number, the value of predetermined number is depending on network environment, if network Environment is relatively cleaner (message disturbed is less), then can suitably reduce the value of predetermined number.
S4, the message information according to preset matching character match, extract address information from message information;
S5, the address information of acquisition is compared with default management address;If identical, test passes through;Otherwise, test Failure.Specifically, preset matching character is (src:.*) (.*), the address information are source IP address, that is, represent to be tested The IP address of equipment.It is the IP address information of equipment to be tested and default management address ratio by address information in message information It is right, judge whether two addresses are identical, if identical, are successfully tested, illustrate that management address modification function is normal.
Test script and execution of the present invention by design, so as to realize automatic test and management address modification function, without Manual operation, mitigate tester's work difficulty.
Fig. 2 is a kind of entire protocol schematic diagram of automated testing method of the present invention.
Preferably, above-described embodiment is improved, as shown in Fig. 2 " crawl is devices under sending in the step S3 Predetermined number back message " specifically include step:The back message of predetermined number is captured using bootp agreements as filtering item.
Specifically, bootp agreements BOOTP (Bootstrap Protocol, boot protocol) is a kind of BOOT strapping Protocol, It is the predecessor of DHCP protocol based on IP/UDP agreements, also referred to as Bootstrap Protocol.BOOTP is used in the LAN of non-disk workstation, can To allow non-disk workstation to obtain IP address from a central server.Can be without disk in LAN by BOOTP agreements Work station distributes dynamic IP addressing, goes to go to set static ip address for each user so there is no need to keeper.In order to reduce The crawl quantity of back message, mitigate amount of calculation, the present embodiment using bootp agreements as filtering item by being captured, present count Amount is set to 10, filters out the message of non-bootp agreements, greatly reduces the scope of message.
Preferably, above-described embodiment is improved, as shown in Fig. 2 the step S4 is " according to preset matching character match The message information, extracts address information from message information " specifically include:
The message information is matched according to preset matching field, is expert at positioning address information in message information Position;Matched according to preset matching character from row opening position where address information, the address is extracted from message information Information.
Specifically, preset matching field is " Internet Protocol ", address first to be found by positioning in the present embodiment Line position where information is put, i.e. Internet the first row (row includes source IP and target ip address), and line position where from address information is put Place is matched, it is not necessary to all rows of whole message information are all matched, alleviate matching workload, improve effect Rate.
Preferably, above-described embodiment is improved, as shown in Fig. 2 " crawl is devices under what is sent to the step S3 The back message of predetermined number, and parse the back message and obtain message information " also include step S31 afterwards:By the report Default storage region, and output display line by line are arrived in literary information storage.
Also message information is exported line by line in the present embodiment and is shown to tester, is easy to tester intuitively to check whole Individual test process, also allow for tester and search mistake when test makes a mistake.
In order to which the Expected Results of the present invention is better described, with reference to flow chart for example, according to skill of the invention Art scheme is described in further detail, and Fig. 3 is a kind of flow chart of automated testing method of the present invention, as shown in Figure 3:
Prepare:The lan interfaces of equipment to be tested are connected by tester with the network interface card of test equipment, start test pin This;
Step 301, script calls login functions to open and log in DUT WEB pages;
Step 302, call click orders LAN that the page is set, the management address for changing equipment to be tested is default management ground Location, and preserved;
Step 303, call instruction tshark carries out capturing 10 messages and by message using agreement as bootp as filtering item The details of information decoded result is output in the log.txt of D disks;
Step 304, call open functions to open the log.txt texts under D disks and be assigned to the message information in text Variables A;
Step 305, call for functions and read functions to be exported the message information in variables A line by line, and call Re.search functions are so that ' Internet Protocol ' are matched to position report as matching field to every row message information Internet the first row in literary information (row includes source IP and target ip address);
Step 306, the row is output to variable B after positioning successfully and calls re.search functions respectively with (src:.*) Source IP and output in (.*) matching B;
Step 307, the source IP address of output and amended default management address are contrasted, identical then test is logical Cross, different then test crash.
Step 308, output test result.
The management address modification functional test of equipment to be tested is solidified into automatic test script by the key point of the present invention Used for tester, the test of modification function in equipment control address to be tested is realized in crawl and analysis with DHCP message.This The technical staff in field can make a variety of changes on the premise of without departing substantially from the principle and essence of the present invention to these embodiments More or change, but these changes and modification each fall within protection scope of the present invention.
A kind of test equipment, including processor, it is adapted for carrying out each instruction;And storage device, suitable for storing a plurality of instruction, The instruction is suitable to be loaded and performed by processor:Open and log in the Webpage being devices under;By what is be devices under Management address is revised as default management address and preserved;Crawl is devices under the back message of the predetermined number sent, and solves Analyse the back message and obtain message information;According to message information described in preset matching character match, extracted from message information Address information;The address information of acquisition is compared with default management address;If identical, test passes through;Otherwise, test is lost Lose.
Preferably, the instruction is particularly adapted to be loaded by processor and performed:It is default as filtering item crawl using bootp agreements The back message of quantity.
Preferably, the instruction is further adapted for being loaded by processor and being performed:By message information storage to default storage Region, and output display line by line.
Preferably, the instruction is particularly adapted to be loaded by processor and performed:According to preset matching field to the message Information is matched, and is put with positioning line position where address information in message information;According to preset matching character from address information institute Opening position of being expert at is matched, and the address information is extracted from message information.
A kind of automatization test system, including be devices under and above-mentioned test equipment;The local being devices under Network interface is connected with the network interface card of the test equipment.
A kind of storage medium, wherein being stored with a plurality of instruction, the instruction is suitable to be loaded and performed by processor:Open simultaneously Log in the Webpage being devices under;The management address being devices under is revised as default management address and preserved;Crawl The back message of predetermined number sent is devices under, and parses the back message and obtains message information;According to default With message information described in character match, address information is extracted from message information;By the address information of acquisition and default management ground Location is compared;If identical, test passes through;Otherwise, test crash.
Part that technical scheme substantially contributes to prior art in other words or the technical scheme It can completely or partially be embodied in the form of software product, the computer software product is stored in a storage medium, Including some instructions causing a computer equipment (can be personal computer, database or network equipment etc.) to perform sheet Invent all or part of step of each embodiment methods described.And foregoing storage medium includes:USB flash disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disc Or CD etc. is various can be with the medium of store program codes.
It should be noted that above-described embodiment can independent assortment as needed.Described above is only the preferred of the present invention Embodiment, it is noted that for those skilled in the art, do not departing from the premise of the principle of the invention Under, some improvements and modifications can also be made, these improvements and modifications also should be regarded as protection scope of the present invention.

Claims (10)

1. a kind of automated testing method, for test equipment, it is characterised in that including step:
Open and log in the Webpage being devices under;
The management address being devices under is revised as default management address and preserved;
Crawl is devices under the back message of the predetermined number sent, and parses the back message and obtain message information;
According to message information described in preset matching character match, address information is extracted from message information;
The address information of acquisition is compared with default management address;If identical, test passes through;Otherwise, test crash.
2. automated testing method according to claim 1, it is characterised in that " crawl is devices under sending out the step The back message of the predetermined number sent " specifically includes step:
The back message of predetermined number is captured using bootp agreements as filtering item.
3. automated testing method according to claim 1, it is characterised in that " according to preset matching character match Message information, address information is extracted from message information " specifically include:
The message information is matched according to preset matching field, to position line position where address information in message information Put;
Matched according to preset matching character from row opening position where address information, the address letter is extracted from message information Breath.
4. automated testing method according to claim 1, it is characterised in that " crawl is devices under sending out the step The back message of the predetermined number sent, and parse the back message and obtain message information " also include step afterwards:
Default storage region, and output display line by line are arrived into message information storage.
5. a kind of test equipment, including processor, it is adapted for carrying out each instruction;And storage device, suitable for storing a plurality of instruction, institute Instruction is stated to be suitable to be loaded and performed by processor:
Open and log in the Webpage being devices under;
The management address being devices under is revised as default management address and preserved;
Crawl is devices under the back message of the predetermined number sent, and parses the back message and obtain message information;
According to message information described in preset matching character match, address information is extracted from message information;
The address information of acquisition is compared with default management address;If identical, test passes through;Otherwise, test crash.
6. test equipment as claimed in claim 5, it is characterised in that the instruction is particularly adapted to be loaded by processor and held OK:
The back message of predetermined number is captured using bootp agreements as filtering item.
7. test equipment as claimed in claim 5, it is characterised in that the instruction is further adapted for being loaded by processor and being performed:
Default storage region, and output display line by line are arrived into message information storage.
8. test equipment as claimed in claim 5, it is characterised in that the instruction is particularly adapted to be loaded by processor and held OK:
The message information is matched according to preset matching field, to position line position where address information in message information Put;
Matched according to preset matching character from row opening position where address information, the address letter is extracted from message information Breath.
9. a kind of automatization test system, including it is devices under the test equipment described in claim 5-8 any one;Institute The lan interfaces being devices under are stated with the network interface card of the test equipment to be connected.
10. a kind of storage medium, it is characterised in that be wherein stored with a plurality of instruction, the instruction is suitable to by processor loading simultaneously Perform:
Open and log in the Webpage being devices under;
The management address being devices under is revised as default management address and preserved;
Crawl is devices under the back message of the predetermined number sent, and parses the back message and obtain message information;
According to message information described in preset matching character match, address information is extracted from message information;
The address information of acquisition is compared with default management address;If identical, test passes through;Otherwise, test crash.
CN201711205266.XA 2017-11-27 2017-11-27 Automated testing method, test equipment, automatization test system and storage medium Withdrawn CN107896173A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711205266.XA CN107896173A (en) 2017-11-27 2017-11-27 Automated testing method, test equipment, automatization test system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711205266.XA CN107896173A (en) 2017-11-27 2017-11-27 Automated testing method, test equipment, automatization test system and storage medium

Publications (1)

Publication Number Publication Date
CN107896173A true CN107896173A (en) 2018-04-10

Family

ID=61806235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711205266.XA Withdrawn CN107896173A (en) 2017-11-27 2017-11-27 Automated testing method, test equipment, automatization test system and storage medium

Country Status (1)

Country Link
CN (1) CN107896173A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108667953A (en) * 2018-04-27 2018-10-16 四川斐讯信息技术有限公司 A kind of the lease function test method and system, test device of DHCP service
CN109655762A (en) * 2019-01-09 2019-04-19 安徽省航嘉智源科技有限公司 System and method are demarcated in the address of battery management unit
CN109669857A (en) * 2018-11-20 2019-04-23 苏州凯尔思特自动化科技有限公司 A kind of automated testing method
CN110119423A (en) * 2019-05-17 2019-08-13 厦门商集网络科技有限责任公司 A kind of data analysis method and computer readable storage medium of configurableization
CN110127326A (en) * 2019-06-19 2019-08-16 盐城工学院 Production line automation turns to transport control system and method, production line control system
CN112256557A (en) * 2020-09-16 2021-01-22 蘑菇物联技术(深圳)有限公司 Program regression testing method, device, system, computer equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108667953A (en) * 2018-04-27 2018-10-16 四川斐讯信息技术有限公司 A kind of the lease function test method and system, test device of DHCP service
CN109669857A (en) * 2018-11-20 2019-04-23 苏州凯尔思特自动化科技有限公司 A kind of automated testing method
CN109655762A (en) * 2019-01-09 2019-04-19 安徽省航嘉智源科技有限公司 System and method are demarcated in the address of battery management unit
CN109655762B (en) * 2019-01-09 2024-03-22 安徽省航嘉智源科技有限公司 Address calibration system and method for battery management unit
CN110119423A (en) * 2019-05-17 2019-08-13 厦门商集网络科技有限责任公司 A kind of data analysis method and computer readable storage medium of configurableization
CN110127326A (en) * 2019-06-19 2019-08-16 盐城工学院 Production line automation turns to transport control system and method, production line control system
CN112256557A (en) * 2020-09-16 2021-01-22 蘑菇物联技术(深圳)有限公司 Program regression testing method, device, system, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107896173A (en) Automated testing method, test equipment, automatization test system and storage medium
US9465718B2 (en) Filter generation for load testing managed environments
CN104268079B (en) A kind of method and system of POS Application testings
EP3132353B1 (en) User interface test coverage
CN107302475A (en) The method of testing and device of a kind of Based on Distributed storage cluster
CN108052451A (en) Test method, system, test server, test terminal and storage medium
CN105787364B (en) Automatic testing method, device and system for tasks
US20130263090A1 (en) System and method for automated testing
US20140282411A1 (en) Test Case Reduction for Code Regression Testing
CN105095207B (en) Retrieval, the method and apparatus for obtaining application software content
Haller Mobile testing
CN106897226A (en) The method and device of a kind of continuous integrating test
CN109011565B (en) Analysis method, device and the server of state before a kind of game running
CN107370740A (en) Redirect hold-up interception method and device
CN109815115A (en) Method and device, the computer equipment, storage medium of debugging bridge joint mouth
WO2010022199A1 (en) Method and system for delivering performance based emulation testing
CN107707574A (en) A kind of anti-reptile method based on the behavior of access
CN108108445A (en) A kind of data intelligence processing method and system
CN110401580A (en) Webpage status monitoring method and relevant device based on heartbeat mechanism
CN112148607A (en) Interface testing method and device for service scene
CN105446845B (en) A kind of intelligent terminal ROM fluency evaluating method and system
CN110865941A (en) Interface test case generation method, device and system
CN107332805A (en) Detect the methods, devices and systems of leak
CN109861874B (en) Automatic test system of equipment
CN111159028A (en) Webpage testing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20200909

Address after: No. 2-3167, zone a, Nonggang City, No. 2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Applicant after: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

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

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

TA01 Transfer of patent application right
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20180410

WW01 Invention patent application withdrawn after publication