CN107273296A - The method of testing and test device of a kind of software - Google Patents

The method of testing and test device of a kind of software Download PDF

Info

Publication number
CN107273296A
CN107273296A CN201710494262.1A CN201710494262A CN107273296A CN 107273296 A CN107273296 A CN 107273296A CN 201710494262 A CN201710494262 A CN 201710494262A CN 107273296 A CN107273296 A CN 107273296A
Authority
CN
China
Prior art keywords
test
software
log
testing
tested
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.)
Pending
Application number
CN201710494262.1A
Other languages
Chinese (zh)
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.)
Shanghai Chuanying Information Technology Co Ltd
Original Assignee
Shanghai Chuanying Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Chuanying Information Technology Co Ltd filed Critical Shanghai Chuanying Information Technology Co Ltd
Priority to CN201710494262.1A priority Critical patent/CN107273296A/en
Publication of CN107273296A publication Critical patent/CN107273296A/en
Pending legal-status Critical Current

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/3692Test management for test results analysis

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 invention provides a kind of method of testing of software and test device, the method for testing includes:To software merit rating test parameter to be tested;Set the software in a test threshold and test run;When the operational factor of the software reaches the test threshold, the index parameter of the software is recorded;Analyze the index parameter and export analysis result.Operational factor in the test device collection tested software system operation that the present invention is provided;The operational factor in the tested software system operation of collection is analyzed, and exports analysis result, in this way, the automatic process tested and analyzed can be realized, the drawbacks of single method of testing is brought can be avoided.Acquired test log carries out test log analysis before the present invention can also be contrasted, while can analyze the log content in the journal file that is recording, so as to improve the promptness of reading journal file.

Description

Software testing method and device
Technical Field
The invention relates to the field of intelligent equipment, in particular to a software testing method and a software testing device.
Background
In the development and release of versions of software systems, a primary concern is whether the developed and released program is stable in operation. This is because: the stability of program operation is the basis for the success of a software system. An unstable software system is not a successful product no matter how powerful the function is and how beautiful the interface is, and the trust of the user on the software system is necessarily reduced greatly.
A good software system needs good control measures in each link of a development cycle, software testing, particularly system testing, is a very important ring in software quality assurance, and the system testing mainly comprises the following steps: functional test, performance test, stability test, and the like.
However, in the existing testing process, the testing is mainly performed manually, so that the requirement of long-time operation cannot be met, the reliability of a testing result is further affected, and the testing efficiency is also low. With the rapid development of informatization construction, more and more informatization software systems are provided, and real-time software, transmission software, storage software and the like play more and more important roles in respective fields.
In the prior art, a software system operation stability can be tested, and a common method is as follows: writing a script by adopting a script testing tool, and testing by utilizing the written script in an auxiliary way, namely: and repeatedly performing certain operations to observe the running stability of the tested program when the tested program runs for a long time or the tested program runs in a large data volume burst. The longer the test time is, the more reliable the test result is, so that it is desirable to monitor the running condition of the tested program in real time while testing the software.
At present, a lot of monitoring software in the industry comprehensively realizes monitoring and evaluation of a hardware system, but the monitoring of the software is less, so that the instability of the software in operation is enhanced, and the reliability of the system is reduced.
Finally, for the running log generated by the tested software, the common method for logging is generally as follows: a log recording function is realized, and the log content can be recorded into a specified hard disk file; if different logs are required to be recorded in different hard disk files, a plurality of similar log recording functions are required to be realized; if the log is recorded on a storage medium such as a database, a new log recording function needs to be implemented. Or, only one log recording function is implemented, and a parameter is added in the log recording function for marking the log category, and then the log recording function records the log into different hard disk files according to the parameter. In fact, the log can be recorded in a cache or immediately, and because each has advantages and disadvantages, two sets of log recording functions are usually implemented.
For the recorded log file, the background server cannot determine whether the log content of the log file has been read, so that the background server generally only reads the generated log file when reading the log file, and cannot read the content in the recorded log file, thereby resulting in poor timeliness of reading the log file.
Disclosure of Invention
In order to overcome the technical defects, the invention aims to provide a software testing method and a software testing device.
The invention discloses a software testing method, which is characterized by comprising the following steps:
configuring test parameters for software to be tested;
setting a test threshold and testing running software;
when the running parameters of the software reach the test threshold, recording index parameters of the software;
and analyzing the index parameters and outputting an analysis result.
Preferably, configuring test parameters for the software to be tested, comprises:
the test parameter is a test frequency;
executing a test task at a fixed period according to the test frequency;
resetting the test frequency when the test task is finished;
the test frequency is the duration of executing the test task.
Preferably, setting a test threshold and testing the software in operation comprises:
the test threshold is one of memory occupancy rate or CPU occupancy rate;
setting a software running list;
acquiring the software in operation and displaying the software in the software operation list;
removing the software from the software playlist to stop testing.
Preferably, when the operating parameter of the software reaches the test threshold, recording an index parameter of the software, including:
the operation parameter is one of the software memory occupancy rate or the software CPU occupancy rate;
when the operating parameter is larger than the test threshold value, recording the index parameter of the software;
the index parameters comprise one or more of the name of the software, the memory occupancy rate of the software, the CPU occupancy rate of the software and the occurrence time.
Preferably, analyzing the index parameter and outputting an analysis result includes:
acquiring a log for recording the index parameters;
and analyzing the log, acquiring abnormal points in the running of the tested software, and generating a test report of the software.
The invention also discloses a software testing device, which is characterized by comprising the following components: the device comprises a test module, a log module and an analysis module; wherein,
the test module supports the configuration of test parameters according to the software to be tested;
the test module receives a test threshold and tests running software;
when the test module detects that the running parameters of the software reach the test threshold, the log module records the index parameters of the software;
and the analysis module analyzes the index parameters and outputs an analysis result.
Preferably, the test module comprises:
the test parameter configuration unit receives a test frequency of the software;
the test execution unit executes a test task in a fixed period according to the test frequency;
and the test parameter configuration unit resets the test frequency when the test task is finished.
Preferably, the test module comprises:
the test management unit comprises a software running list;
the test management unit acquires the software in operation and displays the software in the software operation list;
the test management unit removes the software from the software run list to stop testing.
Preferably, the log module includes:
and the log generation unit records the index parameters of the software in a log test mode when the operating parameters are larger than the test threshold.
Preferably, the analysis module comprises:
the test analysis unit acquires a log recording the index parameters;
and the test analysis unit analyzes the log, acquires abnormal points in the running process of the software to be tested and generates a test report of the software.
After the technical scheme is adopted, compared with the prior art, the method has the following beneficial effects:
1. the testing device provided by the invention collects the running parameters of the tested software system in running; the collected running parameters of the tested software system in running are analyzed, and the analysis result is output, so that the automatic testing and analyzing process can be realized, the defects caused by a single testing method can be avoided, and the reliability and the testing efficiency of the testing result are improved.
2. In the embodiment of the invention, the test log analysis can be carried out by comparing the test logs obtained before, so that the log content which is not subjected to the log analysis in the log file can be obtained according to the analyzed data volume of the log file, and meanwhile, the log content in the log file which is recorded can be analyzed, thereby improving the timeliness of reading the log file.
Drawings
FIG. 1 is a flow chart illustrating a method for testing software according to a preferred embodiment of the present invention;
FIG. 2 is a schematic diagram of a software testing apparatus according to a preferred embodiment of the present invention.
Reference numerals:
the device comprises a test device 10, a test module 20, a log module 30, an analysis module 40, a test parameter configuration unit 21, a test management unit 22, a test execution unit 23, a log generation unit 31 and a test analysis unit 32.
Detailed Description
The advantages of the invention are further illustrated in the following description of specific embodiments in conjunction with the accompanying drawings.
Referring to fig. 1, a flow chart of a software testing method according to a preferred embodiment of the invention is shown, the method including:
the embodiment provides a software testing method, which comprises the steps of formulating a testing plan for software to be tested, wherein the testing plan comprises a series of testing parameters, reading the testing parameters contained in the testing plan by the testing method, correspondingly setting the testing function of a testing module through the testing parameters, and executing the testing plan; acquiring test data of the software, and recording the test data in a log mode; and analyzing the test log to generate a test report.
Step 101: configuring test parameters for software to be tested
In particular, the test parameters refer to test parameters for test input. The test parameters are preset by software testers, different test parameters are set according to different software tests, or different test parameters are manufactured and used at different stages of the same software.
Step 102: setting a test threshold and testing running software;
after receiving the test cases and the test parameters, setting at least one test threshold before the test work starts, wherein the test threshold is one of memory occupancy rate or CPU occupancy rate. And storing the software to be tested in a test software list, loading test parameters to execute the test, then carrying out conversion combination on the test parameters and testing again until the tested structure reaches the preset test parameters. Because it can transform the combination to the test parameter of input, can the automatic generation new test parameter, carry out a lot of tests automatically to effectual solution prior art sets up the problem that can't discover the leak of test parameter scope after the test parameter, does not need the manual work to carry out the increase of test parameter, can improve the convenience of efficiency of software testing and test. And the test parameters are set, so that the system can be prevented from performing too many repeated test operations, and system resources are saved. After the test, the test parameters are analyzed, part of the test parameters without abnormity are filtered, the test parameters can be better optimized, and the test efficiency is further improved.
Step 103: when the running parameters of the software reach the test threshold, recording index parameters of the software;
detecting the running parameters of the software in the process of testing the software, and starting to record the running parameters of the tested software when detecting that the current running parameters reach the set testing threshold value by comparing with at least one testing threshold value set before the test work is started. And setting the operation parameters of log collection and the adopted output mode according to the set corresponding test parameters. Specifically, the corresponding test parameters are analyzed and the functions configured for log generation are parsed. And generating a corresponding relation between the log record and the tested software according to the analysis result. The method not only generates the corresponding relation between the log records and the tested software, but also is responsible for storing and maintaining the log records and the tested software.
Step 104: and analyzing the index parameters and outputting an analysis result.
Obtaining the current data volume of a first log file to be analyzed, and obtaining the analyzed data volume of the first log file, wherein the analyzed data volume is the data volume of the log content subjected to log analysis in the log file, comparing the current data volume of the first log file with the analyzed data volume of the first log file, if the current data volume of the first log file is not the same as the analyzed data volume of the first log file, obtaining the log content not subjected to log analysis in the first log file according to the analyzed data volume of the first log file, and performing log analysis, so that the log content not subjected to log analysis in the log file can be obtained according to the analyzed data volume of the log file, thereby analyzing the log content in the log file being recorded, and improving the timeliness of reading the log file, meanwhile, the test result is evaluated through the acquired difference by comparing the log file generated by the last test, and a test report is generated.
Referring to fig. 2, the testing device for software according to the present invention can be implemented by a testing device, in which the testing device comprises: 20-testing module, 30-logging module and 40-analyzing module.
The embodiment provides a testing device of software, which formulates a testing plan by software for plan testing, wherein the testing plan comprises a series of testing parameters, the testing device reads the testing parameters contained in the testing plan through a testing module 20, correspondingly sets the testing function of the testing module through the testing parameters, and executes the testing plan; the log module 30 obtains the test data of the software, and records the test data in a log mode; the analysis module 40 analyzes the test log to generate a test report.
Test module 20:
test parameter configuration unit 21:
the test parameter configuration unit 21 receives and stores test parameters of software to be tested. The test parameter configuration unit 21 may complete initialization of the test module by reading the test parameters. The test parameters may include: name of the test software, period of the test, number of tests, etc. The method for reading the test parameters by the test parameter configuration unit 21 includes: the test parameter configuration unit 21 is supported to directly operate by the tester to input and store the test parameters, or the test parameter configuration unit 21 reads the test parameter file configured in advance by the tester to obtain and store the test parameters.
The test management unit 22:
the test management unit 22 stores the software to be tested in a test software list, and provides a function of monitoring the test software in real time. The test management unit 22 may obtain information of the test software according to a name of the test software set in the test parameters configured in the test parameter configuration unit 21, and the test management unit 22 supports a tester to directly input the software to be tested in a management interface of the test management unit 22 to obtain the information of the test software.
The test execution unit 23:
the test execution unit 23 acquires test information from the test parameter configuration unit 21 and the test management unit 22, and then executes a test task based on the information. Specifically, for example, when the stability of the software operation needs to be tested, the test execution unit 23 executes a stability control instruction, and the stability control instruction detects the software operation to be tested; here, during the detection process, the stability control command is automatically recorded for each test step and the execution time of the test step, and the operation parameters of the stability control command for the software to be tested are generated. The test execution unit 23 may detect an exception of the software system under test during the process of executing the stability control instruction, where the exception may be: and the process of the tested software system exits, a client interface menu or a window of the tested software system pops up abnormally, and the like, and the process is recorded in the operation parameters.
The log module 30:
the log module initializes the log generating unit 31 when starting a test operation for software.
The log generation unit 31:
the log generating unit 31 sets the operation parameters of log collection and the output mode according to the set corresponding test parameters. Specifically, the log generating unit 31 analyzes the corresponding test parameters and parses the configuration log generating unit 31. Based on the analysis result, the log generation unit 31 generates a correspondence between log records and the software under test. The log generating unit 31 not only generates the correspondence between log records and the software under test, but also is responsible for storing and maintaining them.
The operating parameters include: log collection interval, log collection duration, the process to be subjected to log collection in the tested software system, the specific log collection content of the process to be subjected to log collection and the like; the specific log collection content may include: occupation of a central processing unit, physical memory, virtual memory, thread description, the number of graphic equipment interface resource objects and the like; the log collection interval can be set according to the needs, such as: setting a log collection interval to be 1 second; the log collection time can also be set according to needs, and in order to ensure the accuracy of the test result, the log collection time can be set to be more than 24 hours.
The output mode may be: and outputting in a graphic mode, a file mode or a combination of the graphic mode and the file mode.
After receiving the execution request of the log module 30 to the log generating unit 31, the log generating unit 31 searches for the corresponding relationship between the log record and the software to be tested, and returns the corresponding log record.
The corresponding relationship between the log records and the tested software can comprise the following two parts:
1. identification of software under test and name of software under test
2. Log records and corresponding identification of software under test
The log generating unit 31 mainly outputs the test log information of the software to be tested according to the corresponding relationship between the log records and the software to be tested, and in this embodiment, the test log information is output in a log file manner.
Analysis module 40:
the analysis module 40 sets the acquired log file of the latest software under test as the first log file, and sets the log file generated by the last test of the software under test as the reference log file.
The test analysis unit 41:
the test analysis unit 41 receives a log analysis request carrying a target log type; and acquiring a log file of a target log type from the locally stored log files as a log file to be analyzed. The log file to be analyzed is a first log file, each log record of the first log file is obtained, and a characteristic value of one log record of the first log file is determined to be used as a file identifier of the first log file.
Analyzing each record of the first log file, and after a certain amount of analysis is finished, acquiring the current data volume of the first log file to be analyzed and the analyzed data volume of the first log file, wherein the analyzed data volume is the data volume of log content subjected to log analysis in the log file;
comparing the current data volume of the first log file with the analyzed data volume of the first log file;
and if the current data volume of the first log file is different from the analyzed data volume of the first log file, acquiring the log content which is not subjected to log analysis in the first log file according to the analyzed data volume of the first log file, and performing log analysis.
Meanwhile, the log analysis is carried out by comparing the difference of the two log files according to the corresponding file identification of the reference log file.
Specifically, the test analysis unit 41 acquires the current data volume of the first log file to be analyzed, and acquires the analyzed data volume of the first log file, wherein the analyzed data volume is the data volume of the log content of the log file subjected to the log analysis, compares the current data volume of the first log file with the analyzed data volume of the first log file, and if the current data volume of the first log file is not the same as the analyzed data volume of the first log file, acquires the log content of the first log file not subjected to the log analysis according to the analyzed data volume of the first log file, and performs the log analysis, so that the log content of the log file not subjected to the log analysis can be acquired according to the analyzed data volume of the log file, and therefore, the log content of the log file being recorded can be analyzed, and the timeliness of reading the log file can be improved, meanwhile, the test result is evaluated through the acquired difference by comparing the log file generated by the last test, and a test report is generated.
It should be noted that the embodiments of the present invention have been described in terms of preferred embodiments, and not by way of limitation, and that those skilled in the art can make modifications and variations of the embodiments described above without departing from the spirit of the invention.

Claims (10)

1. A method for testing software, the method comprising:
configuring test parameters for software to be tested;
setting a test threshold value and testing the software to be tested in operation;
when the running parameters of the software to be tested reach the test threshold, recording index parameters of the software to be tested;
and analyzing the index parameters and outputting an analysis result.
2. The testing method of claim 1, wherein configuring the testing parameters for the software to be tested comprises:
the test parameter is a test frequency;
executing a test task at a fixed period according to the test frequency;
resetting the test frequency when the test task is finished;
the test frequency is the duration of executing the test task.
3. The method of claim 1, wherein setting a test threshold and testing software to be tested in operation comprises:
the test threshold is one of memory occupancy rate or CPU occupancy rate;
setting a software running list;
acquiring the software to be tested in operation and displaying the software in operation in the software operation list;
removing the software from the software playlist to stop testing.
4. The testing method of claim 1, wherein recording an indicator parameter of the software when the operational parameter of the software reaches the test threshold comprises:
the operation parameter is one of the software memory occupancy rate or the software CPU occupancy rate;
when the operating parameter is larger than the test threshold value, recording the index parameter of the software;
the index parameters comprise one or more of the name of the software, the memory occupancy rate of the software, the CPU occupancy rate of the software and the occurrence time.
5. The test method of claim 1, wherein analyzing the indicator parameter and outputting an analysis result comprises:
acquiring a log for recording the index parameters;
and analyzing the log, acquiring abnormal points in the running of the tested software, and generating a test report of the software.
6. A test apparatus for software, the test apparatus comprising: the device comprises a test module, a log module and an analysis module; wherein,
the test module supports the configuration of test parameters according to the software to be tested;
the test module receives a test threshold and tests running software;
when the test module detects that the running parameters of the software reach the test threshold, the log module records the index parameters of the software;
and the analysis module analyzes the index parameters and outputs an analysis result.
7. The test apparatus of claim 6, wherein the test module comprises:
the test parameter configuration unit receives a test frequency of the software;
the test execution unit executes a test task in a fixed period according to the test frequency;
and the test parameter configuration unit resets the test frequency when the test task is finished.
8. The test apparatus of claim 6, wherein the test module comprises:
the test management unit comprises a software running list;
the test management unit acquires the software in operation and displays the software in the software operation list;
the test management unit removes the software from the software run list to stop testing.
9. The testing apparatus of claim 6, wherein the log module comprises:
and the log generation unit records the index parameters of the software in a log test mode when the operating parameters are larger than the test threshold.
10. The test device of claim 6, wherein the analysis module comprises:
the test analysis unit acquires a log recording the index parameters;
and the test analysis unit analyzes the log, acquires abnormal points in the running process of the software to be tested and generates a test report of the software.
CN201710494262.1A 2017-06-26 2017-06-26 The method of testing and test device of a kind of software Pending CN107273296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710494262.1A CN107273296A (en) 2017-06-26 2017-06-26 The method of testing and test device of a kind of software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710494262.1A CN107273296A (en) 2017-06-26 2017-06-26 The method of testing and test device of a kind of software

Publications (1)

Publication Number Publication Date
CN107273296A true CN107273296A (en) 2017-10-20

Family

ID=60068792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710494262.1A Pending CN107273296A (en) 2017-06-26 2017-06-26 The method of testing and test device of a kind of software

Country Status (1)

Country Link
CN (1) CN107273296A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905475A (en) * 2021-03-11 2021-06-04 湖南化工职业技术学院(湖南工业高级技工学校) Software testing platform based on computer
CN113138930A (en) * 2021-05-12 2021-07-20 上海云从企业发展有限公司 Software testing method and device and computer storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515247A (en) * 2009-03-30 2009-08-26 福建星网锐捷网络有限公司 Method and device for monitoring memory
JP2010134862A (en) * 2008-12-08 2010-06-17 Nec Corp Log analysis system, method, and program
CN106502887A (en) * 2016-10-13 2017-03-15 郑州云海信息技术有限公司 A kind of stability test method, test controller and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010134862A (en) * 2008-12-08 2010-06-17 Nec Corp Log analysis system, method, and program
CN101515247A (en) * 2009-03-30 2009-08-26 福建星网锐捷网络有限公司 Method and device for monitoring memory
CN106502887A (en) * 2016-10-13 2017-03-15 郑州云海信息技术有限公司 A kind of stability test method, test controller and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905475A (en) * 2021-03-11 2021-06-04 湖南化工职业技术学院(湖南工业高级技工学校) Software testing platform based on computer
CN113138930A (en) * 2021-05-12 2021-07-20 上海云从企业发展有限公司 Software testing method and device and computer storage medium

