CN103995773A - Automatic testing method for URL filtering function - Google Patents

Automatic testing method for URL filtering function Download PDF

Info

Publication number
CN103995773A
CN103995773A CN201410074477.4A CN201410074477A CN103995773A CN 103995773 A CN103995773 A CN 103995773A CN 201410074477 A CN201410074477 A CN 201410074477A CN 103995773 A CN103995773 A CN 103995773A
Authority
CN
China
Prior art keywords
test
url filtering
script
network address
configuration
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
CN201410074477.4A
Other languages
Chinese (zh)
Other versions
CN103995773B (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.)
Shaanxi Yuexiang Environmental 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 CN201410074477.4A priority Critical patent/CN103995773B/en
Publication of CN103995773A publication Critical patent/CN103995773A/en
Application granted granted Critical
Publication of CN103995773B publication Critical patent/CN103995773B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses an automatic testing method for the URL filtering function. The method comprises the steps that (1), a testing script sends a configuration script calling instruction, and an URL filtering web address is added; (2), the testing script sends a trigger instruction, and a computer is triggered to access the URL filtering web address; (3), the testing script judges whether the URL filtering web address can be accessed or not; when the URL filtering web address cannot be accessed, the testing script triggers and deletes the URL filtering web address, and the step 4 is executed; when the URL filtering web address can be accessed, the testing is ended; (4) the testing script sends a configuration script calling instruction, and the URL filtering web address is deleted; (5) the testing script sends a trigger instruction, and the computer is triggered to access the deleted URL filtering web address; (6) the testing script judges whether the deleted URL filtering web address can be accessed or not; when the deleted URL filtering web address can be accessed, a test success result is displayed by the computer, and the testing is ended; when the deleted URL filtering web address cannot be accessed, a test failure result is displayed by the computer, and the testing is ended.

Description

