CN109669867A - Test device, automated testing method and computer readable storage medium - Google Patents

Test device, automated testing method and computer readable storage medium Download PDF

Info

Publication number
CN109669867A
CN109669867A CN201811513480.6A CN201811513480A CN109669867A CN 109669867 A CN109669867 A CN 109669867A CN 201811513480 A CN201811513480 A CN 201811513480A CN 109669867 A CN109669867 A CN 109669867A
Authority
CN
China
Prior art keywords
server
result
test program
communication connection
database
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
CN201811513480.6A
Other languages
Chinese (zh)
Other versions
CN109669867B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811513480.6A priority Critical patent/CN109669867B/en
Publication of CN109669867A publication Critical patent/CN109669867A/en
Application granted granted Critical
Publication of CN109669867B publication Critical patent/CN109669867B/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/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • 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)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to a kind of functional test technology, a kind of test device, automated testing method and computer readable storage medium are disclosed.The present invention runs predetermined server connecting test program, obtains and parse the operation result of the server connecting test program, when the operation result is unsatisfactory for the first preset condition, issues prompt information;Timing operation is predetermined to apply test program, obtains and parse the operation result using test program, when the operation result is unsatisfactory for the second preset condition, issues prompt information;Predetermined database operation test program is run, obtains and the operation result for parsing the database operation test program issues prompt information when the operation result is unsatisfactory for third preset condition.Compared to the prior art, the present invention realizes the automatic test to server each in system and database.

Description