Similar Documents

Publication Publication Date Title
US9448916B2 (en) Software test automation systems and methods
CN101887392A (en) Method and device for testing software system operation stability
US7930597B2 (en) Method and apparatus for validating system properties exhibited in execution traces
CN107223257B (en) Test method, test server and test system
CN110275878B (en) Service data detection method and device, computer equipment and storage medium
US10467590B2 (en) Business process optimization and problem resolution
CN110196801B (en) Code coverage rate based test method and device
KR20070080313A (en) Method and system for analyzing performance of providing services to client terminal
CN107102929A (en) The detection method and device of failure
CN111324502A (en) Batch test system and method thereof
CN113708986B (en) Server monitoring apparatus, method and computer-readable storage medium
CN106771453B (en) Testing method and device for oscilloscope
CN107273296A (en) The method of testing and test device of a kind of software
CN106294109B (en) Method and device for acquiring defect code
CN114141302A (en) Test method of solid state disk and electronic equipment
US9378082B1 (en) Diagnosis of storage system component issues via data analytics
CN112148616B (en) Performance test management platform
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN110554949A (en) Cross-platform process data collecting and analyzing tool, method and using method
CN107357701B (en) SAS signal testing method and device under distributed scene
CN115373984A (en) Code coverage rate determining method and device
CN114138579A (en) Prometous-based GPU (graphics processing Unit) interactive test method, device, equipment and readable medium
CN107102938B (en) Test script updating method and device
CN109783263B (en) Method and system for processing aging test fault of server
CN113392021A (en) Method, device and equipment for analyzing cluster reliability test result and readable 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171020