A kind of automatic test approach of url filtering function
Technical field
The present invention relates to the communications field, be specifically related to one for URL(Uniform Resource Locator, be called for short URL(uniform resource locator)) filtration automatic test approach.
Background technology
Along with the develop rapidly of internet, network has been inalienable part during everybody lives.Internet can make full use of multimedia technology, and what diffuse information is various informative; Instantaneity is strong, the report that can roll, and immediate updating, and can more fully realize interaction between audient; Virtual human communication platform can be provided.But the deficiency of network is also apparent, in open network, be flooded with various information, children and teenager are brought to unpredictable risk, as game website, pornographic website, video website etc.The head of a family can filter these websites by url filtering function.Nowadays work at home or small company (Small Office Home Office, be called for short SOHO) router has been the main flow of family online, so that the url filtering of SOHO product becomes is particularly important, and that the test of this function also becomes is more and more important.
The current test for url filtering function is mainly taking manual test as main.Test period is long, and testing procedure is loaded down with trivial details, tests multiple different URL addresses, can expend the much time; Increase the cost of product, increase test manpower and materials, and while having extended test, increased the whole R&D costs of product; Manual test false failure rate is high, loaded down with trivial details, similar because of test process, easily in testing engineering, causes maloperation.
Summary of the invention
The object of the present invention is to provide a kind of automatic test approach of url filtering function, simplify testing procedure, manual operation step is become automatically and completed, the form that test access internet address is triggered to test packet (ping bag) by test script realizes; By the form that is configured to be written as algorithm of function items for calling to realize; Shortened test period, all are all automation mechanized operations, and tester, the in the situation that of this function of test, can do work; Reduce false failure rate, automatically tested accuracy high, avoided unpredictable maloperation.
In order to achieve the above object, the present invention is achieved through the following technical solutions:
An automatic test approach for url filtering function, is characterized in, this method of testing comprises following steps:
Step 1, test script sends and calls configuration script order, adds url filtering network address;
Step 2, test script sends trigger command, triggers the above-mentioned url filtering network address of computer access;
Step 3, test script judges whether to access above-mentioned url filtering network address; When inaccessible, test script triggers deletes above-mentioned url filtering network address, execution step 4; Can access time, test finishes;
Step 4, test script sends and calls configuration script order, deletes above-mentioned url filtering network address;
Step 5, test script sends trigger command, triggers the deleted above-mentioned url filtering network address of computer access;
Step 6, test script judges whether to access deleted above-mentioned url filtering network address; Can access time, test successfully by Computer display, test finishes; When inaccessible, by Computer display test crash, test finishes.
Above-mentioned step 1 comprises following steps:
Step 1.1, test script is sent and is called configuration script order by computing machine;
Step 1.2, configuration script sends and writes order, the configuration address of input router and the initial username of router and encrypted message;
Step 1.3, the url filtering configuration page of configuration script location router;
Step 1.4, configuration script sends and writes order, by the above-mentioned url filtering network address of computer input and preserve this network address.
Above-mentioned step 2, comprises following steps:
Step 2.1, test script sends visit order, enters computing machine DOS interface;
Step 2.2, test script sends trigger command, triggers the ping bag access url filtering network address of computing machine.
Above-mentioned step 3 comprises following steps:
Step 3.1, test script judges whether rreturn value comprises " life span "; While comprising, test script calls configuration script order, deletes above-mentioned url filtering network address; While not comprising, test finishes;
Step 3.2, test script calls display command, and by computer export " url filtering is invalid ", test finishes.
Above-mentioned step 4 comprises following steps:
Step 4.1, test script is sent and is called configuration script order by computing machine;
Step 4.2, configuration script sends and writes order, the configuration address of input router and the initial username of router and encrypted message;
Step 4.3, the url filtering configuration page of configuration script location router;
Step 4.4, configuration script sends delete command, deletes above-mentioned url filtering network address and preserves.
Above-mentioned step 5 comprises following steps:
Step 5.1, test script sends visit order, enters computing machine DOS interface;
Step 5.2, test script sends trigger command, triggers the deleted url filtering network address of ping bag access of computing machine.
Above-mentioned step 6 comprises following steps:
Step 6.1, test script judges whether rreturn value comprises " life span "; While comprising, execution step 6.2; While not comprising, execution step 6.3;
Step 6.2, Computer display " is tested successfully ", and test finishes;
Step 6.3, test script calls display command, and by computer export " it is invalid that url filtering is deleted ", test finishes.
Before carrying out described step 1, also need following steps:
Test script sends visit order, enters computing machine DOS interface;
Test script sends trigger command, triggers the test packet accesses network address of computing machine;
Test script judges by computing machine whether rreturn value comprises " life span "; While comprising, call browser, test script sends and calls configuration script order; While not comprising, test script calls display command, output " Network Abnormal ", and test finishes.
The present invention compared with prior art has the following advantages:
1. test is simplified: tester only need check test result, does not need to do loaded down with trivial details action.
2. reliability is higher: automated testing method, without manual operation, has been avoided the error producing due to manual configuration.
3. shorten the test duration: revised after testing algorithm in early stage, tester is without do other operation in test;
4. reduce testing complex degree: tester can test equally in the situation that being unfamiliar with function.
Brief description of the drawings
Fig. 1 is the overall flow figure of the automatic test approach of a kind of url filtering function of the present invention.
Fig. 2 is the preparation process process flow diagram of the automatic test approach of a kind of url filtering function of the present invention.
Fig. 3 is the particular flow sheet of the automatic test approach of a kind of url filtering function of the present invention.
Embodiment
Below in conjunction with accompanying drawing, by describing a preferably specific embodiment in detail, the present invention is further elaborated.
As shown in Figure 1, Figure 3, a kind of automatic test approach of url filtering function, this method of testing comprises following steps:
Step 1, test script sends and calls configuration script order, adds url filtering network address; This step comprises following steps:
Step 1.1, test script is sent and is called configuration script order by computing machine.
Step 1.2, configuration script sends and writes order, the configuration address of input router and the initial username of router and encrypted message.
Step 1.3, the url filtering configuration page of configuration script location router.
Step 1.4, configuration script sends and writes order, by computer input url filtering network address and preserve this network address.
By step 1.1-1.4, complete the interpolation function of url filtering network address.
Step 2, test script sends trigger command, triggers computer access url filtering network address; This step comprises following steps:
Step 2.1, test script sends visit order, enters computing machine DOS interface.
Step 2.2, test script sends trigger command, triggers the ping bag access url filtering network address of computing machine.
Step 3, test script judges whether to access url filtering network address; When inaccessible, test script triggers deletes url filtering network address, execution step 4; Can access time, test finishes; This step comprises following steps:
Step 3.1, test script judges whether rreturn value comprises " life span " (Time To Live, is called for short TTL, for representing how long this ping bag can exist on network); While comprising, test script calls configuration script order, deletes url filtering network address; While not comprising, test finishes.
Step 3.2, test script calls display command, and by computer export " url filtering is invalid ", test finishes.
By step 2, step 3, this automatic test approach has completed the detection of filtering function.
Step 4, test script sends and calls configuration script order, deletes url filtering network address; This step comprises following steps:
Step 4.1, test script is sent and is called configuration script order by computing machine.
Step 4.2, configuration script sends and writes order, the configuration address of input router and the initial username of router and encrypted message.
Step 4.3, the url filtering configuration page of configuration script location router.
Step 4.4, configuration script sends delete command, deletes url filtering network address and preserves.
Step 5, test script sends trigger command, triggers the deleted url filtering network address of computer access; This step comprises following steps:
Step 5.1, test script sends visit order, enters computing machine DOS interface;
Step 5.2, test script sends trigger command, triggers the deleted url filtering network address of ping bag access of computing machine.
Step 6, test script judges whether to access deleted url filtering network address; Can access time, test successfully by Computer display, test finishes; When inaccessible, by Computer display test crash, test finishes.This step comprises following steps:
Step 6.1, test script judges whether rreturn value comprises " life span "; While comprising, execution step 6.2; While not comprising, execution step 6.3.
Step 6.2, Computer display " is tested successfully ", and test finishes.
Step 6.3, test script calls display command, and by computer export " it is invalid that url filtering is deleted ", test finishes.
Realize the deletion of right url filtering network address by step 5, step 6, and after checking deletion url filtering network address, can normally access deleted url filtering network address, the final complete url filtering function of having tested.
As shown in Figure 2, a kind of automatic test approach of url filtering function, the method, before execution step 1, also comprises following preparation process, for detecting before url filtering function formal, whether unimpededly detects test network:
Test script sends visit order, enters computing machine DOS interface.
Test script sends trigger command, triggers the ping bag accesses network address of computing machine.
Test script judges by computing machine whether rreturn value comprises " life span "; While comprising, call browser, test script sends and calls configuration script order; While not comprising, test script calls display command, output " Network Abnormal ", and test finishes.
Although content of the present invention has been done detailed introduction by above preferred embodiment, will be appreciated that above-mentioned description should not be considered to limitation of the present invention.Read after foregoing those skilled in the art, for multiple amendment of the present invention and substitute will be all apparent.Therefore, protection scope of the present invention should be limited to the appended claims.

