CN105138460A - Software testing method and system - Google Patents

Software testing method and system Download PDF

Info

Publication number
CN105138460A
CN105138460A CN201510599520.3A CN201510599520A CN105138460A CN 105138460 A CN105138460 A CN 105138460A CN 201510599520 A CN201510599520 A CN 201510599520A CN 105138460 A CN105138460 A CN 105138460A
Authority
CN
China
Prior art keywords
time
time point
application server
network node
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.)
Granted
Application number
CN201510599520.3A
Other languages
Chinese (zh)
Other versions
CN105138460B (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.)
Beijing Forever Technology Co Ltd
Original Assignee
Beijing Forever 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 Beijing Forever Technology Co Ltd filed Critical Beijing Forever Technology Co Ltd
Priority to CN201510599520.3A priority Critical patent/CN105138460B/en
Publication of CN105138460A publication Critical patent/CN105138460A/en
Application granted granted Critical
Publication of CN105138460B publication Critical patent/CN105138460B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a software testing method and system which are applied to a network topology structure. The network topology structure comprises multiple network nodes, an application server and a data server. The method comprises the steps that at least one network node sends a first request to the application server, and meanwhile the current time point is recorded as a first time point; the application server responds to the first request and sends a second request to the data server, and meanwhile the current time point is recorded as a second time point; when the application server receives a response message fed back by the data server, the current time point is recorded as a third time point, and meanwhile the response message is fed back to the network nodes; when the network nodes receive the response message, the current time point is recorded as a fourth time point, the total response time can be determined through a difference value between the fourth time point and the first time point, the database response time can be determined through a difference value between the third time point and the second time point, and the total response time and the database response time can be used as cases to analyze fault problems.

Description

A kind of method for testing software and system
Technical field
The application relates to Internet technical field, more particularly, relates to a kind of method for testing software and system.
Background technology
In software project, in order to ensure that the software of reaching the standard grade can normally work, all need simulated pressure in test environment, the performance of testing software.
But even if having passed the software of the pressure test before reaching the standard grade, it also may break down in actual production environment, such as access slowly waits abnormal.Cause the reason of this situation mainly on-the-spot complicated network topology structure, heterogeneous networks internodal communication link may go wrong, and the function of software systems also may break down.
Therefore, how accurately can find the problem, become a kind of problem that technician is urgently to be resolved hurrily.
Summary of the invention
In view of this, this application provides a kind of method for testing software and system, for providing a kind of software test scheme, to determine the problem place of software fault in production environment.
To achieve these goals, the existing scheme proposed is as follows:
A kind of method for testing software, be applied in network topology structure, this network topology structure comprises several network nodes, application server and data server, and the method comprises:
At least one network node in several network nodes sends the first request to described application server, and record current point in time is very first time point simultaneously;
First request described in described application server responses, send the second request to described data server, record current point in time is the second time point simultaneously;
Described application server receives the response message of described data server feedback, and record current point in time is the 3rd time point simultaneously;
Described network node receives the described response message that described application server sends, record current point in time is the 4th time point simultaneously, the difference of wherein said 4th time point and point of the described very first time is overall response time, the difference of described 3rd time point and described second time point is the database response time, and described overall response time and described database response time are used for analysis of failure problem.
Preferably, described network node sends the first request to described application server, comprising:
Described network node, according to preset sample frequency and number of users, sends the first request to described application server.
Preferably, also comprise:
Described second time point and described 3rd time point are sent to described network node by described application server;
Described network node calculates the difference of described 3rd time point and described second time point, and is defined as the database response time;
Described network node judges whether the described database response time exceedes preset database response time threshold, and if so, then the localization of faults is positioned on described application server, described data server or the communication link between the two.
A kind of software testing system, comprising:
Several network nodes, application server and data server;
Wherein, at least one network node sends the first request to described application server, and record current point in time is very first time point simultaneously;
First request described in described application server responses, send the second request to described data server, record current point in time is the second time point simultaneously;
Described application server receives the response message of described data server feedback, and record current point in time is the 3rd time point simultaneously;
Described network node receives the described response message that described application server sends, record current point in time is the 4th time point simultaneously, the difference of wherein said 4th time point and point of the described very first time is overall response time, the difference of described 3rd time point and described second time point is the database response time, and described overall response time and described database response time are used for analysis of failure problem.
Preferably, described network node comprises:
First network node subelement, for according to preset sample frequency and number of users, sends the first request to described application server.
Preferably, described application server is also for being sent to described network node by described second time point and described 3rd time point;
Described network node is also for calculating the difference of described 3rd time point and described second time point, and be defined as the database response time, judge whether the described database response time exceedes preset database response time threshold, if so, then the localization of faults is positioned on described application server, described data server or the communication link between the two.
As can be seen from above-mentioned technical scheme, the method for testing software that the embodiment of the present application provides is applied in network topology structure, this network topology structure comprises several network nodes, application server and data server, wherein at least one network node sends the first request to application server, record current point in time is very first time point simultaneously, application server responses first is asked, the second request is sent to data server, record current point in time is the second time point simultaneously, application server is when receiving the response message of data server feedback, record current point in time is the 3rd time point, response message is fed back to network node simultaneously, network node records current point in time when receiving response message be the 4th time point.The difference put by the 4th time point and the very first time can determine overall response time, can determine the database response time by the difference of the 3rd time point and the second time point.In actual applications, by performing said process to multiple network node, overall response time and the database response time of each network node can be obtained, and then according to these result localizations of faults.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present application or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only the embodiment of the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to the accompanying drawing provided.
Fig. 1 is a kind of method for testing software process flow diagram disclosed in the embodiment of the present application;
Fig. 2 is another kind of method for testing software process flow diagram disclosed in the embodiment of the present application;
Fig. 3 is a kind of software testing system structural representation disclosed in the embodiment of the present application;
Fig. 4 is a kind of network node structure schematic diagram disclosed in the embodiment of the present application.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, be clearly and completely described the technical scheme in the embodiment of the present application, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all belong to the scope of the application's protection.
Present embodiment discloses a kind of software test scheme, be applied in network topology structure, this network topology structure comprises several network nodes, application server and data server.Wherein, each network node access application server directly or indirectly, by the request of application server according to network node, obtains corresponding data, and data is returned to network node from data server.
See Fig. 1, Fig. 1 a kind of method for testing software process flow diagram disclosed in the embodiment of the present application.
As shown in Figure 1, the method comprises:
At least one network node in step S100, several network nodes sends the first request to application server, and record current point in time is very first time point simultaneously;
In practical operation, can choose a network node according to certain strategy, send the first request by this network node to application server, record current point in time is very first time point simultaneously.
Here, the first request of transmission can be that any one comprises the service request of accessing database.
When transmission first is asked, network node records the current time simultaneously, is designated as very first time point.
First request described in step S110, described application server responses, send the second request to data server, record current point in time is the second time point simultaneously;
Particularly, the second request can be sent to data server after application server receives the first request, and record current time while transmission second is asked, be designated as the second time point.
The second request that application server sends to data server is determined according to the content of the first request, when the first request is logon data server, must carry user login information in first request, then the second request can be the logging request comprising user login information; When the first request is acquisition request data, then the second request can be comprise user want request msg to identify data acquisition request.
Step S120, described application server receive the response message of described data server feedback, and record current point in time is the 3rd time point simultaneously;
Particularly, the result inquired according to requesting query database, and is fed back to application server as response message after receiving the second request of application server transmission by data server.Application server, when receiving the response message of data server feedback, records current time simultaneously, is designated as the 3rd time point.
Response message, after receiving response message, can be returned to network node by application server.
Step S130, described network node receive the described response message that described application server sends, and record current point in time is the 4th time point simultaneously.
The difference of wherein said 4th time point and point of the described very first time is overall response time, and the difference of described 3rd time point and described second time point is the database response time, and described overall response time and described database response time are used for analysis of failure problem.
By performing above-mentioned flow process at network node, can obtain overall response time and the database response time of this network node, overall response time deducts the database response time and is system response time.Also namely, the application's scheme can be determined in a data request process, system response time and database response time.
By performing said process to multiple network node, overall response time and the database response time of each network node can be obtained.Those skilled in the art can determine failure problems place according to these results.
Citing as, suppose to test at certain network node the database response time paranormal database response time obtained, then can directly problem identificatioin appear in the process of application server access data server, and then the daily record of the spacer assembly between application server and data server is positioned at by the performance report of data query server or inquiry, can problem identificatioin place.
Certainly, if it is normal to test at certain network node the database response time obtained, and the words that overall response time exceeds standard, then describe the problem on the communication link that appears between current network node and application server, therefore can according to the mode of approaching to application server, heterogeneous networks node is tested, obtain the overall response time of each network node, until when finding that the overall response time that certain network node is tested is normal, then can problem identificatioin appear on the link between this network node and upper level network node.
Optionally, in order to simulate actual scene, when testing certain network node, sample frequency and number of users can be set.Sample frequency is that unique user sends the frequency of the first request to application server, and number of users refers to the number of users using consolidated network node to send request to application server.
See Fig. 2, Fig. 2 another kind of method for testing software process flow diagram disclosed in the embodiment of the present application.
As shown in Figure 2, the method comprises:
At least one network node in step S200, several network nodes sends the first request to application server, and record current point in time is very first time point simultaneously;
In practical operation, can choose a network node according to certain strategy, send the first request by this network node to application server, record current point in time is very first time point simultaneously.
Here, the first request of transmission can be that any one comprises the service request of accessing database.
When transmission first is asked, network node records the current time simultaneously, is designated as very first time point.
First request described in step S210, described application server responses, send the second request to data server, record current point in time is the second time point simultaneously;
Particularly, the second request can be sent to data server after application server receives the first request, and record current time while transmission second is asked, be designated as the second time point.
The second request that application server sends to data server is determined according to the content of the first request, when the first request is logon data server, must carry user login information in first request, then the second request can be the logging request comprising user login information; When the first request is acquisition request data, then the second request can be comprise user want request msg to identify data acquisition request.
Step S220, described application server receive the response message of described data server feedback, and record current point in time is the 3rd time point simultaneously;
Particularly, the result inquired according to requesting query database, and is fed back to application server as response message after receiving the second request of application server transmission by data server.Application server, when receiving the response message of data server feedback, records current time simultaneously, is designated as the 3rd time point.
Response message, after receiving response message, can be returned to network node by application server.
Step S230, described network node receive the described response message that described application server sends, and record current point in time is the 4th time point simultaneously;
Described second time point and described 3rd time point are sent to described network node by step S240, described application server;
Step S250, described network node calculate the difference of described 3rd time point and described second time point, and are defined as the database response time;
Step S260, described network node judge whether the described database response time exceedes preset database response time threshold, if so, perform step S270;
Step S270, the network node localization of faults are positioned on described application server, described data server or the communication link between the two.
Be understandable that, network node have recorded very first time point and the 4th time point, can calculate overall response time by these two time points.And application server have recorded the second time point and the 3rd time point, these two time points can be sent to network node by application server, calculate by network node is unified.If network node calculates find that the database response time exceeds standard, then can determine that fault appears in the process of application server access data server, therefore trouble spot is on application server, data server or the communication link between the two.
Certainly, above-described embodiment merely illustrate application server by second and the 3rd time point send to network node, the process calculated is carried out by network node, be understandable that, application server can also be sent to by network node first and the 4th time point, carry out computing by application server.
Further, for the time point of application server and network node record, directly can derive, by artificial or computing machine, computing be carried out to time point.
Be described the software testing system that the embodiment of the present application provides below, software testing system described below can mutual corresponding reference with above-described method for testing software.
See Fig. 3, Fig. 3 a kind of software testing system structural representation disclosed in the embodiment of the present application.
As shown in Figure 3, this system comprises:
Several network nodes 31, application server 32 and data server 33;
Wherein, at least one network node 31 sends the first request to described application server 32, and record current point in time is very first time point simultaneously;
Described application server 32 responds described first request, and send the second request to described data server 33, record current point in time is the second time point simultaneously;
Described application server 32 receives the response message of described data server 33 feedback, and record current point in time is the 3rd time point simultaneously;
Described network node 31 receives the described response message that described application server 32 sends, record current point in time is the 4th time point simultaneously, the difference of wherein said 4th time point and point of the described very first time is overall response time, the difference of described 3rd time point and described second time point is the database response time, and described overall response time and described database response time are used for analysis of failure problem.
Wherein, the network node between application server 32 and data server 33 can be fire wall, spacer assembly etc.
The software testing system that the embodiment of the present application provides comprises several network nodes, application server and data server, wherein at least one network node sends the first request to application server, record current point in time is very first time point simultaneously, application server responses first is asked, the second request is sent to data server, record current point in time is the second time point simultaneously, application server is when receiving the response message of data server feedback, record current point in time is the 3rd time point, response message is fed back to network node simultaneously, network node records current point in time when receiving response message be the 4th time point.The difference put by the 4th time point and the very first time can determine overall response time, can determine the database response time by the difference of the 3rd time point and the second time point.In actual applications, multiple network node can perform said process respectively, obtains overall response time and the database response time of each network node, and then according to these result localizations of faults.
Optionally, the embodiment of the present application discloses a kind of alternate configurations of above-mentioned network node, and as shown in Figure 4, network node 31 can comprise:
First network node subelement 311, for according to preset sample frequency and number of users, sends the first request to described application server.
Optionally, described application server 32 is also for being sent to described network node 31 by described second time point and described 3rd time point;
Described network node 31 is also for calculating the difference of described 3rd time point and described second time point, and be defined as the database response time, judge whether the described database response time exceedes preset database response time threshold, if so, then the localization of faults is positioned on described application server, described data server or the communication link between the two.
Finally, also it should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.
To the above-mentioned explanation of the disclosed embodiments, professional and technical personnel in the field are realized or uses the application.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein when not departing from the spirit or scope of the application, can realize in other embodiments.Therefore, the application can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (6)

1. a method for testing software, is characterized in that, is applied in network topology structure, and this network topology structure comprises several network nodes, application server and data server, and the method comprises:
At least one network node in several network nodes sends the first request to described application server, and record current point in time is very first time point simultaneously;
First request described in described application server responses, send the second request to described data server, record current point in time is the second time point simultaneously;
Described application server receives the response message of described data server feedback, and record current point in time is the 3rd time point simultaneously;
Described network node receives the described response message that described application server sends, record current point in time is the 4th time point simultaneously, the difference of wherein said 4th time point and point of the described very first time is overall response time, the difference of described 3rd time point and described second time point is the database response time, and described overall response time and described database response time are used for analysis of failure problem.
2. method according to claim 1, is characterized in that, described network node sends the first request to described application server, comprising:
Described network node, according to preset sample frequency and number of users, sends the first request to described application server.
3. method according to claim 1, is characterized in that, also comprises:
Described second time point and described 3rd time point are sent to described network node by described application server;
Described network node calculates the difference of described 3rd time point and described second time point, and is defined as the database response time;
Described network node judges whether the described database response time exceedes preset database response time threshold, and if so, then the localization of faults is positioned on described application server, described data server or the communication link between the two.
4. a software testing system, is characterized in that, comprising:
Several network nodes, application server and data server;
Wherein, at least one network node sends the first request to described application server, and record current point in time is very first time point simultaneously;
First request described in described application server responses, send the second request to described data server, record current point in time is the second time point simultaneously;
Described application server receives the response message of described data server feedback, and record current point in time is the 3rd time point simultaneously;
Described network node receives the described response message that described application server sends, record current point in time is the 4th time point simultaneously, the difference of wherein said 4th time point and point of the described very first time is overall response time, the difference of described 3rd time point and described second time point is the database response time, and described overall response time and described database response time are used for analysis of failure problem.
5. system according to claim 4, is characterized in that, described network node comprises:
First network node subelement, for according to preset sample frequency and number of users, sends the first request to described application server.
6. system according to claim 4, is characterized in that,
Described application server is also for being sent to described network node by described second time point and described 3rd time point;
Described network node is also for calculating the difference of described 3rd time point and described second time point, and be defined as the database response time, judge whether the described database response time exceedes preset database response time threshold, if so, then the localization of faults is positioned on described application server, described data server or the communication link between the two.
CN201510599520.3A 2015-09-18 2015-09-18 A kind of method for testing software and system Active CN105138460B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510599520.3A CN105138460B (en) 2015-09-18 2015-09-18 A kind of method for testing software and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510599520.3A CN105138460B (en) 2015-09-18 2015-09-18 A kind of method for testing software and system

Publications (2)

Publication Number Publication Date
CN105138460A true CN105138460A (en) 2015-12-09
CN105138460B CN105138460B (en) 2018-02-23

Family

ID=54723814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510599520.3A Active CN105138460B (en) 2015-09-18 2015-09-18 A kind of method for testing software and system

Country Status (1)

Country Link
CN (1) CN105138460B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357480A (en) * 2016-11-23 2017-01-25 北京蓝海讯通科技股份有限公司 Method and device for monitoring network performance of application and mobile terminal
CN106961358A (en) * 2017-05-11 2017-07-18 国网山东省电力公司信息通信公司 Web application system cluster method for monitoring operation states and its system based on daily record
CN107888690A (en) * 2017-11-17 2018-04-06 深圳泉眼体育运营管理有限公司 The statistical method and system of response time
CN108255659A (en) * 2016-12-28 2018-07-06 平安科技(深圳)有限公司 A kind of application program capacity monitoring method and its system
CN111324545A (en) * 2020-03-13 2020-06-23 中国工商银行股份有限公司 Application server middleware performance test method, test terminal and application server
CN114465919A (en) * 2022-04-12 2022-05-10 北京天维信通科技有限公司 Network service testing method, system, electronic equipment and storage medium
CN114785675A (en) * 2022-06-20 2022-07-22 中建三局信息科技有限公司 Method, device and storage medium for positioning service overtime

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130086130A1 (en) * 2011-09-30 2013-04-04 Oracle International Corporation Executor for software configuration automation
CN103365770A (en) * 2012-04-09 2013-10-23 陆兵 Mobile terminal software testing system and software testing method
CN104104554A (en) * 2013-04-10 2014-10-15 深圳市腾讯计算机***有限公司 Life cycle method and apparatus for detecting data access request

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130086130A1 (en) * 2011-09-30 2013-04-04 Oracle International Corporation Executor for software configuration automation
CN103365770A (en) * 2012-04-09 2013-10-23 陆兵 Mobile terminal software testing system and software testing method
CN104104554A (en) * 2013-04-10 2014-10-15 深圳市腾讯计算机***有限公司 Life cycle method and apparatus for detecting data access request

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357480A (en) * 2016-11-23 2017-01-25 北京蓝海讯通科技股份有限公司 Method and device for monitoring network performance of application and mobile terminal
CN106357480B (en) * 2016-11-23 2020-02-14 北京蓝海讯通科技股份有限公司 Method and device for monitoring network performance of application and mobile terminal
CN108255659A (en) * 2016-12-28 2018-07-06 平安科技(深圳)有限公司 A kind of application program capacity monitoring method and its system
CN108255659B (en) * 2016-12-28 2021-06-29 平安科技(深圳)有限公司 Application program performance monitoring method and system
CN106961358A (en) * 2017-05-11 2017-07-18 国网山东省电力公司信息通信公司 Web application system cluster method for monitoring operation states and its system based on daily record
CN107888690A (en) * 2017-11-17 2018-04-06 深圳泉眼体育运营管理有限公司 The statistical method and system of response time
CN111324545A (en) * 2020-03-13 2020-06-23 中国工商银行股份有限公司 Application server middleware performance test method, test terminal and application server
CN111324545B (en) * 2020-03-13 2023-09-22 中国工商银行股份有限公司 Application server middleware performance test method, test terminal and application server
CN114465919A (en) * 2022-04-12 2022-05-10 北京天维信通科技有限公司 Network service testing method, system, electronic equipment and storage medium
CN114785675A (en) * 2022-06-20 2022-07-22 中建三局信息科技有限公司 Method, device and storage medium for positioning service overtime
CN114785675B (en) * 2022-06-20 2022-09-09 中建三局信息科技有限公司 Method, device and storage medium for positioning service overtime

Also Published As

Publication number Publication date
CN105138460B (en) 2018-02-23

Similar Documents

Publication Publication Date Title
CN105138460A (en) Software testing method and system
US8443074B2 (en) Constructing an inference graph for a network
CN106034051B (en) Network monitoring data processing method and network monitoring data processing unit
CN102035667B (en) Method, device and system for evaluating network reliability
CN103117901B (en) A kind of distributed heartbeat detection method, Apparatus and system
CN109274557B (en) Intelligent CMDB management and cloud host monitoring method in cloud environment
CN105592487B (en) LTE network service flow evaluation method and device
US9148354B2 (en) Apparatus and method for monitoring of connectivity services
CN102363969A (en) Excavator and method and system for determining equipment fault
CN103051500A (en) Test method and system of service network system
CN104915238A (en) Method for determining configuration parameter association of Web application
CN105577456A (en) Network topology configuration display method for solving single-domain and cross-domain problems
CN110474821A (en) Node failure detection method and device
CN104219087A (en) Fault location method
CN104348669B (en) A kind of Domain Hijacking detection method, system and device
CN107769964B (en) Special line checking method and system
CN117650964A (en) Intelligent network operation and maintenance management system
CN114745616B (en) Underground heat information remote monitoring and early warning system and method
Son et al. RAFD: Resource-aware fault diagnosis system for home environment with smart devices
CN111988172B (en) Network information management platform, device and security management method
CN102783087A (en) Associative alarm method and device based on management layers
CN107678905B (en) Monitoring method and device
CN105827475A (en) End-to-end telecom customer network monitoring system
TWI624185B (en) Wireless network service inspection system and its detection method
TWI618024B (en) Automatic detection and setting method for automatically detecting PON network heterogeneous optical terminal equipment

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