CN107995059B - iOS network test strategy - Google Patents
iOS network test strategy Download PDFInfo
- Publication number
- CN107995059B CN107995059B CN201711207954.XA CN201711207954A CN107995059B CN 107995059 B CN107995059 B CN 107995059B CN 201711207954 A CN201711207954 A CN 201711207954A CN 107995059 B CN107995059 B CN 107995059B
- Authority
- CN
- China
- Prior art keywords
- test
- server
- app
- domain name
- request
- 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
Images
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/50—Testing arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The invention relates to an iOS network test strategy, which comprises the following steps: step 1, setting whether the current operation environment is an online environment or not; if the environment is the online environment, allowing the APP to be connected with the server, and if the environment is not the online environment, forbidding the APP to be connected with the server; step 2, setting whether to start a test mode; if the test mode is the test mode, only allowing the test server to be connected, and if the test mode is not the test mode, only allowing the formal server to be connected; step 3, when the connection of the test server is allowed, requesting to test a domain name resolution table; when the request is successful, the obtained test domain name resolution table is resolved, and when the request is failed, error information is returned; and 4, after the resolution is finished, generating and outputting the local test domain mapping. The invention avoids that the situation of the server can be automatically and correspondingly dealt with after the APP is formally released and is not switched to the formal server in time, thereby avoiding the influence on normal business as much as possible, facilitating the development and the test of the APP and reducing the test risk.
Description
Technical Field
The invention relates to the technical field of iOS development and test, in particular to an iOS network test strategy.
Background
After the APP is developed and before the APP is released formally, the test process is needed, the purpose of the test is to check whether the function is normal, namely, whether the APP has problems and needs to be corrected is determined, and whether the APP can be released finally (released formally) as a stable version.
In the test of the APP, several test servers need to be used and switched in order to check the operation condition of each function.
The test server used in the test generally cannot be put on line formally, otherwise, the operation of normal service is influenced, because the test server cannot stably support the daily use requirements of a large number of users. After the APP is formally released, the test server needs to be switched to a formal server, if the switching work of the server address is omitted, serious influence can be brought, the APP or the server is crashed lightly, and user data loss or damage can be caused seriously or seriously.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide an iOS network test strategy, which avoids that the situation of the server can be automatically and correspondingly dealt with by failing to switch to a formal server in time after the APP is formally released, avoids the influence on normal business as much as possible, is convenient for developing and testing the APP, and reduces the test risk.
In order to achieve the above purposes, the technical scheme adopted by the invention is as follows:
an iOS network test strategy, comprising the steps of:
step 1, setting whether the current running environment is an online environment or not according to the operation of a tester;
if the environment is an online environment, the APP is allowed to be connected with the server,
if the environment is not the online environment, the APP is forbidden to be connected with the server;
the server comprises a test server and a formal server;
step 2, setting whether to start a test mode according to the operation of a tester;
if the test mode is adopted, only the test server is allowed to be connected,
when the test mode is not the test mode, only allowing to connect the formal server;
step 3, when the connection of the test server is allowed, requesting to test a domain name resolution table;
when the request is successful, the obtained test domain name resolution table is resolved,
when the request fails, returning error information;
and 4, after the resolution is finished, generating and outputting the local test domain mapping.
On the basis of the technical scheme, when the environment is not on line or the test mode is not in, the server generates a local empty test domain mapping for the APP to connect with the virtual server.
On the basis of the technical scheme, when the request for testing the domain name resolution table fails, the server generates a local empty test domain name mapping for the APP to connect with the virtual server.
On the basis of the technical scheme, in the local NULL test domain mapping, an IP address or a MAC address or a URL address of a virtual server is provided, a success or failure message is returned to the APP only, and when data needs to be returned, NULL data or preset character string data is returned.
An iOS network test strategy is characterized in that when an APP initiates a request, the request refers to a server connection request, and the method comprises the following steps:
step 1, judging whether the current operation environment is an online environment;
if the domain name is in the online environment, the original domain name is maintained,
if not, initiating a test domain name query;
step 2, after initiating a test domain name query, firstly searching a local test domain name mapping;
when the search is successful, a test domain name is generated,
when the search fails, the original domain name is maintained unchanged;
and 3, returning the generated test domain name or the maintained original domain name to the APP as a query result.
On the basis of the technical scheme, the domain name of the formal server corresponding to the online environment is set in the APP by default.
On the basis of the technical scheme, the APP request server returns the type of the APP request server, judges whether the APP request server is a test server, a formal server or a virtual server,
the APP judges whether the current operation mode is matched with the type of the server side, and if not, the current operation mode is switched to a preset matched domain name.
On the basis of the technical scheme, if the APP receives the local empty test domain mapping, the APP analyzes the local empty test domain mapping, and the data obtained through analysis is subjected to subsequent processing.
The iOS network test strategy provided by the invention can avoid that the situation of the server can be automatically and correspondingly dealt with by failing to switch to the formal server in time after the APP is formally released, thereby avoiding the influence on the normal service as much as possible, facilitating the development and test of the APP and reducing the test risk.
Drawings
The invention has the following drawings:
FIG. 1 is a flow chart of a server of the present invention.
FIG. 2 is a flowchart of the APP side of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, in the iOS network test policy of the present invention, the server includes the following steps:
step 1, setting whether the current running environment is an online environment or not according to the operation of a tester;
if the environment is an online environment, the APP is allowed to be connected with the server,
if the environment is not the online environment, the APP is forbidden to be connected with the server;
the server comprises a test server and a formal server;
step 2, setting whether to start a test mode according to the operation of a tester;
if the test mode is adopted, only the test server is allowed to be connected,
when the test mode is not the test mode, only allowing to connect the formal server;
step 3, when the connection of the test server is allowed, requesting to test a domain name resolution table;
when the request is successful, the obtained test domain name resolution table is resolved,
when the request fails, returning error information;
and 4, after the resolution is finished, generating and outputting the local test domain mapping. This output is returned to the APP that initiated the server connection request.
On the basis of the technical scheme, when the environment is not on line or the test mode is not in, the server generates a local empty test domain mapping for the APP to connect with the virtual server.
On the basis of the technical scheme, when the request for testing the domain name resolution table fails, the server generates a local empty test domain name mapping for the APP to connect with the virtual server.
On the basis of the technical scheme, in the local NULL test domain mapping, an IP address or a MAC address or a URL address of a virtual server is provided, a success or failure message is returned to the APP only, and when data needs to be returned, NULL data or preset character string data is returned.
On the basis of the above technical solution, as shown in fig. 2, when an APP initiates a request, the request refers to a server connection request, and includes the following steps:
step 1, judging whether the current operation environment is an online environment;
if the domain name is in the online environment, the original domain name is maintained,
if not, initiating a test domain name query;
step 2, after initiating a test domain name query, firstly searching a local test domain name mapping;
when the search is successful, a test domain name is generated,
when the search fails, the original domain name is maintained unchanged;
and 3, returning the generated test domain name or the maintained original domain name to the APP as a query result.
On the basis of the technical scheme, the domain name of the formal server corresponding to the online environment is set in the APP by default.
On the basis of the technical scheme, the APP request server returns the type of the APP request server, judges whether the APP request server is a test server, a formal server or a virtual server,
the APP judges whether the current operation mode is matched with the type of the server side, and if not, the current operation mode is switched to a preset matched domain name.
On the basis of the technical scheme, if the APP receives the local empty test domain mapping, the APP analyzes the local empty test domain mapping, and the data obtained through analysis is subjected to subsequent processing.
Those not described in detail in this specification are within the skill of the art.
Claims (6)
1. An iOS network test strategy, comprising the steps of:
step 1, setting whether the current running environment is an online environment or not according to the operation of a tester;
if the environment is an online environment, the APP is allowed to be connected with the server,
if the environment is not the online environment, the APP is forbidden to be connected with the server;
the server comprises a test server and a formal server;
step 2, setting whether to start a test mode according to the operation of a tester;
if the test mode is adopted, only the test server is allowed to be connected,
when the test mode is not the test mode, only allowing to connect the formal server;
step 3, when the connection of the test server is allowed, requesting to test a domain name resolution table;
when the request is successful, the obtained test domain name resolution table is resolved,
when the request fails, returning error information;
step 4, after the resolution is finished, generating and outputting a local test domain mapping;
when the virtual server is not in an online environment or in a test mode, the server generates a local empty test domain mapping for the APP to connect with the virtual server.
2. The iOS network test policy of claim 1, wherein: when the request for testing the domain name resolution table fails, the server generates a local empty test domain name mapping for the APP to connect with the virtual server.
3. The iOS network test strategy of claim 1 or 2, wherein: in the local NULL test domain mapping, the IP address or the MAC address or the URL address of the virtual server is provided, only a success or failure message is returned to the APP, and when data needs to be returned, NULL data or preset character string data is returned.
4. An iOS network test strategy is characterized in that when an APP initiates a request, the request refers to a server connection request, and the method comprises the following steps:
step 1, judging whether the current operation environment is an online environment;
if the domain name is in the online environment, the original domain name is maintained,
if not, initiating a test domain name query;
step 2, after initiating a test domain name query, firstly searching a local test domain name mapping;
when the search is successful, a test domain name is generated,
when the search fails, the original domain name is maintained unchanged;
step 3, the generated test domain name or the maintained original domain name is used as a query result and returned to the APP;
and if the APP receives the local empty test domain mapping, analyzing the local empty test domain mapping, and transferring the data obtained by analysis to subsequent processing.
5. The iOS network test policy of claim 4, wherein: and the domain name of the corresponding formal server is set in the APP by default when the online environment is in use.
6. The iOS network test policy of claim 4, wherein: the APP request server returns the type of the APP request server, judges whether the APP request server is a test server, a formal server or a virtual server,
the APP judges whether the current operation mode is matched with the type of the server side, and if not, the current operation mode is switched to a preset matched domain name.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711207954.XA CN107995059B (en) | 2017-11-27 | 2017-11-27 | iOS network test strategy |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711207954.XA CN107995059B (en) | 2017-11-27 | 2017-11-27 | iOS network test strategy |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107995059A CN107995059A (en) | 2018-05-04 |
CN107995059B true CN107995059B (en) | 2020-11-03 |
Family
ID=62032299
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711207954.XA Active CN107995059B (en) | 2017-11-27 | 2017-11-27 | iOS network test strategy |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107995059B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110351134A (en) * | 2019-06-28 | 2019-10-18 | 北京你财富计算机科技有限公司 | A kind of server environment switching method, device and electronic equipment |
CN113472607B (en) * | 2021-06-29 | 2023-05-02 | 未鲲(上海)科技服务有限公司 | Application program network environment detection method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB0509409D0 (en) * | 2005-05-09 | 2005-06-15 | 3Com Corp | Testing applications or devices in large networks |
CN104580540A (en) * | 2013-10-09 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Method and device for achieving website access |
CN105391811A (en) * | 2014-08-29 | 2016-03-09 | 腾讯科技(深圳)有限公司 | DNS (domain name resolution) method, access method for application server, and terminal |
CN105743725A (en) * | 2014-12-10 | 2016-07-06 | 无锡买卖宝信息技术有限公司 | Method and device for testing application programs |
CN106330560A (en) * | 2016-08-31 | 2017-01-11 | 武汉斗鱼网络科技有限公司 | Method and apparatus for switching server in system setting during IOS system test |
CN106681714A (en) * | 2016-12-07 | 2017-05-17 | 乐视控股(北京)有限公司 | Method and device for setting program environments and electronic equipment |
CN107071065A (en) * | 2017-06-07 | 2017-08-18 | 北京酷我科技有限公司 | A kind of dynamic modification App host method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103905258B (en) * | 2012-12-24 | 2018-03-06 | 百度国际科技(深圳)有限公司 | A kind of method of testing and device of client data upload function |
-
2017
- 2017-11-27 CN CN201711207954.XA patent/CN107995059B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB0509409D0 (en) * | 2005-05-09 | 2005-06-15 | 3Com Corp | Testing applications or devices in large networks |
CN104580540A (en) * | 2013-10-09 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Method and device for achieving website access |
CN105391811A (en) * | 2014-08-29 | 2016-03-09 | 腾讯科技(深圳)有限公司 | DNS (domain name resolution) method, access method for application server, and terminal |
CN105743725A (en) * | 2014-12-10 | 2016-07-06 | 无锡买卖宝信息技术有限公司 | Method and device for testing application programs |
CN106330560A (en) * | 2016-08-31 | 2017-01-11 | 武汉斗鱼网络科技有限公司 | Method and apparatus for switching server in system setting during IOS system test |
CN106681714A (en) * | 2016-12-07 | 2017-05-17 | 乐视控股(北京)有限公司 | Method and device for setting program environments and electronic equipment |
CN107071065A (en) * | 2017-06-07 | 2017-08-18 | 北京酷我科技有限公司 | A kind of dynamic modification App host method |
Non-Patent Citations (1)
Title |
---|
模拟服务器返回数据;c10wtiybq1ye3;《CSDN博客https://blog.csdn.net/c10WTiybQ1Ye3/article/details/78098632》;20170207;1-4 * |
Also Published As
Publication number | Publication date |
---|---|
CN107995059A (en) | 2018-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017097123A1 (en) | Access request conversion method and device | |
CN105808399B (en) | Remote debugging method and device | |
CN103841111A (en) | Method for preventing data from being submitted repeatedly and server | |
CN110781083A (en) | H5 client code setting multi-environment testing method and system | |
CN107995059B (en) | iOS network test strategy | |
CN109245953B (en) | Network configuration method and device | |
US10148764B2 (en) | Backup wide area network connection for access points and routers | |
CN105743707A (en) | Method for testing BMC log analysis function based on Redhat system | |
EP1895718A1 (en) | Method and apparatus for checking maintenance association integrity and method and apparatus for adding maintenance end point. | |
WO2020088170A1 (en) | Domain name system configuration method and related apparatus | |
CN107995321A (en) | A kind of VPN client acts on behalf of the method and device of DNS | |
CN111352995A (en) | Server service method, system, device and storage medium based on database Neo4j | |
CN104539462B (en) | It is a kind of to switch to method and device of the calamity for application example | |
CN107911496A (en) | A kind of VPN service terminal acts on behalf of the method and device of DNS | |
CN105743725A (en) | Method and device for testing application programs | |
CN110198222B (en) | Plug-and-play test method and test master station for power distribution automation terminal | |
CN114265760A (en) | Micro-service request fault injection method and device based on eBPF | |
CN107517248B (en) | Network connection method and device based on SDK | |
WO2017084587A1 (en) | Interactive method and apparatus based on network file system | |
CN117118814A (en) | Cloud resource switching method, device, equipment and medium based on multi-cloud management platform | |
CN107172228A (en) | Change the method and apparatus and computer-readable recording medium of virtual machine IP address | |
US20180124012A1 (en) | Domain name system (dns) resolution processing method and device | |
CN111200512B (en) | Network connection disaster recovery method, terminal equipment, storage medium and electronic equipment | |
CN114915545B (en) | Application scheduling deployment management method based on DHCP network cluster | |
CN108153543B (en) | Server address switching method |
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 |