Claims (8)

1. an automatic test approach for url filtering function, is characterized in that, this method of testing comprises following steps:
Step 1, test script sends and calls configuration script order, adds url filtering network address;
Step 2, test script sends trigger command, triggers url filtering network address described in computer access;
Step 3, test script judges whether to access described url filtering network address; When inaccessible, test script triggers deletes described url filtering network address, execution step 4; Can access time, test finishes;
Step 4, test script sends and calls configuration script order, deletes described url filtering network address;
Step 5, test script sends trigger command, triggers the deleted described url filtering network address of computer access;
Step 6, test script judges whether to access deleted described url filtering network address; Can access time, test successfully by Computer display, test finishes; When inaccessible, by Computer display test crash, test finishes.
2. the automatic test approach of url filtering function as claimed in claim 1, is characterized in that, described step 1 comprises following steps:
Step 1.1, test script is sent and is called configuration script order by computing machine;
Step 1.2, configuration script sends and writes order, the configuration address of input router and the initial username of router and encrypted message;
Step 1.3, the url filtering configuration page of configuration script location router;
Step 1.4, configuration script sends and writes order, by url filtering network address described in computer input and preserve this network address.
3. the automatic test approach of url filtering function as claimed in claim 1, is characterized in that, described step 2 comprises following steps:
Step 2.1, test script sends visit order, enters computing machine DOS interface;
Step 2.2, test script sends trigger command, triggers the test packet of computing machine and accesses described url filtering network address.
4. the automatic test approach of url filtering function as claimed in claim 1, is characterized in that, described step 3 comprises following steps:
Step 3.1, test script judges whether rreturn value comprises " life span "; While comprising, test script calls configuration script order, deletes described url filtering network address; While not comprising, test finishes;
Step 3.2, test script calls display command, and by computer export " url filtering is invalid ", test finishes.
5. the automatic test approach of url filtering function as claimed in claim 1, is characterized in that, described step 4 comprises following steps:
Step 4.1, test script is sent and is called configuration script order by computing machine;
Step 4.2, configuration script sends and writes order, the configuration address of input router and the initial username of router and encrypted message;
Step 4.3, the url filtering configuration page of configuration script location router;
Step 4.4, configuration script sends delete command, deletes described url filtering network address and preserves.
6. the automatic test approach of url filtering function as claimed in claim 1, is characterized in that, described step 5 comprises following steps:
Step 5.1, test script sends visit order, enters computing machine DOS interface;
Step 5.2, test script sends trigger command, triggers the deleted described url filtering network address of test packet access of computing machine.
7. the automatic test approach of url filtering function as claimed in claim 1, is characterized in that, described step 6 comprises following steps:
Step 6.1, test script judges whether rreturn value comprises " life span "; While comprising, execution step 6.2; While not comprising, execution step 6.3;
Step 6.2, Computer display " is tested successfully ", and test finishes;
Step 6.3, test script calls display command, and by computer export " it is invalid that url filtering is deleted ", test finishes.
8. the automatic test approach of the url filtering function as described in as any in claim 1 to 7, is characterized in that, before carrying out described step 1, also needs following steps:
Test script sends visit order, enters computing machine DOS interface;
Test script sends trigger command, triggers the test packet accesses network address of computing machine;
Test script judges by computing machine whether rreturn value comprises " life span "; While comprising, call browser, test script sends and calls configuration script order, carries out described step 1; While not comprising, test script calls display command, output " Network Abnormal ", and test finishes.
CN201410074477.4A 2014-02-28 2014-02-28 A kind of automatic test approach of url filtering function Active CN103995773B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410074477.4A CN103995773B (en) 2014-02-28 2014-02-28 A kind of automatic test approach of url filtering function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410074477.4A CN103995773B (en) 2014-02-28 2014-02-28 A kind of automatic test approach of url filtering function

Publications (2)

Publication Number Publication Date
CN103995773A true CN103995773A (en) 2014-08-20
CN103995773B CN103995773B (en) 2019-11-22

Family

ID=51309945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410074477.4A Active CN103995773B (en) 2014-02-28 2014-02-28 A kind of automatic test approach of url filtering function

Country Status (1)

Country Link
CN (1) CN103995773B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809758A (en) * 2018-05-24 2018-11-13 四川斐讯信息技术有限公司 A kind of network address intercepts test method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5974572A (en) * 1996-10-15 1999-10-26 Mercury Interactive Corporation Software system and methods for generating a load test using a server access log
US20080140765A1 (en) * 2006-12-07 2008-06-12 Yahoo! Inc. Efficient and reproducible visitor targeting based on propagation of cookie information
CN101909079A (en) * 2010-07-15 2010-12-08 北京迈朗世讯科技有限公司 User online behavior data acquisition method in backbone link and system
CN102624703A (en) * 2011-12-31 2012-08-01 成都市华为赛门铁克科技有限公司 Method and device for filtering uniform resource locators (URLs)
CN103324710A (en) * 2013-06-19 2013-09-25 深圳市共进电子股份有限公司 User experiencing method based on uniform resource locator (URL) filtering function
CN103455422A (en) * 2013-08-30 2013-12-18 上海斐讯数据通信技术有限公司 Software function automatic testing method
CN103544316A (en) * 2013-11-06 2014-01-29 苏州大拿信息技术有限公司 Uniform resource locator (URL) filtering system and achieving method thereof
CN103560995A (en) * 2013-09-25 2014-02-05 深圳市共进电子股份有限公司 URL filtering method for realizing IPv4 and IPv6 at the same time

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5974572A (en) * 1996-10-15 1999-10-26 Mercury Interactive Corporation Software system and methods for generating a load test using a server access log
US20080140765A1 (en) * 2006-12-07 2008-06-12 Yahoo! Inc. Efficient and reproducible visitor targeting based on propagation of cookie information
CN101909079A (en) * 2010-07-15 2010-12-08 北京迈朗世讯科技有限公司 User online behavior data acquisition method in backbone link and system
CN102624703A (en) * 2011-12-31 2012-08-01 成都市华为赛门铁克科技有限公司 Method and device for filtering uniform resource locators (URLs)
CN103324710A (en) * 2013-06-19 2013-09-25 深圳市共进电子股份有限公司 User experiencing method based on uniform resource locator (URL) filtering function
CN103455422A (en) * 2013-08-30 2013-12-18 上海斐讯数据通信技术有限公司 Software function automatic testing method
CN103560995A (en) * 2013-09-25 2014-02-05 深圳市共进电子股份有限公司 URL filtering method for realizing IPv4 and IPv6 at the same time
CN103544316A (en) * 2013-11-06 2014-01-29 苏州大拿信息技术有限公司 Uniform resource locator (URL) filtering system and achieving method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LOVE BAOBAO: "ping命令", 《HTTPS://BLOG.CSDN.NET/LOVE BAOBAO/ARTICLE/DETAILS/6880050》 *
可乐: "防火墙应用指南(七)一URL过滤功能使用举例", 《HTTP://HEZEFENG 168. B1OG.163. COM/BLOG/STATIC/992252262008102295015236/》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809758A (en) * 2018-05-24 2018-11-13 四川斐讯信息技术有限公司 A kind of network address intercepts test method and system

