CN106445805A - Visualized testing report generation method - Google Patents

Visualized testing report generation method Download PDF

Info

Publication number
CN106445805A
CN106445805A CN201610735414.8A CN201610735414A CN106445805A CN 106445805 A CN106445805 A CN 106445805A CN 201610735414 A CN201610735414 A CN 201610735414A CN 106445805 A CN106445805 A CN 106445805A
Authority
CN
China
Prior art keywords
test
action
current
case
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610735414.8A
Other languages
Chinese (zh)
Other versions
CN106445805B (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.)
Shanghai Fortune Mdt Infotech Ltd
Original Assignee
Shanghai Fortune Mdt Infotech 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 Fortune Mdt Infotech Ltd filed Critical Shanghai Fortune Mdt Infotech Ltd
Priority to CN201610735414.8A priority Critical patent/CN106445805B/en
Publication of CN106445805A publication Critical patent/CN106445805A/en
Priority to PCT/CN2017/098687 priority patent/WO2018036529A1/en
Application granted granted Critical
Publication of CN106445805B publication Critical patent/CN106445805B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a visualized testing report generation method and belongs to the technical field of software testing. The method includes: selecting a testing action as a current action and using a testing case corresponding to the current action as a current case; comparing a serial number of a display frame with a serial number of a testing frame of the current action; in the positioned display frame, capturing a testing control matching with the current action as a current control and operating the current control according to a corresponding operation method based on attributes of the current control, then outputting an operation outcome; comparing the operation outcome with an anticipated outcome, and saving a corresponding comparative result as a testing outcome of the current action; and obtaining the operation outcome and the anticipated outcome of every testing action in every testing case separately, filling in a testing report, and displaying the testing report in a report frame. The beneficial effects of the technique solution are as follows: the visualized testing is performed automatically, with a more efficient testing process and a more intuitive testing report.

Description

A kind of visual testing report-generating method
Technical field
The present invention relates to software testing technology field, more particularly to a kind of visual testing report-generating method.
Background technology
Traditional software testing technology has a stage of manual intervention, tester need to arrange manually test case with And including various test actions, and manual testing results, manual contrastive test result and sentenced according to comparison result Break and test whether successfully.In other words, the step of there is excessive manual intervention in existing software testing technology, therefore can take Substantial amounts of manual resource, extends the time of software test, reduces testing efficiency.
Meanwhile, in existing software testing technology, its test parameter is arranged generally only has professional test personnel using some The code level that could grasp arranges to realize, and therefore causes test setting more complicated, it is desirable to which tester has and to match Code knowledge and technology could carry out parameter setting to software test;
In traditional software testing technology, the test report for automatically generating after test terminates is usual.
Content of the invention
According to the above-mentioned problems in the prior art, a kind of technical side of visual testing report-generating method is now provided Case, it is intended to which the visualization for realizing test is carried out automatically so that test process more intuitively more efficiently, simplifies the operation of test.
Technique scheme is specifically included:
A kind of visual testing report-generating method, wherein, sequentially presets multiple test cases, and each described test case is corresponded to In multiple test actions for sequentially executing, each described test action is corresponding to a test control, each described test action Corresponding to an operational approach, each described test control corresponds to test pictures, and each described test action corresponds to multiple Potential result;
By corresponding for all described test case of this needs execution all test actions according to the test case quilt The one test action list of order arrangement form of execution;
The visual testing report-generating method includes:
Step S1, selects a test action in the action lists as current action, and by the current action The corresponding test case is tested as current use-case;
Step S2, by the numbering of the display picture in system browser in test process, and the current action is corresponding described The numbering of test pictures is compared, to position to the display picture;
Step S3, crawl in the display picture being positioned is matched with the test control of the current action as working as Front control;
Step S4, according to the action attributes of the current action, according to the corresponding operational approach to working as described in crawled Front control is operated, subsequently the operating result of the output correspondence current action;
Step S5, the operating result is compared with the potential result of the corresponding current action, described to judge Whether current action runs succeeded, and corresponding comparative result is saved as the test result of the current action;
Step S6, all test cases all tested finish after, obtain each in each described test case respectively The operating result of the test action and the potential result are simultaneously filled in a test report;
Step S7, the test report is given in a report screen, with backed off after random.
Preferably, the visual testing report-generating method, wherein, before being tested, uses for test each described Example sets first setting content respectively, and sets second setting content respectively for each described test action, And the one test case list of all described test case arrangement form that this needs is executed, each described test case row Table corresponds to a test case;
Each described first setting content includes the testing attribute in the corresponding test case respectively;
Each second setting content includes the testing attribute of the corresponding test action respectively;
Then step S6 is specifically included:
Step S61, selects first test case in the test case list as report use-case;
Step S62, first setting content for being associated with the report use-case is filled in the test report;
Step S63, selects first test action in the test action list as report action;
Step S64, will be associated with second setting content, the operating result and the potential result of the report action It is filled in the test report respectively;
Step S65, the test action of the next one in the steering test action list, and judge that the next test is dynamic Whether make corresponding to the new test case in the test case list:
If so, then using the new test case as the report use-case, and using the next test action as described Report action, is then returned to step S62;
If it is not, then using the next test action as the report action, being then returned to step S64.
Preferably, the visual testing report-generating method, wherein, in step S64, sets filling described first While content, the initialization data for being associated with the report use-case is filled in the test report.
Preferably, the visual testing report-generating method, wherein, in step S1, is associated with described working as in execution During first test action of front use-case, extract described in first test control corresponding to the current use-case Test pictures are used as unlatching picture, and open the unlatching picture by being associated with the address for opening picture, right to start The current use-case is tested.
Preferably, the visual testing report-generating method, wherein, in step S1, is associated with described working as in execution Before each described test action of front use-case, the action attributes according to the test action judge whether needs open corresponding to The test pictures of the test control of the test action, and extract the ground for being associated with the test pictures when needed Location is to open the test pictures.
Preferably, the visual testing report-generating method, wherein, in step S1, when will be true for the test case The initialization data of the current use-case is extracted after thinking the current use-case, to being associated with the data base of the current use-case Data carry out initialization operation, to start to test the current use-case;
The address for extracting the test pictures of first test control corresponding to the current use-case is opened as described The unlatching address of picture is opened, and the unlatching address is based on, opened using the start-up parameter for being associated with the current use-case described Picture is opened, to test to the start picture.
Preferably, the visual testing report-generating method, wherein, step S2 is specifically included:
Acquisition is corresponding to the numbering of the test pictures of the follow-up test action of the current action, while monitoring institute The numbering of display picture is stated, when the numbering of the display picture is consistent with the numbering of the test pictures, confirms the display Picture handover success, to position to the display picture.
Preferably, the visual testing report-generating method, wherein, step S2 is specifically included:
The numbering of the follow-up test pictures corresponding to the current action is obtained, while the volume of the monitoring display picture Number, when the numbering of the display picture is consistent with the numbering of the test pictures, confirm the display picture handover success, with The display picture is positioned.
Preferably, the visual testing report-generating method, wherein, in step S3, grabs the display picture In one described test control after, by described test control control property corresponding with the current action described test control The control property of part is mated and is obtained matching result, and when the matching result represents that the match is successful by crawled institute State test control and orientate the current control as.
Preferably, the visual testing report-generating method, wherein, in step S4, is grasping to the control The action attributes of the current action before work, are first determined whether, and is determined to the current control according to the action attributes Part is operated:
If the action attributes of the current action are for setting value, the operation carried out by the current control be to the control Assignment;
If the action attributes of the current action are operation command, the operation carried out by the current control for holding The row operational order is to operate the control;
If the action attributes of the current action operate the current control to send corresponding for sending text line message The text line message;
If the action attributes of the current action are replicated for internal memory, the value of the current control is stored in Installed System Memory In;
If the action attributes of the current action are internal memory assignment, the value of the current control to be changed to the system The value for preserving in internal memory;
If the action attributes of the current action are logical judgment, assign for representing to being stored in the Installed System Memory The expression formula of value is judged, and skips the default follow-up test for being associated with the current action according to judged result Action;
If the action attributes of the current action are to be operated by the way of function key combination, pass through to system Input equipment sends the mode of corresponding function key compound command and operates the current control.
Preferably, the visual testing report-generating method, wherein, in step S5, according to the operating result Type carries out the comparison between the operating result and the potential result:
If the operating result is the result of the control that the operation display picture includes, browse described in system reading The information of the corresponding control of the display picture in device, and the information for reading is compared with the potential result Relatively;
If the operating result is the result corresponding to the column number evidence in the browser, system is read in the browser The corresponding column number evidence, and the information for reading is compared with the potential result;
If the operating result is the data in the data base of system, system reads the data in the data base, and reads To information be compared with the potential result.
Preferably, the visual testing report-generating method, wherein, in step S5, judges that the current action is No run succeeded:
If so, the operating result for being associated with the current action is then preserved, continues thereafter with execution step S5;
If it is not, then terminating the test of the current use-case, and the next test case is jumped to, being then returned to the step S1.
Preferably, the visual testing report-generating method, wherein, in step S5, corresponding comparative result is protected After saving as the test result of the current action, the next test action is jumped to:
If the next one for the jumping to test action represents operating to global control, step S4 is returned.
The beneficial effect of technique scheme is:A kind of visual testing report-generating method is provided, test can be realized Visualization carry out automatically so that test process more directly perceived more efficiently, simplify the operation of test.
Description of the drawings
Fig. 1 is that in the preferred embodiment of the present invention, a kind of overall procedure of visual testing report-generating method is illustrated Figure;
Fig. 2 is the idiographic flow schematic diagram of visual testing report-generating method in the preferred embodiment of the present invention;
Fig. 3-4 is the schematic diagram of default test case in the preferred embodiment of the present invention;
Fig. 5 is the schematic diagram of default picture in the preferred embodiment of the present invention;
Fig. 6 is the schematic diagram of default test action in the preferred embodiment of the present invention;
Fig. 7 is the schematic diagram of preset control in the preferred embodiment of the present invention;
Fig. 8-10 is in the preferred embodiment of the present invention, the schematic diagram of different potential result.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art obtained on the premise of creative work is not made all its His embodiment, belongs to the scope of protection of the invention.
It should be noted that in the case of not conflicting, the embodiment in the present invention and the feature in embodiment can phases Mutually combine.
The invention will be further described with specific embodiment below in conjunction with the accompanying drawings, but not as limiting to the invention.
In the preferred embodiment of the present invention, based on the above-mentioned problems in the prior art, a kind of visualization is now provided Test report generation method.In the visual testing report-generating method, sequentially multiple test cases are preset first, each test Use-case corresponds to multiple test actions for sequentially executing, and each test action corresponds only to a test control, while each survey Examination action corresponds to an operational approach, that is, be directed to a control, only exist a kind of operational approach.Each test control is corresponded to One test pictures.Each test action corresponds to multiple potential results;
All test actions of all test cases that this needs is executed arrange shape according to the order that test case is performed Become a test action list;
Then as shown in figure 1, specifically including the step of above-mentioned visual testing report-generating method:
Step S1, selects a test action in action lists as current action, and corresponding for current action test is used Example is tested as current use-case;
Step S2, by the numbering of the display picture in system browser in test process, and the corresponding test pictures of current action Numbering be compared, to position to display picture;
Step S3, captures the test control for being matched with current action as current control in the display picture being positioned;
Step S4, according to the action attributes of current action, grasps to crawled current control according to corresponding operational approach Make, subsequently the operating result of the corresponding current action of output;
Step S5, operating result is compared with the potential result of corresponding current action, to judge whether current action executes Success, corresponding comparative result is saved as the test result of current action;
Step S6, all test cases all tested finish after, obtain each test action in each test case respectively Operating result and potential result be filled in a test report;
Step S7, test report is given in a report screen, with backed off after random.
In a specific embodiment, being preset in multiple test cases, each test case first includes that multiple tests are dynamic Make, each test action corresponds to a test control.Each test control corresponds to test pictures, therefore determines each test Use-case corresponds to multiple test pictures.
Specifically, above-mentioned test case is sequentially default, i.e., preset multiple test cases according to certain execution sequence, One test case goes to execute next test case after being finished.Similarly, in same test case, different Test action also arranged in sequence, each test action corresponds respectively to a test control, and each test control is corresponded to respectively In test pictures.Above-mentioned test pictures can be divided into unlatching picture and subsequent pic.For a test case For, picture only one of which is opened, subsequent pic there may be multiple, and above-mentioned unlatching picture can be the of test case execution One picture, subsequent pic is after above-mentioned unlatching picture and the display picture of sequential.Each test pictures(Including Open picture and subsequent pic)The picture being corresponding to one test control of operation.For example for this test of User logs in For use-case, can wherein include the test action of input username and password, and click on the test action for logging in control.Then The test pictures of the above-mentioned login control of correspondence can be to be supplied to the login screen that user can be input into username and password, and And the picture can as the unlatching picture of test case, multiple subsequent pic of above-mentioned test case can be login successfully after Other pictures of the system browser of display, or show the picture of login failure.Above-mentioned picture is according to test logic sequence.
In above-described embodiment, the setting interface of test case is as shown in Figure 3-4.The name of the unlatching picture in the test case Referred to as " accounts information ", entitled " entering modification account password interface " of the test case, the early stage association of the test case Test case is " enter accounts information interface ", correspondingly, the early stage association test case of the test case also include " login ", " entrance system administration " and " entering accounts information interface ", above-mentioned early stage associates test case sequential.Survey shown in Fig. 2 The setting interface of example on probation be visualization interface, not in prior art code level setting interface, therefore can simplify test The setting up procedure of use-case.Above-mentioned default test case list is shown in Fig. 4.
In above-described embodiment, the test pictures of test case are associated with(Including opening picture and subsequent pic)Setting circle Face is as shown in Figure 5.Image information in Fig. 5 includes panel number(ID), picture title and picture reference address.So-called Reference address refers to URL(Uniform Resoure Locator, unified resource is positioned)Address.It is same that above-mentioned picture arranges interface Sample is visualization interface.
In above-described embodiment, test action arrange interface as shown in fig. 6, the test action in Fig. 6 be configurable to " embedding Enter search condition ", wherein it is associated with the title of multiple display pictures, multiple control titles, multiple action attributes(Method)And Assignment of multiple test actions etc..It is easy-operating that the setting interface of above-mentioned test action is similarly visualization.
In above-described embodiment, the corresponding operational approach of each test action can be obtained through series of computation by action attributes Arrive, and above-mentioned action attributes can be represented by corresponding expression formula.
In above-described embodiment, the test action for being associated with different test cases being provided with is formed an action column Table.Specifically, such as arranged in sequence is respectively arranged with test case A, B and C, and in test case A, arranged in sequence is respectively provided with There are test action A1, A2 and A3, arranged in sequence is respectively arranged with test action B1 and B2 in test case B, in test case C Middle arranged in sequence is respectively arranged with test action C1, C2, C3 and C4, then above-mentioned action lists can think arranged in sequence A1, A2、A3、B1、B2、C1、C2、C3、C4.
In above-described embodiment, the setting interface of the associated control of each test action is as shown in Figure 7.In figure 6, each The control information of control includes control sequence number(ID), control title, control type, the front-end technology of control, control positioning use Property Name, control positioning property value, the maximum/minimum/greatest length/minimum length of control, control write from memory Recognize correct value list/mistake value list of value, control etc..The setting screen of above-mentioned control is also visualization picture.
In above-described embodiment, the setting of above-mentioned test case, test action, picture and control etc. all can be according to following Two ways is carried out:1)Preset by system;2)Each test elements have been preset in systems, then user can pass through Corresponding visualization interface selects different test elements combining to form test case, test action, picture and control etc. Configuration information.
The setting interface of the potential result described in above-described embodiment can hereinafter be described in detail.
Then in above-described embodiment, for all test cases that this needs is executed, according to the sequence of different test cases, By including all test actions be placed in action lists.
Then in above-mentioned steps S1, a test action is selected to start to execute test first.Specifically, dynamic for the test Make, it may be determined that corresponding test case, and the test case being determined is started test as current use-case.
In above-described embodiment, after have good positioning current action and current use-case, the switching of the display picture of browser is monitored State, finds the picture number that browser currently loads the display picture for completing, and the numbering by the test pictures of current action Contrasted with the numbering of the display picture, i.e., the survey with corresponding current action is gone according to the picture number of current display picture Examination picture is mated, so as to the display picture of current browser to be orientated as in current use-case corresponding to current action Test pictures.
In above-described embodiment, after display picture of having good positioning, a point analysis is carried out to the display content in display picture, and is grabbed The real time information of all controls in display picture is taken, according to relevant information and the test action of the control for capturing in display picture Corresponding control information(Such as positioning attribute)Mated, such that it is able to the control of accurate positioning, and record and be positioned The positional information of control.Specifically, after grabbing a control in display picture, by the control property of control and current action The control property of corresponding test control is mated and is obtained matching result, and will be by when matching result represents that the match is successful The control of crawl orientates current control as.For example, after grabbing a control, by the control and test corresponding to test action Control is compared:If it is different, it is not the control of current action then to represent;If identical, then it represents that be the control of current action.With Afterwards the control that the match is successful is confirmed as current control.Therefore, the mode of above-mentioned orient control can include:Initially with test Test control corresponding to action navigates to test pictures, and the test pictures are currently displaying display picture.Due to A control may not only be included in display picture, therefore also need in the display picture to contrast by control property Mode navigates to the test control corresponding to above-mentioned test action, to complete to test the positioning of control.
In above-described embodiment, after test control is navigated to, can be according to the action attributes of current action to the test Control executes corresponding operation, and subsequent current action is finished, the operating result of the corresponding current action of record.
In above-described embodiment, after obtaining operating result, corresponding with current action for operating result potential result is carried out Relatively, to judge whether current action operates successfully, and comparative result is recorded.
In above-described embodiment, after the process for completing above-mentioned steps S1- step S5, can be directly to next test Action, and return above-mentioned steps S1, then the generating process of above-mentioned test report(Step S6)Can complete in this test laggard OK, i.e., all test cases all tested finish after carry out.
Then in above-described embodiment, in above-mentioned steps S6, all test cases all tested finish after, can obtain respectively The operating result of each test action in each test case and potential result are simultaneously filled in a test report, and will test Report is given in a report screen.
In sum, in technical solution of the present invention, by visual operational approach, test case, survey will be pre-set Examination action, test control, the process of the test parameter such as test pictures and potential result become to be easily understood, and can be convenient Ground carries out visual software test automatically according to these test parameters being provided, and disclosure satisfy that the software test of people is needed Ask, and the efficiency of software test is improved, subsequently according to visual testing process, by test result also by visual side Formula is presented in test report, is easy to user to check.
In the preferred embodiment of the present invention, before being tested, one first is set respectively for each test case Setting content, and second setting content, and the institute that this needs is executed is set respectively for each test action There is the one test case list of test case arrangement form, each test case list corresponds to a test case;
Each first setting content includes the testing attribute in corresponding test case respectively;
Each the second setting content includes the testing attribute of corresponding test action respectively;
Above, the testing attribute of the test case in above-mentioned first setting content, can wherein include the use of the test case Example attribute, the information such as use-case title and test purpose.
Correspondingly, the testing attribute of the test action in above-mentioned second setting content, can wherein include the test action Action description, the corresponding control of action, the operational approach of action, the assignment of action, waiting time of operational motion and dynamic The information such as the rear picture that makees.
Then as shown in Fig. 2 above-mentioned steps S6 are specifically included:
Step S61, selects first test case in test case list as report use-case;
Step S62, the first setting content for being associated with report use-case is filled in test report;
Step S63, selects first test action in test action list as report action;
Step S64, the second setting content, operating result and the potential result that are associated with report action are filled into test report respectively In announcement;
Step S65, the next test action in slew test action lists, and judge whether next test action corresponds to New test case in test case list:
If so, then using new test case as report use-case, and using next test action as report action, it is then returned to Step S62;
If it is not, then using next test action as report action, being then returned to step S64.
Specifically, in the preferred embodiment of the present invention, first test case in test case list is obtained automatically As report use-case, and the first setting content of this report use-case is filled into the specified location of test report.The present invention is relatively In good embodiment, while the initialization data of above-mentioned report use-case can also be filled into the specified location of test report(Close Can hereinafter describe in detail in initialization data).
The test action list of this report use-case is subsequently obtained, and obtains automatically first test in test action list Action, as report action, the second setting content of this report action correlation is filled into the specified location of test report, and Further obtain the corresponding operating result of above-mentioned report action and potential result and be filled into the specified location of test report.
Next test action is subsequently diverted to, and judges that next test action indicates whether a new test case:
If so, then using the new test case as report use-case, and using the next test action as report action, subsequently Above-mentioned steps S64 are returned, to be filled with to test report according to new report use-case and report action;
If it is not, then using the next test action as report action, above-mentioned steps S67 are then returned to, with original report According to new report action, test report is filled with the basis of use-case.
In the preferred embodiment of the present invention, in above-mentioned steps S67, the next test in slew test action lists is dynamic After work, in addition it is also necessary to judge:
In the preferred embodiment of the present invention, being generated as above-mentioned test report is full automatic, and user is only needed to according to integrated The case list of the test button having including multiple test cases selects suitably test case, and waits the test for automatically generating Report shows in report interface.
In one preferred embodiment of the present invention, in above-mentioned steps S1, execute be associated with current use-case each Before test action, the action attributes according to test action judge whether to need to open the test control corresponding to test action Test pictures, and the address for being associated with test pictures is extracted when needed to open test pictures.Specifically, above-described embodiment In, before each test action is executed, whether need under being required for judging to load the corresponding test control of the test action Test pictures:If desired, then corresponding test pictures are loaded;If need not, any variation is not done to picture.Above-described embodiment In, the extraction of above-mentioned test pictures is to be realized by the URL address of the corresponding picture of the corresponding control of extraction with loading.Specifically Ground, the URL address of the corresponding picture correlation by extracting corresponding control, the start-up parameter that is specified using current use-case, and clear Look in device and corresponding URL address is opened, to test to current use-case.If currently assigned browser is opened, only Need to update the display picture in browser by extracting the related URL address of picture.Also, in above-described embodiment, The action attributes of so-called test action, can wherein include the incidence relation between test action and the action of its tandem. Then system can judge whether to need to extract corresponding URL address by judging test action and the relation of its fore-aft motion And open corresponding test pictures.
In another preferred embodiment of the present invention, in above-mentioned steps S1, the first of current use-case is associated with executing During individual test action, test pictures corresponding to first of current use-case test control are extracted as picture is opened, and pass through Unlatching picture is opened in the address for being associated with unlatching picture, to start to test current use-case.Specifically, above-described embodiment In, only execute a test case in first test action when, just load the corresponding test control of the test action Test pictures, using as open picture.Specifically, when test is started first, the in above-mentioned action lists can be selected One test action simultaneously starts test.After then choosing test action, using the test action as current action, and according to current Operating position fixing subsequently extracts the corresponding survey of the current action to corresponding test case using the test case as current use-case The corresponding test pictures of examination control simultaneously proceed by test.In above-described embodiment, due to starting test action when testing first For first test action, then the unlatching picture that the above-mentioned picture being extracted should also for corresponding current use-case.Similarly, plus Carrying the method for picture being opened with extraction identical with upper one embodiment, that is, passes through to extract the URL address for opening picture and use to work as The start-up parameter that front use-case is specified, opens to realize in system specified browser.
In the preferred embodiment of the present invention, before starting to execute each test case above-mentioned, the test is set first The initialization data of use-case, i.e., carry out initialization operation to the data of test case.So-called initialization operation is carried out to data, its In can include:Initialization process is done to corresponding data in data base, leaving with the test data before avoiding affects this Test, or add corresponding initialization data in data base, to form the initialization test environment of a test, it is ensured that Uniformity of environment that test starts etc..
Therefore, in a preferred embodiment of the present invention, when a new test action is gone to, it is necessary first to Judge that whether the test action is first test action of certain test case:If so, then need first to carry out test case The operation of initialization data, subsequently executes test action again;If it is not, then directly executing the test action.
Or, in another preferred embodiment of the present invention, rower is entered to the unlatching picture of each test case Note.In test process, when a unlatching picture is jumped to, then the behaviour for carrying out initialization data to corresponding test case Make, subsequently execute the corresponding test action of unlatching picture again.
In the preferred embodiment of the present invention, in above-mentioned steps S1, extract after test case is confirmed as current use-case The initialization data of current use-case, to start to test current use-case;
The address of test pictures of first test control corresponding to current use-case is extracted as picture is opened, subsequently use and work as The start-up parameter that front use-case is specified opens unlatching picture, and is tested.
In above-described embodiment, so-called start-up parameter, refer to open the standard network of the above-mentioned test pictures as starting image Network parameter.
In one preferred embodiment of the present invention, above-mentioned steps S2 are specifically included:After obtaining corresponding to current action The numbering of the test pictures of continuous test action, while the numbering of monitoring display picture, in numbering and the test picture of display picture When the numbering in face is consistent, display picture handover success is confirmed, to position to display picture.Specifically, in above-mentioned steps S2, If the numbering of current display picture is consistent with the numbering of the corresponding test pictures of the subsequent action of current action, then it is assumed that current Display picture handover success, so as to the display picture to be orientated as the test pictures of the subsequent action of current action.
In another preferred embodiment of the present invention, above-mentioned steps S2 are specifically included:Obtain corresponding to current action The numbering of follow-up test pictures, while the numbering of monitoring display picture, in the numbering of numbering and the test pictures of display picture When consistent, display picture handover success is confirmed, to position to display picture.Specifically, in above-mentioned steps S2, if current The numbering of display picture is consistent with the numbering of the subsequent pic of current action, then it is assumed that current display picture handover success, from And the display picture is orientated as the subsequent pic of current action.
In the preferred embodiment of the present invention, in above-mentioned steps S4, before operating to control, first determine whether current The action attributes of action, and according to action attributes determination, current control is operated:
If the action attributes of current action are for setting value, the operation carried out by current control be to control assignment, such as to control Give numerical value set in advance etc..
If the action attributes of current action are operation command, the operation carried out by current control for executing operation life Order is with operational controls, and such as operational order is " click ", then can to execute, to current control, the operation for clicking on control.
If the action attributes of current action are to be operated by the way of function key combination, pass through the input to system Device sends the mode of corresponding function key compound command and operates current control, and such as function key is combined as combining on input keyboard " Shift " button, " Alt " button and " Enter " button, then system can send corresponding function key combination life to keyboard Order, to notify the combination button instruction of keyboard output above three button.
If the action attributes of current action are for sending text line message, operation current control sends corresponding text line and disappears Breath, specifically can send corresponding text line message by browser.
If the action attributes of current action are replicated for internal memory, the assignment of current control is stored in Installed System Memory;Tool Body ground, can be saved in the assignment of current control or other particular values in Installed System Memory, that is, realize " cliping and pasting for Installed System Memory Plate " function.
Internal memory assignment, can be according to the action attributes of current action, by system if the action attributes of current action are Deposit saved value to assign in current control.
If the action attributes of current action are value that logical judgment, can be to preserving in internal memory judge, and according to Judged result skips default follow-up test action.Specifically, so-called logical judgment, its be in Installed System Memory represent assignment Expression formula judged, for example judge the expression formula whether more than/less than certain preset value, or judge guarantor in Installed System Memory Whether the value that deposits is true/false.And the skipping scheme and can be preset in different test actions of above-mentioned expression skip action In testing attribute.Specifically judge process can be:Judge the expression formula of numerical value for preserving in said system internal memory, and according to sentencing Disconnected result determine the need for executing above-mentioned default skip scheme, skip one or more follow-up test actions.Above-mentioned In embodiment, above-mentioned skipping in scheme can not equally include any one subsequent action, i.e., regardless of judged result, not Need to skip any one subsequent action.
In the preferred embodiment of the present invention, if as mentioned above it is possible, current picture is redirected, can monitor clear Look at the display content of device, and then new picture number is navigated to, and navigate to new test control.
In the preferred embodiment of the present invention, in above-mentioned steps S5, the type according to operating result carry out operating result with Comparison between potential result:
If operating result is the result of the control of operating display frame, system reads what the display picture in browser included The information of corresponding control, and the information for reading and potential result are compared;Specifically, in the information to control and in advance When thinking that result is compared, it is that a collection of control is carried out unifying comparison, for example, captures all controls in current display picture Corresponding information, and be compared with potential result respectively.
If operating result is the result corresponding to the column number evidence in browser, system is read corresponding one in browser Column number evidence, and the information for reading and potential result are compared;
If operating result is the data in the data base of system, the data in system reading database, and the information for reading It is compared with potential result.
Specifically, in the preferred embodiment of the present invention, setting interface such as Fig. 8-10 that above-mentioned potential result pre-sets Shown:
The potential result of control in picture is shown in Fig. 8, can wherein include the ID of control, control title, it is contemplated that the class of result Type and the value of potential result.
The potential result of form class is shown in Fig. 9, can wherein include control ID, the title of control, it is contemplated that number of packages, compare The attribute such as number of packages and list data.
The potential result of class database is shown in Figure 10, can wherein be included search condition, sort criteria, be limited bar number And the attribute such as data.
Then in the preferred embodiment of the present invention:
If control compares, then system reads the information of corresponding control in browser, and by the information for reading and potential result It is compared;
If the comparison of a column number evidence, then system read browser in corresponding column number evidence, and by the information for reading with pre- Think that result is compared;
If the comparison of data base, then system reads the data in the data base for specifying, and the information for reading and anticipation are tied Fruit is compared.
In the preferred embodiment of the present invention, in above-mentioned steps S5, judge whether current action runs succeeded:
If so, the operating result for being associated with current action is then preserved, continues thereafter with execution step S5;
If it is not, then terminating the test of current use-case, and next test case is jumped to, being then returned to step S1.
Specifically, in the preferred embodiment of the present invention:
If current action runs succeeded, jump to naturally the next test action of same current use-case and execute(Continue Execution step S5), while preserving the operating result for running succeeded.
If current action executes failure, terminate the test of current use-case, and jump to the execution of next test case(Return Return step S1), it is in action lists and the corresponding follow-up test action of current use-case is skipped, from next test case First test action restarts to be tested.
In the preferred embodiment of the present invention, when the operating result of a current action is completed, can be to browser Show the page(Represent the page of operating result)Sectional drawing preservation is carried out, and the corresponding control of current action is marked out in sectional drawing The position of part(It is labeled by control positioning before).
In one preferred embodiment of the present invention, in above-mentioned steps S5, corresponding comparative result is saved as current dynamic After the test result of work, next test action is jumped to:
If the next test action for jumping to represents operating to global control, return to step S4.
In one preferred embodiment of the present invention, in above-mentioned steps S5, corresponding comparative result is saved as current dynamic After the test result of work, next test action is jumped to.
In the preferred embodiment of the present invention, above-mentioned visual testing report-generating method goes for any one master In the software system of stream, this is because in the data for presetting above-mentioned test case, test action, test control, test pictures etc. The implementation of the driving method for needing to use in main software system has been guaranteed in advance that in storehouse, so as to ensure that main software system The driving of the method for operating in system.
Preferred embodiments of the present invention are the foregoing is only, not thereby limits embodiments of the present invention and protection model Enclose, to those skilled in the art, should can appreciate that done by all utilization description of the invention and diagramatic content Scheme obtained by equivalent and obvious change, should all be included in protection scope of the present invention.

Claims (13)

1. a kind of visual testing report-generating method, it is characterised in that sequentially preset multiple test cases, each described test Use-case corresponds to multiple test actions for sequentially executing, each described test action corresponding to a test control, described in each Test action corresponds to an operational approach, and each described test control corresponds to test pictures, each described test action The multiple potential results of correspondence;
By corresponding for all described test case of this needs execution all test actions according to the test case quilt The one test action list of order arrangement form of execution;
The visual testing report-generating method includes:
Step S1, selects a test action in the action lists as current action, and by the current action The corresponding test case is tested as current use-case;
Step S2, by the numbering of the display picture in system browser in test process, and the current action is corresponding described The numbering of test pictures is compared, to position to the display picture;
Step S3, crawl in the display picture being positioned is matched with the test control of the current action as working as Front control;
Step S4, according to the action attributes of the current action, according to the corresponding operational approach to working as described in crawled Front control is operated, subsequently the operating result of the output correspondence current action;
Step S5, the operating result is compared with the potential result of the corresponding current action, described to judge Whether current action runs succeeded, and corresponding comparative result is saved as the test result of the current action;
Step S6, all test cases all tested finish after, obtain each in each described test case respectively The operating result of the test action and the potential result are simultaneously filled in a test report;
Step S7, the test report is given in a report screen, with backed off after random.
2. visual testing report-generating method as claimed in claim 1, it is characterised in that before being tested, for per The individual test case sets first setting content respectively, and sets one respectively for each described test action Two setting contents, and the one test case list of all described test case arrangement form that this needs is executed, each institute State test case list and correspond to a test case;
Each described first setting content includes the testing attribute in the corresponding test case respectively;
Each second setting content includes the testing attribute of the corresponding test action respectively;
Then step S6 is specifically included:
Step S61, selects first test case in the test case list as report use-case;
Step S62, first setting content for being associated with the report use-case is filled in the test report;
Step S63, selects first test action in the test action list as report action;
Step S64, will be associated with second setting content, the operating result and the potential result of the report action It is filled in the test report respectively;
Step S65, the test action of the next one in the steering test action list, and judge that the next test is dynamic Whether make corresponding to the new test case in the test case list:
If so, then using the new test case as the report use-case, and using the next test action as described Report action, is then returned to step S62;
If it is not, then using the next test action as the report action, being then returned to step S64.
3. visual testing report-generating method as claimed in claim 2, it is characterised in that in step S64, in filling While first setting content, the initialization data for being associated with the report use-case is filled in the test report.
4. visual testing report-generating method as claimed in claim 1, it is characterised in that in step S1, is executing Be associated with the current use-case first test action when, extract corresponding to the current use-case first survey The test pictures of examination control are used as unlatching picture, and open the unlatching picture by being associated with the address for opening picture Face, to start to test the current use-case.
5. visual testing report-generating method as claimed in claim 1, it is characterised in that in step S1, is executing Before being associated with each described test action of the current use-case, the action attributes according to the test action judge whether need The test pictures of the test control corresponding to the test action are opened, and described in extraction is associated with when needed The address of test pictures is to open the test pictures.
6. visual testing report-generating method as claimed in claim 1, it is characterised in that in step S1, when by institute State the initialization data that the current use-case is extracted after test case confirms as the current use-case, to being associated with the current use Data in the data base of example carry out initialization operation, to start to test the current use-case;
The address for extracting the test pictures of first test control corresponding to the current use-case is opened as described The unlatching address of picture is opened, and the unlatching address is based on, opened using the start-up parameter for being associated with the current use-case described Picture is opened, to test to the start picture.
7. visual testing report-generating method as claimed in claim 1, it is characterised in that step S2 is specifically included:
Acquisition is corresponding to the numbering of the test pictures of the follow-up test action of the current action, while monitoring institute The numbering of display picture is stated, when the numbering of the display picture is consistent with the numbering of the test pictures, confirms the display Picture handover success, to position to the display picture.
8. visual testing report-generating method as claimed in claim 1, it is characterised in that step S2 is specifically included:
The numbering of the follow-up test pictures corresponding to the current action is obtained, while the volume of the monitoring display picture Number, when the numbering of the display picture is consistent with the numbering of the test pictures, confirm the display picture handover success, with The display picture is positioned.
9. visual testing report-generating method as claimed in claim 1, it is characterised in that in step S3, grab After a test control in the display picture, will be corresponding with the current action for the control property of the test control The control property of the test control mated and obtained matching result, and when the matching result represents that the match is successful The crawled test control is orientated as the current control.
10. visual testing report-generating method as claimed in claim 1, it is characterised in that in step S4, to institute State before control operated, the action attributes of the current action are first determined whether, and is determined according to the action attributes The current control is operated:
If the action attributes of the current action are for setting value, the operation carried out by the current control be to the control Assignment;
If the action attributes of the current action are operation command, the operation carried out by the current control for holding The row operational order is to operate the control;
If the action attributes of the current action operate the current control to send corresponding for sending text line message The text line message;
If the action attributes of the current action are replicated for internal memory, the value of the current control is stored in Installed System Memory In;
If the action attributes of the current action are internal memory assignment, the value of the current control to be changed to the system The value for preserving in internal memory;
If the action attributes of the current action are logical judgment, assign for representing to being stored in the Installed System Memory The expression formula of value is judged, and skips the default follow-up test for being associated with the current action according to judged result Action;
If the action attributes of the current action are to be operated by the way of function key combination, pass through to system Input equipment sends the mode of corresponding function key compound command and operates the current control.
11. visual testing report-generating methods as claimed in claim 1, it is characterised in that in step S5, according to institute The type for stating operating result carries out the comparison between the operating result and the potential result:
If the operating result is the result of the control that the operation display picture includes, browse described in system reading The information of the corresponding control of the display picture in device, and the information for reading is compared with the potential result Relatively;
If the operating result is the result corresponding to the column number evidence in the browser, system is read in the browser The corresponding column number evidence, and the information for reading is compared with the potential result;
If the operating result is the data in the data base of system, system reads the data in the data base, and reads To information be compared with the potential result.
12. visual testing report-generating methods as claimed in claim 1, it is characterised in that in step S5, judge institute State whether current action runs succeeded:
If so, the operating result for being associated with the current action is then preserved, continues thereafter with execution step S5;
If it is not, then terminating the test of the current use-case, and the next test case is jumped to, being then returned to the step S1.
13. visual testing report-generating methods as claimed in claim 1, it is characterised in that in step S5, will be corresponding Comparative result save as the test result of the current action after, jump to the next test action:
If the next one for the jumping to test action represents operating to global control, step S4 is returned.
CN201610735414.8A 2016-08-26 2016-08-26 Visual test report generation method Active CN106445805B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610735414.8A CN106445805B (en) 2016-08-26 2016-08-26 Visual test report generation method
PCT/CN2017/098687 WO2018036529A1 (en) 2016-08-26 2017-08-23 Method for generating visual test report

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610735414.8A CN106445805B (en) 2016-08-26 2016-08-26 Visual test report generation method

