CN104199767A - Test method and device - Google Patents
Test method and device Download PDFInfo
- Publication number
- CN104199767A CN104199767A CN201410409965.6A CN201410409965A CN104199767A CN 104199767 A CN104199767 A CN 104199767A CN 201410409965 A CN201410409965 A CN 201410409965A CN 104199767 A CN104199767 A CN 104199767A
- Authority
- CN
- China
- Prior art keywords
- test
- action
- parameter
- tester
- item
- 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
Links
Abstract
The invention provides a test method and a test device, wherein the test method comprises the steps of displaying an interactive interface of a test library file to a tester, wherein the test library file has a preset parameter input format; receiving test parameters input by a tester in the interactive interface according to the preset parameter input format; generating a test case based on the received test parameters, wherein the test case represents content information required by the test; and testing the test object according to the test case. The method can reduce the requirements on testers, is convenient for the testers to use, and realizes the test automation.
Description
Technical field
The present invention relates to technical field of automation, relate in particular to a kind of method of testing and device.
Background technology
Software test can be identified correctness, integrality, security and the quality of software.Software test can operate program under defined terms, with discovery procedure mistake, measurement software quality, and whether it can be met design requirement and be assessed.
In prior art, first tester will understand the scope of application of numerous testing tools, relative merits and limitation separately, therefrom select a suitable testing tool by the feature of tested object and operation platform on this basis, then use the programming language of this testing tool requirement finally to complete test case.There is higher requirement for writing with the personnel of maintenance test use-case.
Summary of the invention
The present invention is intended to solve at least to a certain extent one of technical matters in correlation technique.
For this reason, one object of the present invention is to propose a kind of method of testing, and the method can reduce the requirement to tester, facilitates tester to use, and realizes test automation.
Another object of the present invention is to propose a kind of proving installation.
For achieving the above object, the method for testing that first aspect present invention embodiment proposes, comprising: show the interactive interface of test library file to tester, described test library file has default parameter input format;
Receive the test parameter that tester inputs in described interactive interface according to described default parameter input format; Based on the described test parameter generating test use case receiving, the required content information of described test case characterization test; According to described test case, tested object is tested.
Optionally, in described interactive interface, comprise the format information that represents described default parameter input format;
Receive the test parameter that tester inputs in described interactive interface according to described default parameter input format, be specially:
The test parameter that the described default parameter input format that reception tester represents according to described format information is inputted in described interactive interface.
Optionally, described format information comprises parameter input position and/or parameter physical meaning.
Optionally, described method also comprises:
Show described default parameter input format to described tester, and the implication of the displaying each parameter corresponding with described default parameter input format.
Optionally, the form of described test library file comprises:
Expandable mark language XML form; Or,
Electrical form; Or,
Text formatting; Or,
Configuration file ini file form.
Optionally, described test parameter comprises following information:
Action type;
Action Target;
Expect test result.
Optionally, describedly according to described test case, tested object is tested, being comprised:
According to the corresponding relation of predefined action type and action-item, determine the action-item corresponding with action type in described test case;
The operand that described Action Target is represented, carries out the processing operation that described action-item represents, obtains practical operation result;
According to the described expectation test result in described practical operation result and described test case, determine implementation status.
Optionally, described action-item comprises at least one in following:
Keyboard operation item on computer, the mouse action item on computer, the action-item on smart mobile phone.
The method of testing that first aspect present invention embodiment proposes, by show test library file to tester, described test library file has default parameter input format, and receive the test parameter that tester inputs in described interactive interface according to described default parameter input format, realizing tester just can test according to default form input, effectively reduce the requirement to tester, facilitate tester to use, realize test automation.
For achieving the above object, the proving installation that second aspect present invention embodiment proposes, comprising: interactive module, and for show the interactive interface of test library file to tester, described test library file has default parameter input format; Receiver module, the test parameter of inputting at described interactive interface according to described default parameter input format for receiving tester; Generation module, for the described test parameter generating test use case based on receiving, the required content information of described test case characterization test; Test module, for according to described test case, tests tested object.
Optionally, in described interactive interface, comprise the format information that represents described default parameter input format, described receiver module specifically for:
The test parameter that the described default parameter input format that reception tester represents according to described format information is inputted in described interactive interface.
Optionally, described format information comprises parameter input position and/or parameter physical meaning.
Optionally, described device also comprises:
Display module, for show described default parameter input format to described tester, and the implication of the displaying each parameter corresponding with described default parameter input format.
Optionally, the form of described test library file comprises:
Expandable mark language XML form; Or,
Electrical form; Or,
Text formatting; Or,
Configuration file ini file form.
Optionally, described test parameter comprises following information:
Action type;
Action Target;
Expect test result.
Optionally, described test module specifically for:
According to the corresponding relation of predefined action type and action-item, determine the action-item corresponding with action type in described test case;
The operand that described Action Target is represented, carries out the processing operation that described action-item represents, obtains practical operation result;
According to the described expectation test result in described practical operation result and described test case, determine implementation status.
Optionally, described action-item comprises at least one in following:
Keyboard operation item on computer, the mouse action item on computer, the action-item on smart mobile phone.
The proving installation that second aspect present invention embodiment proposes, by show test library file to tester, described test library file has default parameter input format, and receive the test parameter that tester inputs in described interactive interface according to described default parameter input format, realizing tester just can test according to default form input, effectively reduce the requirement to tester, facilitate tester to use, realize test automation.
For achieving the above object, the proving installation that third aspect present invention embodiment proposes, comprising: housing, processor, storer, circuit board and power circuit, wherein, circuit board is placed in the interior volume that housing surrounds, and processor and storer are arranged on circuit board; Power circuit, is used to each circuit or the device power supply of proving installation; Storer is for stores executable programs code; Processor moves the program corresponding with executable program code by the executable program code of storing in read memory, for carrying out following steps: show the interactive interface of test library file to tester, described test library file has default parameter input format; Receive the test parameter that tester inputs in described interactive interface according to described default parameter input format; Based on the described test parameter generating test use case receiving, the required content information of described test case characterization test; According to described test case, tested object is tested.
Optionally, in described interactive interface, comprise the format information that represents described default parameter input format;
Receive the test parameter that tester inputs in described interactive interface according to described default parameter input format, be specially:
The test parameter that the described default parameter input format that reception tester represents according to described format information is inputted in described interactive interface.
Optionally, described format information comprises parameter input position and/or parameter physical meaning.
Optionally, described method also comprises:
Show described default parameter input format to described tester, and the implication of the displaying each parameter corresponding with described default parameter input format.
Optionally, the form of described test library file comprises:
Expandable mark language XML form; Or,
Electrical form; Or,
Text formatting; Or,
Configuration file ini file form.
Optionally, described test parameter comprises following information:
Action type;
Action Target;
Expect test result.
Optionally, describedly according to described test case, tested object is tested, being comprised:
According to the corresponding relation of predefined action type and action-item, determine the action-item corresponding with action type in described test case;
The operand that described Action Target is represented, carries out the processing operation that described action-item represents, obtains practical operation result;
According to the described expectation test result in described practical operation result and described test case, determine implementation status.
Optionally, described action-item comprises at least one in following:
Keyboard operation item on computer, the mouse action item on computer, the action-item on smart mobile phone.
The proving installation that third aspect present invention embodiment proposes, by show test library file to tester, described test library file has default parameter input format, and receive the test parameter that tester inputs in described interactive interface according to described default parameter input format, realizing tester just can test according to default form input, effectively reduce the requirement to tester, facilitate tester to use, realize test automation.
The aspect that the present invention is additional and advantage in the following description part provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Brief description of the drawings
The present invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments obviously and easily and understand, wherein:
Fig. 1 is the schematic flow sheet of the method for testing of one embodiment of the invention proposition;
Fig. 2 is the schematic flow sheet of the method for testing of another embodiment of the present invention proposition;
Fig. 3 is a kind of test case schematic diagram in the embodiment of the present invention;
Fig. 4 is picture a schematic diagram in the embodiment of the present invention;
Fig. 5 is picture b schematic diagram in the embodiment of the present invention;
Fig. 6 be in the embodiment of the present invention parameter illustrate schematic diagram;
Fig. 7 is spreadsheet test case schematic diagram in the embodiment of the present invention;
Fig. 8 is the structural representation of the proving installation of another embodiment of the present invention proposition;
Fig. 9 is the structural representation of the proving installation of another embodiment of the present invention proposition.
Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has the element of identical or similar functions from start to finish.Be exemplary below by the embodiment being described with reference to the drawings, only for explaining the present invention, and can not be interpreted as limitation of the present invention.On the contrary, embodiments of the invention comprise all changes, amendment and the equivalent within the scope of spirit and the intension that falls into additional claims.
Fig. 1 is the schematic flow sheet of the method for testing of one embodiment of the invention proposition, and the method comprises:
S11: show the interactive interface of test library file to tester, described test library file has default parameter input format.
Proving installation in the embodiment of the present invention can provide interface to tester in the mode of library file.
The form of test library file comprises: extend markup language (Extensible Markup Language, XML) form, electrical form, text formatting (txt) or ini file form, ini file is a kind of configuration file.
S12: receive the test parameter that tester inputs in described interactive interface according to described default parameter input format.
Optionally, in described interactive interface, comprise the format information that represents described default parameter input format, corresponding, receive the test parameter that tester inputs in described interactive interface according to described default parameter input format, be specially:
The test parameter that the described default parameter input format that reception tester represents according to described format information is inputted in described interactive interface.
Optionally, described format information comprises parameter input position and/or parameter physical meaning.
For example, when test library file is electrical form, can in interactive interface, show electrical form, in electrical form, can comprise key word, tester can input corresponding value according to this key word.
In another embodiment, the method can also comprise: show described default parameter input format to described tester, and the implication of the displaying each parameter corresponding with described default parameter input format.
For example, when test library file is ini file, can first show to user the position of each parameter and the physical meaning of each parameter that in the ini file that will input, comprise, tester can be according to the content of this displaying input test parameter on interactive interface.
Test parameter can comprise: the identification information of test case, and for example, title or numbering, specifically can use numeral or string representation; Action type, for example, mouse-click, mouse double-click or keyboard input etc., specifically can represent respectively different types by different numerals; Action Target, for showing to carry out the object of test operation, for example, is stored in the picture of assigned address etc., specifically can use string representation; Expect test result, for showing, tested object is carried out after test operation, expect the result of appearance, to detect software implementation status, specifically can use string representation.
S13: based on the described test parameter generating test use case receiving, the required content information of described test case characterization test.
After each test parameter is determined, can generate corresponding test case based on this test parameter.For example, can identify with the identification information of input numbering or the title of corresponding test case, the operational motion that will carry out by the action type mark test case of input etc.
S14: according to described test case, tested object is tested.
Concrete testing process can comprise: according to the corresponding relation of predefined action type and action-item, determine the action-item corresponding with action type in described test case;
The operand that described Action Target is represented, carries out the processing operation that described action-item represents, obtains practical operation result;
According to the described expectation test result in described practical operation result and described test case, determine implementation status.
Optionally, described action-item comprises at least one in following:
Keyboard operation item on computer, the mouse action item on computer, the action-item on smart mobile phone.
For example, according to the operation of action type instruction, the object of Action Target instruction is carried out to corresponding operating, and after executable operations, whether unanimously with expectation test result detect actual test result.
When test case is during at least two, each test case can be according to above-mentioned flow performing once.
The present embodiment is by showing test library file to tester, described test library file has default parameter input format, and receive the test parameter that tester inputs in described interactive interface according to described default parameter input format, realizing tester just can test according to default form input, therefore can reduce the requirement to tester, facilitate tester to use, realize test automation.
Fig. 2 is the schematic flow sheet of the method for testing of another embodiment of the present invention proposition, and the method comprises:
S21: set up proving installation, this proving installation comprises: support module and library file.
Wherein, support module can be completed by test development personnel, for resolving the content of library file and carrying out concrete test case.
Library file is the interface that proving installation externally provides, can be by tester's input test use-case in library file.
The form of library file can comprise: XML form, electrical form, txt form or ini form.
Concrete, library file can be for showing the interactive interface of test library file to tester, described test library file has default parameter input format; Receive the test parameter that tester inputs in described interactive interface according to described default parameter input format; And, based on the described test parameter generating test use case receiving, the required content information of described test case characterization test.
Support module can, for according to described test case, be tested tested object.
S22: library file receives the test parameter of tester's input, and according to test parameter generating test use case.
In library file, comprise the parameter list that each needs common test personnel to fill in, and for common test personnel provide the interface of input parameter, so that the relevant parameter of common test personnel input test use-case.
Concrete, library file can be shown to tester the interactive interface of test library file, described test library file has default parameter input format;
Test parameter can comprise:
The identification information of test case, for example title or numbering;
Action type, wherein, the upper class of operation of PC (Personal Computer, PC) comprises keyboard operation and mouse action, keyboard operation can comprise: singly-bound input and Macintosh are inputted, and mouse action can comprise: click, double-click, pull with roller and operate.Action type on smart mobile phone can comprise to be clicked and pulls.
Be understandable that, in the time that dividing, action type also can adopt other dividing mode, as long as ensure that support module is appreciated that the action type of inputting in library file, for example, mouse action can comprise clicks single, twice of adopting consecutive click chemical reaction, click left button, click right etc.
Different action types can be by different numerals, for example, represent that with 1 mouse double-clicks, and represent that with 2 mouse pulls.
Action Target, for showing the object of action type instruction, for example, need to provide click location when click, and click location can represent by forms such as coordinate, picture or control id; When keyboard input, need to provide the particular content of input, the character string that particular content is for example inputted for employing keyboard etc.
Expect test result, for detection of the execution result of the software that will test.
That ini file form is as example taking the form of library file, a kind of test case can be as shown in Figure 3, wherein, the schematic diagram of picture a and picture b can be respectively referring to Fig. 4 or Fig. 5, can realize by double-clicking desktop shortcuts and automatically open QQ login window by this test case, and judge execution result.
Optionally, in order to facilitate tester to understand, library file can provide explaining of parameters for tester, and parameter value fill in the information explanations such as rule, tester, in the time of test, can fill according to explaining corresponding parameter value.
For example, when tester opens after library file, before input test use-case, library file can represent parameter interpretation explanation 61 as shown in Figure 6 to user, to instruct tester's input test use-case.
Fig. 3 is taking ini file form as example, and the form of library file can also be electrical form, as shown in Figure 7, has represented and the test case of Fig. 3 identical content with spreadsheet.Concrete, in Fig. 7, agreement the first row represents key word, the part on "=" left side in the ini file of corresponding diagram 3, and the second row and later row are used for filling in occurrence, the part on "=" the right in the ini file of corresponding diagram 3.Illustrating of parameters can be referring to Fig. 6.
S23: support module load libraries file, and carry out test according to the test case in library file.
Wherein, test development personnel are in the time setting up proving installation, and support module need to be set can load libraries file, and reads content wherein, and is appreciated that the implication of the parameter of test case.For example, can in support module, preset when receiving after user's the instruction bringing into operation, automatically load libraries file read the parameter of test case wherein, and, the corresponding relation of preliminary setting parameter value and concrete meaning in support module, for example, mouse double-click is carried out in setting operation type=1 o'clock, therefore, in the time that the parameter value of the action type reading is 1, support module carries out mouse double click operation, again for example, the operand that setting operation object representation is corresponding, so when support module reads after the parameter value of Action Target, the object that this parameter value is specified carries out the operation of above-mentioned action type instruction.
After support module carries out the operation of action type instruction to the object of Action Target instruction, can read practical operation result, and compare with the object that desired operation result is specified, judge implementation status, and can generate test report according to implementation status.Test report can comprise and in the time that both are identical, showing by test, otherwise by test etc., or while also comprising not by test, the particular content of makeing mistakes etc.
The present embodiment externally provides interface by the mode with library file, because library file has default parameter input format, straightaway for tester, can not need tester to write professional test code, therefore can reduce the requirement to tester, facilitate tester to use, realize test automation.The present embodiment illustrates in advance by the parameter to test case, can make tester know relevant information, facilitates user's input test use-case, promotes user and experiences.
Fig. 8 is the structural representation of the proving installation of another embodiment of the present invention proposition, and this device 80 comprises interactive module 81, receiver module 82, generation module 83 and test module 84.
Interactive module 81 is for showing the interactive interface of test library file to tester, described test library file has default parameter input format;
Proving installation in the embodiment of the present invention can provide interface to tester in the mode of library file.
The form of test library file comprises: extend markup language (Extensible Markup Language, XML) form, electrical form, text formatting (txt) or ini file form, ini file is a kind of configuration file
The test parameter that receiver module 82 is inputted at described interactive interface according to described default parameter input format for receiving tester;
Optionally, in described interactive interface, comprise the format information that represents described default parameter input format, described receiver module 82 specifically for: receive the test parameter that the described default parameter input format that represents according to described format information of tester is inputted in described interactive interface.
Optionally, described format information comprises parameter input position and/or parameter physical meaning.
For example, when test library file is electrical form, can in interactive interface, show electrical form, in electrical form, can comprise key word, tester can input corresponding value according to this key word.
Referring to Fig. 9, in another embodiment, this device 80 can also comprise: display module 85, display module 85 is for show described default parameter input format to described tester, and the implication of the displaying each parameter corresponding with described default parameter input format.
For example, when test library file is ini file, can first show to user the position of each parameter and the physical meaning of each parameter that in the ini file that will input, comprise, tester can be according to the content of this displaying input test parameter on interactive interface.
Test parameter can comprise: the identification information of test case, and for example, title or numbering, specifically can use numeral or string representation; Action type, for example, mouse-click, mouse double-click or keyboard input etc., specifically can represent respectively different types by different numerals; Action Target, for showing to carry out the object of test operation, for example, is stored in the picture of assigned address etc., specifically can use string representation; Expect test result, for showing, tested object is carried out after test operation, expect the result of appearance, to detect software implementation status, specifically can use string representation.
Generation module 83 is for the described test parameter generating test use case based on receiving, the required content information of described test case characterization test;
After each test parameter is determined, can generate corresponding test case based on this test parameter.For example, can identify with the identification information of input numbering or the title of corresponding test case, the operational motion that will carry out by the action type mark test case of input etc.
Test module 84, for according to described test case, is tested tested object.
Optionally, described test module 84 specifically for:
According to the corresponding relation of predefined action type and action-item, determine the action-item corresponding with action type in described test case;
The operand that described Action Target is represented, carries out the processing operation that described action-item represents, obtains practical operation result;
According to the described expectation test result in described practical operation result and described test case, determine implementation status.
Optionally, described action-item comprises at least one in following:
Keyboard operation item on computer, the mouse action item on computer, the action-item on smart mobile phone.
In another embodiment, described concrete operations item comprises at least one in following:
Keyboard operation item on computer, the mouse action item on computer, the action-item on smart mobile phone.
Wherein, PC (Personal Computer, PC) upper class of operation comprises keyboard operation and mouse action, and keyboard operation can comprise: singly-bound input and Macintosh are inputted, and mouse action can comprise: click, double-click, pull with roller and operate.Action type on smart mobile phone can comprise to be clicked and pulls.
Be understandable that, in the time that dividing, action type also can adopt other dividing mode, as long as ensure that test module is appreciated that the action type of inputting in library file, for example, mouse action can comprise clicks single, twice of adopting consecutive click chemical reaction, click left button, click right etc.
When test case is during at least two, each test case can be according to above-mentioned flow performing once.
Concrete, test parameter can comprise:
The identification information of test case, for example title or numbering;
Action type, wherein, the upper class of operation of PC (Personal Computer, PC) comprises keyboard operation and mouse action, keyboard operation can comprise: singly-bound input and Macintosh are inputted, and mouse action can comprise: click, double-click, pull with roller and operate.Action type on smart mobile phone can comprise to be clicked and pulls.
Be understandable that, in the time that dividing, action type also can adopt other dividing mode, as long as ensure that test module is appreciated that the action type of inputting in library file, for example, mouse action can comprise clicks single, twice of adopting consecutive click chemical reaction, click left button, click right etc.
Different action types can be by different numerals, for example, represent that with 1 mouse double-clicks, and represent that with 2 mouse pulls.
Action Target, for showing the object of action type instruction, for example, need to provide click location when click, and click location can represent by forms such as coordinate, picture or control id; When keyboard input, need to provide the particular content of input, the character string that particular content is for example inputted for employing keyboard etc.
Expect test result, for detection of the execution result of the software that will test.
That ini file form is as example taking the form of library file, a kind of test case can be as shown in Figure 3, wherein, the schematic diagram of picture a and picture b can be respectively referring to Fig. 4 or Fig. 5, can realize by double-clicking desktop shortcuts and automatically open QQ login window by this test case, and judge execution result.
Optionally, in order to facilitate tester to understand, library file can provide explaining of parameters for tester, and parameter value fill in the information explanations such as rule, tester, in the time of test, can fill according to explaining corresponding parameter value.
For example, when tester opens after library file, before input test use-case, library file can represent parameter interpretation explanation as shown in Figure 6 to user, to instruct tester's input test use-case.
Wherein, test development personnel, in the time setting up proving installation, need to arrange test module and can load test library file, and read content wherein, and are appreciated that the implication of the parameter of test case.For example, can in test module, preset when receiving after user's the instruction bringing into operation, the automatic parameter that loads test library file and read test case wherein, and, the corresponding relation of preliminary setting parameter value and concrete meaning in test module, for example, mouse double-click is carried out in setting operation type=1 o'clock, therefore, in the time that the parameter value of the action type reading is 1, support module 82 carries out mouse double click operation, again for example, the operand that setting operation object representation is corresponding, so when test module reads after the parameter value of Action Target, the object that this parameter value is specified carries out the operation of above-mentioned action type instruction.
After test module carries out the operation of action type instruction to the object of Action Target instruction, can read practical operation result, and compare with the object that desired operation result is specified, judge implementation status, and can generate test report according to implementation status.Test report can comprise and in the time that both are identical, showing by test, otherwise by test etc., or while also comprising not by test, the particular content of makeing mistakes etc.
The present embodiment externally provides interface by the mode with library file, because library file has default parameter input format, straightaway for tester, can not need tester to write professional test code, therefore can reduce the requirement to tester, facilitate tester to use, realize test automation.
The embodiment of the present invention also provides a kind of client device, and this client device comprises housing, processor, storer, circuit board and power circuit, and wherein, circuit board is placed in the interior volume that housing surrounds, and processor and storer are arranged on circuit board; Power circuit, is used to each circuit or the device power supply of client device; Storer is for stores executable programs code; Processor moves the program corresponding with executable program code by the executable program code of storing in read memory, for carrying out following steps:
S11 ': show the interactive interface of test library file to tester, described test library file has default parameter input format.
Proving installation in the embodiment of the present invention can provide interface to tester in the mode of library file.
The form of test library file comprises: extend markup language (Extensible Markup Language, XML) form, electrical form, text formatting (txt) or ini file form, ini file is a kind of configuration file.
S12 ': receive the test parameter that tester inputs in described interactive interface according to described default parameter input format.
Optionally, in described interactive interface, comprise the format information that represents described default parameter input format, corresponding, receive the test parameter that tester inputs in described interactive interface according to described default parameter input format, be specially:
The test parameter that the described default parameter input format that reception tester represents according to described format information is inputted in described interactive interface.
Optionally, described format information comprises parameter input position and/or parameter physical meaning.
For example, when test library file is electrical form, can in interactive interface, show electrical form, in electrical form, can comprise key word, tester can input corresponding value according to this key word.
In another embodiment, the method can also comprise: show described default parameter input format to described tester, and the implication of the displaying each parameter corresponding with described default parameter input format.
For example, when test library file is ini file, can first show to user the position of each parameter and the physical meaning of each parameter that in the ini file that will input, comprise, tester can be according to the content of this displaying input test parameter on interactive interface.
Test parameter can comprise: the identification information of test case, and for example, title or numbering, specifically can use numeral or string representation; Action type, for example, mouse-click, mouse double-click or keyboard input etc., specifically can represent respectively different types by different numerals; Action Target, for showing to carry out the object of test operation, for example, is stored in the picture of assigned address etc., specifically can use string representation; Expect test result, for showing, tested object is carried out after test operation, expect the result of appearance, to detect software implementation status, specifically can use string representation.
S13 ': based on the described test parameter generating test use case receiving, the required content information of described test case characterization test.
After each test parameter is determined, can generate corresponding test case based on this test parameter.For example, can identify with the identification information of input numbering or the title of corresponding test case, the operational motion that will carry out by the action type mark test case of input etc.
S14 ': according to described test case, tested object is tested.
Concrete testing process can comprise: according to the corresponding relation of predefined action type and action-item, determine the action-item corresponding with action type in described test case;
The operand that described Action Target is represented, carries out the processing operation that described action-item represents, obtains practical operation result;
According to the described expectation test result in described practical operation result and described test case, determine implementation status.
Optionally, described action-item comprises at least one in following:
Keyboard operation item on computer, the mouse action item on computer, the action-item on smart mobile phone.
For example, according to the operation of action type instruction, the object of Action Target instruction is carried out to corresponding operating, and after executable operations, whether unanimously with expectation test result detect actual test result.
When test case is during at least two, each test case can be according to above-mentioned flow performing once.
The present embodiment is by showing test library file to tester, described test library file has default parameter input format, and receive the test parameter that tester inputs in described interactive interface according to described default parameter input format, realizing tester just can test according to default form input, therefore can reduce the requirement to tester, facilitate tester to use, realize test automation.
In another embodiment, processor moves the program corresponding with executable program code by the executable program code of storing in read memory, for carrying out following steps:
S21 ': set up proving installation, this proving installation comprises: support module and library file.
Wherein, support module can be completed by test development personnel, for resolving the content of library file and carrying out concrete test case.
Library file is the interface that proving installation externally provides, can be by tester's input test use-case in library file.
The form of library file can comprise: XML form, electrical form, txt form or ini form.
Concrete, library file can be for showing the interactive interface of test library file to tester, described test library file has default parameter input format; Receive the test parameter that tester inputs in described interactive interface according to described default parameter input format; And, based on the described test parameter generating test use case receiving, the required content information of described test case characterization test.
Support module can, for according to described test case, be tested tested object.
S22 ': library file receives the test parameter of tester's input, and according to test parameter generating test use case.
In library file, comprise the parameter list that each needs common test personnel to fill in, and for common test personnel provide the interface of input parameter, so that the relevant parameter of common test personnel input test use-case.
Concrete, library file can be shown to tester the interactive interface of test library file, described test library file has default parameter input format;
Test parameter can comprise:
The identification information of test case, for example title or numbering;
Action type, wherein, the upper class of operation of PC (Personal Computer, PC) comprises keyboard operation and mouse action, keyboard operation can comprise: singly-bound input and Macintosh are inputted, and mouse action can comprise: click, double-click, pull with roller and operate.Action type on smart mobile phone can comprise to be clicked and pulls.
Be understandable that, in the time that dividing, action type also can adopt other dividing mode, as long as ensure that support module is appreciated that the action type of inputting in library file, for example, mouse action can comprise clicks single, twice of adopting consecutive click chemical reaction, click left button, click right etc.
Different action types can be by different numerals, for example, represent that with 1 mouse double-clicks, and represent that with 2 mouse pulls.
Action Target, for showing the object of action type instruction, for example, need to provide click location when click, and click location can represent by forms such as coordinate, picture or control id; When keyboard input, need to provide the particular content of input, the character string that particular content is for example inputted for employing keyboard etc.
Expect test result, for detection of the execution result of the software that will test.
That ini file form is as example taking the form of library file, a kind of test case can be as shown in Figure 3, wherein, the schematic diagram of picture a and picture b can be respectively referring to Fig. 4 or Fig. 5, can realize by double-clicking desktop shortcuts and automatically open QQ login window by this test case, and judge execution result.
Optionally, in order to facilitate tester to understand, library file can provide explaining of parameters for tester, and parameter value fill in the information explanations such as rule, tester, in the time of test, can fill according to explaining corresponding parameter value.
For example, when tester opens after library file, before input test use-case, library file can represent parameter interpretation explanation 61 as shown in Figure 6 to user, to instruct tester's input test use-case.
Fig. 3 is taking ini file form as example, and the form of library file can also be electrical form, as shown in Figure 7, has represented and the test case of Fig. 3 identical content with spreadsheet.Concrete, in Fig. 7, agreement the first row represents key word, the part on "=" left side in the ini file of corresponding diagram 3, and the second row and later row are used for filling in occurrence, the part on "=" the right in the ini file of corresponding diagram 3.Illustrating of parameters can be referring to Fig. 6.
S23 ': support module load libraries file, and carry out test according to the test case in library file.
Wherein, test development personnel are in the time setting up proving installation, and support module need to be set can load libraries file, and reads content wherein, and is appreciated that the implication of the parameter of test case.For example, can in support module, preset when receiving after user's the instruction bringing into operation, automatically load libraries file read the parameter of test case wherein, and, the corresponding relation of preliminary setting parameter value and concrete meaning in support module, for example, mouse double-click is carried out in setting operation type=1 o'clock, therefore, in the time that the parameter value of the action type reading is 1, support module carries out mouse double click operation, again for example, the operand that setting operation object representation is corresponding, so when support module reads after the parameter value of Action Target, the object that this parameter value is specified carries out the operation of above-mentioned action type instruction.
After support module carries out the operation of action type instruction to the object of Action Target instruction, can read practical operation result, and compare with the object that desired operation result is specified, judge implementation status, and can generate test report according to implementation status.Test report can comprise and in the time that both are identical, showing by test, otherwise by test etc., or while also comprising not by test, the particular content of makeing mistakes etc.
The present embodiment externally provides interface by the mode with library file, because library file has default parameter input format, straightaway for tester, can not need tester to write professional test code, therefore can reduce the requirement to tester, facilitate tester to use, realize test automation.The present embodiment illustrates in advance by the parameter to test case, can make tester know relevant information, facilitates user's input test use-case, promotes user and experiences.
It should be noted that, in description of the invention, term " first ", " second " etc. are only for describing object, and can not be interpreted as instruction or hint relative importance.In addition,, in description of the invention, except as otherwise noted, the implication of " multiple " is two or more.
Any process of otherwise describing in process flow diagram or at this or method are described and can be understood to, represent to comprise that one or more is for realizing module, fragment or the part of code of executable instruction of step of specific logical function or process, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can be not according to order shown or that discuss, comprise according to related function by the mode of basic while or by contrary order, carry out function, this should be understood by embodiments of the invention person of ordinary skill in the field.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, multiple steps or method can realize with being stored in software or the firmware carried out in storer and by suitable instruction execution system.For example, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: there is the discrete logic for data-signal being realized to the logic gates of logic function, there is the special IC of suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in a kind of computer-readable recording medium, this program, in the time carrying out, comprises step of embodiment of the method one or a combination set of.
In addition, the each functional unit in each embodiment of the present invention can be integrated in a processing module, can be also that the independent physics of unit exists, and also can be integrated in a module two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, and also can adopt the form of software function module to realize.If described integrated module realizes and during as production marketing independently or use, also can be stored in a computer read/write memory medium using the form of software function module.The above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
In the description of this instructions, the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means to be contained at least one embodiment of the present invention or example in conjunction with specific features, structure, material or the feature of this embodiment or example description.In this manual, the schematic statement of above-mentioned term is not necessarily referred to identical embodiment or example.And specific features, structure, material or the feature of description can be with suitable mode combination in any one or more embodiment or example.
Although illustrated and described embodiments of the invention above, be understandable that, above-described embodiment is exemplary, can not be interpreted as limitation of the present invention, and those of ordinary skill in the art can change above-described embodiment within the scope of the invention, amendment, replacement and modification.
Claims (16)
1. a method of testing, is characterized in that, comprising:
Show the interactive interface of test library file to tester, described test library file has default parameter input format;
Receive the test parameter that tester inputs in described interactive interface according to described default parameter input format;
Based on the described test parameter generating test use case receiving, the required content information of described test case characterization test;
According to described test case, tested object is tested.
2. method according to claim 1, is characterized in that, comprises the format information that represents described default parameter input format in described interactive interface;
Receive the test parameter that tester inputs in described interactive interface according to described default parameter input format, be specially:
The test parameter that the described default parameter input format that reception tester represents according to described format information is inputted in described interactive interface.
3. method according to claim 2, is characterized in that, described format information comprises parameter input position and/or parameter physical meaning.
4. method according to claim 1, is characterized in that, also comprises:
Show described default parameter input format to described tester, and the implication of the displaying each parameter corresponding with described default parameter input format.
5. method according to claim 1, is characterized in that, the form of described test library file comprises:
Expandable mark language XML form; Or,
Electrical form; Or,
Text formatting; Or,
Configuration file ini file form.
6. according to the method described in claim 1 to 5 any one, it is characterized in that, described test parameter comprises following information:
Action type;
Action Target;
Expect test result.
7. method according to claim 6, is characterized in that, describedly according to described test case, tested object is tested, and comprising:
According to the corresponding relation of predefined action type and action-item, determine the action-item corresponding with action type in described test case;
The operand that described Action Target is represented, carries out the processing operation that described action-item represents, obtains practical operation result;
According to the described expectation test result in described practical operation result and described test case, determine implementation status.
8. method according to claim 7, is characterized in that, described action-item comprises at least one in following:
Keyboard operation item on computer, the mouse action item on computer, the action-item on smart mobile phone.
9. a proving installation, is characterized in that, comprising:
Interactive module, for show the interactive interface of test library file to tester, described test library file has default parameter input format;
Receiver module, the test parameter of inputting at described interactive interface according to described default parameter input format for receiving tester;
Generation module, for the described test parameter generating test use case based on receiving, the required content information of described test case characterization test;
Test module, for according to described test case, tests tested object.
10. device according to claim 9, is characterized in that, comprises the format information that represents described default parameter input format in described interactive interface, described receiver module specifically for:
The test parameter that the described default parameter input format that reception tester represents according to described format information is inputted in described interactive interface.
11. devices according to claim 10, is characterized in that, described format information comprises parameter input position and/or parameter physical meaning.
12. devices according to claim 9, is characterized in that, also comprise:
Display module, for show described default parameter input format to described tester, and the implication of the displaying each parameter corresponding with described default parameter input format.
13. devices according to claim 9, is characterized in that, the form of described test library file comprises:
Expandable mark language XML form; Or,
Electrical form; Or,
Text formatting; Or,
Configuration file ini file form.
14. according to the device described in claim 9 to 13 any one, it is characterized in that, described test parameter comprises following information:
Action type;
Action Target;
Expect test result.
15. devices according to claim 14, is characterized in that, described test module specifically for:
According to the corresponding relation of predefined action type and action-item, determine the action-item corresponding with action type in described test case;
The operand that described Action Target is represented, carries out the processing operation that described action-item represents, obtains practical operation result;
According to the described expectation test result in described practical operation result and described test case, determine implementation status.
16. devices according to claim 17, is characterized in that, described action-item comprises at least one in following:
Keyboard operation item on computer, the mouse action item on computer, the action-item on smart mobile phone.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410409965.6A CN104199767B (en) | 2014-08-19 | 2014-08-19 | Test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410409965.6A CN104199767B (en) | 2014-08-19 | 2014-08-19 | Test method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104199767A true CN104199767A (en) | 2014-12-10 |
CN104199767B CN104199767B (en) | 2017-08-29 |
Family
ID=52085063
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410409965.6A Active CN104199767B (en) | 2014-08-19 | 2014-08-19 | Test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104199767B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107357729A (en) * | 2017-07-07 | 2017-11-17 | 广东中星电子有限公司 | The method and electronic equipment of test software |
CN108241577A (en) * | 2016-12-27 | 2018-07-03 | 百度在线网络技术(北京)有限公司 | test method and device |
CN108763070A (en) * | 2018-05-16 | 2018-11-06 | 北京金山云网络技术有限公司 | Generation method, device and the electronic equipment of test data |
CN109426611A (en) * | 2017-08-31 | 2019-03-05 | 贵州白山云科技股份有限公司 | A kind of method for testing software and device |
CN109460368A (en) * | 2018-11-22 | 2019-03-12 | 北京同有飞骥科技股份有限公司 | Automatic test approach, device and storage medium based on syntax conversion |
CN109471788A (en) * | 2017-12-29 | 2019-03-15 | 北京安天网络安全技术有限公司 | A kind of domestic operating system software automated testing method and system |
CN110083527A (en) * | 2019-03-18 | 2019-08-02 | 平安普惠企业管理有限公司 | A kind of generation method and device, electronic equipment of test case |
CN110704317A (en) * | 2019-09-26 | 2020-01-17 | 凡普数字技术有限公司 | Method, device and storage medium for testing parameter rule of interface parameter |
CN114268569A (en) * | 2020-09-16 | 2022-04-01 | 中盈优创资讯科技有限公司 | Configurable network operation, maintenance, acceptance and test method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1622022A1 (en) * | 2004-07-22 | 2006-02-01 | Siemens Aktiengesellschaft | Automatic generation of test cases |
CN1983209A (en) * | 2005-12-14 | 2007-06-20 | 中兴通讯股份有限公司 | System and method for automatically testing software unit |
CN101339534A (en) * | 2008-06-17 | 2009-01-07 | 金蝶软件(中国)有限公司 | Software test apparatus and test method |
CN103049371A (en) * | 2012-11-07 | 2013-04-17 | 青岛海信传媒网络技术有限公司 | Testing method and testing device of Android application programs |
CN103186457A (en) * | 2011-12-29 | 2013-07-03 | 阿里巴巴集团控股有限公司 | Method and device for automatically generating test case |
CN103246601A (en) * | 2012-02-10 | 2013-08-14 | 腾讯科技(深圳)有限公司 | Testing method and device |
-
2014
- 2014-08-19 CN CN201410409965.6A patent/CN104199767B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1622022A1 (en) * | 2004-07-22 | 2006-02-01 | Siemens Aktiengesellschaft | Automatic generation of test cases |
CN1983209A (en) * | 2005-12-14 | 2007-06-20 | 中兴通讯股份有限公司 | System and method for automatically testing software unit |
CN101339534A (en) * | 2008-06-17 | 2009-01-07 | 金蝶软件(中国)有限公司 | Software test apparatus and test method |
CN103186457A (en) * | 2011-12-29 | 2013-07-03 | 阿里巴巴集团控股有限公司 | Method and device for automatically generating test case |
CN103246601A (en) * | 2012-02-10 | 2013-08-14 | 腾讯科技(深圳)有限公司 | Testing method and device |
CN103049371A (en) * | 2012-11-07 | 2013-04-17 | 青岛海信传媒网络技术有限公司 | Testing method and testing device of Android application programs |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108241577A (en) * | 2016-12-27 | 2018-07-03 | 百度在线网络技术(北京)有限公司 | test method and device |
CN107357729A (en) * | 2017-07-07 | 2017-11-17 | 广东中星电子有限公司 | The method and electronic equipment of test software |
CN109426611A (en) * | 2017-08-31 | 2019-03-05 | 贵州白山云科技股份有限公司 | A kind of method for testing software and device |
CN109471788A (en) * | 2017-12-29 | 2019-03-15 | 北京安天网络安全技术有限公司 | A kind of domestic operating system software automated testing method and system |
CN108763070A (en) * | 2018-05-16 | 2018-11-06 | 北京金山云网络技术有限公司 | Generation method, device and the electronic equipment of test data |
CN109460368A (en) * | 2018-11-22 | 2019-03-12 | 北京同有飞骥科技股份有限公司 | Automatic test approach, device and storage medium based on syntax conversion |
CN110083527A (en) * | 2019-03-18 | 2019-08-02 | 平安普惠企业管理有限公司 | A kind of generation method and device, electronic equipment of test case |
CN110704317A (en) * | 2019-09-26 | 2020-01-17 | 凡普数字技术有限公司 | Method, device and storage medium for testing parameter rule of interface parameter |
CN114268569A (en) * | 2020-09-16 | 2022-04-01 | 中盈优创资讯科技有限公司 | Configurable network operation, maintenance, acceptance and test method and device |
CN114268569B (en) * | 2020-09-16 | 2023-10-31 | 中盈优创资讯科技有限公司 | Configurable network operation and maintenance acceptance test method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104199767B (en) | 2017-08-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104199767A (en) | Test method and device | |
WO2019144680A1 (en) | Automatic testing method and apparatus, storage medium and electronic device | |
US7529990B2 (en) | Systems and methods for managing multi-device test sessions | |
CN108959068B (en) | Software interface testing method, device and storage medium | |
CN112270149B (en) | Verification platform automatic integration method and system, electronic equipment and storage medium | |
US9268672B1 (en) | Automated test case generation for applications | |
US10127141B2 (en) | Electronic technology resource evaluation system | |
CN106415480B (en) | High-speed application for installation on a mobile device for enabling remote configuration of the mobile device | |
US20130311827A1 (en) | METHOD and APPARATUS for automatic testing of automation software | |
US20150347281A1 (en) | Automation testing using descriptive maps | |
CN106649107B (en) | Automatic testing method and device for stability of android system | |
CN102419732A (en) | Android-platform-based automated testing method and testing tool | |
CN108196825A (en) | The construction method and system of software project | |
CN103984626A (en) | Method and device for generating test-case script | |
US20100064178A1 (en) | World-Readiness and Globalization Testing Assemblies | |
CN111767208B (en) | Automatic test method and device | |
US20140082582A1 (en) | Resource Tracker | |
TWI476587B (en) | Testing method and testing apparatus for testing function of electronic apparatus | |
CN103488488A (en) | Text input check method, device ad mobile terminal | |
CN101030160B (en) | Tester and method for testing unified series interface command | |
US11422783B2 (en) | Auto-deployment of applications | |
CN102231127A (en) | System and method for detecting BIOS (Basic Input Output System) wrong information display | |
US9348561B2 (en) | Tabular format transaction editor | |
CN110321278B (en) | System testing method and device, computer equipment and storage medium | |
CN103631702A (en) | Automatic random key test method and device |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20181210 Address after: 519030 Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province Patentee after: Zhuhai Leopard Technology Co.,Ltd. Address before: 100085 East District, Second Floor, 33 Xiaoying West Road, Haidian District, Beijing Patentee before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd. |
|
TR01 | Transfer of patent right |