Also Published As

Publication number Publication date
CN103995773B (en) 2019-11-22

Similar Documents

Publication Publication Date Title
US9628349B2 (en) Interactivity analyses of web resources based on reload events
CN109062809B (en) Online test case generation method and device and electronic equipment
CN104767775B (en) Web application information push method and system
WO2021135809A1 (en) Testing method, device, terminal apparatus, and storage medium
US9262311B1 (en) Network page test system and methods
CN109683997B (en) Method for accessing application program interface through sandbox, sandbox and sandbox equipment
CN104834588B (en) The method and apparatus for detecting resident formula cross site scripting loophole
US9507691B2 (en) Conditional component breakpoint setting system and method
CN103207863A (en) Page cross-domain interacting method and terminal
CN104182681B (en) Hook-based iOS (iPhone operating system) key behavior detection device and detection method thereof
CN107168850B (en) URL page monitoring method and device
CN104836779B (en) XSS leak detection method, system and Web server
CN111309620A (en) Game protocol testing method and device, electronic equipment and storage medium
CN106649531A (en) Webpage detection method and device
CN103902534A (en) Method and device for triggering local operations through webpage program
CN105117340A (en) URL (Uniform Resource Locator) detection method and device used for quality evaluation of iOS browser application
CN111694550A (en) Page display control method, device and system
CN106557411B (en) Method and system for testing Hybrid application in Android system
WO2016188101A1 (en) Service system test method and device
CN103995773A (en) Automatic testing method for URL filtering function
US20080162687A1 (en) Data acquisition system and method
WO2023124314A1 (en) Micro-service test method and system for hybrid cpu architecture device, and related apparatus
CN113031995B (en) Rule updating method and device, storage medium and electronic equipment
CN114218011A (en) Test simulation method and device, terminal equipment and storage medium
CN107861966A (en) Cache detection method, equipment and computer-readable recording medium

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
TR01 Transfer of patent right

Effective date of registration: 20201112

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: 201620 Shanghai city Songjiang District Guangfulin road 4855 Lane 20, No. 90

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

EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20140820

Assignee: Hangzhou xiaobuzhixue Information Technology Co.,Ltd.

Assignor: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Contract record no.: X2021330000454

Denomination of invention: An automatic test method for URL filtering function

Granted publication date: 20191122

License type: Common License

Record date: 20211019

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20140820

Assignee: Hangzhou national software industry base Co.,Ltd.

Assignor: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Contract record no.: X2021330000669

Denomination of invention: An automatic test method for URL filtering function

Granted publication date: 20191122

License type: Common License

Record date: 20211103

EE01 Entry into force of recordation of patent licensing contract
TR01 Transfer of patent right

Effective date of registration: 20240305

Address after: Room 5-166, Building B, Jinghe Zhigu, Chongwen Town, Jinghe New City, Xixian New District, Xi'an City, Shaanxi Province, 710075

Patentee after: Shaanxi Yuexiang Environmental Technology Co.,Ltd.

Country or region after: China

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.

Country or region before: China

TR01 Transfer of patent right