Publications (2)

Publication Number Publication Date
CN106445805A true CN106445805A (en) 2017-02-22
CN106445805B CN106445805B (en) 2020-06-12

Family

ID=58181860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610735414.8A Active CN106445805B (en) 2016-08-26 2016-08-26 Visual test report generation method

Country Status (2)

Country Link
CN (1) CN106445805B (en)
WO (1) WO2018036529A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122298A (en) * 2017-04-21 2017-09-01 千寻位置网络有限公司 The methods of exhibiting of visual software development process quality
WO2018036529A1 (en) * 2016-08-26 2018-03-01 上海合福信息科技有限公司 Method for generating visual test report
WO2018177436A1 (en) * 2017-03-28 2018-10-04 上海合福信息科技有限公司 Control authentication method and software automation testing method
CN108804333A (en) * 2018-06-14 2018-11-13 郑州云海信息技术有限公司 A kind of test case and CQ correlating methods and system
CN111427776A (en) * 2020-03-12 2020-07-17 甄十信息科技(上海)有限公司 Automatic testing method and device for intelligent equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851667A (en) * 2006-02-15 2006-10-25 华为技术有限公司 Graphic user interface test method and system
CN101102579A (en) * 2007-06-22 2008-01-09 华为技术有限公司 A method and device for knowing and positioning UI in test
US20130198568A1 (en) * 2012-01-31 2013-08-01 Bank Of America Corporation System And Method For Test Case Generation Using Action Keywords
CN103502952A (en) * 2011-03-08 2014-01-08 惠普发展公司,有限责任合伙企业 Creating a test case
CN103617118A (en) * 2013-11-28 2014-03-05 北京奇虎科技有限公司 Method, device and system for uniformly processing test results
CN104794050A (en) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 Application program test method, device and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100561444C (en) * 2006-11-15 2009-11-18 中兴通讯股份有限公司 A kind of automatic test approach and test macro thereof that drives based on key word
US20100333073A1 (en) * 2009-06-29 2010-12-30 Honeywell International Inc. Systems and methods for automated generation of software tests based on modeling the software test domain
CN106445805B (en) * 2016-08-26 2020-06-12 上海合福信息科技有限公司 Visual test report generation method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851667A (en) * 2006-02-15 2006-10-25 华为技术有限公司 Graphic user interface test method and system
CN101102579A (en) * 2007-06-22 2008-01-09 华为技术有限公司 A method and device for knowing and positioning UI in test
CN103502952A (en) * 2011-03-08 2014-01-08 惠普发展公司,有限责任合伙企业 Creating a test case
US20130198568A1 (en) * 2012-01-31 2013-08-01 Bank Of America Corporation System And Method For Test Case Generation Using Action Keywords
CN103617118A (en) * 2013-11-28 2014-03-05 北京奇虎科技有限公司 Method, device and system for uniformly processing test results
CN104794050A (en) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 Application program test method, device and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018036529A1 (en) * 2016-08-26 2018-03-01 上海合福信息科技有限公司 Method for generating visual test report
WO2018177436A1 (en) * 2017-03-28 2018-10-04 上海合福信息科技有限公司 Control authentication method and software automation testing method
CN107122298A (en) * 2017-04-21 2017-09-01 千寻位置网络有限公司 The methods of exhibiting of visual software development process quality
CN108804333A (en) * 2018-06-14 2018-11-13 郑州云海信息技术有限公司 A kind of test case and CQ correlating methods and system
CN108804333B (en) * 2018-06-14 2021-11-02 郑州云海信息技术有限公司 Method and system for associating test case with CQ
CN111427776A (en) * 2020-03-12 2020-07-17 甄十信息科技(上海)有限公司 Automatic testing method and device for intelligent equipment

