CN113312266A - System and method for rapidly generating test topology structure diagram based on automatic test - Google Patents
System and method for rapidly generating test topology structure diagram based on automatic test Download PDFInfo
- Publication number
- CN113312266A CN113312266A CN202110658964.5A CN202110658964A CN113312266A CN 113312266 A CN113312266 A CN 113312266A CN 202110658964 A CN202110658964 A CN 202110658964A CN 113312266 A CN113312266 A CN 113312266A
- Authority
- CN
- China
- Prior art keywords
- data
- test
- address
- structure diagram
- topology structure
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3676—Test management for coverage analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention relates to the field of automatic testing, in particular to a system and a method for rapidly generating a test topology structure chart based on automatic testing, wherein the system comprises a data capture engine, a data analysis engine, a data format conversion engine and a front-end page, and the method comprises the following steps: firstly, capturing a data packet of a browser, secondly, setting a primary address of a target webpage, filtering the data packet captured in the previous step, filtering a message containing the primary address of the target webpage, finally, converting the data filtered in the previous step into a data format which can be identified by a front-end page, and converting the data into a topological graph. The problems of low evaluation test coverage rate and difficult positioning in the black box test are solved.
Description
Technical Field
The invention relates to the field of automatic testing, in particular to a system and a method for quickly generating a test topology structure diagram based on automatic testing.
Background
Agile development modes are more and more widely applied to software development, and the main agile development mode XP or SCRUM and other modes all emphasize the problems of automatic testing to find codes as soon as possible and accelerate the development speed, and the automatic testing is generally divided into interface automatic testing, Web automatic testing and APP automatic testing; in addition, automatic testing can be realized by writing Shell scripts and Python scripts.
The mainstream at present as a plug-in form can be integrated into Jenkins to realize the automated testing tool of the assembly line: selenium (suitable for automated testing of Web application interfaces, supporting python language), Katalon Studio (suitable for testing of interfaces, Web, mobile applications, and desktop applications); TestComplete (suitable for interface, Web, mobile application and desktop application tests, supporting JavaScript \ VBScript \ python \ C + + Script), the branch coverage of the test is the key to the test quality, it is usually difficult to evaluate the test coverage in the black box test, and it is highly dependent on the experience of the tester, and in the automated test, the problems of automatic evaluation of the test coverage and quick positioning become problems that can be solved by the system.
Disclosure of Invention
Based on the problems, the invention provides a system and a method for quickly generating a test topology structure diagram based on automatic test, and solves the problems of low evaluation test coverage rate and difficult positioning in black box test.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
the system for rapidly generating the test topology structure diagram based on the automatic test comprises the following steps:
the data capture engine is used for rapidly capturing a data packet of the browser according to the configured rule and sending the data packet to the next process;
the data analysis engine is used for setting a primary address of a target webpage, filtering the received data packet after receiving the data packet sent by the data capture engine, and filtering a message containing the primary address of the target webpage;
the data format conversion engine is used for converting the data filtered by the data analysis engine into a data format which can be identified by a front-end page;
and the front-end page converts the data converted by the data conversion engine into a topological graph.
The method for rapidly generating the test topology structure diagram based on the automatic test comprises the following steps:
step 1, capturing a data packet of a browser;
step 2, setting a primary address of the target webpage, filtering the data packet captured in the step 1, and filtering out a message containing the primary address of the target webpage;
and 3, converting the data filtered in the step 2 into a data format which can be identified by a front-end page, and converting the data into a topological graph.
Further, in step 1, the browser captures the data packet in an agent mode, an ip address is an address of a host where a system for quickly generating a test topology structure diagram based on an automated test is located, a port is 9000, and all messages sent by the browser need to be sent and received by an agent.
Further, in the step 2, the data packet is filtered by using a regular rule and a filtering algorithm to obtain a required message, and the content of the message includes the element type, the element name, the input and the output of the webpage.
Further, the step 3 specifically includes the following steps:
step 3.1, generating a data transmission direction in the topological graph, wherein Get is an arrow pointing to a source address, and POST is an arrow pointing to a target resource;
step 3.2, the Get request resolves the request resource address, and draws all the externally requested resource topologies of the current page;
step 3.3, the POST request analyzes the request resource address and generates an arrow pointing to the current page from the request resource address;
step 3.4, the POST requests to catch the data of the service address, and the data are displayed above the arrow in the step 3.3;
and 3.5, generating a new node when the page is skipped, thereby generating the whole topological graph.
Further, in step 3.5, before generating the topology map, a filtering condition and a delay packet capturing are set, and useless addresses in the page loading process are filtered out.
Compared with the prior art, the invention has the beneficial effects that: the data packets in the automatic testing process are captured, the data packets are analyzed to generate a logic topological graph of the automatic testing, the topological graph is visually displayed on a webpage, and developers can know testing logic through the topological graph, so that problems are quickly located. The tester can perform test coverage rate evaluation through the topological graph.
Drawings
FIG. 1 is a structural view of the present embodiment 1;
fig. 2 is a flowchart of this embodiment 1.
Detailed Description
The invention will be further described with reference to the accompanying drawings. Embodiments of the present invention include, but are not limited to, the following examples.
Example 1
As shown in fig. 1, a system for rapidly generating a test topology structure diagram based on an automated test operates in an application layer, intercepts data packets of HTTP and HTTPs protocols in the application layer, generates different topology diagrams by setting an analysis type or a web application in advance by a user, and generates a web operation topology diagram by mainly using an operation timeline as a dimension analysis click element in a web test, and performs alarm display on an operation having an abnormal return value, including the following steps:
the data capture engine is used for rapidly capturing a data packet of the browser according to the configured rule and sending the data packet to the next process;
the data analysis engine is used for setting a primary address of a target webpage, filtering the received data packet after receiving the data packet sent by the data capture engine, and filtering a message containing the primary address of the target webpage;
the data format conversion engine is used for converting the data filtered by the data analysis engine into a data format which can be identified by a front-end page;
and the front-end page converts the data converted by the data conversion engine into a topological graph.
As shown in fig. 2, the method for quickly generating a test topology structure diagram based on an automated test includes the following steps:
step 1, capturing a data packet of a browser;
the browser is set to be in an agent mode, an ip address is an address of a host where a system for quickly generating a test topology structure diagram based on automatic test is located, a port is 9000, and all messages sent by the browser need to be sent and received through agents, so that all messages sent and received by Web application can be intercepted.
Step 2, setting a primary address of the target webpage, filtering the data packet captured in the step 1, and filtering out a message containing the primary address of the target webpage;
the data packet is filtered by adopting a regular rule and a filtering algorithm to obtain a required message, wherein the content of the message comprises the element type, the element name, the input and the output of a webpage.
Step 3, converting the data filtered in the step 2 into a data format which can be identified by a front-end page, and converting the data into a topological graph;
the process of generating the topological graph specifically comprises the following steps:
step 3.1, generating a data transmission direction in the topological graph, wherein Get is an arrow pointing to a source address, and POST is an arrow pointing to a target resource;
step 3.2, the Get request resolves the request resource address, and draws all the externally requested resource topologies of the current page;
step 3.3, the POST request analyzes the request resource address and generates an arrow pointing to the current page from the request resource address;
step 3.4, the POST requests to catch the data of the service address, the data are displayed above the arrow in the step 3.3, and testers can check details by clicking, so that the current page can clearly know what state the POST request is sent to;
and 3.5, generating a new node when the page is skipped, thereby generating the whole topological graph.
Further, before generating the topological graph, a filtering condition and a delay packet capturing may be set, and useless addresses in the page loading process are filtered, for example, all picture addresses, document addresses, and the like are filtered, or a packet capturing process is delayed for several seconds, and resource addresses generated by user operation are captured after the page loading is completed.
Example 2
A tester utilizes a system for quickly generating a test topology structure diagram based on automatic test, and the process of applying test to a webpage specifically comprises the following steps:
step one, setting a browser into a proxy mode, wherein an ip address is an address of a host where a system for quickly generating a test topology structure diagram based on an automatic test is located, and a port is 9000;
step two, setting a primary address of a target webpage;
step three, opening a browser to input a test webpage application address;
and fourthly, the tester performs operations such as page clicking and inputting on the webpage according to the test case.
The above is an embodiment of the present invention. The specific parameters in the above embodiments and examples are only for the purpose of clearly illustrating the invention verification process of the inventor and are not intended to limit the scope of the invention, which is defined by the claims, and all equivalent structural changes made by using the contents of the specification and the drawings of the present invention should be covered by the scope of the present invention.
Claims (6)
1. The system for rapidly generating the test topology structure diagram based on the automatic test is characterized by comprising the following steps:
the data capture engine is used for rapidly capturing a data packet of the browser according to the configured rule and sending the data packet to the next process;
the data analysis engine is used for setting a primary address of a target webpage, filtering the received data packet after receiving the data packet sent by the data capture engine, and filtering a message containing the primary address of the target webpage;
the data format conversion engine is used for converting the data filtered by the data analysis engine into a data format which can be identified by a front-end page;
and the front-end page converts the data converted by the data conversion engine into a topological graph.
2. The method for rapidly generating the test topology structure diagram based on the automatic test is characterized by comprising the following steps:
step 1, capturing a data packet of a browser;
step 2, setting a primary address of the target webpage, filtering the data packet captured in the step 1, and filtering out a message containing the primary address of the target webpage;
and 3, converting the data filtered in the step 2 into a data format which can be identified by a front-end page, and converting the data into a topological graph.
3. The method for rapidly generating the test topology structure diagram based on the automatic test as claimed in claim 2, wherein in the step 1, the browser uses a proxy mode to capture the data packet, the ip address is the address of the host where the system for rapidly generating the test topology structure diagram based on the automatic test is located, the port is 9000, and all messages sent by the browser need to be sent and received through the proxy.
4. The method for rapidly generating a test topology structure diagram based on the automated test according to claim 2, wherein in the step 2, the data packet is filtered by using a regular rule and a filtering algorithm to obtain a required message, and the content of the message comprises the element type, the element name, the input and the output of the webpage.
5. The method for rapidly generating a test topology structure diagram based on the automated test according to claim 2, wherein the step 3 specifically comprises the following steps:
step 3.1, generating a data transmission direction in the topological graph, wherein Get is an arrow pointing to a source address, and POST is an arrow pointing to a target resource;
step 3.2, the Get request resolves the request resource address, and draws all the externally requested resource topologies of the current page;
step 3.3, the POST request analyzes the request resource address and generates an arrow pointing to the current page from the request resource address;
step 3.4, the POST requests to catch the data of the service address, and the data are displayed above the arrow in the step 3.3;
and 3.5, generating a new node when the page is skipped, thereby generating the whole topological graph.
6. The method for rapidly generating a test topology structure diagram based on the automatic test as claimed in claim 5, wherein in the step 3.5, a filtering condition and a delay packet capturing are set before generating the topology structure diagram, and useless addresses in the page loading process are filtered out.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110658964.5A CN113312266B (en) | 2021-06-11 | 2021-06-11 | System and method for rapidly generating test topology structure diagram based on automatic test |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110658964.5A CN113312266B (en) | 2021-06-11 | 2021-06-11 | System and method for rapidly generating test topology structure diagram based on automatic test |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113312266A true CN113312266A (en) | 2021-08-27 |
CN113312266B CN113312266B (en) | 2023-09-15 |
Family
ID=77378692
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110658964.5A Active CN113312266B (en) | 2021-06-11 | 2021-06-11 | System and method for rapidly generating test topology structure diagram based on automatic test |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113312266B (en) |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020158897A1 (en) * | 2001-04-30 | 2002-10-31 | Besaw Lawrence M. | System for displaying topology map information through the web |
CN101102259A (en) * | 2006-07-05 | 2008-01-09 | 鸿富锦精密工业(深圳)有限公司 | Network access control system and its method |
CN102446191A (en) * | 2010-10-13 | 2012-05-09 | 北京创新方舟科技有限公司 | Method for generating webpage content abstracts and equipment and system adopting same |
US20120185669A1 (en) * | 2011-01-17 | 2012-07-19 | Fujitsu Limited | Program inspection method and non-transitory, computer readable storage medium storing inspection program |
CN102768641A (en) * | 2012-06-15 | 2012-11-07 | 深圳中兴网信科技有限公司 | Webpage testing factor selecting device and webpage testing factor selecting method |
US20140189435A1 (en) * | 2012-12-31 | 2014-07-03 | Johnson Manuel-Devadoss | System and method to extend the capabilities of a web browser of a web application issue root cause determination techniques |
US8892687B1 (en) * | 2013-12-06 | 2014-11-18 | Shape Security, Inc. | Client/server security by an intermediary rendering modified in-memory objects |
CN105187234A (en) * | 2015-08-10 | 2015-12-23 | 北京思特奇信息技术股份有限公司 | Network topology uniform management method and system |
WO2018104834A1 (en) * | 2016-12-07 | 2018-06-14 | Yogesh Chunilal Rathod | Real-time, ephemeral, single mode, group & auto taking visual media, stories, auto status, following feed types, mass actions, suggested activities, ar media & platform |
CN108427639A (en) * | 2018-01-24 | 2018-08-21 | 深圳壹账通智能科技有限公司 | Automated testing method, application server and computer readable storage medium |
CN109802842A (en) * | 2017-11-16 | 2019-05-24 | 华为软件技术有限公司 | The generation method and relevant device of applied topology |
CN110321276A (en) * | 2018-03-29 | 2019-10-11 | 广州阿里巴巴文学信息技术有限公司 | The generation method and device of test case |
CN110855493A (en) * | 2019-11-18 | 2020-02-28 | 上海新炬网络信息技术股份有限公司 | Application topological graph drawing device for mixed environment |
CN112882938A (en) * | 2021-02-25 | 2021-06-01 | 重庆紫光华山智安科技有限公司 | Scene data testing method, system, electronic device and medium |
-
2021
- 2021-06-11 CN CN202110658964.5A patent/CN113312266B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020158897A1 (en) * | 2001-04-30 | 2002-10-31 | Besaw Lawrence M. | System for displaying topology map information through the web |
CN101102259A (en) * | 2006-07-05 | 2008-01-09 | 鸿富锦精密工业(深圳)有限公司 | Network access control system and its method |
CN102446191A (en) * | 2010-10-13 | 2012-05-09 | 北京创新方舟科技有限公司 | Method for generating webpage content abstracts and equipment and system adopting same |
US20120185669A1 (en) * | 2011-01-17 | 2012-07-19 | Fujitsu Limited | Program inspection method and non-transitory, computer readable storage medium storing inspection program |
CN102768641A (en) * | 2012-06-15 | 2012-11-07 | 深圳中兴网信科技有限公司 | Webpage testing factor selecting device and webpage testing factor selecting method |
US20140189435A1 (en) * | 2012-12-31 | 2014-07-03 | Johnson Manuel-Devadoss | System and method to extend the capabilities of a web browser of a web application issue root cause determination techniques |
US8892687B1 (en) * | 2013-12-06 | 2014-11-18 | Shape Security, Inc. | Client/server security by an intermediary rendering modified in-memory objects |
CN105187234A (en) * | 2015-08-10 | 2015-12-23 | 北京思特奇信息技术股份有限公司 | Network topology uniform management method and system |
WO2018104834A1 (en) * | 2016-12-07 | 2018-06-14 | Yogesh Chunilal Rathod | Real-time, ephemeral, single mode, group & auto taking visual media, stories, auto status, following feed types, mass actions, suggested activities, ar media & platform |
CN109802842A (en) * | 2017-11-16 | 2019-05-24 | 华为软件技术有限公司 | The generation method and relevant device of applied topology |
CN108427639A (en) * | 2018-01-24 | 2018-08-21 | 深圳壹账通智能科技有限公司 | Automated testing method, application server and computer readable storage medium |
CN110321276A (en) * | 2018-03-29 | 2019-10-11 | 广州阿里巴巴文学信息技术有限公司 | The generation method and device of test case |
CN110855493A (en) * | 2019-11-18 | 2020-02-28 | 上海新炬网络信息技术股份有限公司 | Application topological graph drawing device for mixed environment |
CN112882938A (en) * | 2021-02-25 | 2021-06-01 | 重庆紫光华山智安科技有限公司 | Scene data testing method, system, electronic device and medium |
Non-Patent Citations (3)
Title |
---|
HTTPS://JINGYAN.BAIDU.COM/ARTICLE/AB69B2709C3B092CA7189FAD.HTML: "网络结构图怎么拓扑绘制", pages 1 - 4 * |
SOMELOU: "PageRank算法实现好友推荐(算法原理)", pages 1 - 9 * |
ZHIYU ZHANG: "Identification of Critical Nodes in Power System Based on Graph Theory and PageRank Algorithm", pages 213 - 217 * |
Also Published As
Publication number | Publication date |
---|---|
CN113312266B (en) | 2023-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106484611B (en) | Fuzzy test method and device based on automatic protocol adaptation | |
CN111026645B (en) | User interface automatic test method and device, storage medium and electronic equipment | |
CN107133161B (en) | Method and device for generating client performance test script | |
CN105024872A (en) | Network performance test method and device | |
US20230239375A1 (en) | Deriving proxy stability without network inspection | |
CN104573520A (en) | Method and device for detecting permanent type cross site scripting vulnerability | |
CN105635064A (en) | CSRF attack detection method and device | |
CN104468265A (en) | Method and device for detecting online states of local area network terminals | |
CN112231209A (en) | Parameter acquisition method and device, computer equipment and storage medium | |
CN106972983B (en) | Automatic testing device and method for network interface | |
CN105068926A (en) | Program test method and device thereof | |
CN111767229A (en) | Performance test method, device and equipment | |
CN107888451B (en) | Method and device for testing Web server | |
CN112671574B (en) | Front-end and back-end joint debugging method and device, proxy equipment and storage medium | |
KR101472012B1 (en) | Network simulator based on software | |
CN113535586A (en) | Test environment switching method, device, equipment and readable storage medium | |
CN113312266A (en) | System and method for rapidly generating test topology structure diagram based on automatic test | |
CN113626321B (en) | Bridging test method, device, system and storage medium | |
CN111737629B (en) | Data detection method and device | |
CN110737549A (en) | Application testing method, device, server and system | |
CN112346991B (en) | Interface test script generation method and device | |
CN115174245A (en) | Test method and system based on DoIP protocol detection | |
CN113641575A (en) | Test method, device, equipment and storage medium | |
CN115391770A (en) | Program monitoring method, device, electronic equipment and computer readable storage medium | |
CN113032255A (en) | Response noise recognition method, model, electronic device, and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |