CN106919508A - A kind of generation method of application program of computer network test cases - Google Patents
A kind of generation method of application program of computer network test cases Download PDFInfo
- Publication number
- CN106919508A CN106919508A CN201710135863.3A CN201710135863A CN106919508A CN 106919508 A CN106919508 A CN 106919508A CN 201710135863 A CN201710135863 A CN 201710135863A CN 106919508 A CN106919508 A CN 106919508A
- Authority
- CN
- China
- Prior art keywords
- application program
- test cases
- tested
- message
- business
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
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 application provides a kind of generation method of application program of computer network test cases, to solve the problems, such as that test cases in current computer applied algorithm test process depends on the ability or defect of case writer unduly.The method includes:Actual services transaction message is recorded using from the actual production environment consistent with tested object business or management, after procotol is decoded and request response message is matched, it is stored in database according to practical business order of occurrence, the background database information recorded when starting is preserved simultaneously, needs are tested according to tested object, surveyed according to certain conversion rule carries out adaptive transition to the transaction message for preserving, and by the transaction message after conversion according to sequential when recording, preserved with reference to background data when recording, collectively constitute the test cases of the tested object.When actually used, by all or part of request message playing out to tested application program, with reference to response message when recording, whether the tested application program of verification is processed correctly, to judge that tested application program whether there is defect.
Description
Technical field
The present invention relates to areas of information technology, more particularly to a kind of generation side of application program of computer network test cases
Method.
Background technology
With technical development of computer, to ensure computer software quality, software testing technology is also evolving, also goes out
Substantial amounts of testing tool is showed.Computer applied algorithm as computer software one kind, predominantly enterprises and institutions and various
The electronization that mechanism provides business or management supports and aids in, the quality of computer applied algorithm be directly connected to an enterprise or
Tissue can normal operation, therefore, the test job to computer applied algorithm is extremely important.
At present, the test job of enterprise or mechanism to computer applied algorithm includes functional test, performance test.Function is surveyed
Examination then pays close attention to developed finished product to the situation of realizing of business demand, and manual compiling is relied primarily at present and test cases is performed
Mode is carried out, and belongs to the category of Black-box Testing, and emphasis assesses application program to business or the satisfaction degree of management;Performance test is then closed
Robustness after heart application program on-line running, it is stabilization when can meet enterprise or a large amount of personnel's long-term uses of mechanism, suitable
Smooth property requirement, application program capacity can carry out part deduction and assessment by white-box testing instrument, because running environment is used
The complexity of scene, more often still takes the way of Black-box Testing, using loadrunner instruments, using case case script,
Simulation concurrent user carries out application program capacity detection.
The case used when existing capability is tested and performance is surveyed, is completely dependent on tester in itself, and tested person personnel are outstanding
It is the influence such as case writer knowledge, ability, and the case for being used is in the aspects such as complexity, diversity and practical business ring
There is a big difference in border.
The content of the invention
The present invention provides a kind of generation method of application program of computer network test cases, is used to solve current computer
Test cases depends on the problem or defect of the ability of case writer unduly in web application test process.
In order to realize above-mentioned target, the present invention provides following technical scheme:
A kind of generation method of application program of computer network test cases, it is characterised in that using the actual industry of tested program
The network trading message generation test cases of business environment.Business event and management are an incremental processes, therefore computer
Application program generally takes the mode development & construction of iteration optimization, in the reality consistent with tested program traffic or management background
Border running environment collection network trading message, is slightly processed, and just can be used for the test of iterative optimization procedure.
A kind of generation method of application program of computer network test cases, it is characterised in that the test cases is by network
Transaction message and background data are constituted.Using network trading message to being tested system testing, real business is really simulated
Scene sends request to tested program, the process that tested test system responds according to request, and this must assure that background data
With uniformity of the message played on business scenario, otherwise, the Successful Transaction under practical business environment may fail.
A kind of generation method of application program of computer network test cases, it is characterised in that the generation of the test cases
With using being automatically performed by computer program.Traditional test cases is held by manual compiling, manual entry or manual compiling
This is traveled far and wide, the test cases that the inventive method is generated is to pass through network trading message and background database automatic data collection by program
Obtained from backup, sent automatically to tested program according to the order recorded from playing program when using.
A kind of generation method of application program of computer network test cases, it is characterised in that comprise the following steps:
Step one, the background data for treating test network application program operation actual services environment is preserved;
Step 2, continuous Internet Trade Data Stream in a period of time from actual services environment is carried out protocol-decoding and
Request response pairing treatment, forms original service transaction request and response message and preserves;
Step 3, it is necessary to when, the original service transaction request message to obtaining carries out business factor extraction, for tested application
Program needs accordingly to be changed according to certain rule, and the information that will have been changed is saved in corresponding service transaction request message
In;
Step 4, by all or part of business transaction request message and corresponding response message changed, with reference to the corresponding back of the body
Scape data are saved backup as test cases.
Web application to be tested in the step one refers to and the application program business or management for subsequently needing test
Background is consistent, serve business event or the computer program or software of management.
Actual services environment in the step one refers to the production ring consistent with tested application program business or management background
Border or test environment.
Background data in the step one refers to database data institute when computer applied algorithm or certain time point of software
The business at that time or controlled state for containing, with service conditions pair at that time when herein referring to that data recording starts in actual services environment
The database data answered.
Internet in the step 2 refers to the Internet of osi model.
Trade Data Stream in the step 2 refers to that the Internet for being employed the correct transaction for performing and having processed of program please
The network data packet stream of summation response.
Continuous Internet Trade Data Stream refers to the net of continuous acquisition certain hour in a period of time in the step 2
Network layers Trade Data Stream, time length can need proper extension or shortening according to test.
Trade Data Stream in the step 2 can be other systems or equipment including in true environment collection crawl
Network data packet stream of the PCAP files, or combination other software of network data packet stream in true environment Real-time Collection.
Protocol-decoding in the step 2 is that network packet stream is reduced according to different network protocol, reduction knot
Fruit is the original message information asked or respond, and the information such as association requests response time, port, IP address.
Request response pairing treatment in the step 2 is the protocol-decoding result combination by corresponding request and response
Corresponding informance in a pair.
Original service transaction request and response message in the step 2 assign the agreement solution to good request and response
Code result.
Business factor in the step 3 refers to the related industry that the service request is constituted in original service transaction request message
Business or the critical field or information of management, business factor are often multiple.
Although carrying out corresponding conversion according to certain rule and refer to true environment and tested application program industry in the step 3
Business or management background are consistent, but the request message of program may have a certain difference, including business factor order, it is how many etc. all
It is possible to variant, it is necessary to according to the situation of tested application program, establish relevant regulations, to original service transaction request message
Conversion process is carried out, is allowed to adapt to tested application program.Being likely to original service transaction request message need not do any conversion.
Business transaction request message and corresponding response message that all or part in the step 4 has been changed, refer to root
Needed according to test, the business transaction message that will have been changed(Including request and response message)It is all or part of(Meet certain specific
Condition)Screen, with reference to respective background data, used as test cases.
The present invention is taken by the use of Internet Trade Data Stream as test cases data source, is shielded application program and is taken
Different structure and the difference using different language, can be used for the independent test of distributed system difference node and component, favorably
In being accurately positioned and find Distributed Application defect and the real root of performance bottleneck.
The generation method of the application program of computer network test cases that the present invention takes, make use of the original industry of true environment
Business transaction request and response message contain actual services scene, actual services complexity, multifarious characteristic, solve to rely on artificial
The deficiency of case is write, the test cases generated using the inventive method can be tested and obtain being more nearly really tested answering
With program quality and behavior pattern.
Brief description of the drawings
Fig. 1 is the inventive method flow chart.
Specific embodiment
In order that the object, technical solutions and advantages of the present invention become apparent from understanding, below in conjunction with accompanying drawing and embodiment,
The present invention is carried out detailed further.
By taking the optimization program function test of certain bank credit management management system as an example, with reference to Fig. 1, the illustratively invention
Actually used step:
Step S1, the Internet Trade Data Stream of invention need true environment to be processed can be from bank original credit operation pipe
The collection of reason system actual production environment is recorded, and collection synchronously preserves the data of background database when starting.Can for example stop
Before external service during service, backup credit operation Management System Data storehouse is used as background data, while continuous record collection 24
The system transaction data of hour, forms PCAP file for standby.
Step S2, the method for the invention carries out protocol-decoding and friendship after Internet Trade Data Stream PCAP files are obtained
Easily pairing, forms original service transaction request and response message and preserves.These messages reflect credit operation pipe in 24 hours
The Business Processing situation of reason system.
Step S3, the method for the invention is directed to the request message for having restored, and extracts crucial business factor field,
And according to credit operation management system optimization program the need for and respective rule, it is necessary to when to raw requests message carry out conversion and
Assembling, forms for broadcasting transaction request message and preserving.Although the standby credit operation management system optimization program for reporting text of operation with
Former credit operation management system may be variant, but changes in itself due to bank credit management less, so the scope meeting for changing
It is very limited, to limited variation, certain rules and methods can be taken, conversion process is carried out automatically using computer program.
Step S4, according to test needs, will change for transaction request message, corresponding corresponding message whole or portion is broadcast
Point, it is standby as test cases together with corresponding background data.Selection is whole or the standby transaction request message of broadcasting in part regards survey
Depending on examination needs, screened according to certain screening conditions during selected section, respective background data gather record with production system
The corresponding service data that credit operation management system associated databases when making this batch of original message are represented are consistent.
During actual test, in the case where background data is consistent, the business transaction in the test cases of present invention generation please
Message is asked to be sent to tested application program by original order, tested application program carries out corresponding position according to service request
Response is managed and provides, by the response condition of contrastive test case, you can analysis judges the quality and performance of tested program.
Because banking is in itself substantially without what change, former credit operation management system program and credit operation
Management system optimization program major part is the same, and the part accounting of optimization is little, and mainly some flows, the pipe for optimizing
Reason or friendly in terms of program code, so so that using original core system original transaction request and response message as
Test data is possibly realized.Contain the network transaction data message of actual services transaction scene, its complexity, diversity need not matter
Doubt, the test cases data generated using the method for the present invention carry out function of application and performance test, can not only break away from
The limitation of manual compiling test cases, and test can be made more efficient.
Claims (1)
1. a kind of generation method of application program of computer network test cases, it is characterised in that comprise the following steps:
Step one, the background data for treating test network application program operation actual services environment is preserved;
Step 2, continuous Internet Trade Data Stream in a period of time from actual services environment is carried out protocol-decoding and
Request response pairing treatment, forms original service transaction request and response message and preserves;
Step 3, it is necessary to when, the original service transaction request message to obtaining carries out business factor extraction, for tested application
Program needs accordingly to be changed according to certain rule, and the information that will have been changed is saved in corresponding service transaction request message
In;
Step 4, by all or part of business transaction request message and corresponding response message changed, with reference to the corresponding back of the body
Scape data are saved backup as test cases.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710135863.3A CN106919508A (en) | 2017-03-09 | 2017-03-09 | A kind of generation method of application program of computer network test cases |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710135863.3A CN106919508A (en) | 2017-03-09 | 2017-03-09 | A kind of generation method of application program of computer network test cases |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106919508A true CN106919508A (en) | 2017-07-04 |
Family
ID=59460663
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710135863.3A Withdrawn CN106919508A (en) | 2017-03-09 | 2017-03-09 | A kind of generation method of application program of computer network test cases |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106919508A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108427614A (en) * | 2018-05-11 | 2018-08-21 | 中国银行股份有限公司 | A kind of interface test method and device based on Admitester tools |
CN112181836A (en) * | 2020-09-30 | 2021-01-05 | 中国平安财产保险股份有限公司 | Test case generation method, system, device and storage medium |
CN112506771A (en) * | 2020-12-03 | 2021-03-16 | 建信金融科技有限责任公司 | Message comparison method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102053872A (en) * | 2009-11-06 | 2011-05-11 | 中国银联股份有限公司 | Method for testing transaction performance of terminal |
CN103580945A (en) * | 2012-08-07 | 2014-02-12 | 百度在线网络技术(北京)有限公司 | Method and device for generating testing data for complex service system |
CN104468655A (en) * | 2013-09-18 | 2015-03-25 | 阿里巴巴集团控股有限公司 | Method and system for testing reverse proxy software |
-
2017
- 2017-03-09 CN CN201710135863.3A patent/CN106919508A/en not_active Withdrawn
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102053872A (en) * | 2009-11-06 | 2011-05-11 | 中国银联股份有限公司 | Method for testing transaction performance of terminal |
CN103580945A (en) * | 2012-08-07 | 2014-02-12 | 百度在线网络技术(北京)有限公司 | Method and device for generating testing data for complex service system |
CN104468655A (en) * | 2013-09-18 | 2015-03-25 | 阿里巴巴集团控股有限公司 | Method and system for testing reverse proxy software |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108427614A (en) * | 2018-05-11 | 2018-08-21 | 中国银行股份有限公司 | A kind of interface test method and device based on Admitester tools |
CN108427614B (en) * | 2018-05-11 | 2021-05-18 | 中国银行股份有限公司 | Interface testing method and device based on adaptor tool |
CN112181836A (en) * | 2020-09-30 | 2021-01-05 | 中国平安财产保险股份有限公司 | Test case generation method, system, device and storage medium |
CN112506771A (en) * | 2020-12-03 | 2021-03-16 | 建信金融科技有限责任公司 | Message comparison method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106844220A (en) | A kind of method of testing and system of simulation computer web application real running environment | |
US10929879B2 (en) | Method and apparatus for identification of fraudulent click activity | |
CN107179995A (en) | A kind of performance test methods of application program of computer network | |
US8996437B2 (en) | Smart survey with progressive discovery | |
CN109189665B (en) | Method and device for recording, replaying and automatically testing data | |
CN106850746B (en) | The method and device of smooth service upgrading | |
US9483387B1 (en) | Tree comparison functionality for services | |
US10474563B1 (en) | System testing from production transactions | |
CN109298997A (en) | Interface test method, system, computer equipment and storage medium | |
CN109831357B (en) | Service verification method, device, storage medium and server | |
US9665475B2 (en) | Application experiment system | |
US9558106B1 (en) | Testing service with control testing | |
CN108536521B (en) | Simulation platform-based offline environment checking method and device | |
CN109949069A (en) | Suspicious user screening technique, device, computer equipment and storage medium | |
CN107704360A (en) | Processing method, equipment, server and the storage medium of monitoring data | |
CN112100052A (en) | Interface test scene playback method and device | |
US20210152596A1 (en) | System and method for phishing email training | |
CN106919508A (en) | A kind of generation method of application program of computer network test cases | |
CN112860569A (en) | Automatic testing method and device, electronic equipment and storage medium | |
CN109254912A (en) | A kind of method and device of automatic test | |
CN111629010A (en) | Malicious user identification method and device | |
CN107168844B (en) | Performance monitoring method and device | |
US9823999B2 (en) | Program lifecycle testing | |
CN106559498A (en) | Air control data collection platform and its collection method | |
CN106713011A (en) | Method and system for obtaining test data |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20170704 |
|
WW01 | Invention patent application withdrawn after publication |