Also Published As

Publication number Publication date
WO2018036529A1 (en) 2018-03-01
CN106445805B (en) 2020-06-12

Similar Documents

Publication Publication Date Title
CN106445805A (en) Visualized testing report generation method
CN106326125B (en) A kind of method for generating test case
CN106033393B (en) A kind of applied program testing method and system and mobile terminal
CN103577229B (en) The loading method of a kind of web game and web browser
CN103853611B (en) The method and electronic equipment that text between application program is fast replicated
US20070094541A1 (en) Method and apparatus for generating test execution sequences automatically for a software testing process
CN102446109B (en) Utilize input method instrument that the method for software, client and system are installed
CN106445817A (en) Test data processing method, apparatus and system
CN103688262B (en) System constructing auxiliary device and system structure drawing generating method
US20090228839A1 (en) Plant information display apparatus and method
CN104627385B (en) A kind of process visualization decision-making diagnostic system and reasoning and decision method thereof
CN108959067A (en) Test method, device and the computer readable storage medium of search engine
CN105975492A (en) Search term prompt method and device
CN107886589A (en) Information processor, information processing system, information processing method
CN107368199A (en) The expression management method and device of social software based on mobile terminal
CN107423411A (en) Journal displaying method and apparatus
CN107797721A (en) A kind of interface information display methods and its device
CN107741900B (en) A kind of automatic test approach
EP1480129A2 (en) Database search information output method
CN1938674A (en) Electronic device
CN107016023A (en) Cumulative search processing method and device
US10579718B2 (en) System and method for interacting in layers in channels over the display of a resource by another application
CN106335045B (en) The mechanical arm console and method that a kind of remote media is combined with speech detection
JP5885204B2 (en) User operation support method and apparatus
CN106407105B (en) A kind of test design sheets generation method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant