[go: up one dir, main page]

CN107179986A - The method for testing pressure and device of operation system - Google Patents

The method for testing pressure and device of operation system Download PDF

Info

Publication number
CN107179986A
CN107179986A CN201610136597.1A CN201610136597A CN107179986A CN 107179986 A CN107179986 A CN 107179986A CN 201610136597 A CN201610136597 A CN 201610136597A CN 107179986 A CN107179986 A CN 107179986A
Authority
CN
China
Prior art keywords
information
test
operation system
pressure test
login sessions
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
CN201610136597.1A
Other languages
Chinese (zh)
Other versions
CN107179986B (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610136597.1A priority Critical patent/CN107179986B/en
Publication of CN107179986A publication Critical patent/CN107179986A/en
Application granted granted Critical
Publication of CN107179986B publication Critical patent/CN107179986B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

This application discloses a kind of method for testing pressure of operation system and device.Wherein method includes:Test account profile information is obtained, wherein, test account profile information includes the accounts information of multiple test accounts;Generate multiple landing request informations to be logged in operation system to generate multiple login sessions information according to test account profile information;The accounts information and multiple login sessions information of multiple test accounts are preserved into memory mapping table;When carrying out pressure test to operation system, multiple traffic pressure test requests are generated according to the accounts information of multiple test accounts;And multiple traffic pressure test request data are generated according to multiple traffic pressure test requests and memory mapping table, and multiple traffic pressure test request data are sent to operation system to carry out pressure test to operation system.This method is by individually performing multiple login parts for testing accounts, it is ensured that the centrality of the pressure test of operation system.

Description

The method for testing pressure and device of operation system
Technical field
The application is related to software testing technology field, more particularly to a kind of operation system method for testing pressure and device.
Background technology
Generally, in order to ensure the performance and availability of operation system, pressure test can be carried out to operation system with test system The maximum loading condition that can be born.For example, the related application such as shopping, booking is during the Spring Festival, double ten first-class Easily there is peak request in business, in order to ensure the operation system corresponding to these application programs remain to good operation, it is necessary to Pressure test is carried out to the operation system, such as to test out maximum user's visit capacity that system can bear.
In correlation technique, it is necessary to prepare substantial amounts of test account, so that according to these during the pressure test of progress operation system Test account simulation a large number of users and scene is asked to the peak of system.When carrying out the pressure test of operation system, due to service Device needs first to verify the logging status of account, therefore, it is necessary to be used according to test account simulation is a large amount of before service request is performed Family carries out register, after the SessionID that server returns to test account, generates service request and takes SessionID performs service request to realize to business system to verify by logging status when verifying by logging status The pressure test of system.
But be that it is first log in again service request serial that the pressure test mode of above-mentioned operation system, which is appreciated that, the problem of exist Operation, during test, is also mingled with account logging request during due to traffic pressure test request, can build-up of pressure survey Try the wasting of resources of platform, login system pressure is excessive, and cause traffic pressure test request flow it is unstable the problems such as; Used further, since Session is not reproducible, change pressure test business or need after pause pressure test, due to Session timeliness is shorter, again during pressure test, and test account needs to log in again, causes continually to carry out logging status Verification.
The content of the invention
The purpose of the application is intended at least solve one of above-mentioned technical problem to a certain extent.
Therefore, first purpose of the application is to propose a kind of method for testing pressure of operation system, list the method achieve Solely perform the login parts of multiple test accounts, it is to avoid log in influence of the part to operation system pressure test, it is ensured that industry The centrality of business system pressure test, so that traffic pressure test ensure that purely, is not influenceed, flow control by login System is transparent.
Second purpose of the application is to propose a kind of pressure test device of operation system.
For up to above-mentioned purpose, a kind of method for testing pressure of operation system is proposed according to the embodiment of the application first aspect, Comprise the following steps:Test account profile information is obtained, wherein, the test account profile information includes multiple Test the accounts information of account;Multiple landing request informations are generated according to the test account profile information, and according to institute Multiple landing request informations are stated to be logged in generate multiple login sessions information to the operation system;By the multiple test The accounts information of account and multiple login sessions information are preserved into memory mapping table;When to operation system progress pressure During test, multiple traffic pressure test requests are generated according to the accounts information of the multiple test account;And according to described many Individual traffic pressure test request and the memory mapping table generate multiple traffic pressure test request data, and will be described many Individual traffic pressure test request data send to the operation system to carry out pressure test to the operation system.
The method for testing pressure of the operation system of the embodiment of the present application, according to the account of the accounts information comprising multiple test accounts Profile information generates multiple landing request informations, and carries out login generation to operation system according to multiple landing request informations Multiple login sessions information, and then the accounts information and multiple login sessions information of multiple test accounts are preserved to internal memory and reflected In firing table.When carrying out pressure test to operation system, multiple traffic pressures are generated according to the accounts information of multiple test accounts Test request, and multiple traffic pressure test request numbers can be generated according to multiple traffic pressure test requests and memory mapping table According to, finally by pressure test request data send to operation system with to operation system carry out pressure test.Pass through above-mentioned realization Mode, realizes the login part for individually performing multiple test accounts, i.e., by being logged in advance to high-volume test account Preheating, and the session got is preserved so that directly obtained when performing traffic pressure test from session ponds Take session to verify by logging status, it is to avoid log in influence of the part to operation system pressure test, it is ensured that industry The centrality of business system pressure test, so that traffic pressure test ensure that purely, is not influenceed, flow control by login System is transparent.
For up to above-mentioned purpose, according to the embodiment of the second aspect of the application, it is proposed that a kind of pressure test dress of operation system Put, including:Acquisition module, for obtaining test account profile information, wherein, the test account configuration file letter Breath includes the account information of multiple test accounts;First generation module, for being given birth to according to the test account profile information Into multiple landing request informations, and logged in the operation system according to the multiple landing request information multiple to generate Login sessions information;Preserving module, for the accounts information and multiple login sessions information of the multiple test account to be protected Deposit into memory mapping table;Second generation module, for when carrying out pressure test to the operation system, according to described many The accounts information of individual test account generates multiple traffic pressure test requests;3rd generation module, for according to the multiple industry Business pressure test request and the memory mapping table generate multiple traffic pressure test request data;And sending module, For the multiple traffic pressure test request data to be sent to the operation system to carry out pressure survey to the operation system Examination.
The pressure test device of the operation system of the embodiment of the present application, according to the account of the accounts information comprising multiple test accounts Profile information generates multiple landing request informations, and carries out login generation to operation system according to multiple landing request informations Multiple login sessions information, and then the accounts information and multiple login sessions information of multiple test accounts are preserved to internal memory and reflected In firing table, when carrying out pressure test to operation system, multiple traffic pressures are generated according to the accounts information of multiple test accounts Test request, and multiple traffic pressure test request numbers can be generated according to multiple traffic pressure test requests and memory mapping table According to, finally, by pressure test request data send to operation system with to operation system carry out pressure test.Pass through above-mentioned reality Existing mode, realizes the login part for individually performing multiple test accounts, i.e., by being stepped in advance to high-volume test account Record preheating, and the session got is preserved so that when performing traffic pressure test directly from session ponds Obtain session to verify by logging status, it is to avoid log in influence of the part to operation system pressure test, it is ensured that The centrality of operation system pressure test, so that traffic pressure test ensure that purely, is not influenceed, flow by login Control is transparent.
The aspect and advantage that the application is added will be set forth in part in the description, and partly will become bright from the following description It is aobvious, or recognized by the practice of the application.
Brief description of the drawings
The above-mentioned and/or additional aspect and advantage of the application will be apparent from description of the accompanying drawings below to embodiment is combined Be readily appreciated that, wherein:
Fig. 1 is the flow chart of the method for testing pressure of the operation system according to the application one embodiment;
Fig. 2 is the flow chart of the method for testing pressure of the operation system according to the application another embodiment;
Fig. 3 is the structural representation of the pressure test device of the operation system according to the application one embodiment;
Fig. 4 is the structural representation of the pressure test device of the operation system according to one specific embodiment of the application;
Fig. 5 is the structural representation of the pressure test device of the operation system according to the application another specific embodiment;
Fig. 6 is the structural representation of the pressure test device of the operation system according to the application another specific embodiment;And
Fig. 7 is the structural representation of the pressure test device of the operation system according to the application another specific embodiment.
Embodiment
Embodiments herein is described below in detail, the example of the embodiment is shown in the drawings, wherein identical from beginning to end Or similar label represents same or similar element or the element with same or like function.Retouched below with reference to accompanying drawing The embodiment stated is exemplary, it is intended to for explaining the application, and it is not intended that limitation to the application.
Fig. 1 is the flow chart of the method for testing pressure of the operation system according to the application one embodiment.It should be noted that The method for testing pressure of the operation system of the embodiment of the present application can be applied to pressure test platform, and the pressure test platform passes through this The method for testing pressure of the operation system of application carries out pressure test to operation system, with the maximum load situation of test system, To cause related personnel (such as tester, developer) to be debugged according to test result to operation system.In addition, Business in the embodiment of the present application can be understood as the various functions in application program or system, for example, with wechat application program Exemplified by, the business included in the wechat application program for example has, and sends out message, plusing good friend, shakes, gives bonus, robbing red Bag, brush circle of friends etc..
As shown in figure 1, the method for testing pressure of the operation system includes:
S110, obtains test account profile information, wherein, test account profile information includes multiple test accounts Accounts information.
It is appreciated that can be that the pressure test to the operation system is advance in advance before pressure test is carried out to operation system Setup test script, the test script at least includes but is not limited to test account profile information and business information to be tested, The business information to be tested such as the type including business, realize the business function corresponding to test code.
In order to realize the login warm-up operation for completing multiple test accounts before pressure test is carried out to operation system, it is necessary in advance Prepare substantial amounts of test account, the accounts information of these substantial amounts of test accounts can be aggregated into test account configuration file, with For in packing pressure test process, register is carried out according to these test account simulation a large number of users.
In one embodiment of the application, in the incipient stage of pressure test, pre-prepd test script can be loaded, During performing the test script, the profile information for testing account can be obtained according to the test script, wherein, the survey Trying account profile information includes the accounts informations of multiple test accounts, such as including test account ID (Identity, Identity), user's pet name, and/or password etc..
S120, multiple landing request informations are generated according to test account profile information, and according to multiple landing request informations Logged in generate multiple login sessions information to operation system.
Specifically, the corresponding login of each test account included in the configuration file can be generated according to test account configuration file Solicited message, the landing request information includes ID, the password of such as account, afterwards, can send landing request information To operation system.Operation system can complete corresponding test when receiving landing request information according to the landing request information The register of account, and login sessions information Session is generated, and login sessions information Session is fed back to Pressure test platform.
S130, the accounts information and multiple login sessions information of multiple test accounts are preserved into memory mapping table.
It is appreciated that in order in the pressure test of operation system, the unified management to logging in part be realized, in pressure test Platform receive operation system feedback can after login sessions information Session, can by the accounts information of each test account with And corresponding login sessions information Session is preserved into memory mapping table.That is, can be stored with memory mapping table Multiple test accounts and its corresponding login sessions information.
Specifically, in one embodiment of the application, by the accounts information and multiple login sessions of multiple test accounts The process that implements that information is preserved into memory mapping table may include following steps:It is determined that each testing the accounts information of account With the corresponding relation of each log-on message, according to corresponding relation according to preset format by it is multiple test accounts accounts informations and Multiple login sessions information are preserved into memory mapping table, wherein, each test can clearly be stored according to the preset format Account and login sessions information and corresponding relation therebetween.
It is appreciated that in order to distinguish each login sessions information, an ID can be distributed for each login sessions information, for example, with SessionID represents login sessions information, in embodiments herein, and above-mentioned preset format can be<ID, SessionID>Form.For example, after the logging request of multiple test accounts is performed to operation system, each survey is obtained The corresponding login sessions information SessionID of account is tried, each login sessions information SessionID can now be cached, and With<ID, SessionID>Form be saved in memory mapping table.
S140, when carrying out pressure test to operation system, multiple business pressures are generated according to the accounts information of multiple test accounts Power test request.
It is appreciated that when carrying out pressure test to operation system, can be by pre-prepd test script according to multiple accounts Accounts information generate multiple traffic pressure test requests, to simulate the scene that multiple users carry out service request to operation system.
S150, multiple traffic pressure test request data are generated according to multiple traffic pressure test requests and memory mapping table, And send multiple traffic pressure test request data to operation system to carry out pressure test to operation system.
It is appreciated that now it is considered that all test accounts have been logged on state, in order to realize test Account Logon industry Business system, and ensure that the logging status verification for testing account passes through.Specifically, can basis in embodiments herein The accounts information of multiple test accounts searches multiple logins corresponding with the accounts information of multiple test accounts from memory mapping table Session information, and multiple login sessions information corresponding with the accounts information of multiple test accounts are added to each self-corresponding industry It is engaged in the Cookie of pressure test request generating multiple traffic pressure test request data.Afterwards, each traffic pressure is tested Request data is sent to operation system, and operation system can be according to the login sessions information in each traffic pressure test request data SessionID completes the verification of the logging status of correspondence test account, and according to each traffic pressure test request to operation system Carry out pressure test.
That is, when carrying out pressure test to operation system, now all test accounts have all been logged on state, when When building traffic pressure test request data, it is only necessary to correspondence is found from memory mapping table according to the ID of test account SessionID, takes SessionID in upstream request, is such as put into the Cookie in HTTP request, with this by stepping on The verification of record state, while the traffic pressure test request in traffic pressure test request data is to pair in operation system Business is answered to carry out pressure test.A register will be carried out when thus, without carrying out pressure test to operation system every time, Correspondence SessionID need to be only found from memory mapping table (such as session ponds), and is added to traffic pressure test To realize the verification of logging status in the Cookie of request, register flow is eliminated, so as to reach that traffic pressure is surveyed The pure property of request is tried, flow control also can be more transparent.
Wherein, in embodiments herein, traffic pressure test request data are that short chain connects request data.Therefore, in order to Ensure that session is permanently effective, ensure the validity of link, regularly can send heartbeat request to operation system, it is right with timing The login sessions information extension out-of-service time in memory mapping table.Further, in one embodiment of the application, in root Logged according to multiple landing request informations to operation system with after generating multiple login sessions information, the method for testing pressure It may also include:Periodically multiple heartbeat requests are generated according to the accounts informations of multiple test accounts, and by multiple heartbeat requests Send to operation system to carry out multiple login sessions information in memory mapping table the operation of extension out-of-service time.Wherein, exist In embodiments herein, the time interval in above-mentioned cycle is smaller than login sessions information (i.e. session) out-of-service time. Thus, heartbeat request is sent by timing to fail to each login sessions information session extensions in memory mapping table with timing Time.
The method for testing pressure of the operation system of the embodiment of the present application, according to the account of the accounts information comprising multiple test accounts Profile information generates multiple landing request informations, and carries out login generation to operation system according to multiple landing request informations Multiple login sessions information, and then the accounts information and multiple login sessions information of multiple test accounts are preserved to internal memory and reflected In firing table, when carrying out pressure test to operation system, multiple traffic pressures are generated according to the accounts information of multiple test accounts Test request, and multiple traffic pressure test request numbers can be generated according to multiple traffic pressure test requests and memory mapping table According to, finally, by pressure test request data send to operation system with to operation system carry out pressure test.Pass through above-mentioned reality Existing mode, realizes the login part for individually performing multiple test accounts, i.e., by being stepped in advance to high-volume test account Record preheating, and the session got is preserved so that when performing traffic pressure test directly from session ponds Obtain session to verify by logging status, it is to avoid log in influence of the part to operation system pressure test, it is ensured that The centrality of operation system pressure test, so that traffic pressure test ensure that purely, is not influenceed, flow by login Control is transparent.
Fig. 2 is the flow chart of the method for testing pressure of the operation system according to the application another embodiment.
In order to improve the practicality of pressure test, repeat logon operation during pressure test is saved as much as possible, the application's In embodiment, login sessions information session can be subjected to persistence, i.e., can be by after generation login sessions information The accounts information of each test account is write to default file to generate login sessions file with each login sessions information, thus can be square Just the pressure test plan to operation system is dynamically adjusted according to the login sessions file.
Specifically, as shown in Fig. 2 the method for testing pressure of the operation system includes:
S210, obtains test account profile information, wherein, test account profile information includes multiple test accounts Accounts information.
S220, multiple landing request informations are generated according to test account profile information, and according to multiple landing request informations Logged in generate multiple login sessions information to operation system.
S230, the accounts information of multiple test accounts is write to default file with multiple login sessions information and logs in meeting to generate Talk about file.
For the ease of dynamically adjusting the pressure test plan to operation system, repetition when saving pressure test as much as possible is stepped on Record operation, login sessions information session can be carried out persistence, i.e., step on the accounts information of multiple test accounts with multiple Record session information writes to default file to generate login sessions file.It is appreciated that accounts information and corresponding login sessions Information for example with<ID, sessionID>Form specified file is written to form login sessions file.
In one embodiment of the application, write by the accounts information of each test account and each login sessions information to default On the premise of file is to generate login sessions file, detecting after the pressure test to operation system is suspended, the pressure Method of testing may also include:Detect whether to receive the recovery instruction inputted for the pressure test of operation system, if received Recovery to the pressure test input for operation system is instructed, then judges that multiple login sessions information in memory mapping table are No failure;If multiple login sessions information in memory mapping table do not fail, load login sessions file to log in meeting Multiple login sessions information in words file are reloaded into memory mapping table;If multiple login meetings in memory mapping table Information failure is talked about, then multiple landing request informations are generated according to test account profile information again, and log according to multiple Solicited message is logged in generate multiple login sessions information to operation system.
Specifically, during pressure test is carried out to operation system, if detection is partway surveyed to the pressure of operation system Examination is suspended, and such as drillstem test personnel want to change business object to be tested or change test script or tester due to it His reason and when suspending the pressure test to operation system, refer to when detecting the recovery that receives for the pressure test of operation system Order, and under login sessions information sessionID non-failure cases, last login preheating can be loaded directly into and generated Login sessions file, by each login sessions information in login sessions file with<ID, sessionID>Form adds again It is downloaded in memory mapping table.Thus, it is possible to prevent from generating again logging request with to operation system re-start register with Generate login sessions information, it is to avoid the waste of resource.
S240, the accounts information and multiple login sessions information of multiple test accounts are preserved into memory mapping table.
It should be noted that in embodiments herein, above-mentioned steps S230 and step S240 execution can not differentiate between elder generation Order, e.g., can first carry out execution step S240 after step S230, step is performed after can also first carrying out step S240 afterwards S230, or, step S230 and step S240 can also be performed simultaneously.
S250, when carrying out pressure test to operation system, multiple business pressures are generated according to the accounts information of multiple test accounts Power test request.
S260, multiple traffic pressure test request data are generated according to multiple traffic pressure test requests and memory mapping table, And send multiple traffic pressure test request data to operation system to carry out pressure test to operation system.
The pressure test requesting method of the operation system of the embodiment of the present application, after generation login sessions information, is surveyed multiple The accounts information and multiple login sessions information for trying account write to default file to generate login sessions file so as to industry After the pressure test of business system is suspended, when detect receive for operation system pressure test input recovery instruction, And login sessions information is not when failing, each login sessions information in login sessions file directly can be loaded onto memory mapping table In, it is to avoid the waste of resource, the practicality of method for testing pressure is improved, while being easy to dynamically adjust to operation system Pressure test plan, repeat logon operation when saving pressure test as much as possible.
In order to realize above-described embodiment, the application also proposed a kind of pressure test device of operation system.Fig. 3 is according to this Apply for the structural representation of the pressure test device of the operation system of one embodiment.As shown in figure 3, the pressure of the operation system Force test device includes:Acquisition module 310, the first generation module 320, preserving module 330, the second generation module 340, 3rd generation module 350 and sending module 360.
Wherein, acquisition module 310, for obtaining test account profile information, wherein, test account configuration file letter Breath includes the accounts information of multiple test accounts.
It is appreciated that can be that the pressure test to the operation system is advance in advance before pressure test is carried out to operation system Setup test script, the test script at least includes but is not limited to test account profile information and business information to be tested, The business information to be tested such as the type including business, realize the business function corresponding to test code.
In order to realize the login warm-up operation for completing multiple test accounts before pressure test is carried out to operation system, it is necessary in advance Prepare substantial amounts of test account, the accounts information of these substantial amounts of test accounts can be aggregated into test account configuration file, with For in packing pressure test process, register is carried out according to these test account simulation a large number of users.
In one embodiment of the application, in the incipient stage of pressure test, acquisition module 310 can load pre-prepd Test script, during the test script is performed, can obtain the profile information for testing account according to the test script, Wherein, the test account profile information includes the accounts information of multiple test accounts, such as the user including testing account ID, user's pet name, and/or password etc..
First generation module 320, for generating multiple landing request informations according to test account profile information, and according to Multiple landing request informations are logged in generate multiple login sessions information to operation system.
Specifically, the first generation module 320 can generate each survey included in the configuration file according to test account configuration file The corresponding landing request information of account is tried, the landing request information includes ID, the password of such as account, afterwards, can be by Landing request information is sent to operation system.Operation system can be believed when receiving landing request information according to the logging request Breath completes the register of corresponding test account, and generates login sessions information Session, and the login sessions are believed Breath Session feeds back to pressure test platform.
Preserving module 330, for preserving to internal memory and reflecting the accounts information and multiple login sessions information of multiple test accounts In firing table.
It is appreciated that in order in the pressure test of operation system, the unified management to logging in part be realized, in pressure test Platform receive operation system feedback can after login sessions information Session, can used preserving module 330 by each test The accounts information of account and corresponding login sessions information Session are preserved into memory mapping table.That is, internal memory Can be stored with multiple test accounts and its corresponding login sessions information in mapping table.
Specifically, Fig. 4 is the structural representation of the pressure test device of the operation system according to one specific embodiment of the application Figure.As shown in figure 4, the preserving module 330 in the pressure test device of the operation system is specifically included:Determining unit 331 With storage unit 332.In one embodiment of the application, determining unit 331 determines the accounts information of each test account With the corresponding relation of each log-on message, storage unit 332 is according to corresponding relation according to preset format by multiple test accounts Accounts information and multiple login sessions information are preserved into memory mapping table, wherein, can be clear according to the preset format Store each test account and login sessions information and corresponding relation therebetween.
Second generation module 340, for when carrying out pressure test to operation system, being believed according to the account of multiple test accounts The multiple traffic pressure test requests of breath generation.
It is appreciated that when carrying out pressure test to operation system, the second generation module 340 can pass through pre-prepd test Script generates multiple traffic pressure test requests according to the accounts information of multiple accounts, and operation system is entered with simulating multiple users The scene of row service request.
3rd generation module 350, for generating multiple business according to multiple traffic pressure test requests and memory mapping table Pressure test request data.
It is appreciated that now it is considered that all test accounts have been logged on state, in order to realize test Account Logon industry Business system, and ensure that the logging status verification for testing account passes through.
Fig. 5 is the structural representation of the pressure test device of the operation system according to the application another specific embodiment.As schemed Described in 5, the 3rd generation module 350 in the pressure test device of the operation system is specifically included:Searching unit 351 and life Into unit 352.
Specifically, in embodiments herein, searching unit 351 can be according to the accounts informations of multiple test accounts from interior Deposit and multiple login sessions information corresponding with the accounts information of multiple test accounts are searched in mapping table, generation unit 352 will be many Individual login sessions information corresponding with the accounts information of multiple test accounts is added to each self-corresponding traffic pressure test request To generate multiple traffic pressure test request data in Cookie.
That is, when carrying out pressure test to operation system, now all test accounts have all been logged on state, when When building traffic pressure test request data, it is only necessary to correspondence is found from memory mapping table according to the ID of test account SessionID, takes SessionID in upstream request, is such as put into the Cookie in HTTP request, with this by stepping on The verification of record state, while the traffic pressure test request in traffic pressure test request data is to pair in operation system Business is answered to carry out pressure test.A register will be carried out when thus, without carrying out pressure test to operation system every time, Correspondence SessionID need to be only found from memory mapping table (such as session ponds), and is added to traffic pressure test To realize the verification of logging status in the Cookie of request, register flow is eliminated, so as to reach that traffic pressure is surveyed The pure property of request is tried, flow control also can be more transparent.
Sending module 360, for multiple traffic pressure test request data to be sent to operation system to be carried out to operation system Pressure test.
In embodiments herein, each traffic pressure test request data are sent to operation system, industry by sending module 360 Business system can in each traffic pressure test request data login sessions information SessionID complete correspondence test account The verification of logging status, and pressure test is carried out to operation system according to each traffic pressure test request.
Wherein, in embodiments herein, traffic pressure test request data are that short chain connects request data.Therefore, in order to Ensure that session is permanently effective, ensure the validity of link, regularly can send heartbeat request to operation system, it is right with timing The login sessions information extension out-of-service time in memory mapping table.
Fig. 6 is the structural representation of the pressure test device of the operation system according to the application another specific embodiment.As schemed Shown in 6, on the basis of as shown in Figure 3, the pressure test device of the operation system also includes:4th generation module 370 Extend module 380 with the out-of-service time.
Specifically, the 4th generation module 370 is used in the first generation module 320 according to multiple landing request informations to business System is logged in after generating multiple login sessions information, periodically to be generated according to the accounts informations of multiple test accounts Multiple heartbeat requests, and failure extension module 380 are used to send multiple heartbeat requests to operation system to map internal memory Multiple login sessions information in table carry out the operation of extension out-of-service time.Wherein, in embodiments herein, the above-mentioned cycle Time interval be smaller than login sessions information (i.e. session) out-of-service time.Thus, out-of-service time extension module 380 The heartbeat request generated by timing the 4th generation module 370 of transmission is with timing to each login sessions information in memory mapping table Session extends the out-of-service time.
The pressure test device of the operation system of the embodiment of the present application, according to the account of the accounts information comprising multiple test accounts Profile information generates multiple landing request informations, and carries out login generation to operation system according to multiple landing request informations Multiple login sessions information, and then the accounts information and multiple login sessions information of multiple test accounts are preserved to internal memory and reflected In firing table, when carrying out pressure test to operation system, multiple traffic pressures are generated according to the accounts information of multiple test accounts Test request, and multiple traffic pressure test request numbers can be generated according to multiple traffic pressure test requests and memory mapping table According to, finally, by pressure test request data send to operation system with to operation system carry out pressure test.Pass through above-mentioned reality Existing mode, realizes the login part for individually performing multiple test accounts, i.e., by being stepped in advance to high-volume test account Record preheating, and the session got is preserved so that when performing traffic pressure test directly from session ponds Obtain session to verify by logging status, it is to avoid log in influence of the part to operation system pressure test, it is ensured that The centrality of operation system pressure test, so that traffic pressure test ensure that purely, is not influenceed, flow by login Control is transparent.
In order to improve the practicality of pressure test, repeat logon operation during pressure test is saved as much as possible, the application's In embodiment, login sessions information session can be subjected to persistence, i.e., can be by after generation login sessions information The accounts information of each test account is write to default file to generate login sessions file with each login sessions information, thus can be square Just the pressure test plan to operation system is dynamically adjusted according to the login sessions file.
Fig. 7 is the structural representation of the pressure test device of the operation system according to the application another specific embodiment.As schemed Shown in 7, on the basis of as shown in Figure 3, the pressure test device of the operation system also includes:5th generation module 390, Detection module 3100, judge module 3110 and load-on module 3120.
Wherein, the 5th generation module 390 is used in the first generation module 320 according to multiple landing request informations to operation system Logged in after generating multiple login sessions information, by the accounts informations and multiple login sessions information of multiple test accounts Write to default file to generate login sessions file.
For the ease of dynamically adjusting the pressure test plan to operation system, repetition when saving pressure test as much as possible is stepped on Record operation, login sessions information session can be carried out into persistence, i.e. the 5th generation module 390 can be by multiple test accounts Accounts information and multiple login sessions information write to default file to generate login sessions file.It is appreciated that account is believed Breath with corresponding login sessions information for example with<ID, sessionID>Form specified file is written to form login Session file.
In one embodiment of the application, in the 5th generation module 390 by accounts information and each login meeting of each test account On the premise of words information is write to default file to generate login sessions file, detection module 3100 is being detected to operation system Pressure test be suspended after, detect whether to receive the recovery instruction of the pressure test input for operation system, judge The recovery instruction that module 3110 is inputted in the pressure test received for operation system, judge in memory mapping table multiple steps on Whether record session information fails;If it is determined that module 3110 judges that multiple login sessions information in memory mapping table do not fail, Load-on module 3120 then load login sessions file with by multiple login sessions information in login sessions file reload to In memory mapping table;Wherein, if it is determined that module 3110 judges multiple login sessions information failure in memory mapping table, then First generation module 320 is additionally operable to again according to the multiple landing request informations of test account profile information generation, and according to Multiple landing request informations are logged in generate multiple login sessions information to operation system.
Specifically, during pressure test is carried out to operation system, if detection module 3100 is detected partway to business The pressure test of system is suspended, and such as drillstem test personnel want to change business object to be tested or change test script or survey When examination personnel suspend the pressure test to operation system due to other reasonses, industry is directed to when detection module 3100 detects reception The recovery instruction of the pressure test of business system, and judge what login sessions information sessionID did not failed in judge module 3110 In the case of, the login sessions file that last login preheating can be loaded directly into by load-on module 3120 and is generated will log in meeting Talk about file in each login sessions information with<ID, sessionID>Form is re-loaded in memory mapping table.Thus, It can prevent the first generation module 320 from generating logging request again to re-start register to operation system to generate login Session information, it is to avoid the waste of resource.
The pressure test request unit of the operation system of the embodiment of the present application, after generation login sessions information, is surveyed multiple The accounts information and multiple login sessions information for trying account write to default file to generate login sessions file so as to industry After the pressure test of business system is suspended, when detect receive for operation system pressure test input recovery instruction, And login sessions information is not when failing, each login sessions information in login sessions file directly can be loaded onto memory mapping table In, it is to avoid the waste of resource, the practicality of pressure test device is improved, while being easy to dynamically adjust to operation system Pressure test plan, repeat logon operation when saving pressure test as much as possible.
In the description of the present application, it is to be understood that term " first ", " second " are only used for describing purpose, and can not It is interpreted as indicating or implies relative importance or the implicit quantity for indicating indicated technical characteristic.Thus, define " the One ", at least one this feature can be expressed or be implicitly included to the feature of " second ".In the description of the present application, " multiple " It is meant that at least two, such as two, three etc., unless otherwise specifically defined.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specific example ", Or the description of " some examples " etc. means to combine specific features, structure, material or the feature that the embodiment or example are described It is contained at least one embodiment of the application or example.In this manual, need not to the schematic representation of above-mentioned term Identical embodiment or example must be directed to.Moreover, specific features, structure, material or the feature of description can be with office Combined in an appropriate manner in one or more embodiments or example.In addition, in the case of not conflicting, this area Technical staff can be tied the not be the same as Example or the feature of example and non-be the same as Example or example described in this specification Close and combine.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes one Or more be used for executable instruction the step of realize specific logical function or process code module, fragment or part, And the scope of the preferred embodiment of the application includes other realization, wherein order that is shown or discussing can not be pressed, Including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be by the application's Embodiment person of ordinary skill in the field is understood.
It should be appreciated that each several part of the application can be realized with hardware, software, firmware or combinations thereof.In above-mentioned reality Apply in mode, software that multiple steps or method can be performed in memory and by suitable instruction execution system with storage or Firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardware Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal Discrete logic, the application specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA) is existing Field programmable gate array (FPGA) etc..
Those skilled in the art be appreciated that to realize all or part of step that above-described embodiment method is carried is can To instruct the hardware of correlation to complete by program, described program can be stored in a kind of computer-readable recording medium, The program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in the application each embodiment can be integrated in a processing module or each Individual unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated module was both It can be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.If the integrated module with The form of software function module realize and as independent production marketing or in use, can also be stored in one it is computer-readable Take in storage medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..Although having been shown and described above Embodiments herein, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as the limitation to the application, One of ordinary skill in the art can be changed to above-described embodiment, change, replacing and modification within the scope of application.

Claims (12)

1. a kind of method for testing pressure of operation system, it is characterised in that comprise the following steps:
Test account profile information is obtained, wherein, the test account profile information includes multiple test accounts Accounts information;
Multiple landing request informations are generated according to the test account profile information, and believed according to the multiple logging request Cease and logged in generate multiple login sessions information to the operation system;
The accounts information and multiple login sessions information of the multiple test account are preserved into memory mapping table;
When carrying out pressure test to the operation system, multiple business are generated according to the accounts information of the multiple test account Pressure test is asked;And
Multiple traffic pressure test request numbers are generated according to the multiple traffic pressure test request and the memory mapping table According to, and the multiple traffic pressure test request data are sent to the operation system to carry out pressure to the operation system Test.
2. the method for testing pressure of operation system as claimed in claim 1, it is characterised in that described to be surveyed the multiple The accounts information and multiple login sessions information for trying account are preserved into memory mapping table, including:
It is determined that each testing corresponding relation of the accounts information with each login sessions information of account;
According to the corresponding relation according to preset format by it is the multiple test account accounts information and multiple login sessions Information is preserved into the memory mapping table.
3. the method for testing pressure of operation system as claimed in claim 1, it is characterised in that described according to the multiple Traffic pressure test request and the memory mapping table generate multiple traffic pressure test request data, including:
Multiple and the multiple test account is searched from the memory mapping table according to the accounts information of the multiple test account The corresponding login sessions information of accounts information at family;
The multiple login sessions information corresponding with the accounts information of the multiple test account is added to each self-corresponding To generate the multiple traffic pressure test request data in the Cookie of traffic pressure test request.
4. the method for testing pressure of operation system as claimed in claim 1, it is characterised in that described according to described many Individual landing request information is logged in the operation system with after generating multiple login sessions information, in addition to:
Multiple heartbeat requests are periodically generated according to the accounts information of the multiple test account, and please by the multiple heartbeat Ask and send to the operation system to carry out the extension out-of-service time to the multiple login sessions information in the memory mapping table Operation.
5. the method for testing pressure of operation system as claimed in claim 1, it is characterised in that described according to described many Individual landing request information is logged in the operation system with after generating multiple login sessions information, in addition to:
The accounts information of the multiple test account is write to default file with multiple login sessions information and logs in meeting to generate Talk about file.
6. the method for testing pressure of operation system as claimed in claim 5, it is characterised in that detecting to the industry After the pressure test of business system is suspended, in addition to:
Detect whether to receive the recovery instruction inputted for the pressure test of the operation system;
If receiving the recovery instruction of the pressure test input for the operation system, judge in the memory mapping table The multiple login sessions information whether fail;
If the multiple login sessions information in the memory mapping table does not fail, load the login sessions file with Multiple login sessions information in the login sessions file are reloaded into the memory mapping table;
If the multiple login sessions information failure in the memory mapping table, again according to the test account configuration Fileinfo generates multiple landing request informations, and is logged according to the multiple landing request information to the operation system To generate multiple login sessions information.
7. a kind of pressure test device of operation system, it is characterised in that including:
Acquisition module, for obtaining test account profile information, wherein, the test account profile information includes The account information of multiple test accounts;
First generation module, for generating multiple landing request informations according to the test account profile information, and according to The multiple landing request information is logged in generate multiple login sessions information to the operation system;
Preserving module, for preserving to internal memory and reflecting the accounts information and multiple login sessions information of the multiple test account In firing table;
Second generation module, for when carrying out pressure test to the operation system, according to the account of the multiple test account Family information generates multiple traffic pressure test requests;
3rd generation module, for multiple according to the multiple traffic pressure test request and memory mapping table generation Traffic pressure test request data;And
Sending module, for the multiple traffic pressure test request data to be sent to the operation system with to the business System carries out pressure test.
8. the pressure test device of operation system as claimed in claim 7, it is characterised in that the preserving module includes:
Determining unit, accounts information and the corresponding relation of each login sessions information for determining each test account;
Storage unit, for according to the corresponding relation according to preset format by it is the multiple test account accounts information and Multiple login sessions information are preserved into the memory mapping table.
9. the pressure test device of operation system as claimed in claim 7, it is characterised in that the 3rd generation module bag Include:
Searching unit, for searching multiple and institute from the memory mapping table according to the accounts information of the multiple test account State the corresponding login sessions information of accounts information of multiple test accounts;
Generation unit, for the multiple login sessions information corresponding with the accounts information of the multiple test account to be added Into the Cookie of each self-corresponding traffic pressure test request to generate the multiple traffic pressure test request data.
10. the pressure test device of operation system as claimed in claim 7, it is characterised in that also include:
4th generation module, in first generation module according to the multiple landing request information to the operation system Logged in after generating multiple login sessions information, periodically to be generated according to the accounts information of the multiple test account Multiple heartbeat requests;
Out-of-service time extends module, for the multiple heartbeat request to be sent to the operation system to map the internal memory The multiple login sessions information in table carries out the operation of extension out-of-service time.
11. the pressure test device of operation system as claimed in claim 7, it is characterised in that also include:
5th generation module, in first generation module according to the multiple landing request information to the operation system Logged in after generating multiple login sessions information, by the accounts information and multiple login sessions of the multiple test account Information writes to default file to generate login sessions file.
12. the pressure test device of operation system as claimed in claim 11, it is characterised in that also include:
Detection module, for detecting after the pressure test to the operation system is suspended, detects whether to receive pin Recovery instruction to the pressure test input of the operation system;
Judge module, when the recovery for being inputted in the pressure test received for the operation system is instructed, judges described Whether the multiple login sessions information in memory mapping table fails;
Load-on module, for judging the memory mapping table in the judge module in the multiple login sessions information do not lose During effect, load the login sessions file to reload multiple login sessions information in the login sessions file to institute State in memory mapping table;
Wherein, what first generation module was additionally operable in the judge module judges the memory mapping table the multiple steps on When recording session information failure, again according to the multiple landing request informations of the test account profile information generation, and according to The multiple landing request information is logged in generate multiple login sessions information to the operation system.
CN201610136597.1A 2016-03-10 2016-03-10 Pressure testing method and device of business system Active CN107179986B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610136597.1A CN107179986B (en) 2016-03-10 2016-03-10 Pressure testing method and device of business system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610136597.1A CN107179986B (en) 2016-03-10 2016-03-10 Pressure testing method and device of business system

Publications (2)

Publication Number Publication Date
CN107179986A true CN107179986A (en) 2017-09-19
CN107179986B CN107179986B (en) 2020-09-08

Family

ID=59830617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610136597.1A Active CN107179986B (en) 2016-03-10 2016-03-10 Pressure testing method and device of business system

Country Status (1)

Country Link
CN (1) CN107179986B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483295A (en) * 2017-09-22 2017-12-15 武汉虹信通信技术有限责任公司 A kind of method of testing of network management system disposal ability
CN109348499A (en) * 2018-11-30 2019-02-15 北京奇安信科技有限公司 Pressure testing system and method
CN110035091A (en) * 2018-01-11 2019-07-19 杭州海康威视数字技术股份有限公司 Modify the method, apparatus and server of the session information in network information system
CN110196802A (en) * 2018-02-26 2019-09-03 财付通支付科技有限公司 A kind of test data processing method, device and server
CN110928771A (en) * 2019-10-30 2020-03-27 苏州浪潮智能科技有限公司 Method and system for timed automatic batch test of Rest interfaces
CN111209207A (en) * 2020-01-13 2020-05-29 中国铁道科学研究院集团有限公司电子计算技术研究所 Performance test method, device and system of passenger ticket system
CN111881057A (en) * 2020-08-06 2020-11-03 中国工商银行股份有限公司 Test method, test device, test system, and medium
CN112433933A (en) * 2020-04-09 2021-03-02 上海哔哩哔哩科技有限公司 Method and equipment for automatically testing interface

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882105A (en) * 2010-06-01 2010-11-10 华南理工大学 A Method of Testing Response Time in Concurrent Environment of Web Pages
CN102479146A (en) * 2010-11-30 2012-05-30 金蝶软件(中国)有限公司 Scene test monitoring method and device and scene test monitoring system
CN102957728A (en) * 2011-08-26 2013-03-06 华为终端有限公司 Management session establishment method, customer-premises equipment and automatic configuration server
CN103475630A (en) * 2012-06-08 2013-12-25 深圳中兴网信科技有限公司 Session preservation method and apparatus thereof
CN103634159A (en) * 2012-08-24 2014-03-12 百度在线网络技术(北京)有限公司 Registration simulation-based flow playback method and apparatus
US20150088959A1 (en) * 2013-09-23 2015-03-26 Infosys Limited Method and system for automated transaction analysis

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882105A (en) * 2010-06-01 2010-11-10 华南理工大学 A Method of Testing Response Time in Concurrent Environment of Web Pages
CN102479146A (en) * 2010-11-30 2012-05-30 金蝶软件(中国)有限公司 Scene test monitoring method and device and scene test monitoring system
CN102957728A (en) * 2011-08-26 2013-03-06 华为终端有限公司 Management session establishment method, customer-premises equipment and automatic configuration server
CN103475630A (en) * 2012-06-08 2013-12-25 深圳中兴网信科技有限公司 Session preservation method and apparatus thereof
CN103634159A (en) * 2012-08-24 2014-03-12 百度在线网络技术(北京)有限公司 Registration simulation-based flow playback method and apparatus
US20150088959A1 (en) * 2013-09-23 2015-03-26 Infosys Limited Method and system for automated transaction analysis

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483295B (en) * 2017-09-22 2020-12-01 武汉虹信科技发展有限责任公司 Method for testing processing capacity of network management system
CN107483295A (en) * 2017-09-22 2017-12-15 武汉虹信通信技术有限责任公司 A kind of method of testing of network management system disposal ability
CN110035091B (en) * 2018-01-11 2021-10-22 杭州海康威视数字技术股份有限公司 Method, device and server for modifying session information in network information system
CN110035091A (en) * 2018-01-11 2019-07-19 杭州海康威视数字技术股份有限公司 Modify the method, apparatus and server of the session information in network information system
CN110196802A (en) * 2018-02-26 2019-09-03 财付通支付科技有限公司 A kind of test data processing method, device and server
CN110196802B (en) * 2018-02-26 2024-01-12 财付通支付科技有限公司 Test data processing method, device and server
CN109348499A (en) * 2018-11-30 2019-02-15 北京奇安信科技有限公司 Pressure testing system and method
CN109348499B (en) * 2018-11-30 2022-02-25 奇安信科技集团股份有限公司 Stress testing system and method
CN110928771A (en) * 2019-10-30 2020-03-27 苏州浪潮智能科技有限公司 Method and system for timed automatic batch test of Rest interfaces
CN111209207A (en) * 2020-01-13 2020-05-29 中国铁道科学研究院集团有限公司电子计算技术研究所 Performance test method, device and system of passenger ticket system
CN111209207B (en) * 2020-01-13 2023-07-18 中国铁道科学研究院集团有限公司电子计算技术研究所 Performance test method, device and system of passenger ticket system
CN112433933A (en) * 2020-04-09 2021-03-02 上海哔哩哔哩科技有限公司 Method and equipment for automatically testing interface
CN111881057A (en) * 2020-08-06 2020-11-03 中国工商银行股份有限公司 Test method, test device, test system, and medium
CN111881057B (en) * 2020-08-06 2023-08-15 中国工商银行股份有限公司 Test method, test device, test system and medium

Also Published As

Publication number Publication date
CN107179986B (en) 2020-09-08

Similar Documents

Publication Publication Date Title
CN107179986A (en) The method for testing pressure and device of operation system
CN112073269B (en) Block chain network testing method, device, server and storage medium
US10997063B1 (en) System testing from production transactions
CN104765678B (en) The method and device tested the application on mobile terminal device
US8291068B2 (en) Automatic protocol detection
CN109617759A (en) Block catenary system stability test method, apparatus, equipment and storage medium
CN105991412B (en) Information push method and device
CN107453929B (en) Cluster system self-construction method and device and cluster system
US11086752B2 (en) Methods, systems, and computer readable media for vendor-neutral testing and scoring of systems under test
CN108459850B (en) Method, device and system for generating test script
CN106357449A (en) zedis distributed type buffer method
JP2021518026A (en) A system that determines performance based on the entropy value
CN109800160A (en) Cluster server fault testing method and relevant apparatus in machine learning system
CN111611140B (en) Report verification method and device for buried point data, electronic equipment and storage medium
CN111258913A (en) Automatic algorithm testing method and device, computer system and readable storage medium
CN111176803A (en) Business processing method, device, server and storage medium
CN109753418A (en) Performance test methods, device, computer equipment and storage medium
KR20130030037A (en) Test analysis system of network and analysis method thereof
CN109739711A (en) A kind of interface test method, device, equipment and storage medium
CN106776323B (en) Application testing method and device
CN113656313A (en) Automated test processing method and device
CN109831355A (en) Test method, test device and medium
CN109388420A (en) Application upgrade test method, device, computer equipment and storage medium
CN106302459A (en) Networking operational approach and device
CN110716730A (en) Gray scale distribution method, device, equipment and computer readable 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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201013

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201013

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.