CN101135989B - Automatization test method and device for Web applied system - Google Patents

Automatization test method and device for Web applied system Download PDF

Info

Publication number
CN101135989B
CN101135989B CN2006100307782A CN200610030778A CN101135989B CN 101135989 B CN101135989 B CN 101135989B CN 2006100307782 A CN2006100307782 A CN 2006100307782A CN 200610030778 A CN200610030778 A CN 200610030778A CN 101135989 B CN101135989 B CN 101135989B
Authority
CN
China
Prior art keywords
test
test cases
data
cases
script
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.)
Active
Application number
CN2006100307782A
Other languages
Chinese (zh)
Other versions
CN101135989A (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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN2006100307782A priority Critical patent/CN101135989B/en
Publication of CN101135989A publication Critical patent/CN101135989A/en
Application granted granted Critical
Publication of CN101135989B publication Critical patent/CN101135989B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The method comprises: reading out the pre-configured test solution; according to the function type in said test solution, calling the relevant functional test script; said functional test script calls a browser to open the relevant webpage window of the Web application system under test, and records the identifier of the webpage window; said functional test script calls the browser interface to input the data and operation of current test solution into said webpage window to get test result.

Description

A kind of method and apparatus of automatic test of Web application system
Technical field
The present invention relates to the software test field, particularly relate to a kind of method and apparatus of automatic test of Web application system.
Background technology
Web service is the service that developed recently gets up on the internet, also is with fastest developing speed and present most widely used service.Exactly because Web service has been arranged, make that just the internet is developed rapidly in recent years, and number of users has increased rapidly.Web service is a kind of software application by URL(uniform resource locator) (URL) sign, its interface and binding form can be passed through extend markup language (eXtensible MarkupLanguage, be called for short XML) definition, describe and retrieval, and can finish directly mutual with other application by XML message and Internet protocol.Web service has become the active platform of enterprise's application integration service, and the enterprise-level application software of serving based on web just more and more is applied in internet or the intranet.
The Web application system all will be through testing before issue and after the upgrading, guarantees that all functions can both normally move, without any mistake.How effectively the application system of continuous upgrading of test and renewal is the problem that each developer can face.If time or resource-constrained, this problem can be more thorny.Manual testing's workload is too big, also needs the extra time to train new tester.Therefore, be applied under the varying environment and can both move on normal reliable ground, need an automated test tool simple to operate to finish the functional test of application program in order to ensure those complex enterprise.
Existing automated test tool mainly is to be the automatic test software of the script explanation type of representative with Winrunner and Rational Robot, its principle of work is interface operation to be recorded as script or to write the execution script, by playing the purpose that operation of script modeling interface or database manipulation reach automatic test.For example, No. 200410086041.3 application documents of Chinese patent disclose a kind of automatization test system based on script explanatory tool, system is by the management to test cases, solve test cases and reused problem, test is undertaken by the backstage, realize the balanced management of testing process robotization and test resource, had stronger dirigibility, can satisfy the multiple business demand.Chinese patent has been announced a kind of automatic test backup system and corresponding software automatic test system No. 200410054163.4, this patent has defined the structuring test cases, adopt the dynamic execution of test cases and postponed the loading technology, and test cases is converted into the test script of commercial testing software, drive commercial testing software and carry out test, and logging test results; This system has improved writing of test cases and has carried out efficient.
There are the following problems for such scheme: at first, in above-mentioned test macro, depend on operation playback mode and test, current theactivewindow operated automatically by testing software, from current window, obtain tested object, data are operated and imported to analog mouse and keyboard, and in test process, the user can not the operational testing machine, the input of switching, keyboard and the mouse of operation window can not be arranged, otherwise can cause that testing software is unusual, cause test process to stop, influence testing efficiency.As seen, this mode is strict to the machine of operation testing software, and testing software monopolizes the test machine resource, and the user can not operate, and causes the wasting of resources; Secondly, this method need be recorded a large amount of test scripts at the different operation flow of each Web page (different sequence of operation) carrying out the test that Web uses, and it is big to record workload, and script is write the grammer complexity, the inconvenience of modification script.In addition, if change has taken place for operation flow adjustment or some interface elements used, just must record script again, workload is big, lacks dirigibility.
Summary of the invention
Technical matters to be solved by this invention provides a kind of method and apparatus of automatic test of Web application system, and the test job amount is big in the Web automatic test, efficient is low, the problem of the wasting of resources to solve.
For solving the problems of the technologies described above, the invention provides a kind of automated testing method of Web application system, may further comprise the steps:
Read pre-configured test cases, obtain the function type of described test cases;
Call the function corresponding test script according to the function type in the described test cases;
Described functional test script is opened the respective page window of tested Web application system according to the function type of described test cases, writes down the distinguishing mark of described page window;
Described functional test script is called the interface of browser according to the distinguishing mark of described page window, and data in the described test cases and operation are imported in the subsequent page of described page window and described page window, obtains test result.
Preferably, said method also comprises:
Described test result and the expected result that sets in advance are compared and generate test report.
Preferably, the distinguishing mark of the window of the page described in the said method is process number, title or the pointer of window.
Preferably, the process step of the step of functional test script described in the said method and described function type is corresponding one by one.
Preferably, pre-configured test cases described in the said method is with the text editor configuration, and uses text to preserve test cases; Said method before described calling function test script, also comprises after described read test case: judge whether test cases meets the case format specification, and under incongruent situation, finish test procedure.
Preferably, pre-configured test cases described in the said method is with case configuration tool configuration, and uses database table to preserve test cases.
Preferably, test cases comprises described in the said method: login user data, testing parameter data and contrasting data as a result.
The invention also discloses a kind of automatic test device of Web application system, comprising:
The case read module is used to read pre-configured test cases, obtains the function type of described test cases;
Process control module is used for calling the function corresponding test script according to the function type of test cases;
The functional test script module, comprise at least one functional test script, be used to open the respective page window of tested Web application system, write down the distinguishing mark of described page window, and according to the distinguishing mark of described page window, the interface that calls browser imports data in the described test cases and operation in the subsequent page of described page window and described page window into, obtains test result.
Preferably, said apparatus also comprises the report generation module, is used for comparing and generate test report with obtaining test result and expected result.
Preferably, said apparatus also comprises the test cases configuration module, is used for configuration and preserves test cases.
Preferably, the configuration module of test cases described in the said apparatus is a text editor, uses text storage test cases; Said apparatus also comprises test cases preliminary examination module, is used to judge whether test cases meets the case format specification, under incongruent situation, withdraws from test macro.
Preferably, the configuration module of test cases described in the said apparatus is the case configuration tool, uses database table storage test cases; Said apparatus also comprises case library, is used for the good test cases data of stored configuration.
Compared with prior art, the present invention has the following advantages:
1, functional test script is opened exclusive browser window, the process number of functional test script record test browser window is as the window distinguishing mark, functional test script is called interface that browser provides the data of test cases and operating parameter is sent to page elements on the tested page, thereby realize the input of test data and the carrying out of test operation, do not need moving or simulating and knock key in data of analog mouse, user's mouse or keyboard operation do not influence the process of test, the state of activation that does not also rely on browser window is discerned browser window, having avoided the user to switch the test process that current theactivewindow causes makes mistakes, also stop with regard to software anomaly that having avoided user's operation to cause, improved testing efficiency, and do not need to monopolize test machine, saved resource.
2, the present invention does not need to record test script, the big problem of workload when having avoided recording, functional sequence step 1 one correspondence of the program step of functional test script and tested application system, when the functional sequence of tested application system changes or some interface elements when changing, only need to revise and change relevant local script, other part scripts need not be revised, and the modification amount is little, can adapt to the renewal of tested application system flexibly.
3, when the read test case data, judge the format specification of test cases, when not meeting the case format specification, to withdraw from test process, after revising test cases, starting test process once more tests, testing software operation exception and the mistake of having avoided misdata to cause have improved the robustness of system, have also improved the efficient of test.
Description of drawings
Fig. 1 is the running environment figure of automated testing method of the present invention;
Fig. 2 is the process flow diagram of automated testing method of the present invention;
Fig. 3 is the flow chart of steps of the embodiment of automated testing method of the present invention;
Fig. 4 is the block diagram of automatic test device of the present invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
With reference to Fig. 1, be the environment map of operation of the present invention, to form by automatic test device 101, client browser 102 and tested Web application system 103, the effect of each several part is as follows:
Automatic test device 101 is used for the function of automatic test Web application system, and generates test report 104;
Client browser 102, be used to receive test data and the operation that automatic test device 101 sends, according to the data that obtain open tested Web application system 103 respective page and with data and the operation write in the element of the correspondence on the page, submit the page according to the operation that obtains to Web application system 103, receive the results page that Web application system 103 is returned;
Web application system 103 receives the request that client browser 102 is submitted to, and after handling, the return results page is given client browser 102.
Automatic test device 101 of the present invention and client browser 102 operate on same the test machine, and can be connected by network between test machine and tested Web application system, test machine can use the http agreement to open the page of tested Web application system 103 by browser.The network environment of operation can be same with the environmental facies that reality is used, for getting rid of the influence of network connection to functional test, can between test machine and Web application system, adopt network at a high speed to be connected, preferably, automatic test device 101 of the present invention also can operate on same the computing machine with Web application system 103.
Automatic test device 101 of the present invention reads pre-configured test cases, test cases comprises the login user data, testing parameter data and contrasting data as a result, automatic test device 101 is opened client browser 102 on test machine, connect the Web application system 103 with the function pages test cases correspondence, Ce Shi function type carries out the data interpolation to the page elements in the client browser 102 as required, operations such as submission, the input of analog subscriber, after submitting to Web application system 103 and handling, the return results page is given client browser 102, automatic test device 101 obtains results page from client browser 102, the analysis result page, count the test result of this test cases, by with the comparison of contrasting data as a result after, obtain test report and output.
Tested system of the present invention is the Web application system.The Web application system generally is made up of the server and client side, and server end receives the request that client sends, and carries out most function and data processing, and the result is returned to client; The difference of it and traditional client/server approach is, the general web browser software of the general employing of the client software of Web application system, without private client software, so also claim the B/S structure, the service end technology generally adopts .net or J2EE framework, and they can construct large-scale enterprise application system.The benefit that this B/S structure is brought is: low to the client requirement, do not need the maintain customer end substantially, and equally also need not unify to handle the upgrade job of all clients, maintenance cost reduces greatly, only needs the software of maintenance service end to get final product.Increasing application system has adopted this mode to implement and since this system mainly show various information and information processing result to the user by browser page, its functional test is also just realized by the test to the page.
Software test is the important component part of software development, later maintenance process, has become a subject, and its test process runs through each link of soft project, and the purpose of test is the problem in the discovery procedure, improves software quality; And the upgrading test after being used for software and coming into operation, after the software patch installing, need carry out the correctness that regression test guarantees former function.Test for the Web application system comprises performance test and functional test two aspects, and what this paper was related is the functional test part.
Referring to Fig. 2, be the process flow diagram of method of the present invention, comprising:
Step 201, the configuration testing case.
Test cases comprises: login user data, testing parameter data and contrasting data as a result; The file of configuration can adopt text formatting, and configuration tool can be adopted text editor, and the test cases that configuration generates adopts the text storage; The form of test cases can have multiple, as long as can correctly be resolved by functional test script, the form of following explanation is wherein a kind of situation just, is described as follows:
The login user data begin with [inst] mark, comprise data such as user name, user cipher, and it is a plurality of that mark [inst] can have, and use sequence number to distinguish.First row that begins with [test_set] mark is a testing parameter data, comprise the title of function type, the sequence number and the supplemental characteristic source of login user, the source of described supplemental characteristic can be to obtain from database from data file or by the SQL statement that provides; Second row is a contrasting data as a result, shows the source of contrasting data as a result, can directly be provided or be inquired about from database by the SQL statement that provides by data file to obtain.The row that begins with # in the test cases is a comment line.Stipulated a test transaction with two non-comment lines that [test_set] mark begins, the function that representative promptly will be tested can comprise a plurality of test transaction in the test cases.
The login user data are used to login needs the Web of control authority application system, by the corresponding relation of user class and application system function, guarantees that certain other user of level can only use the function of the application system of appointment; The data of the input when testing parameter data is used to test is provided; Contrasting data is used for the contrastive test result as a result.
Here Pei Zhi process also can adopt the case configuration tool to carry out, by the data structure that has defined test cases in the routine configuration tool, the input uniform data centralized management of all test modules can be made things convenient for the management of test cases, the test cases after the configuration adopts the database table storage.
Step 202, the read test case.
Test cases can read from text, also can read from database table, can be come the mode and the filename of regulation read test case by configuration file here.When test cases is when reading from text, after the test transaction in the read test case, with the format specification of introducing above test transaction is checked, if test transaction does not meet format specification, the daily record of misregistration reason, system withdraws from, and behind the modification test cases, restarts test process; If meet format specification then, read next bar test transaction, up to running through test cases.
Step 203 is called the function corresponding test script according to the function type in the described test cases.
Judge the function that to test according to the function type in the test cases, and startup function corresponding test script, the process step of the program step of functional test script and the function that will test is corresponding one by one, like this when the flow process of application system changes, as long as the local step of modify feature test script, other parts do not need modification.
Each functional test script and the functional sequence correspondence that will test, promptly a functional sequence just has a function corresponding test script.
Step 204, described functional test script are called the respective page window that browser is opened tested Web application system, write down the distinguishing mark of described page window.
Functional test script is opened the page of tested Web application system according to the function type in the test cases data, and note the distinguishing mark of window, here distinguishing mark is used to discern this browser window, and distinguishing mark can be the process number of window, the title of window or the pointer of sensing window.When operating system is opened a new process, can distribute this process of process number unique identification; The pointer class that points to window is similar to one and points to window handle; Had process number, title or the pointer of window, just can find window object by them, and then the element object in the action pane.
Step 205, described functional test script are called browser interface data in the test cases and operation are imported in the subsequent page of page window and this page window, obtain test result.
Functional test script is according to the distinguishing mark of browser window, call the interface that browser provides, parameter in the test cases and operation are imported in the page, the element of the corresponding page obtains parameter in the browser page, can operate element (as submit button etc.) and obtain operation accordingly, the page is submitted to the Web application system, after the Web application system receives the information of being submitted to and processing, results page is returned client browser, functional test script obtains results page from browser, according to the needs of functional sequence, opens the page of next procedure, and submission relevant information, up to the test result page that gets to the end, and the content in the judged result page, if obtain correct test result, then this test record in database and be denoted as and test successfully, otherwise be denoted as test crash.
Process of user login can be opened log in page by functional test script, and username and password etc. is passed to the page as parameter, submits to the page to give Web application system then, realizes that the user logins; Also can be independent as a public funcall login feature, be not included in the functional test script, functional test script is called login feature and usersaccount information is passed to it, finish land after, proceed next step operation by functional test script again.
Adopt the mode of the interface call browser to transmit test parameter and operation in this step, do not need moving and clicking of analog mouse, also do not need the hammer action of simulating keyboard, so user's operation keyboard, mouse are to not influence of test process; Adopt the mode of the process number of record browser window to find the browser window of opening, and then call its interface, the state of activation that does not need to depend on window is finished test, so user's switch window does not influence test process yet.
Step 206 compares and generates test report with test result and the expected result that obtains.
Expected result by expected result and the test result that obtains are compared, generates test report from the contrasting data as a result that is provided with in the test cases; Test report can be used excel (electrical form) document presentation, also can the form by web page form show, and can further process and be treated to intuitively graphics mode and show test result.
Referring to Fig. 3, be the flow chart of steps of the inventive method embodiment, the tested Web application system in the present embodiment is interior card mistake processing platform.
This Platform Implementation is carried out mistake to the transaction that has wrong account in the enchashment between the side of accepting (POS machine, ATM user side) and the card issuer (bank side), the consumer sale and is handled (account adjustment).Platform feature: confirm inquiry, credit adjustment, mistake business etc. such as cancel the order once.The mistake that occurs may be: the holder withdraws the money on ATM and does not tell paper money, but cardholder account by button account or holder in the POS of trade company consumption, POS shows that transaction is unsuccessful, but has reduced situation such as cardholder account remaining sum in fact.For every transaction, the card issuer all keeps complete original transaction data, when carrying out the mistake adjustment, need call these raw data and handle, to carry out flat account and clearance.Be adjusted into example with credit, introduce concrete operating process below, when the credit mistake takes place when, at first the personnel by the side of accepting login the mistake processing platform, inquire original customer transaction data according to former transaction data (primary account number, date of settlement), select the transaction of mistake, select to initiate credit adjustment application, fill in relevant application information, and submit applications, wait pending.Behind the auditor login platform, the credit application that inquiry is not checked, check by after, clearance is waited in this mistake transaction data data-in storehouse, finishes the operating process that credit is adjusted.Test macro operates on the windows platform, and the delphi language development is adopted at the interface, and functional test script partly adopts Python to realize.
Referring to Fig. 3, present embodiment comprises following step:
Step 301, the configuration testing case.
Test cases 312 is relevant with tested operation flow, and the needed element of transaction of test cases 312 test service flow processs (also being page input key element) is as primary account number, date of settlement etc.If operation flow changes, test cases also will carry out corresponding modify.
Adopt text editor configuration testing case 312 in this step, save as text after configuration is finished.
The test cases of credit adjustment has been set two parts parameter: the one, and testing parameter data, the 2nd, contrasting data as a result.The comparison data field has been stipulated every kind of test transaction after end of test (EOT), the data field in the database that needs to compare.Can adopt dual mode to set the data field that will compare in the test cases: first kind is table name and the field name in the direct setting data storehouse; Second kind is directly to write SQL statement, carries out data field and data that SQL statement is learnt needs comparison.
In this test cases, card mistake processing platform in the User login, test credit adjustment (biztest_CreditAdjust) function, testing parameter data is taken from data file input_data_CreditAdjust.csv.Contrasting data is taken from the SQL statement of data base querying as a result.
Data file input_data_CreditAdjust.csv adopts the csv stored in file format, and this form is the text formatting with CSV, can use electrical form software Excel to open and check.Test data of the every behavior of data file, every test data is divided into two parts, and the field of first is test input data, comprises date of settlement, primary account number and tracking number; Second portion is the sign as a result of test, and all fields separate with English comma; Described sign as a result is used to judge whether this test completes successfully.
Step 302, the read test case.
From step 301, read a test transaction in the test cases of configuration, if read test case for the first time also needs to read login user information.
Step 303 judges whether to meet the case format specification.If meet, enter step 305, as not, enter step 304.
Judgement is that the case format specification according to aforementioned introduction comes the test transaction of reading in the test cases is checked judgement.
Step 304, the misregistration daily record is also withdrawed from.
After finding mistake, system withdraws from, and the error log record is which bar test transaction makes a mistake, and concrete wrong information, revise test cases by the tester after, restart test process.
Step 305 judges whether to run through test cases.If run through, enter step 306, if not, enter step 302.
Step 306, the calling function test script.
Title biztest_CreditAdjust according to the function type in the test cases, identify is that credit is adjusted function, then call credit and adjust functional test script, the step that comprises the operating process of credit adjustment in the script, each step and step 1 one correspondence of manually carrying out the credit adjustment that relates to previously.
When the operation flow of interior card error management platform changes, only need part relevant in the modify feature test script with variation, other parts need not be revised, and the workload of maintenance is little, can well adapt to the change of application system business.
The page of card error management platform in the step 307, open any browser window access.
Credit is adjusted the browser that functional test script is called this machine, blocks the page of error management platform in opening, and notes the process number of window, as the sign of identification test window in the subsequent operation.
Step 308 is imported parameter and operational order into browser according to requirements of process, obtains results page, the analytic record result.
Credit is adjusted functional test script and is called the login utility module, and a user profile that obtains from test cases passes to the login utility module, after login is finished, return credit and adjust functional test script continuation execution, credit is adjusted functional test script and is opened the historical trading query page, imports the former Transaction Information that obtains from case data into, inquires original transaction data, if the inquiry failure, record trace log, mistake detail are also returned.The name of test trace log file comprises the date so that distinguish, and every daily record comprises time, test sequence number, module name, test source data, the test result of being tested.This journal file can conveniently be inquired about the problem of test process situation and finder execution.If the historical trading successful inquiring is initiated credit adjustment transaction, and is checked.Make mistakes if carry out, record trace log, mistake detail are also returned failure flags; If this test completes successfully, then return success sign, and the data that the needs in this test are compared write in the test result file.Test result file is named with module name, as result_CreditAdjust_n.csv.The detailed file designation of mistake is also with the module name name, and as error_CreditAdjust_n.csv, its content comprises information such as test record numbering, error reason sign indicating number, error reason, the time of makeing mistakes.
If whole end of test (EOT), the number of times that the result of statistical test and all error reasons occur.Its statistical result file content comprises information such as transaction name, test record number, number of success, total frequency of failure, success ratio, error reason code, occurrence number.
Step 309 judges whether test cases is finished.
If be finished, forward step 310 to, forward step 306 if not to.
In test cases, if also comprise a plurality of test transaction that will test, then go back to step 306, carry out the test of next function.
Step 310, the data comparison.
Read the test result of successful execution, and compare, pass through if conform to be designated as to test, otherwise be designated as test crash with the corresponding results contrasting data.
When carrying out regression test, test process was carried out once before the patch installing of mistake processing platform, carried out once after patch installing.Can exist in the test result data file and need the data of comparing after twice execution.
Step 311 generates test report.
Produce test report 313 according to test result, test report is surveyed employing csv stored in file format, and content comprises transaction name, test record number, number of success, the total frequency of failure, success ratio, matched record number, contents such as record number and matching rate do not match.
In the above embodiments, step 301 configuration testing case also can adopt the case configuration tool to carry out, the case configuration tool is by window interface mode configuration management test cases, and a relevant information uses tables of data to store, in the configuration testing case, provide out selective, and do not need manually to import most data, and the relation of the logic association between each data of test cases can be provided automatically, reduce artificial workload, can avoid the test cases of typing mistake.Test cases after the configuration adopts database table to carry out structured storage.The structured storage mode of test cases can be made of login account number table, pick list, module table, testing process table, test case table, Input Data word segment table, input data table, and their effect is as follows:
1, login account number table is used for storing the interior card mistake system login account of the required use of test.Comprising information such as the user name of logining account number, password, login mechanisms.Its detailed data sheet field organization definition is as shown in table 1.
Figure 200610030778200011
Figure 200610030778200021
Table 1 login account number table
2, pick list is used to store the config option of test environment, as the connection string of database, the information such as position of test cases file.
3, module table, the relevant information that is used to store test module, module I D, module numbering, module title, acquiescence input SQL statement, acquiescence output SQL statement and the explanation of for example having write down credit adjustment test module.
4, testing process table, the relevant information that is used to store testing process comprises testing process ID, testing process numbering, module numbering and explanation.For specific modules, to form by a plurality of operations, credit adjusting module for example has the former transaction of inquiry, initiates the credit adjustment, operation such as checks, and also may comprise operations such as deletion, modification.
5, test case table, be used to store the relevant information of test case, comprise the input pattern of test case ID, test case numbering, testing sequence value, test module numbering, test data, main login account number, inferior login account number, input data SQL statement, output data SQL statement and explanation.One group of test data of a corresponding input data table of record in this table.
6, Input Data word segment table is used to store the title of the Input Data word section of each test module, comprises input data ID, Input Data word segment number, input data values, test case numbering and input data sequence number.
7, input data table, the input data that are used to store each test module comprise input data ID, Input Data word segment number, input data values, test case numbering and input data sequence number.
Here the field name of the input data of test cases and two tables of field value design separate storage, mode by the ranks conversion, problem below having solved: the input data number difference that different test cases need, if adopt a table storage, then can need to revise the number or the field name of the field of tables of data, also can adopt and reserve enough fields, and the mode of employing universal field name named fields, the shortcoming of bringing like this is the field resource of having wasted tables of data, and the universal field name need discern on program again, can not well address this problem.Adopt when separating storage mode, only need in the Input Data word segment table, increase corresponding field name data recording when increasing field, when in input data table, increasing data, field name record in the related corresponding Input Data word segment table, can connect data and field name, the input uniform data centralized management of all test modules can have been avoided when increasing the situation that new test data field need change database structure.
In the above embodiments, for the test report data that generate in the test statistics result who generates in the step 308, test result data file in the step 310 and the step 311, can also adopt database table to carry out structured storage, after these data storage are tables of data, help the extraction of data and represent in modes such as forms, and can further be processed into data modes such as pie chart, curve map or post figure and represent, be convenient to understand test result.
Can use following tables of data:
1, test detail list is used to write down the use-case number and the input data sequence number of test input, also writes down the error reason sign indicating number and the test duration of this test record simultaneously.Its organization definition such as table 2 are described.
Figure 200610030778200031
Table 2 test detail list
2, test result field list is used for the field name of logging test results, comprises test result Field ID, test result field number, module numbering, the English name of this field and the Chinese name of this field.
3, test result data table is used for the data of logging test results, comprises test result data ID, test result data numbering, test result field number, test result data value and detailed numbering.
4, test result deck watch is used for the comparison data of logging test results, comprises comparison ID, comparison numbering, detailed numbering, test data and test data for the second time for the first time.
5, test result subtotal table is used to write down the test case of each test case, comprises that subtotal ID, test sequence, module title, test case numbering, test record number, test are by number, test crash number and test percent of pass.
6, test report table is used to write down test report information, comprises report ID, test case numbering, module title, matched record number, does not match and write down number and matching rate.
Referring to Fig. 4, be device block diagram of the present invention, comprising:
Process control module 401 is used for calling the function corresponding test script according to the configuration of test cases, and the progress of control and measuring, adds up the result of every test;
Test cases read module 402 is used to read pre-configured test cases;
Functional test script module 403, comprise at least one functional test script, be used to call the respective page window that browser is opened tested Web application system, write down the distinguishing mark of described page window, and call browser interface the data in the described test cases and the operation import in the subsequent page of described page window and described page window, obtain test result;
Report generation module 404, the test result and the expected result that are used for obtaining compare and generate test report.
Preferably, also comprise test cases configuration module 405, be used for configuration and preserve test cases.
Preferably, described test cases configuration module is a text editor, uses text storage test cases.Comprise also test cases preliminary examination module 407 is used to check whether the test cases that reads in meets the case format specification, if do not meet, then misregistration daily record, and withdraw from.
Preferably, described test cases configuration module can also be the case configuration tool, is used to adopt window mode that the data of all test cases are carried out unified management.Also comprise the test cases storehouse, be used to preserve the test cases data of case configuration tool configuration.
Under the control of process control module 401, by the test cases in the test cases read module 402 read test case files, whether 407 pairs of test cases of test cases preliminary examination module meet the case format specification is judged, if do not meet, by process control module 401 misregistration daily records and withdraw from test macro, if meet, then begin to test, read a test transaction, according to its function that will test, the function corresponding test script in the calling function test module 403, functional test script is opened the Web application system page, submit test parameter to, up to obtaining the test result page, the analytical test results page obtains test result, report generation unit 404 draws test report to test result and contrasting data comparison as a result.
More than the method and apparatus of the automatic test of a kind of Web application system provided by the present invention is described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (15)

1. the automated testing method of a Web application system is characterized in that, comprising:
Read pre-configured test cases, obtain the function type of described test cases;
Call the function corresponding test script according to the function type in the described test cases;
Described functional test script is opened the respective page window of tested Web application system according to the function type of described test cases, writes down the distinguishing mark of described page window;
Described functional test script is called the interface of browser according to the distinguishing mark of described page window, and data in the described test cases and operation are imported in the subsequent page of described page window and described page window, obtains test result.
2. method according to claim 1 is characterized in that, also comprises after described method:
Described test result and the expected result that sets in advance are compared and generate test report.
3. method according to claim 1 and 2 is characterized in that, the distinguishing mark of described page window is the process number of window, title or pointer.
4. method according to claim 1 and 2 is characterized in that, the step of described functional test script and the process step of described function type are corresponding one by one.
5. method according to claim 1 and 2 is characterized in that, described pre-configured test cases is with the text editor configuration, and uses text to preserve test cases.
6. method according to claim 5 is characterized in that, after described read test case, before described calling function test script, also comprises: judge whether test cases meets the case format specification, and under incongruent situation, finish test procedure.
7. method according to claim 1 and 2 is characterized in that, described pre-configured test cases is with case configuration tool configuration, and uses database table to preserve test cases.
8. method according to claim 2 is characterized in that, described test cases comprises: login user data, testing parameter data and contrasting data as a result.
9. the automatic test device of a Web application system is characterized in that, comprising:
The case read module is used to read pre-configured test cases, obtains the function type of described test cases;
Process control module is used for calling the function corresponding test script according to the function type of test cases;
The functional test script module, comprise at least one functional test script, be used to open the respective page window of tested Web application system, write down the distinguishing mark of described page window, and according to the distinguishing mark of described page window, call the interface of browser, data in the described test cases and operation are imported in the subsequent page of described page window and described page window, obtain test result.
10. device according to claim 9 is characterized in that, also comprises the report generation module, is used for comparing and generate test report with obtaining test result and expected result.
11. device according to claim 9 is characterized in that, also comprises the test cases configuration module, is used for configuration and preserves test cases.
12. device according to claim 11 is characterized in that, described test cases configuration module is a text editor, uses text storage test cases.
13. device according to claim 12 is characterized in that, also comprises test cases preliminary examination module, is used to judge whether test cases meets the case format specification, under incongruent situation, withdraws from test macro.
14. device according to claim 11 is characterized in that, described test cases configuration module is the case configuration tool, uses database table storage test cases.
15. device according to claim 14 is characterized in that, also comprises case library, is used for the good test cases data of stored configuration.
CN2006100307782A 2006-08-31 2006-08-31 Automatization test method and device for Web applied system Active CN101135989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006100307782A CN101135989B (en) 2006-08-31 2006-08-31 Automatization test method and device for Web applied system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006100307782A CN101135989B (en) 2006-08-31 2006-08-31 Automatization test method and device for Web applied system

Publications (2)

Publication Number Publication Date
CN101135989A CN101135989A (en) 2008-03-05
CN101135989B true CN101135989B (en) 2010-11-24

Family

ID=39160096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006100307782A Active CN101135989B (en) 2006-08-31 2006-08-31 Automatization test method and device for Web applied system

Country Status (1)

Country Link
CN (1) CN101135989B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635655B (en) * 2008-07-25 2012-01-04 阿里巴巴集团控股有限公司 Method, device and system for page performance test

Families Citing this family (53)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593146B (en) * 2008-05-30 2013-01-23 国际商业机器公司 Method and device for automatically testing page
CN101526919B (en) * 2009-04-29 2011-12-28 福建星网锐捷网络有限公司 Method for generating script files to test Web application software and device thereof
CN102012857B (en) * 2009-09-08 2012-10-10 中国工商银行股份有限公司 Device and method for automatically testing web page
CN101866314A (en) * 2010-05-31 2010-10-20 中山大学 Software testing method and software testing system
CN101847124A (en) * 2010-05-31 2010-09-29 中山大学 Method for realizing browser testing and browser testing system
US8881110B2 (en) 2010-06-11 2014-11-04 Hewlett-Packard Development Company, L.P. Role-based automation scripts
CN102098550A (en) * 2010-11-30 2011-06-15 广东星海数字家庭产业技术研究院有限公司 Embedded browser-based digital television system and method
US8700985B2 (en) * 2011-06-20 2014-04-15 Google Inc. Collecting user feedback about web pages
CN103164328B (en) * 2011-12-12 2016-06-22 ***通信集团陕西有限公司 The regression testing method of a kind of business function, Apparatus and system
CN102595184B (en) * 2012-01-19 2014-04-16 青岛海信传媒网络技术有限公司 Intelligent television automation test method and system
CN103368762B (en) * 2012-04-05 2017-03-15 百度在线网络技术(北京)有限公司 Big data contrast test method, system and device
CN103377127B (en) * 2012-04-28 2016-04-13 阿里巴巴集团控股有限公司 The development and testing system of web page product, method of testing and device
CN103457783B (en) 2012-05-31 2017-04-12 国际商业机器公司 Method and system for testing mobile network application
CN103810094B (en) * 2012-11-14 2016-10-05 中国农业银行股份有限公司 Execution method, device and the testing tool of a kind of test cases
CN103198017B (en) * 2013-04-07 2016-04-13 武汉天喻信息产业股份有限公司 A kind of method of test data integrity protection and device
CN104424162A (en) * 2013-08-21 2015-03-18 鸿合科技有限公司 Method and device for generating record of document used recently
CN104516908A (en) * 2013-09-29 2015-04-15 华为技术有限公司 Database access method and device
WO2015062003A1 (en) * 2013-10-31 2015-05-07 Hewlett-Packard Development Company, L.P. User interface tester
CN103984625A (en) * 2014-05-12 2014-08-13 浪潮电子信息产业股份有限公司 System robustness testing method based on use rate analysis
CN103984626B (en) * 2014-05-13 2017-07-28 华为技术有限公司 A kind of method and device for generating test case script
CN104361012B (en) * 2014-10-13 2018-03-27 交控科技股份有限公司 A kind of method of testing and device of city track traffic engineering track data
US9753843B2 (en) * 2014-11-20 2017-09-05 Accenture Global Services Limited Automated testing of web-based applications
CN104461903B (en) * 2014-12-26 2017-07-28 北京奇虎科技有限公司 The method and apparatus of test client based on browser
CN104657639B (en) * 2015-02-02 2017-08-25 中国科学院数据与通信保护研究教育中心 A kind of method of testing and system of operating system identity authentication scheme
CN105117343A (en) * 2015-09-18 2015-12-02 厦门美图移动科技有限公司 Method and device for performing automatic testing based on text
CN105373474B (en) * 2015-11-10 2018-07-06 中国建设银行股份有限公司 A kind of test method and device for operation system
CN105389257B (en) 2015-11-11 2017-12-12 中国建设银行股份有限公司 A kind of systematic parameter processing method, apparatus and system
CN105930259B (en) * 2015-12-23 2018-10-16 ***股份有限公司 A kind of method and apparatus of WEB regression tests
CN106920346A (en) * 2015-12-28 2017-07-04 航天信息股份有限公司 The automated testing method of single business is received based on POS
CN105912681A (en) * 2016-04-14 2016-08-31 国家电网公司 Aging testing method and system for electricity marketing database
CN106227652B (en) * 2016-07-12 2019-05-28 合一网络技术(北京)有限公司 Automated testing method and system
CN106201800A (en) * 2016-07-15 2016-12-07 北京捷科智诚科技有限公司 A kind of test design platform
CN106375140A (en) * 2016-08-22 2017-02-01 腾讯科技(深圳)有限公司 Pressure testing method and device
CN106302025B (en) * 2016-08-22 2021-06-08 腾讯科技(深圳)有限公司 Automatic testing method and device for communication protocol
CN108228443B (en) * 2016-12-14 2021-10-15 北京国双科技有限公司 Web application testing method and device
CN107145440B (en) * 2017-04-06 2020-07-24 百富计算机技术(深圳)有限公司 Application program testing method and device and computer equipment
CN107229507A (en) * 2017-05-31 2017-10-03 郑州云海信息技术有限公司 A kind of container mirror image construction method and device
CN107508720B (en) * 2017-07-25 2021-08-27 ***股份有限公司 Automatic testing method and device
CN107527202B (en) * 2017-08-29 2020-12-01 ***股份有限公司 Transaction data diagnosis method and device and computing equipment
CN108255704B (en) * 2017-11-07 2020-01-10 中国平安人寿保险股份有限公司 Abnormal response method of script calling event and terminal thereof
CN108111368B (en) * 2017-12-19 2021-01-26 ***股份有限公司 Function test method and device of transaction system
CN109254911A (en) * 2018-08-13 2019-01-22 兴业证券股份有限公司 Transaction software market monitoring method and storage medium
CN109345383A (en) * 2018-08-13 2019-02-15 兴业证券股份有限公司 Security software information service monitoring method and storage medium
CN111221719B (en) * 2018-11-23 2023-04-14 青岛海信网络科技股份有限公司 Automatic test system and test method
CN109634857B (en) * 2018-12-05 2022-02-15 东软集团股份有限公司 Method, device and storage medium for testing page object
CN109684205B (en) * 2018-12-12 2022-02-08 恒生电子股份有限公司 System testing method, device, electronic equipment and storage medium
CN109828900A (en) * 2018-12-14 2019-05-31 深圳壹账通智能科技有限公司 Test script automatic generation method, device, electronic equipment and storage medium
CN110162459A (en) * 2019-04-15 2019-08-23 深圳壹账通智能科技有限公司 Test cases generation method, device and computer readable storage medium
CN110489343A (en) * 2019-07-31 2019-11-22 广州微算互联信息技术有限公司 A kind of conversational services test method, system, device and storage medium
CN110737900B (en) * 2019-09-30 2021-08-10 北京智明星通科技股份有限公司 Webpage function testing method and device, server and computer readable storage medium
CN112612710B (en) * 2020-12-28 2022-02-25 上海安畅网络科技股份有限公司 Automatic test method and system
CN113010416A (en) * 2021-02-26 2021-06-22 中国工商银行股份有限公司 Bank counter transaction automatic testing method and device
CN113312259B (en) * 2021-05-26 2023-12-29 深圳前海微众银行股份有限公司 Interface testing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1657634A2 (en) * 2004-11-12 2006-05-17 Empirix Inc. Test agent architecture
CN101056212A (en) * 2006-04-10 2007-10-17 上海欣泰通信技术有限公司 Method for Web page ADSL test via push technology

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1657634A2 (en) * 2004-11-12 2006-05-17 Empirix Inc. Test agent architecture
CN101056212A (en) * 2006-04-10 2007-10-17 上海欣泰通信技术有限公司 Method for Web page ADSL test via push technology

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635655B (en) * 2008-07-25 2012-01-04 阿里巴巴集团控股有限公司 Method, device and system for page performance test

Also Published As

Publication number Publication date
CN101135989A (en) 2008-03-05

Similar Documents

Publication Publication Date Title
CN101135989B (en) Automatization test method and device for Web applied system
US11675691B2 (en) System and method for performing automated API tests
US7916925B2 (en) System and method for generating magnetic ink character recognition (MICR) testing documents
US8701092B1 (en) System and method for testing applications
CN104461863A (en) Service system testing method, device and system
CN101339532A (en) Web application system automatized test method and apparatus
CN104657274A (en) Method and device for testing software interface
CN112540924A (en) Interface automation test method, device, equipment and storage medium
CN107784068A (en) Acquisition methods, device, storage medium, processor and the service end of data variation
CN110309099A (en) Interface managerial method, device, equipment and computer readable storage medium
CN107357721B (en) Method and device for testing system
CN101170568A (en) A method for automatically generating and executing Telnet command via batch mode
CN111596899A (en) Database migration method, system, equipment and storage medium based on Java development
CN113094419A (en) Data analysis system, method, client and storage medium
CN109857716B (en) System interaction log recording method and device, storage medium and server
CN111552648A (en) Automatic verification method and system for application
US20230195792A1 (en) Database management methods and associated apparatus
CN111639478B (en) Automatic data auditing method and system based on EXCEL document
CN115525555A (en) Test script generation method and device, electronic equipment and storage medium
KR100969877B1 (en) Test automating system
US11810022B2 (en) Contact center call volume prediction
CN114490892A (en) Data transmission method and device based on datax
Bailey et al. FRAM memory technology-advantages for low power, fast write, high endurance applications
CN112559641A (en) Processing method and device of pull chain table, readable storage medium and electronic equipment
US11989123B1 (en) Systems, methods, and media for updating, managing, and maintaining a reference template for web service API testing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant