CN105071981B - The method and system of the webapi interface of automatic test same domain name - Google Patents
The method and system of the webapi interface of automatic test same domain name Download PDFInfo
- Publication number
- CN105071981B CN105071981B CN201510417328.8A CN201510417328A CN105071981B CN 105071981 B CN105071981 B CN 105071981B CN 201510417328 A CN201510417328 A CN 201510417328A CN 105071981 B CN105071981 B CN 105071981B
- Authority
- CN
- China
- Prior art keywords
- domain name
- webapi
- server
- test
- numbered
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 98
- 238000000034 method Methods 0.000 title claims abstract description 17
- 230000002159 abnormal effect Effects 0.000 description 10
- 230000009286 beneficial effect Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/30—Managing network names, e.g. use of aliases or nicknames
- H04L61/3015—Name registration, generation or assignment
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Debugging And Monitoring (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention provides a kind of methods of the webapi interface of automatic test same domain name, comprising: the server ip of all same domain names is numbered;Domain name is configured into the configuration file of Reverse Proxy, domain name is numbered;The server ip after numbering and domain name are parsed to test client;Test the corresponding webapi interface of domain name of all different numbers;Continue to test all different corresponding webapi interfaces of domain name numbered after preset time period;The present invention also provides a kind of automatic system of the webapi interface of test same domain name, can the webapi interface to same domain name tested automatically.
Description
Technical field
The present invention relates to computer network fields, more particularly to a kind of side of the webapi interface of automatic test same domain name
Method and system.
Background technique
The previous website of mesh often disposes multiple servers, by load balancing or DNS intelligently parsing, different
Service is resolved to different servers by the different region of route, however works as server parsing when something goes wrong, is needed to every
One server is individually tested, and this results in tests to become difficult, and is frequently necessary to match for each server
It sets individual domain name just and can be carried out automatic test, increase resource cost.
Summary of the invention
The technical problems to be solved by the present invention are: how tested automatically the webapi interface of same domain name.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention are as follows:
A kind of method of the webapi interface of automatic test same domain name, comprising:
The server ip of all same domain names is numbered;
Domain name is configured into the configuration file of Reverse Proxy, domain name is numbered;
The server ip after numbering and domain name are parsed to test client;
Test the corresponding webapi interface of domain name of all different numbers;
Continue to test all different corresponding webapi interfaces of domain name numbered after preset time period.
The beneficial effect of the method for the webapi interface of above-mentioned automatic test same domain name is: by server ip into
Row number configures domain name into Reverse Proxy, compiles to domain name to distinguish the different server of same domain name
Number, so that different webapi interfaces is differentiated according to domain name, the domain name and server ip after parsing number to test client, because
This is tested the abnormal feelings that may know that different webapi interfaces by the corresponding webapi interface of domain name to different numbers
Condition continues to test the corresponding webapi interface of domain name of different numbers after preset time period, so that every preset time period carries out
Test realizes test automation, improves the availability of system, reduce since some webapi interface of different server goes out
Existing failure is difficult to judge the case where which platform server goes wrong, and improves the efficiency of processing problem.
A kind of system of the webapi interface of automatic test same domain name, comprising:
Ip number module is numbered for the server ip to all same domain names;
Domain name number module is numbered domain name for configuring domain name into the configuration file of Reverse Proxy;
Parsing module, for parsing the server ip after numbering and domain name to test client;
Test module, for testing the corresponding webapi interface of domain name of all different numbers;
Loop module tests all different corresponding webapi interfaces of domain name numbered for continuing after preset time period.
The beneficial effect of the system of the webapi interface of above-mentioned automatic test same domain name is: ip number module is to service
Device ip is numbered, so that the different server for same domain name determines a unique identity, and passes through domain name number module
Domain name is numbered, the domain name so as to distinguish different webapi interfaces according to domain name, after parsing module parsing number
With server ip to test client, therefore test module is surveyed by the corresponding webapi interface of domain name to different numbers
Examination may know that the abnormal conditions of different webapi interfaces, loop module every preset time period are corresponding to the domain name of different numbers
Webapi interface tested, to realize test automation.
Detailed description of the invention
Fig. 1 is the method flow diagram for the webapi interface that the embodiment of the present invention one tests same domain name automatically;
Fig. 2 is the method flow diagram for the webapi interface that the embodiment of the present invention one tests same domain name automatically;
Fig. 3 is the system construction drawing for the webapi interface that the embodiment of the present invention two tests same domain name automatically.
Label declaration:
1, ip number module;2, domain name number module;3, parsing module;4, test module;5, loop module;6, mould is recorded
Block;7, rewriting module.
Specific embodiment
To explain the technical content, the achieved purpose and the effect of the present invention in detail, below in conjunction with embodiment and cooperate attached
Figure is explained.
The most critical design of the present invention is: server ip is numbered, and domain name is configured to Reverse Proxy
Configuration file in, domain name is numbered, so that different webapi interfaces can be distinguished by the domain names of different numbers.
Explanation of technical terms of the present invention:
Fig. 1 and Fig. 2 is please referred to,
A kind of method of the webapi interface of automatic test same domain name, comprising:
S1, the server ip of all same domain names is numbered;
S2, configuration domain name are numbered domain name into the configuration file of Reverse Proxy;
S3, the server ip after numbering and domain name are parsed to test client;
The corresponding webapi interface of domain name of S4, all different numbers of test;
Continue to test all different corresponding webapi interfaces of domain name numbered after S5, preset time period.
The beneficial effect of the method for the webapi interface of above-mentioned automatic test same domain name is: by server ip into
Row number configures domain name into Reverse Proxy, compiles to domain name to distinguish the different server of same domain name
Number, so that different webapi interfaces is differentiated according to domain name, the domain name and server ip after parsing number to test client, because
This is tested the abnormal feelings that may know that different webapi interfaces by the corresponding webapi interface of domain name to different numbers
Condition continues to test the corresponding webapi interface of domain name of different numbers after preset time period, so that every preset time period carries out
Test realizes test automation, improves the availability of system, reduce since some webapi interface of different server goes out
Existing failure is difficult to judge the case where which platform server goes wrong, and improves the efficiency of processing problem.
Further, the method for the webapi interface of the automatic test same domain name further include: S6, when testing out
When webapi interface exception, recording exceptional to log.
As can be seen from the above description, can analyze the abnormal conditions of webapi interface by log, worked normally convenient for it
Maintenance.
Further, described " parsing the server ip after numbering and domain name to test client " specifically: after number
Server ip and domain name be directed into the hosts file of test client operating system.
Further, described " configuration domain name into the configuration file of Reverse Proxy, domain name is numbered " it
Afterwards further include: the domain name after S21, modification and renumbering is unnumbered domain name.
As can be seen from the above description, the domain name after renumbering is unnumbered domain name, for other servers
Domain name simultaneously has not been changed, and does not influence its normal work.
Referring to figure 3.,
A kind of system of the webapi interface of automatic test same domain name, comprising:
Ip number module 1 is numbered for the server ip to all same domain names;
Domain name number module 2 compiles domain name for configuring domain name into the configuration file of Reverse Proxy
Number;
Parsing module 3, for parsing the server ip after numbering and domain name to test client;
Test module 4, for testing the corresponding webapi interface of domain name of all different numbers;
Loop module 5 tests all different corresponding webapi interfaces of domain name numbered for continuing after preset time period.
The beneficial effect of the system of the webapi interface of above-mentioned automatic test same domain name is: 1 pair of ip number module clothes
Business device ip is numbered, so that the different server for same domain name determines a unique identity, and passes through domain name number mould
Domain name is numbered in block 2, so as to distinguish different webapi interfaces according to domain name, after the parsing of parsing module 3 is numbered
Domain name and server ip are to test client, therefore test module 4 passes through the corresponding webapi interface of domain name to different numbers
The abnormal conditions that may know that different webapi interfaces are tested, 5 every preset time period of loop module is to different numbers
The corresponding webapi interface of domain name is tested, to realize test automation.
Further, the system of the webapi interface of the automatic test same domain name further include: logging modle 6 is used for
When testing out webapi interface exception, recording exceptional to log.
As can be seen from the above description, the abnormal conditions of webapi interface can be analyzed by the log of logging modle 6, it is convenient for it
The maintenance of normal work.
Further, the system of the webapi interface of the automatic test same domain name further include: rewriting module 7 is used
Domain name after modification and renumbering is unnumbered domain name.
As can be seen from the above description, the domain name after renumbering is unnumbered domain name, for other servers
Domain name simultaneously has not been changed, and does not influence its normal work.
Further, the Reverse Proxy is ngnix server.
Please refer to Fig. 1 and Fig. 2, the embodiment of the present invention one are as follows:
A kind of method of the webapi interface of automatic test same domain name, comprising:
S1, the server ip of all same domain names is numbered;
S2, configuration domain name are numbered domain name into the configuration file of Reverse Proxy;S21, modification are simultaneously rewritten
Domain name after number is unnumbered domain name;Preferably, the Reverse Proxy is ngnix server;
S3, the server ip after numbering and domain name are parsed to test client;Specifically: by after number server ip and
Domain name is directed into the hosts file of test client operating system;
The corresponding webapi interface of domain name of S4, all different numbers of test;
Continue to test all different corresponding webapi interfaces of domain name numbered after S5, preset time period;Preferably, described
Preset time period is 1 hour;
S6, when testing out webapi interface exception, recording exceptional to log.
For example, testing the server that four domain names are server1.com, serviced since server domain name is identical
Device ip is different, and server ip is numbered first;Four server ip and domain name are configured to ngnix reverse proxy configuration text
In part, so that domain name is numbered, such as: " 1.server1.com ", " 2.server1.com ", " 3.server1.com "
And " 4.server1.com ";Different server and corresponding webapi can be then distinguished from the domain name after number, will be compiled
Server ip and domain name after number are directed into the hosts file of test client operating system, call test program to number
The corresponding webapi of domain name afterwards is tested, since domain name is numbered, so each webapi is also corresponding to be had uniquely
Identity can be specifically the corresponding webapi of which platform server abnormal by test judgement;Loop test all webapi, 1
Continue all webapi of loop test after hour;Realize automatic test;If there is abnormal then record log;Domain name is numbered
Afterwards, modifying the domain name after numbering in overwrite request is the domain name for being originally number, simultaneously hence for domain name for other servers
It has not been changed, does not influence its normal work.
Referring to figure 3., the embodiment of the present invention two are as follows:
A kind of system of the webapi interface of automatic test same domain name, comprising:
Ip number module 1 is numbered for the server ip to all same domain names;
Domain name number module 2 compiles domain name for configuring domain name into the configuration file of Reverse Proxy
Number;Rewriting module 7, the domain name for modifying and after renumbering are unnumbered domain name;Preferably, the reverse proxy service
Device is ngnix server;
Parsing module 3, for parsing the server ip after numbering and domain name to test client;
Test module 4, for testing the corresponding webapi interface of domain name of all different numbers;
Loop module 5 tests all different corresponding webapi interfaces of domain name numbered for continuing after preset time period;
Logging modle 6, for when testing out webapi interface exception, recording exceptional to log.
In conclusion the method and system of the webapi interface of automatic test same domain name provided by the invention, ip number
Server ip is numbered in module, and will configure domain name into Reverse Proxy, by domain name number module to domain name
It is numbered, to distinguish different webapi interfaces according to the domain name of different numbers;After domain name number, rewriting module modification
Domain name after numbering in overwrite request is the domain name for being originally number, hence for domain name for other servers and is had not been changed,
Its normal work is not influenced;After domain name and server ip to test client after parsing module parsing number, test module pair
The corresponding webapi interface of domain name of difference number is tested, to measure the abnormal conditions of different webapi, and when survey
Logging modle is by exception record log when abnormal webapi interface out, the maintenance worked normally convenient for server;Loop module
Every preset time period webapi interface corresponding to the domain name of different numbers is tested, and is realized test automation, is improved
The availability of system reduces since some webapi interface failure of different server is difficult to judge be which platform server
The case where going wrong improves the efficiency of processing problem.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalents made by bright specification and accompanying drawing content are applied directly or indirectly in relevant technical field, similarly include
In scope of patent protection of the invention.
Claims (7)
1. a kind of method of the webapi interface of automatic test same domain name characterized by comprising
The server ip of all same domain names is numbered;
Domain name is configured into the configuration file of Reverse Proxy, domain name is numbered;
The server ip after numbering and domain name are parsed to test client;
Test the corresponding webapi interface of domain name of all different numbers;
Continue to test all different corresponding webapi interfaces of domain name numbered after preset time period;
Wherein, described " parsing the server ip after numbering and domain name to test client " specifically: by the server after number
Ip and domain name are directed into the hosts file of test client operating system.
2. the method for the webapi interface of automatic test same domain name according to claim 1, which is characterized in that also wrap
It includes: when testing out webapi interface exception, recording exceptional to log.
3. the method for the webapi interface of automatic test same domain name according to claim 1, which is characterized in that described
After " configuration domain name is numbered domain name into the configuration file of Reverse Proxy " further include: modify and rewrite volume
Domain name after number is unnumbered domain name.
4. a kind of system of the webapi interface of automatic test same domain name characterized by comprising
Ip number module is numbered for the server ip to all same domain names;
Domain name number module is numbered domain name for configuring domain name into the configuration file of Reverse Proxy;
Parsing module, for parsing the server ip after numbering and domain name to test client, the parsing module is specifically used for
By after number server ip and domain name be directed into the hosts file of test client operating system;
Test module, for testing the corresponding webapi interface of domain name of all different numbers;
Loop module tests all different corresponding webapi interfaces of domain name numbered for continuing after preset time period.
5. the system of the webapi interface of automatic test same domain name according to claim 4, which is characterized in that also wrap
It includes: logging modle, for when testing out webapi interface exception, recording exceptional to log.
6. the system of the webapi interface of automatic test same domain name according to claim 4, which is characterized in that also wrap
Include: rewriting module, the domain name for modifying and after renumbering are unnumbered domain name.
7. the system of the webapi interface of automatic test same domain name according to claim 4, which is characterized in that described anti-
It is ngnix server to proxy server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510417328.8A CN105071981B (en) | 2015-07-16 | 2015-07-16 | The method and system of the webapi interface of automatic test same domain name |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510417328.8A CN105071981B (en) | 2015-07-16 | 2015-07-16 | The method and system of the webapi interface of automatic test same domain name |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105071981A CN105071981A (en) | 2015-11-18 |
CN105071981B true CN105071981B (en) | 2019-01-22 |
Family
ID=54501268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510417328.8A Active CN105071981B (en) | 2015-07-16 | 2015-07-16 | The method and system of the webapi interface of automatic test same domain name |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105071981B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106453296A (en) * | 2016-09-30 | 2017-02-22 | 乐视控股(北京)有限公司 | Request service isolating method and system |
CN112367344A (en) * | 2020-09-11 | 2021-02-12 | 浙江大学 | Construction method of endogenous security load balancing server |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1642099A (en) * | 2004-01-15 | 2005-07-20 | 英业达股份有限公司 | Computer network domain name system configuration method and platform |
CN104009880A (en) * | 2013-02-27 | 2014-08-27 | 阿里巴巴集团控股有限公司 | Web testing method, proxy server and Web testing device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102177685B (en) * | 2008-07-31 | 2015-03-25 | 泰克莱克股份有限公司 | Methods, systems, and computer readable media for throttling traffic to an internet protocol (IP) network server using alias hostname identifiers assigned to the IP network server with a domain name system (DNS) |
US9197706B2 (en) * | 2008-12-16 | 2015-11-24 | Qualcomm Incorporated | Apparatus and method for bundling application services with inbuilt connectivity management |
CN101699825B (en) * | 2009-10-28 | 2013-01-02 | 成都市华为赛门铁克科技有限公司 | Network file system access method, device and system |
-
2015
- 2015-07-16 CN CN201510417328.8A patent/CN105071981B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1642099A (en) * | 2004-01-15 | 2005-07-20 | 英业达股份有限公司 | Computer network domain name system configuration method and platform |
CN104009880A (en) * | 2013-02-27 | 2014-08-27 | 阿里巴巴集团控股有限公司 | Web testing method, proxy server and Web testing device |
Also Published As
Publication number | Publication date |
---|---|
CN105071981A (en) | 2015-11-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107710683B (en) | Elastic as a service | |
US10965580B2 (en) | Systems and methods for automated determination of network device transiting data attributes | |
Jayathilaka et al. | Performance monitoring and root cause analysis for cloud-hosted web applications | |
US10091169B2 (en) | Method and system for protecting cloud-based applications executed in a cloud computing platform | |
US10474519B2 (en) | Server fault analysis system using event logs | |
US9183123B2 (en) | Performance tests in a continuous deployment pipeline | |
US10025678B2 (en) | Method and system for automatically detecting and resolving infrastructure faults in cloud infrastructure | |
US8528093B1 (en) | Apparatus and method for performing dynamic security testing using static analysis data | |
CN105162646B (en) | A kind of multi-protocol interface test system and method | |
CN106708700B (en) | A kind of O&M monitoring method and device applied to server-side | |
CN105577799B (en) | A kind of fault detection method and device of data-base cluster | |
US20200117587A1 (en) | Log File Analysis | |
CN109768896B (en) | Method and device for monitoring server environment state and computer equipment | |
US9558105B2 (en) | Transactional boundaries for virtual model generation | |
GB2522301A (en) | Obtaining a configuration of a network | |
CN105071981B (en) | The method and system of the webapi interface of automatic test same domain name | |
US20120072556A1 (en) | Method and System for Detecting Network Upgrades | |
US20200210310A1 (en) | Analytics-based architecture compliance testing for distributed web applications | |
US10411988B1 (en) | Data injection testing | |
CN111597101A (en) | SDK access state detection method, computer device and computer readable storage medium | |
US20140215269A1 (en) | Test infrastructure simulation | |
US11360785B2 (en) | Execution path determination in a distributed environment | |
CN114238140A (en) | Access test method and device | |
EP1615130B1 (en) | Dynamic Log for a computer system consisting of servers providing services | |
CN109698764A (en) | A kind of domain name analysis system configuration update method and device |
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 |