Test device, automated testing method and computer readable storage medium
Technical field
The present invention relates to computer and network technology field, in particular to a kind of test device, automated testing method and Computer readable storage medium.
Background technique
Currently, the continuous expansion with informatization in terms of dynamics, range, depth and frequency, each enterprise or government It is both needed to business service to provide the public service of Life cycle, full-service process to society as a whole, therefore, occurs A large amount of common platform class system.
Due to having gathered multiple functions, common platform class system generally comprises the complicated multiple devices of deployment (for example, multiple Server and database), the operation conditions of every equipment all may generate large effect to the operation conditions of whole system.But Currently, the operating status for still lacking each equipment in a kind of pair of system carries out automatically-monitored or test method, people is safeguarded Member cannot have found system mistake at the first time.
Therefore, how to realize becomes a urgent problem to be solved to the automatic test of system.
Summary of the invention
The main object of the present invention is to provide a kind of test device, automated testing method and computer-readable storage medium Matter, it is intended to realize the automatic test to system.
To achieve the above object, the present invention proposes a kind of test device, and the test device includes memory and processor, It is stored with automatic test program on the memory, following step is realized when institute's automatic test program is executed by the processor It is rapid:
First testing procedure: running predetermined server connecting test program, obtains and parses the server company The operation result for connecing test program, when the operation result of the server connecting test program is unsatisfactory for the first preset condition, Issue prompt information;
Second testing procedure: after establishing communication connection with server, timing operation is predetermined to apply test program, The operation result using test program is obtained and parses, when the operation result using test program is unsatisfactory for second in advance If when condition, issuing prompt information;
Third testing procedure: communicating to connect with Database, runs predetermined database operation test program, obtains The operation result for taking and parsing the database operation test program, when the database runs the operation result of test program not When meeting third preset condition, prompt information is issued.
Preferably, the processor executes the automatic test program, also performs the steps of
Whether there is newly-increased server log information in real time or in timing detecting server, when detecting, from the clothes Critical field is extracted in business device log information;
According to the critical field of extraction, type of error is determined;
According to the mapping relations between predetermined type of error and default script, inquired in all default scripts each The corresponding default script of a type of error;
Run all default scripts inquired.
Preferably, first testing procedure includes:
Simulant-client sends multiple communication connection requests to server, and obtains the connection knot of each communication connection request Fruit, the connection result include successful connection and connection failure;
According to the connection result, communication connection success rate is calculated, and using the communication connection success rate as the clothes The operation result for device connecting test program of being engaged in;Alternatively, calculating communication connection failure rate, and will be described according to the connection result Communicate to connect operation result of the failure rate as the server connecting test program;
Judge whether the operation result of the server connecting test program meets the first preset condition, if it is not, then issuing Prompt information, wherein when the operation result of the server connecting test program is the communication connection success rate, described the One preset condition is that the communication connection success rate is greater than the first preset threshold, when the operation of the server connecting test program When being as a result the communication connection failure rate, first preset condition is the communication connection failure rate less than the second default threshold Value.
Preferably, second testing procedure includes:
After establishing communication connection with server, simulant-client invoking server logs in interface, and sends out to server Send the user's logging request for carrying log-on message;
The login result that server returns is received, the login result includes logining successfully and login failure;
When it is described log in result be log in unsuccessfully when, issue prompt information.
Preferably, the third testing procedure includes:
It is communicated to connect with Database, calls the query interface of database, and send inquiry request to database;
Receive the query result that database returns;
Judge whether the query result is identical as default result;
When the query result and default result difference, prompt information is issued.
In addition, to achieve the above object, the present invention also proposes a kind of automated testing method, it is suitable for test device, it should Method includes:
First testing procedure: running predetermined server connecting test program, obtains and parses the server company The operation result for connecing test program, when the operation result of the server connecting test program is unsatisfactory for the first preset condition, Issue prompt information;
Second testing procedure: after establishing communication connection with server, timing operation is predetermined to apply test program, The operation result using test program is obtained and parses, when the operation result using test program is unsatisfactory for second in advance If when condition, issuing prompt information;
Third testing procedure: communicating to connect with Database, runs predetermined database operation test program, obtains The operation result for taking and parsing the database operation test program, when the database runs the operation result of test program not When meeting third preset condition, prompt information is issued.
Preferably, this method further include:
Whether there is newly-increased server log information in real time or in timing detecting server, when detecting, from the clothes Critical field is extracted in business device log information;
According to the critical field of extraction, type of error is determined;
According to the mapping relations between predetermined type of error and default script, inquired in all default scripts each The corresponding default script of a type of error;
Run all default scripts inquired.
Preferably, first testing procedure includes:
Simulant-client sends multiple communication connection requests to server, and obtains the connection knot of each communication connection request Fruit, the connection result include successful connection and connection failure;
According to the connection result, communication connection success rate is calculated, and using the communication connection success rate as the clothes The operation result for device connecting test program of being engaged in;Alternatively, calculating communication connection failure rate, and will be described according to the connection result Communicate to connect operation result of the failure rate as the server connecting test program;
Judge whether the operation result of the server connecting test program meets the first preset condition, if it is not, then issuing Prompt information, wherein when the operation result of the server connecting test program is the communication connection success rate, described the One preset condition is that the communication connection success rate is greater than the first preset threshold, when the operation of the server connecting test program When being as a result the communication connection failure rate, first preset condition is the communication connection failure rate less than the second default threshold Value.
Preferably, second testing procedure includes:
After establishing communication connection with server, simulant-client invoking server logs in interface, and sends out to server Send the user's logging request for carrying log-on message;
The login result that server returns is received, the login result includes logining successfully and login failure;
When it is described log in result be log in unsuccessfully when, issue prompt information;
The third testing procedure includes:
It is communicated to connect with Database, calls the query interface of database, and send inquiry request to database;
Receive the query result that database returns;
Judge whether the query result is identical as default result;
When the query result and default result difference, prompt information is issued.
In addition, to achieve the above object, the present invention also proposes a kind of computer readable storage medium, described computer-readable Storage medium is stored with automatic test program, and the automatic test program can be executed by least one processor, so that institute State the step of at least one processor executes automated testing method as described in any one of the above embodiments.
The present invention runs predetermined server connecting test program, obtains and parses the server connecting test journey The operation result of sequence issues prompt information when the operation result is unsatisfactory for the first preset condition;Timing operation is predetermined Using test program, the operation result using test program is obtained and parsed, is preset when the operation result is unsatisfactory for second When condition, prompt information is issued;Predetermined database operation test program is run, obtain and parses the database operation The operation result of test program issues prompt information when the operation result is unsatisfactory for third preset condition.Compared to existing skill Art, the present invention test journey by real-time or timing operation server connecting test program, using test program and database operation Sequence realizes the automatic test to server each in system and database.In addition, operation result of the present invention in test program When being unsatisfactory for preset condition, prompt information is issued, facilitates system maintenance personnel and timely finds and processing system mistake.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with The structure shown according to these attached drawings obtains other attached drawings.
Fig. 1 is the optional application environment schematic diagram of each embodiment one of the invention;
Fig. 2 is the running environment schematic diagram of one embodiment of automatic test program of the present invention;
Fig. 3 is the Program modual graph of one embodiment of automatic test program of the present invention;
Fig. 4 is the flow diagram of one embodiment of automated testing method of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
The principle and features of the present invention will be described below with reference to the accompanying drawings, and the given examples are served only to explain the present invention, and It is non-to be used to limit the scope of the invention.
As shown in fig.1, being the optional application environment schematic diagram of each embodiment one of the invention.
In the present embodiment, present invention can apply to include but are not limited to, test device 1, server 2, database 3 Application environment in.It can be connected by network communication between the test device 1, server 2 and database 3.The network can be with It is intranet (Intranet), internet (Internet), global system for mobile communications (Global System of Mobile communication, GSM), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), 4G network, 5G network, bluetooth (Bluetooth), the wirelessly or non-wirelessly network such as Wi-Fi.
In addition, the quantity of test device 1, server 2 and database 3 may each be one or more in the application environment Platform, the present embodiment are not construed as limiting this.
In the following, above-mentioned application environment and relevant device will be based on, each embodiment of the invention is proposed.
The present invention proposes a kind of automatic test program.
Referring to Fig. 2, being the running environment schematic diagram of 10 1 embodiment of automatic test program of the present invention.
In the present embodiment, automatic test program 10 is installed and is run in test device 1.Test device 1 can be Desktop PC, notebook, palm PC etc. calculate equipment.The test device 1 may include, but be not limited only to, memory 11, Processor 12 and display 13.Fig. 1 illustrates only the test device 1 with component 11-13, it should be understood that simultaneously should not Realistic to apply all components shown, the implementation that can be substituted is more or less component.
Memory 11 can be the internal storage unit of test device 1 in some embodiments, such as the test device 1 Hard disk or memory.Memory 11 is also possible to the External memory equipment of test device 1, such as test dress in further embodiments Set the plug-in type hard disk being equipped on 1, intelligent memory card (SmartMedia Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 11 can also be both interior including test device 1 Portion's storage unit also includes External memory equipment.Memory 11 is for storing the application software for being installed on test device 1 and all kinds of Data, such as the program code of automatic test program 10 etc..Memory 11 can be also used for temporarily storing exported or The data that person will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chips, program code or processing data for being stored in run memory 11, example Such as execute automatic test program 10.
Display 13 can be in some embodiments light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Display 13 is for being shown in The information that is handled in test device 1 and for showing visual user interface.The component 11-13 of test device 1 passes through journey Sequence bus is in communication with each other.
Referring to Fig. 3, being the Program modual graph of 10 1 embodiment of automatic test program of the present invention.In the present embodiment, Automatic test program 10 can be divided into one or more modules, one or more module is stored in memory 11 In, and it is performed by one or more processors (the present embodiment is processor 12), to complete the present invention.For example, in Fig. 3, Automatic test program 10 can be divided into the first test module 101, the second test module 102 and third test module 103. The so-called module of the present invention is the series of computation machine program instruction section for referring to complete specific function, than program more suitable for retouching State implementation procedure of the automatic test program 10 in test device 1, in which:
First test module 101, for running predetermined server connecting test program, obtaining and parsing the clothes The operation result for device connecting test program of being engaged in, when the operation result of the server connecting test program is unsatisfactory for the first default item When part, prompt information is issued.
For example, 101 simulant-client of the first test module sends multiple communication connection requests to server 2, and obtain each The connection result of a communication connection request (connection result includes successful connection and connection failure).
Then, according to the connection result, communication connection success rate is calculated, and using the communication connection success rate as institute State the operation result of server connecting test program;Alternatively, calculating communication connection failure rate, and will according to the connection result Operation result of the communication connection failure rate as the server connecting test program.
Wherein, calculating the step of communicating to connect success rate includes:
The quantity of the connection result of all successful connections is counted, and counts the total quantity of connection result, calculates successful connection Connection result quantity and connection result total quantity ratio, the ratio be communicate to connect success rate.
Calculating the step of communicating to connect failure rate includes:
The quantity of the connection result of all connection failures is counted, and counts the total quantity of connection result, calculates connection failure Connection result quantity and connection result total quantity ratio, the ratio be communicate to connect failure rate.
Finally, judging whether the operation result of the server connecting test program meets the first preset condition, if it is not, then It determines test crash, and issues prompt information, if so, determination is successfully tested.
Wherein, when the operation result of the server connecting test program is the communication connection success rate, described the One preset condition is that the communication connection success rate is greater than the first preset threshold, when the operation of the server connecting test program When being as a result the communication connection failure rate, first preset condition is the communication connection failure rate less than the second default threshold Value.
It is described issue prompt information mode include: Email, short message, instant message (instant message include text i.e. When message and time speech information) etc..
Second test module 102 is used for after establishing communication connection with server 2, the predetermined application of timing operation Test program obtains and parses the operation result using test program, when the operation result using test program not When meeting the second preset condition, prompt information is issued.
It is described to be used to test the application program of server 2 using test program in the present embodiment.
For example, after establishing communication connection with server 2,102 simulant-client invoking server 2 of the second test module Interface is logged in, and sends the user's logging request for carrying log-on message to server 2.
Then, the login result that server 2 returns is received.Wherein, the login result includes logining successfully and logging in mistake It loses.When it is described to log in result be to log in unsuccessfully when, determine test crash, and issue prompt information (for example, with Email, short The modes such as letter, instant message are sent).When it is described log in result be log in successfully when, determination be successfully tested.
In the present embodiment, the second test module 102 also other kinds of interface of analog client call, to test clothes The other function of business device 2.
Third test module 103 is communicated to connect for establishing with database 3, is run predetermined database operation and is surveyed Program is tried, the operation result of the database operation test program is obtained and parse, when the operation knot using test program When fruit is unsatisfactory for third preset condition, prompt information is issued.
For example, third test module 103 and database 3 are established and communicated to connect, the query interface of database 3 is called, concurrently Send inquiry request (inquiry request can carry querying condition) to database 3.
Then, the query result that database 3 returns is received.
Next, it is determined that whether the query result is identical as default result.
When the query result and default result difference, test crash is determined, and issue prompt information (for example, with electricity The modes such as sub- mail, short message, instant message are sent).When the query result is identical as default result, determination is successfully tested.
Compared to the prior art, the present invention passes through real-time or timing operation server connecting test program, using test journey Sequence and database run test program, realize the automatic test to server 2 each in system and database 3.In addition, this hair It is bright when the operation result of test program is unsatisfactory for preset condition, issue prompt information, facilitate system maintenance personnel timely It was found that and processing system mistake.
Further, in this embodiment the automatic test program 10 further includes detecting module, determining module, operation mould Block (not shown), in which:
Detecting module works as detecting for whether having newly-increased server log information in real time or in timing detecting server 2 Then, critical field is extracted from the server log information.
The server log information includes access record, error logging (for recording error message when operation) etc.. Error logging in the server log information not only to 2 internal operation of server when error message record, can also to The device of the interaction of server 2 or the run-time error of equipment (for example, database 3) are recorded.
Determining module determines type of error for the critical field according to extraction.
The mode of the determining type of error includes at least the following two kinds scheme.
Scheme one:
According to the mapping relations between predetermined critical field and type of error, determine that the critical field extracted is corresponding Type of error.
Mapping relations between critical field and type of error can refer to shown in table one.
Table one:
Above-mentioned example is only used for help and understands, keyword and keyword and mistake can be arranged according to specific application scenarios in user The accidentally mapping relations between type.
Scheme two:
It is default after extracting the first preset keyword section (for example, " force shutdown successfully ") In duration (for example, ten minutes), judge whether to extract the second preset keyword section (for example, " STARTING "), if it is not, then really Determining type of error is that server application starting is abnormal.
Module is run, for according to the mapping relations between predetermined type of error and default script, in all pre- If inquiring the corresponding default script of each type of error in script.
Mapping relations between type of error and default script can refer to shown in table two.
Table two:
Type of error Default script
Data exception Nothing
Insufficient disk space ClearWlsStg.sh script
Database is abnormal Database restarts script
Server application starting is abnormal Reset.sh script
The clearWlsStg.sh script is used for defrag space.
The database restarts script for restarting database 3.
The reset.sh script is used to restart the application program of server 2, and after restarting server 2, from update It is inquired in server log information default third critical field (such as " Server state changed to STARTING "), If inquiring, the normal information of the application recovery of feedback server 2.
Step S70 runs all default scripts inquired.
The present embodiment by detecting server log information, can automatic identification type of error (i.e. fault type), and pass through Default script is run, realization is automatically repaired partial error, advantageously reduces the consumption of human resources, improves the available of system Property and stability.
Further it is proposed that a kind of automated testing method, is suitable for test device.
As shown in figure 4, Fig. 4 is the flow diagram of one embodiment of automated testing method of the present invention.
In the present embodiment, this method comprises:
Step S10 runs predetermined server connecting test program, obtains and parses the server connecting test The operation result of program, when the operation result of the server connecting test program is unsatisfactory for the first preset condition, sending is mentioned Show information.
For example, 1 simulant-client of test device sends multiple communication connection requests to server 2, and obtain each communication The connection result of connection request (connection result includes successful connection and connection failure).
Then, according to the connection result, communication connection success rate is calculated, and using the communication connection success rate as institute State the operation result of server connecting test program;Alternatively, calculating communication connection failure rate, and will according to the connection result Operation result of the communication connection failure rate as the server connecting test program.
Wherein, calculating the step of communicating to connect success rate includes:
The quantity of the connection result of all successful connections is counted, and counts the total quantity of connection result, calculates successful connection Connection result quantity and connection result total quantity ratio, the ratio be communicate to connect success rate.
Calculating the step of communicating to connect failure rate includes:
The quantity of the connection result of all connection failures is counted, and counts the total quantity of connection result, calculates connection failure Connection result quantity and connection result total quantity ratio, the ratio be communicate to connect failure rate.
Finally, judging whether the operation result of the server connecting test program meets the first preset condition, if it is not, then It determines test crash, and issues prompt information, if so, determination is successfully tested.
Wherein, when the operation result of the server connecting test program is the communication connection success rate, described the One preset condition is that the communication connection success rate is greater than the first preset threshold, when the operation of the server connecting test program When being as a result the communication connection failure rate, first preset condition is the communication connection failure rate less than the second default threshold Value.
It is described issue prompt information mode include: Email, short message, instant message (instant message include text i.e. When message and time speech information) etc..
Step S20, after establishing communication connection with server 2, timing operation is predetermined to apply test program, obtains And the operation result using test program is parsed, when the operation result using test program is unsatisfactory for the second default item When part, prompt information is issued.
It is described to be used to test the application program of server 2 using test program in the present embodiment.
For example, 1 logging in for simulant-client invoking server 2 of test device connects after establishing communication connection with server 2 Mouthful, and the user's logging request for carrying log-on message is sent to server 2.
Then, the login result that server 2 returns is received.Wherein, the login result includes logining successfully and logging in mistake It loses.When it is described to log in result be to log in unsuccessfully when, determine test crash, and issue prompt information (for example, with Email, short The modes such as letter, instant message are sent).When it is described log in result be log in successfully when, determination be successfully tested.
In the present embodiment, the also other kinds of interface of analog client call of test device 1, with testing service device 2 Other function.
Step S30 is established with database 3 and is communicated to connect, and is run predetermined database operation test program, is obtained simultaneously The operation result for parsing the database operation test program, when the operation result of database operation test program is unsatisfactory for When third preset condition, prompt information is issued.
For example, test device 1 and database 3 are established and communicated to connect, the query interface of database 3 is called, and sends inquiry Request (inquiry request can carry querying condition) to database 3.
Then, the query result that database 3 returns is received.
Next, it is determined that whether the query result is identical as default result.
When the query result and default result difference, test crash is determined, and issue prompt information (for example, with electricity The modes such as sub- mail, short message, instant message are sent).When the query result is identical as default result, determination is successfully tested.
Compared to the prior art, the present invention passes through real-time or timing operation server connecting test program, using test journey Sequence and database run test program, realize the automatic test to server 2 each in system and database 3.In addition, this hair It is bright when the operation result of test program is unsatisfactory for preset condition, issue prompt information, facilitate system maintenance personnel timely It was found that and processing system mistake.
Further, in this embodiment this method further includes step S40~S70 (not shown), in which:
Whether step S40 has newly-increased server log information in real time or in timing detecting server 2, when detecting, Critical field is extracted from the server log information.
The server log information includes access record, error logging (for recording error message when operation) etc.. Error logging in the server log information not only to 2 internal operation of server when error message record, can also to The device of the interaction of server 2 or the run-time error of equipment (for example, database 3) are recorded.
Step S50 determines type of error according to the critical field of extraction.
The mode of the determining type of error includes at least the following two kinds scheme.
Scheme one:
According to the mapping relations between predetermined critical field and type of error, determine that the critical field extracted is corresponding Type of error.
Mapping relations between critical field and type of error can refer to shown in table one.
Table one:
Above-mentioned example is only used for help and understands, keyword and keyword and mistake can be arranged according to specific application scenarios in user The accidentally mapping relations between type.
Scheme two:
It is default after extracting the first preset keyword section (for example, " force shutdown successfully ") In duration (for example, ten minutes), judge whether to extract the second preset keyword section (for example, " STARTING "), if it is not, then really Determining type of error is that server application starting is abnormal.
Step S60, according to the mapping relations between predetermined type of error and default script, in all default scripts It is middle to inquire the corresponding default script of each type of error.
Mapping relations between type of error and default script can refer to shown in table two.
Table two:
Type of error Default script
Data exception Nothing
Insufficient disk space ClearWlsStg.sh script
Database is abnormal Database restarts script
Server application starting is abnormal Reset.sh script
The clearWlsStg.sh script is used for defrag space.
The database restarts script for restarting database 3.
The reset.sh script is used to restart the application program of server 2, and after restarting server 2, from update It is inquired in server log information default third critical field (such as " Server state changed to STARTING "), If inquiring, the normal information of the application recovery of feedback server 2.
Step S70 runs all default scripts inquired.
The present embodiment by detecting server log information, can automatic identification type of error (i.e. fault type), and pass through Default script is run, realization is automatically repaired partial error, advantageously reduces the consumption of human resources, improves the available of system Property and stability.
Further, the present invention also proposes that a kind of computer readable storage medium, the computer readable storage medium are deposited Contain automatic test program, the automatic test program can be executed by least one processor so that it is described at least one Processor executes the automated testing method in any of the above-described embodiment.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all at this Under the inventive concept of invention, using equivalent structure transformation made by description of the invention and accompanying drawing content, or directly/use indirectly It is included in other related technical areas in scope of patent protection of the invention.

Claims (10)

1. a kind of test device, the test device includes memory and processor, which is characterized in that is stored on the memory There is automatic test program, the automatic test program realizes following steps when being executed by the processor:
First testing procedure: running predetermined server connecting test program, obtains and parses the server connection and surveys The operation result for trying program is issued when the operation result of the server connecting test program is unsatisfactory for the first preset condition Prompt information;
Second testing procedure: after establishing communication connection with server, timing operation is predetermined to apply test program, obtains And the operation result using test program is parsed, when the operation result using test program is unsatisfactory for the second default item When part, prompt information is issued;
Third testing procedure: communicating to connect with Database, runs predetermined database operation test program, obtains simultaneously The operation result for parsing the database operation test program, when the operation result of database operation test program is unsatisfactory for When third preset condition, prompt information is issued.
2. test device as described in claim 1, which is characterized in that the processor executes the automatic test program, Also perform the steps of
Whether there is newly-increased server log information in real time or in timing detecting server, when detecting, from the server Critical field is extracted in log information;
According to the critical field of extraction, type of error is determined;
According to the mapping relations between predetermined type of error and default script, each mistake is inquired in all default scripts The accidentally corresponding default script of type;
Run all default scripts inquired.
3. test device as claimed in claim 1 or 2, which is characterized in that first testing procedure includes:
Simulant-client sends multiple communication connection requests to server, and obtains the connection result of each communication connection request, The connection result includes successful connection and connection failure;
According to the connection result, communication connection success rate is calculated, and using the communication connection success rate as the server The operation result of connecting test program;Alternatively, according to the connection result, communication connection failure rate is calculated, and by the communication Operation result of the connection failure rate as the server connecting test program;
Judge whether the operation result of the server connecting test program meets the first preset condition, if it is not, then issuing prompt Information, wherein when the operation result of the server connecting test program is the communication connection success rate, described first is pre- If condition is that the communication connection success rate is greater than the first preset threshold, when the operation result of the server connecting test program When for the communication connection failure rate, first preset condition is the communication connection failure rate less than the second preset threshold.
4. test device as claimed in claim 1 or 2, which is characterized in that second testing procedure includes:
After establishing communication connection with server, simulant-client invoking server logs in interface, and takes to server transmission User's logging request with log-on message;
The login result that server returns is received, the login result includes logining successfully and login failure;
When it is described log in result be log in unsuccessfully when, issue prompt information.
5. test device as claimed in claim 1 or 2, which is characterized in that the third testing procedure includes:
It is communicated to connect with Database, calls the query interface of database, and send inquiry request to database;
Receive the query result that database returns;
Judge whether the query result is identical as default result;
When the query result and default result difference, prompt information is issued.
6. a kind of automated testing method is suitable for test device, which is characterized in that this method comprises:
First testing procedure: running predetermined server connecting test program, obtains and parses the server connection and surveys The operation result for trying program is issued when the operation result of the server connecting test program is unsatisfactory for the first preset condition Prompt information;
Second testing procedure: after establishing communication connection with server, timing operation is predetermined to apply test program, obtains And the operation result using test program is parsed, when the operation result using test program is unsatisfactory for the second default item When part, prompt information is issued;
Third testing procedure: communicating to connect with Database, runs predetermined database operation test program, obtains simultaneously The operation result for parsing the database operation test program, when the operation result of database operation test program is unsatisfactory for When third preset condition, prompt information is issued.
7. automated testing method as claimed in claim 6, which is characterized in that this method further include:
Whether there is newly-increased server log information in real time or in timing detecting server, when detecting, from the server Critical field is extracted in log information;
According to the critical field of extraction, type of error is determined;
According to the mapping relations between predetermined type of error and default script, each mistake is inquired in all default scripts The accidentally corresponding default script of type;
Run all default scripts inquired.
8. automated testing method as claimed in claims 6 or 7, which is characterized in that first testing procedure includes:
Simulant-client sends multiple communication connection requests to server, and obtains the connection result of each communication connection request, The connection result includes successful connection and connection failure;
According to the connection result, communication connection success rate is calculated, and using the communication connection success rate as the server The operation result of connecting test program;Alternatively, according to the connection result, communication connection failure rate is calculated, and by the communication Operation result of the connection failure rate as the server connecting test program;
Judge whether the operation result of the server connecting test program meets the first preset condition, if it is not, then issuing prompt Information, wherein when the operation result of the server connecting test program is the communication connection success rate, described first is pre- If condition is that the communication connection success rate is greater than the first preset threshold, when the operation result of the server connecting test program When for the communication connection failure rate, first preset condition is the communication connection failure rate less than the second preset threshold.
9. automated testing method as claimed in claims 6 or 7, which is characterized in that second testing procedure includes:
After establishing communication connection with server, simulant-client invoking server logs in interface, and takes to server transmission User's logging request with log-on message;
The login result that server returns is received, the login result includes logining successfully and login failure;
When it is described log in result be log in unsuccessfully when, issue prompt information;
The third testing procedure includes:
It is communicated to connect with Database, calls the query interface of database, and send inquiry request to database;
Receive the query result that database returns;
Judge whether the query result is identical as default result;
When the query result and default result difference, prompt information is issued.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has automation to survey Program is tried, the automatic test program can be executed by least one processor, so that at least one described processor executes such as The step of automated testing method described in any one of claim 6-9.
CN201811513480.6A 2018-12-11 2018-12-11 Test apparatus, automated test method, and computer-readable storage medium Active CN109669867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811513480.6A CN109669867B (en) 2018-12-11 2018-12-11 Test apparatus, automated test method, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811513480.6A CN109669867B (en) 2018-12-11 2018-12-11 Test apparatus, automated test method, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN109669867A true CN109669867A (en) 2019-04-23
CN109669867B CN109669867B (en) 2024-03-12

Family

ID=66143694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811513480.6A Active CN109669867B (en) 2018-12-11 2018-12-11 Test apparatus, automated test method, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN109669867B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783677A (en) * 2019-11-04 2021-05-11 北京京东尚科信息技术有限公司 Method and device for monitoring service abnormity

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090122665A (en) * 2008-05-26 2009-12-01 대진대학교 산학협력단 A test system for handset applications using test libraries and the method thereof
CN103902429A (en) * 2012-12-26 2014-07-02 北京新媒传信科技有限公司 Early warning method, sever and system in automated test
CN105718369A (en) * 2016-01-19 2016-06-29 国家电网公司 Computer software test abnormity processing system and test method
CN106549824A (en) * 2016-10-09 2017-03-29 武汉斗鱼网络科技有限公司 A kind of system and method for test software and server connective stability
CN107704398A (en) * 2017-11-01 2018-02-16 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment
CN108009087A (en) * 2017-11-29 2018-05-08 广州品唯软件有限公司 Data library test method, device and computer-readable recording medium
CN108052451A (en) * 2017-12-26 2018-05-18 网易(杭州)网络有限公司 Test method, system, test server, test terminal and storage medium
CN108519943A (en) * 2018-03-06 2018-09-11 平安科技(深圳)有限公司 Testing and control and test execution device, method and computer storage media

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090122665A (en) * 2008-05-26 2009-12-01 대진대학교 산학협력단 A test system for handset applications using test libraries and the method thereof
CN103902429A (en) * 2012-12-26 2014-07-02 北京新媒传信科技有限公司 Early warning method, sever and system in automated test
CN105718369A (en) * 2016-01-19 2016-06-29 国家电网公司 Computer software test abnormity processing system and test method
CN106549824A (en) * 2016-10-09 2017-03-29 武汉斗鱼网络科技有限公司 A kind of system and method for test software and server connective stability
CN107704398A (en) * 2017-11-01 2018-02-16 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment
CN108009087A (en) * 2017-11-29 2018-05-08 广州品唯软件有限公司 Data library test method, device and computer-readable recording medium
CN108052451A (en) * 2017-12-26 2018-05-18 网易(杭州)网络有限公司 Test method, system, test server, test terminal and storage medium
CN108519943A (en) * 2018-03-06 2018-09-11 平安科技(深圳)有限公司 Testing and control and test execution device, method and computer storage media

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王游;冯曙明;何金陵;方泉;: "基于脚本的流程自适应自动化测试研究", 计算机与现代化, no. 02, 15 February 2015 (2015-02-15), pages 98 - 103 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783677A (en) * 2019-11-04 2021-05-11 北京京东尚科信息技术有限公司 Method and device for monitoring service abnormity

Also Published As

Publication number Publication date
CN109669867B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
CN107453960B (en) Method, device and system for processing test data in service test
CN107451040B (en) Method and device for positioning fault reason and computer readable storage medium
CN108334614B (en) Data updating method, system and storage medium
CN110442498B (en) Abnormal data node positioning method and device, storage medium and computer equipment
US8234633B2 (en) Incident simulation support environment and business objects associated with the incident
CN108628748B (en) Automatic test management method and automatic test management system
CN109460343A (en) System exception monitoring method, device, equipment and storage medium based on log
CN108805667A (en) Order flow processing method and system
CN107784068A (en) Acquisition methods, device, storage medium, processor and the service end of data variation
CN110502538A (en) Label of drawing a portrait generates method, system, equipment and the storage medium of logical mappings
CN116107589B (en) Automatic compiling method, device and equipment of software codes and storage medium
CN110063042A (en) A kind of response method and its terminal of database failure
CN110740071A (en) network interface monitoring method, device and system
US9811447B2 (en) Generating a fingerprint representing a response of an application to a simulation of a fault of an external service
CN105955838A (en) System halt reason check method and device
CN109669867A (en) Test device, automated testing method and computer readable storage medium
CN111240981A (en) Interface testing method, system and platform
CN107368425A (en) A kind of openstack method of testings
CN114444087A (en) Unauthorized vulnerability detection method and device, electronic equipment and storage medium
CN111290897A (en) Asynchronous storage test method, electronic device, computer equipment and storage medium
CN114816876B (en) Automatic test system for server Redfish interface specifications
CN115794609A (en) Script sharing method and device, electronic equipment and storage medium
CN113296915B (en) Task generation method and system based on industrial Internet platform
CN116484373B (en) Abnormal process checking and killing method, system, device, computer equipment and storage medium
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card

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