CN108829556A - A kind of automated testing method and device - Google Patents
A kind of automated testing method and device Download PDFInfo
- Publication number
- CN108829556A CN108829556A CN201810685394.7A CN201810685394A CN108829556A CN 108829556 A CN108829556 A CN 108829556A CN 201810685394 A CN201810685394 A CN 201810685394A CN 108829556 A CN108829556 A CN 108829556A
- Authority
- CN
- China
- Prior art keywords
- test
- tested
- interface
- equipment
- function
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The embodiment of the present invention provides a kind of automated testing method and device.The test request sent the method includes receiving equipment to be tested, test request includes function to be tested;Corresponding configuration file is obtained according to function to be tested, corresponding test interface is generated according to configuration file, test interface includes element to be tested;Corresponding test cases is obtained according to test request, and the test data in test cases is inserted in corresponding element to be tested;Application interface is called, the result data that application interface returns is received and result data is handled, to realize the test for treating test equipment.Described device is for executing the method.The embodiment of the present invention can treat test elements automatically and carry out assignment, button click and obtain operating result to realize automatic operation, reduce manual operation load, improve equipment testing efficiency.
Description
Technical field
The present invention relates to the field of test technology, in particular to a kind of automated testing method and device.
Background technique
In the enterprise for possessing a large amount of IT systems, such as bank, telecommunications enterprise, hundred sets of IT systems of number of users, wherein big portion
Dividing IT system is background system, and there is multiclass financial self-service equipment in bank, and every class self-service device can also purchase multiple brand manufacturers
Machine, a large amount of equipment need to complete functions of the equipments, performance, abnormality test, and the deployment that can go into operation uses.
Due to the competitive relation between bank, the demand that there is quick dispensing device in bank, launches new product, this requires to the greatest extent
The fast every test for completing equipment.In addition, financial self-service equipment development is quickly, constantly there are all kinds of new equipments to exit on the market,
The content of equipment test will constantly extend.
In the prior art, a self-service device includes a large amount of external accessory module, such as a wisdom automatic teller machine,
Just contain industrial personal computer, electronic card reader, hair fastener case, hair key case, electronic signature screen, suction-type Certification of Second Generation read scan module,
It is non-to connect more than 20 functional modules such as IC card reading module, magnetic stripe card reading module, check scanning device, receipt printer also, each
The testing tool of supplier itself does not have versatility generally directed to the equipment of its corresponding brand, cannot be applicable in a variety of inhomogeneities
The equipment of type different brands, in this case, to complete will be to the test job of each module of every each brand of class equipment
One significant amount, the work taken time and effort.
Summary of the invention
In view of this, the embodiment of the present invention is designed to provide a kind of automated testing method and device, on solving
State technical problem.
In a first aspect, the embodiment of the invention provides a kind of automated testing methods, including:
The test request that equipment to be tested is sent is received, the test request includes function to be tested;
Corresponding configuration file is obtained according to the function to be tested, corresponding test circle is generated according to the configuration file
Face, the test interface include element to be tested;
Corresponding test cases is obtained according to the test request, and by the test data filling pair in the test cases
In the element to be tested answered;
Application interface is called, the result data that the application interface returns is received and the result data is handled,
To realize the test to the equipment to be tested.
Further, the method further includes:
Corresponding objective cross tool is obtained according to the corresponding test cases of the function to be tested, according to the target group
The corresponding application interface is obtained in conjunction tool.
Further, the method further includes:
The asynchronous event of the equipment to be tested is obtained, and the asynchronous event is shown.
Further, the method further includes:
Test result is obtained, and the test result is shown in fruiting area.
Further, the method further includes:
Multiple service drivings are stored in advance, and each service driving is encapsulated as corresponding functional interface.
Second aspect, the embodiment of the invention provides a kind of automatic test devices, including:
Receiving module, the test request sent for receiving equipment to be tested, the test request includes function to be tested;
Interface generation module, for obtaining corresponding configuration file according to the function to be tested, according to the configuration text
Part generates corresponding test interface, and the test interface includes element to be tested;
Data insert module, for obtaining corresponding test cases according to the test request, and by the test cases
In test data insert in the corresponding element to be tested;
Test module receives the result data that the application interface returns and to the result for calling application interface
Data are handled, to realize the test to the equipment to be tested.
Further, described device further includes:
Combination of interfaces module, for obtaining corresponding objective cross tool according to the function to be tested, according to the mesh
The corresponding all functional interfaces of the function to be tested are combined by mark combination tool, obtain the application interface.
Further, described device further includes:
First display module is shown for obtaining the asynchronous event of the equipment to be tested, and by the asynchronous event
Show.
Further, described device further includes:
Second display module is shown for obtaining test result, and by the test result in fruiting area.
Further, described device further includes:
Memory module is encapsulated as corresponding function for multiple service drivings to be stored in advance, and by each service driving
It can interface.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, including:Processor, memory and bus, wherein
The processor and the memory complete mutual communication by the bus;
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to refer to
Enable the method and step for being able to carry out first aspect.
Fourth aspect, the embodiment of the present invention provide a kind of non-transient computer readable storage medium, including:
The non-transient computer readable storage medium stores computer instruction, and the computer instruction makes the computer
Execute the method and step of first aspect.
The embodiment of the present invention generates corresponding test interface by the corresponding configuration file of function to be tested, and by function to be tested
Data in the corresponding test cases of energy are automatically filled in test interface, are passed through test interface and are called application interface, receive application
The result data that interface returns, and result data is handled, to realize the test to hardware, therefore can treat automatically
Test elements carry out assignment, button is clicked and obtain operating result to realize automatic operation, reduce manual operation load, improve
Equipment testing efficiency.
Other features and advantages of the present invention will be illustrated in subsequent specification, also, partly be become from specification
It is clear that by implementing understanding of the embodiment of the present invention.The objectives and other advantages of the invention can be by written theory
Specifically noted structure is achieved and obtained in bright book, claims and attached drawing.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 is a kind of automated testing method flow diagram provided in an embodiment of the present invention;
Fig. 2 is that the magnetic card magnetic track interface code of wisdom automatic teller machine entry read module provided in an embodiment of the present invention is illustrated
Figure;
Fig. 3 is test interface schematic diagram provided in an embodiment of the present invention;
Fig. 4 is another test interface schematic diagram provided in an embodiment of the present invention;
Fig. 5 is that asynchronous event provided in an embodiment of the present invention shows schematic diagram;
Fig. 6 is a kind of automatic test device structural schematic diagram provided in an embodiment of the present invention;
Fig. 7 is test device logical construction schematic diagram provided in an embodiment of the present invention;
Fig. 8 is a kind of combination of interfaces module concrete structure schematic diagram provided in an embodiment of the present invention;
Fig. 9 is electronic equipment entity structure schematic diagram provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete
Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist
The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause
This, is not intended to limit claimed invention to the detailed description of the embodiment of the present invention provided in the accompanying drawings below
Range, but it is merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
It should be noted that:Similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.Meanwhile of the invention
In description, term " first ", " second " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Fig. 1 is a kind of automated testing method flow diagram provided in an embodiment of the present invention, as shown in Figure 1, this method,
Including:
Step 101:The test request that equipment to be tested is sent is received, the test request includes function to be tested.
In the specific implementation process, tester sends test request by the testing button in equipment to be tested, when
After test device receives test request, starts to treat test equipment and be tested.It should be noted that including in test request
Function to be tested, function to be tested can be industrial personal computer, electronic card reader, hair fastener case, hair key case, electronic signature screen, suction-type
Certification of Second Generation read scan module, it is non-connect IC card reading module, magnetic stripe card reading module, check scanning device or receipt printer, may be used also
Think that other functions to be tested, the embodiment of the present invention are not specifically limited in this embodiment.It can also include to be tested set in test request
Standby corresponding brand manufacturers, brand and model etc..
Step 102:Corresponding configuration file is obtained according to the function to be tested, is generated and is corresponded to according to the configuration file
Test interface, the test interface includes element to be tested.
In the specific implementation process, different type equipment, different function interface have different parameters, pass through application-interface layer
Equipment interface to be tested can be defined and define file, corresponding configuration file is obtained according to function to be tested, according to configuration file
Dynamic generation test interface.Traditional testing tool is that a kind of equipment individually develops a test interface, when new equipment occur, increase
It need to be continually developed when interface, maintenance test tool.Manual testing's layer is then by testing boundary based on interface configuration file dynamic generation
Face solves the problems, such as testing tool frequent updating, this mode is based on, when new equipment, new interface occur, it is only necessary to which configuration connects
Mouth configuration file, without doing development again.
Fig. 2 is that the magnetic card magnetic track interface code of wisdom automatic teller machine entry read module provided in an embodiment of the present invention is illustrated
Figure, as shown in Figure 2.XML file format definition is as shown in table 1:
Table 1
Element | Attribute | Value | Explanation |
DeviceConfig | Indicate an EM equipment module | ||
Id | Implementor name | ||
.Functions | Set of interfaces | ||
..DeviceInterface | Specific certain interface definition | ||
FuncName | Interface name | ||
RetType | Interface return type | ||
...Args | Parameter sets | ||
....FunctionArg | Interface parameter | ||
Type | Parameter data type | ||
Name | Parameter name | ||
DefaultValue | Parameter default | ||
Len | Parametric distribution buffer length | ||
IsOutArg | true,false | It whether is output parameter |
In conjunction with Fig. 2 and table 1, this effectively defines " getCardNum " interfaces of entitled " RDC " equipment, and the interface is in
Between the actual definition of part layer be:
void getCardNum(int trackNum,char*pchTrackData2,char*pchTrackData3,
int timeout,char*pchErrCode,char*pchError)。
Two, three track datas after obtaining brush magnetic stripe card are controlled by track number input parameter " trackNum ".
After parsing interface configuration file, single machine test layer generates dynamic test interface, and Fig. 3 provides for the embodiment of the present invention
Test interface schematic diagram, as shown in figure 3, the test interface show content it is corresponding with the configuration of the interface of the part Fig. 2.
Testing user by test interface and can choosing needs device type to be tested, such as wisdom automatic teller machine, fills out single machine
It is different type;Choose functional module to be tested, such as code keyboard;The functional interface for wanting test module is chosen, such as defeated
Enter password;Setting input parameter, such as the Password Length for needing to input;Calling interface, driving equipment, and return is obtained, such as
After calling input cryptoAPI, the password that user inputs on code keyboard is obtained and shown;Display event, such as in user's point
After having hit code keyboard key, return event is shown that user has inputted Password Length.
Step 103:Corresponding test cases is obtained according to the test request, and by the test number in the test cases
According in the corresponding element to be tested of filling.
In the specific implementation process, different test requests corresponds to different test cases, therefore in advance will be required
The corresponding test cases of all test functions all stores, and then obtains corresponding test cases according to test request,
It include that the test data in test cases is automatically filled in test after getting test cases by test data in test cases
In element to be tested in interface.
The page elements for wherein inputting parameter form part are by each FunctionArg subitem dynamic under configuration item Args
It generates, in above-mentioned specific implementation, the function that js splicing HTML code and dynamically load is utilized realizes page dynamic generation, first
Interface configuration file first is parsed using js, input parameter form is then generated simultaneously according to the dynamic state of parameters of specific interface to be tested
Refresh page.
Step 104:Call application interface, receive the result data that the application interface returns and to the result data into
Row processing, to realize the test to the equipment to be tested.
In the specific implementation process, after inserting test data in corresponding test elements, automatic starting test is adjusted
With the application interface of middleware, and then driving equipment and the result data that driving equipment returns is received from application interface.It should
Illustrate, the result data of return includes two parts, and a part is the synchronous content returned of equipment interface, is shown in result
Area;Another part is the event of asynchronous return, is shown in asynchronous event viewing area.
For example, the element of html page can be operated based on mshtml component in C#, realize that selection is surveyed in this way
Examination device type, selection test interface generate input parameter input list, insert test data into expression, and clicking test
Button calls hardware to execute test, and obtains returned data to be further processed analysis.Further, test device is uniformly to connect
The form of mouth is supplied to upper layer calling, and the test of distinct device, distinct interface is completed according to the parameter for being passed to interface.Example
Such as, core interface is automatically brought into operation to be defined as:doActionHasPara(String deviceType,String
devicefunc,String[]paras,String errCode);Wherein deviceType is to need device type to be tested,
Devicefunc parameter value is to need interface name to be tested, and paras array parameter is then successively right with the element of input parameter form
It answers, errCode is for determining whether generate specified return code after driving interface is called.
Upper layer is by calling the application interface to notify its object to be tested of test device and data, test device that will pass through
It controls test interface and realizes automatic test.Code below such as:
doActionHasPara("RDC","getCardNum",new String[]{"23"},"");
Above code then be notice be automatically brought into operation its reading magnetic interface for needing to test magnetic stripe card reader of core interface module, and
And to read 2,3 track datas.
Based on foregoing description, this patent realize key content be by distinct device, distinct interface by dynamic page,
Distinct interface, is converted to unified interface, in order to be converted to test cases data to system by the method for page elements control
The calling of one interface reduces the development of test interface, driving adaptation etc..
The embodiment of the present invention generates corresponding test interface by the corresponding configuration file of function to be tested, and by function to be tested
Data in the corresponding test cases of energy are automatically filled in test interface, are passed through test interface and are called application interface, receive application
The result data that interface returns, and result data is handled, to realize the test to hardware, therefore can treat automatically
Test elements carry out assignment, button is clicked and obtain operating result to realize automatic operation, reduce manual operation load, improve
Equipment testing efficiency.On the basis of the above embodiments, before calling application interface, the method further includes:
Corresponding objective cross tool is obtained according to the corresponding test cases of the function to be tested, according to the target group
The corresponding application interface is obtained in conjunction tool.
In the specific implementation process, for the test of certain functions not by calling an application interface or primary
What application interface can be realized as, it needs continuously to call multiple interfaces, for example, calculating average after calling 5 read track data
Value, needs to call at this time the application interface of 5 read tracks, and the application interface once averaged, therefore can be by this
Serial application interface is combined, and obtains objective cross tool, it should be noted that can be previously according to each test cases
A combination tool is all corresponded to, objective cross tool is exactly one of them in multiple combination tools, and such tester is holding
When row test cases, without doing the work such as function selection, parameter typing again, by objective cross interface by required stream to be tested
Cheng Jinhang follow-on test.Reduce manual operation load, improves equipment testing efficiency.
In the specific implementation process, on the basis of the above embodiments, the method further includes:
The asynchronous event of the equipment to be tested is obtained, and the asynchronous event is shown.
In the specific implementation process, Fig. 4 is another test interface schematic diagram provided in an embodiment of the present invention, such as Fig. 4 institute
Show, test device obtains the asynchronous event of collected equipment to be tested, and by this it is asynchronous be shown in list of thing, convenient for using
Family carries out checking event.Fig. 5 is that asynchronous event provided in an embodiment of the present invention shows schematic diagram, as shown in Figure 5.
On the basis of the above embodiments, the method further includes:
Test result is obtained, and the test result is shown in fruiting area.
In the specific implementation process, as shown in figure 4, the test result exhibition called to single interface calling or multiple interface
Show fruiting area, records result convenient for tester.
In addition, including Accessorial Tools Storage in test interface, combination tool one by one, each combination tool pair are realized in Accessorial Tools Storage
Answer each test case.
On the basis of the various embodiments described above, the method further includes:
Multiple service drivings are stored in advance, and each service driving is encapsulated as corresponding functional interface.
In the specific implementation process, multiple service drivings are stored in test device in advance, it should be noted that these
Service driving is encapsulated as corresponding functional interface for testing some concrete function, by service driving, is sealed by calling
The functional interface installed realizes function.When needing new test case, need to require according to test case exploitation one it is new
Combined interface is simply combined the functional interface of needs by simple code.
The embodiment of the present invention is by obtaining corresponding objective cross tool according to function to be tested, according to objective cross tool
The corresponding total interface of function to be tested is combined, objective cross interface is obtained, according to test function to corresponding to be measured
Element assignment is tried, and target detection use-case is generated according to objective cross target interface, is tested by target detection use-case, because
This can treat test elements automatically and carry out assignment, button click and obtain operating result to realize automatic operation, and pass through
A series of tests for needing to carry out are carried out follow-on test by objective cross interface, reduce manual operation load, improve equipment survey
Try efficiency.
Fig. 6 is a kind of automatic test device structural schematic diagram provided in an embodiment of the present invention, as shown in fig. 6, the device
Including:Receiving module 601, interface generation module 602, data filling module 603 and test module 604, wherein
Receiving module 601 is used to receive the test request that equipment to be tested is sent, and the test request includes function to be tested
Energy;Interface generation module 602 is used to obtain corresponding configuration file according to the function to be tested, raw according to the configuration file
At corresponding test interface, the test interface includes element to be tested;Data filling module 603 according to the test for asking
It asks and obtains corresponding test cases, and the test data in the test cases is inserted in the corresponding element to be tested;
Test module 604 for calling application interface, receive the result data that the application interface returns and to the result data into
Row processing, to realize the test to the equipment to be tested.
In the specific implementation process, tester sends test request by the testing button in equipment to be tested, when
After receiving module 601 receives test request, starts to treat test equipment and be tested.Different type equipment, different function connect
Mouthful there are different parameters, equipment interface to be tested can be defined by application-interface layer and define file, interface generation module 602
Corresponding configuration file is obtained according to function to be tested, according to configuration file dynamic generation test interface.Different test requests pair
Different test cases is answered, therefore in advance all stores the required corresponding test cases of all test functions, then
Corresponding test cases is obtained according to test request, includes test data in test cases, after getting test cases, number
The test data in test cases is automatically filled in the element to be tested in test interface according to filling module 603.Test module
604 after inserting test data in corresponding test elements, and automatic starting test calls the application interface of middleware, in turn
Driving equipment simultaneously receives the result data that driving equipment returns from application interface.
The embodiment of the present invention generates corresponding test interface by the corresponding configuration file of function to be tested, and by function to be tested
Data in the corresponding test cases of energy are automatically filled in test interface, are passed through test interface and are called application interface, receive application
The result data that interface returns, and result data is handled, to realize the test to hardware, therefore can treat automatically
Test elements carry out assignment, button is clicked and obtain operating result to realize automatic operation, reduce manual operation load, improve
Equipment testing efficiency.On the basis of the above embodiments, described device further includes:
Combination of interfaces module, for obtaining corresponding objective cross tool according to the function to be tested, according to the mesh
The corresponding all functional interfaces of the function to be tested are combined by mark combination tool, obtain the application interface.
On the basis of the above embodiments, described device further includes:
First display module is shown for obtaining the asynchronous event of the equipment to be tested, and by the asynchronous event
Show.
On the basis of the above embodiments, described device further includes:
Second display module is shown for obtaining test result, and by the test result in fruiting area.
On the basis of the above embodiments, described device further includes:
Memory module is encapsulated as corresponding function for multiple service drivings to be stored in advance, and by each service driving
It can interface.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description
Specific work process, no longer can excessively be repeated herein with reference to the corresponding process in preceding method.
In conclusion the embodiment of the present invention generates corresponding test interface by the corresponding configuration file of function to be tested, and
Data in the corresponding test cases of function to be tested are automatically filled in test interface, call application to connect by test interface
Mouthful, the result data that application interface returns is received, and handle result data, to realize the test to hardware, therefore
Test elements can be treated automatically to carry out assignment, button click and obtain operating result to realize automatic operation, reduce people
Work operating quantity improves equipment testing efficiency.
Fig. 7 is test device logical construction schematic diagram provided in an embodiment of the present invention, as shown in fig. 7, test can be filled
It sets and is logically separated into:Device hardware layer, service driving (Service Providor, SP) layer, middleware layer, application-interface layer
With application and development layer, wherein
Device hardware layer:Each functional module including equipment to be tested, such as electronic card reader, Certification of Second Generation scan mould
The hardware modules such as block, receipt printer, the target of final test are exactly to verify hardware capability.
SP layers:It is standardized including manufacturer according to WOSA3.10 and SP is provided, be that one kind that Microsoft proposes is operated in Windows
Software architecture under system, the XFS (Extensions for Financial Services) based on the publication of CES normal structure
Financial service is extended, realizes expansible financial service.Device manufacturer need to only standardize according to XFS and provide service driving SP, so that it may
The SPM (Service Providor Manager) of WOSA is entrusted to manage.
Middleware layer:The input of SP layers of driving interface, output parameter, event argument are all kinds of defined in XFS specification
Structural body, technical comparison is strong, and the meaning of middleware layer is then based on converting SP layer interface by way of combining, converting
At the interface of more business.For inputting cryptographic function, in service definition, code keyboard module has only been adjusted, has been prompted
Client inputs a string of passwords on it;But on physical layer interface, then it is related to multiple combination of interfaces and parameter testing, first has to check
Master key whether there is, then consult session key, and then password of the code keyboard again by client's typing is added by session key
Driving is returned to after close.If very complicated using atom interface exploitation is directly based upon, and the presence of middle layer then simplifies application
Exploitation, and manage distinct device, different supplier driving can be completed by middleware, application layer is not required to be concerned about.When
So, middleware is also required to develop, therefore a part tested is to check the program correctness and performance of middleware.
Application-interface layer:Since the interface that financial industry finally is presented to user is generally based on WEB the relevant technologies, use
The front ends such as html, js language development, therefore the interface conversion of middleware layer is mainly js interface by application-interface layer, this can be with
The method of local program is called to realize by some js.
Application and development layer:Including manual testing's layer and automatic test layer;Manual testing's layer is for fixed by peripheral hardware service layer
The equipment interface of justice generates test interface, device service layer API then can be called on test interface, and receive interface and return
Return result.
Automatic test layer includes core interface and combination tool, by combination supply to the calling of multiple functional interfaces into
Row combination, the corresponding combination tool of each test case, by being based on designed on the basis of single machine test layer
Test case expands button corresponding with test case one by one in Accessorial Tools Storage, and user, only need to be according in implementation of test cases
It is secondary to click each button, that is, complete the test job of corresponding case.Fig. 8 is a kind of combination of interfaces module provided in an embodiment of the present invention
Concrete structure schematic diagram, as shown in Figure 8.
Device hardware layer, SP layers, middleware layer, application-interface layer by the work of completion when being application and development, final answers
Hardware equipment function is called based on the types of functionality interface of application-interface layer with development layer, realizes business demand, i.e., above-mentioned each reality
Apply the method that example is realized.
And equipment test can above equipment hardware layer, SP layer, middleware layer, application-interface layer each layer access,
Such as tested based on SP layers of a pair of of the atom interface of interface one and hardware, based on the interface of middleware to each function of middleware
It can test and conduct downwards.And this patent discussion is the test based on application-interface layer, the test based on interface is a kind of black
Box test, i.e., only by exposure interface, by be passed to different parameters, repeatedly calling interface, according to certain sequence call it is more
The modes such as a interface carry out the function and various aspects of performance of test software programs and hardware.
Several main elements of interface have:
Device type:Various kinds of equipment is because its function difference has different functional interfaces and different asynchronous events;
Interface name:Similar with function name, different interfaces has different interface names;
Interface parameters:Each interface has each customized input, output parameter;
Event argument interface:The parameter that all kinds of asynchronous events return has different structure definition;
In addition the embodiment of the present invention reduces the technical requirements of tester by reducing manual operation load, as long as
The extension to automated test tool is got well and completed to Case Design, and tester only successively need to complete test simultaneously using each tool
Record just completes operation, without grasping the knowledge of too many hardware and test software, reduces the human resources consumption of bank;It mentions
Equipment testing efficiency is risen, tester just can complete the execution of more test cases by shirtsleeve operation;It can accelerate to set
Standby operation speed and stability promote bank in the competitiveness of the same trade.
Fig. 9 is electronic equipment entity structure schematic diagram provided in an embodiment of the present invention, as shown in figure 9, the electronic equipment,
Including:Processor (processor) 901, memory (memory) 902 and bus 903;Wherein,
The processor 901 and memory 902 complete mutual communication by the bus 903;
The processor 901 is used to call the program instruction in the memory 902, to execute above-mentioned each method embodiment
Provided method, for example including:The test request that equipment to be tested is sent is received, the test request includes function to be tested
Energy;Corresponding configuration file is obtained according to the function to be tested, corresponding test interface, institute are generated according to the configuration file
Stating test interface includes element to be tested;Corresponding test cases is obtained according to the test request, and by the test cases
In test data insert in the corresponding element to be tested;Application interface is called, the knot that the application interface returns is received
Fruit data are simultaneously handled the result data, to realize the test to the equipment to be tested.
The present embodiment discloses a kind of computer program product, and the computer program product includes being stored in non-transient calculating
Computer program on machine readable storage medium storing program for executing, the computer program include program instruction, when described program instruction is calculated
When machine executes, computer is able to carry out method provided by above-mentioned each method embodiment, for example including:
The test request that equipment to be tested is sent is received, the test request includes function to be tested;According to described to be measured
It tries function and obtains corresponding configuration file, corresponding test interface is generated according to the configuration file, the test interface includes
Element to be tested;Corresponding test cases is obtained according to the test request, and the test data in the test cases is filled out
Enter in the corresponding element to be tested;Application interface is called, receives the result data that the application interface returns and to described
Result data is handled, to realize the test to the equipment to be tested.
The present embodiment provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage medium
Computer instruction is stored, the computer instruction makes the computer execute method provided by above-mentioned each method embodiment, example
Such as include:
The test request that equipment to be tested is sent is received, the test request includes function to be tested;According to described to be measured
It tries function and obtains corresponding configuration file, corresponding test interface is generated according to the configuration file, the test interface includes
Element to be tested;Corresponding test cases is obtained according to the test request, and the test data in the test cases is filled out
Enter in the corresponding element to be tested;Application interface is called, receives the result data that the application interface returns and to described
Result data is handled, to realize the test to the equipment to be tested.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through
Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing
Show the device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product,
Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code
Part, a part of the module, section or code, which includes that one or more is for implementing the specified logical function, to be held
Row instruction.It should also be noted that function marked in the box can also be to be different from some implementations as replacement
The sequence marked in attached drawing occurs.For example, two continuous boxes can actually be basically executed in parallel, they are sometimes
It can execute in the opposite order, this depends on the function involved.It is also noted that every in block diagram and or flow chart
The combination of box in a box and block diagram and or flow chart can use the dedicated base for executing defined function or movement
It realizes, or can realize using a combination of dedicated hardware and computer instructions in the system of hardware.
In addition, each functional module in each embodiment of the present invention can integrate one independent portion of formation together
Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.It should be noted that:Similar label and letter exist
Similar terms are indicated in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing
It is further defined and explained.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Claims (10)
1. a kind of automated testing method, which is characterized in that including:
The test request that equipment to be tested is sent is received, the test request includes function to be tested;
Corresponding configuration file is obtained according to the function to be tested, corresponding test interface is generated according to the configuration file,
The test interface includes element to be tested;
Corresponding test cases is obtained according to the test request, and the test data filling in the test cases is corresponding
In the element to be tested;
Application interface is called, the result data that the application interface returns is received and the result data is handled, with reality
Now to the test of the equipment to be tested.
2. the method according to claim 1, wherein the method further includes before calling application interface:
Corresponding objective cross tool is obtained according to the corresponding test cases of the function to be tested, according to the objective cross work
The corresponding application interface is obtained in tool.
3. the method according to claim 1, wherein the method, further includes:
The asynchronous event of the equipment to be tested is obtained, and the asynchronous event is shown.
4. the method according to claim 1, wherein the method, further includes:
Test result is obtained, and the test result is shown in fruiting area.
5. method according to claim 1-4, which is characterized in that the method further includes:
Multiple service drivings are stored in advance, and each service driving is encapsulated as corresponding functional interface.
6. a kind of automatic test device, which is characterized in that including;
Receiving module, the test request sent for receiving equipment to be tested, the test request includes function to be tested;
Interface generation module, it is raw according to the configuration file for obtaining corresponding configuration file according to the function to be tested
At corresponding test interface, the test interface includes element to be tested;
Data insert module, for obtaining corresponding test cases according to the test request, and will be in the test cases
Test data is inserted in the corresponding element to be tested;
Test module receives the result data that the application interface returns and to the result data for calling application interface
It is handled, to realize the test to the equipment to be tested.
7. device according to claim 6, which is characterized in that described device further includes:
Combination of interfaces module, for obtaining corresponding objective cross tool according to the function to be tested, according to the target group
The corresponding all functional interfaces of the function to be tested are combined by conjunction tool, obtain the application interface.
8. device according to claim 6, which is characterized in that described device further includes:
First display module is shown for obtaining the asynchronous event of the equipment to be tested, and by the asynchronous event.
9. device according to claim 6, which is characterized in that described device further includes:
Second display module is shown for obtaining test result, and by the test result in fruiting area.
10. according to the described in any item devices of claim 6-9, which is characterized in that described device further includes:
Each service driving for multiple service drivings to be stored in advance, and is encapsulated as corresponding function and connect by memory module
Mouthful.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810685394.7A CN108829556A (en) | 2018-06-27 | 2018-06-27 | A kind of automated testing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810685394.7A CN108829556A (en) | 2018-06-27 | 2018-06-27 | A kind of automated testing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108829556A true CN108829556A (en) | 2018-11-16 |
Family
ID=64139315
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810685394.7A Pending CN108829556A (en) | 2018-06-27 | 2018-06-27 | A kind of automated testing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108829556A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109800119A (en) * | 2018-12-25 | 2019-05-24 | 深圳市元征科技股份有限公司 | A kind of product function test method and device |
CN109840212A (en) * | 2019-02-19 | 2019-06-04 | 百度在线网络技术(北京)有限公司 | Function test method, device, equipment and the readable storage medium storing program for executing of application program |
CN110162459A (en) * | 2019-04-15 | 2019-08-23 | 深圳壹账通智能科技有限公司 | Test cases generation method, device and computer readable storage medium |
CN110232018A (en) * | 2019-05-17 | 2019-09-13 | 浙江数链科技有限公司 | Interface test method, device, computer equipment |
CN110865892A (en) * | 2019-11-18 | 2020-03-06 | 北京锐安科技有限公司 | Detection method and device for call interface, storage medium and electronic equipment |
CN111209209A (en) * | 2020-01-15 | 2020-05-29 | 上海知白智能科技有限公司 | Testing device |
CN112416746A (en) * | 2020-01-21 | 2021-02-26 | 上海哔哩哔哩科技有限公司 | Test case generation method, device, equipment and medium |
CN112612665A (en) * | 2020-12-26 | 2021-04-06 | 中国农业银行股份有限公司 | Testing method, device and equipment of financial intelligent equipment |
CN116594917A (en) * | 2023-07-18 | 2023-08-15 | 建信金融科技有限责任公司 | UI testing method and device, electronic equipment and machine-readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6507842B1 (en) * | 2000-07-10 | 2003-01-14 | National Instruments Corporation | System and method for importing and exporting test executive values from or to a database |
CN104834595A (en) * | 2015-02-15 | 2015-08-12 | 网易(杭州)网络有限公司 | Visual automatic test method and system |
CN104850476A (en) * | 2015-06-03 | 2015-08-19 | 东方网力科技股份有限公司 | Cross-platform interface automated testing method and cross-platform interface automated testing system |
CN105159833A (en) * | 2015-09-30 | 2015-12-16 | 努比亚技术有限公司 | Automatic testing device and method |
CN108153667A (en) * | 2016-12-06 | 2018-06-12 | 北京奇虎科技有限公司 | Automated testing method, apparatus and system |
-
2018
- 2018-06-27 CN CN201810685394.7A patent/CN108829556A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6507842B1 (en) * | 2000-07-10 | 2003-01-14 | National Instruments Corporation | System and method for importing and exporting test executive values from or to a database |
CN104834595A (en) * | 2015-02-15 | 2015-08-12 | 网易(杭州)网络有限公司 | Visual automatic test method and system |
CN104850476A (en) * | 2015-06-03 | 2015-08-19 | 东方网力科技股份有限公司 | Cross-platform interface automated testing method and cross-platform interface automated testing system |
CN105159833A (en) * | 2015-09-30 | 2015-12-16 | 努比亚技术有限公司 | Automatic testing device and method |
CN108153667A (en) * | 2016-12-06 | 2018-06-12 | 北京奇虎科技有限公司 | Automated testing method, apparatus and system |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109800119A (en) * | 2018-12-25 | 2019-05-24 | 深圳市元征科技股份有限公司 | A kind of product function test method and device |
CN109840212A (en) * | 2019-02-19 | 2019-06-04 | 百度在线网络技术(北京)有限公司 | Function test method, device, equipment and the readable storage medium storing program for executing of application program |
CN109840212B (en) * | 2019-02-19 | 2022-11-11 | 百度在线网络技术(北京)有限公司 | Function test method, device and equipment of application program and readable storage medium |
CN110162459A (en) * | 2019-04-15 | 2019-08-23 | 深圳壹账通智能科技有限公司 | Test cases generation method, device and computer readable storage medium |
CN110232018A (en) * | 2019-05-17 | 2019-09-13 | 浙江数链科技有限公司 | Interface test method, device, computer equipment |
CN110865892A (en) * | 2019-11-18 | 2020-03-06 | 北京锐安科技有限公司 | Detection method and device for call interface, storage medium and electronic equipment |
CN111209209A (en) * | 2020-01-15 | 2020-05-29 | 上海知白智能科技有限公司 | Testing device |
CN112416746A (en) * | 2020-01-21 | 2021-02-26 | 上海哔哩哔哩科技有限公司 | Test case generation method, device, equipment and medium |
CN112612665A (en) * | 2020-12-26 | 2021-04-06 | 中国农业银行股份有限公司 | Testing method, device and equipment of financial intelligent equipment |
CN116594917A (en) * | 2023-07-18 | 2023-08-15 | 建信金融科技有限责任公司 | UI testing method and device, electronic equipment and machine-readable storage medium |
CN116594917B (en) * | 2023-07-18 | 2023-09-22 | 建信金融科技有限责任公司 | UI testing method and device, electronic equipment and machine-readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108829556A (en) | A kind of automated testing method and device | |
Labunets et al. | An experimental comparison of two risk-based security methods | |
CN102542367B (en) | Cloud computing network workflow processing method, device and system based on domain model | |
US20110166835A1 (en) | Analyzing anticipated value and effort in using cloud computing to process a specified workload | |
Sawyer et al. | Software requirements | |
Berampu et al. | Human resources transformation in the digitalization professional era in north sumatera | |
CN107526676A (en) | A kind of cross-system method of testing and device | |
CN111477048A (en) | Online experiment teaching platform and teaching method | |
CN201435074Y (en) | Device for generating test case based on member | |
CN112363914B (en) | Parallel test resource allocation optimizing method, computing device and storage medium | |
CN102567066B (en) | Business system development method, business system | |
US20100198642A1 (en) | Method and system for managing one or more processes in an organization | |
Garcia et al. | Adopting an RIA-Based Tool for Supporting Assessment, Implementation and Learning in Software Process Improvement under the NMX-I-059/02-NYCE-2005 Standard in Small Software Enterprises | |
Lee | Why is" Know-Why" Knowledge Useful for Solving Information Quality Problems? | |
CN115454755A (en) | Test method for terminal system and related equipment | |
JP2004192125A (en) | Project management system, data structure used therefor, and project management method | |
Bidgoli | DDS Products Evaluation: An Integrated Framework | |
Srg et al. | Blackbox Test on Web Based Employed Attendance Information System Design | |
van Solingen et al. | Application of software measurement at Schlumberger RPS: Towards enhancing GQM | |
US20140114730A1 (en) | System and method for capability development in an organization | |
Ebert | Managing software products in a global context | |
Ngai et al. | Development of a web-based system for supporting sales in a mineral water manufacturing firm: A case study | |
CN113495498B (en) | Simulation method, simulator, device and medium for hardware device | |
US20090287517A1 (en) | Automated method and system for opportunity analysis using management qualification tool | |
Li et al. | Architecture centric approach to enhance software testing management |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181116 |
|
RJ01 | Rejection of invention patent application after publication |