CN108614774A - Automated testing method and device - Google Patents

Automated testing method and device Download PDF

Info

Publication number
CN108614774A
CN108614774A CN201810372618.9A CN201810372618A CN108614774A CN 108614774 A CN108614774 A CN 108614774A CN 201810372618 A CN201810372618 A CN 201810372618A CN 108614774 A CN108614774 A CN 108614774A
Authority
CN
China
Prior art keywords
test
test operation
information
system type
case
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
Application number
CN201810372618.9A
Other languages
Chinese (zh)
Inventor
董瑛
葛鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810372618.9A priority Critical patent/CN108614774A/en
Publication of CN108614774A publication Critical patent/CN108614774A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the present application discloses automated testing method and device.One specific implementation mode of this method includes:The test execution order obtained is parsed, to obtain the system type information of the configuration data of test operation and the destination end of execution test operation;Obtain the associated test case of configuration data with test operation;The object run information associated by the test operation in test case is transferred according to the system type information of destination end, based on the test operation in object run information implementation of test cases;Test report is generated according to the implementing result of test operation.What the embodiment reduced test case writes cost, improves automatic test efficiency.

Description

Automated testing method and device
Technical field
The invention relates to Internet technical fields, and in particular to software testing technology field, more particularly to it is automatic Change test method and device.
Background technology
With the development of Internet technology and terminal technology, changing for the internet product in various types of terminals is operated in It is getting faster for renewal speed.Automatic test is to execute test operation automatically on a preset condition based, with assessment system or application Whether the operation of program meets expected technology.Automated test frame is then the frame applied to automatic test, Ke Yiti For the test function on basis, or provide the structure module of automatic test execution and management function.
The terminal for being typically different system type (such as Android, ios etc.) has independent automated test frame, each terminal The automated test frame of type is different.Internet product (such as application program, small routine, advertisement etc.) is generally all supported at present Multiple systems type, tester need to be grasped the automated test frame of various end types, based on different test frames come Write test case.
Invention content
The embodiment of the present application proposes automated testing method and device.
In a first aspect, the embodiment of the present application provides a kind of automated testing method, including:The test obtained is parsed to hold Line command, to obtain the system type information of the configuration data of test operation and the destination end of execution test operation;Obtain with The associated test case of configuration data of test operation;The test in test case is transferred according to the system type information of destination end The associated object run information of operation, based on the test operation in object run information implementation of test cases;It is grasped according to test The implementing result of work generates test report.
In some embodiments, the above method further includes:By in test case test operation be suitable for predetermined system The operation information of type is associated.
In some embodiments, aforesaid operations information includes interface function;The above-mentioned test operation by test case with Operation information suitable for predetermined system type is associated, including:It will be for the test operation in implementation of test cases, applicable It is encapsulated as the interface function that the test operation in implementation of test cases is called in the interface function of predetermined system type.
In some embodiments, the above-mentioned system type information according to destination end transfers the test operation institute in test case Associated object run information, based on the test operation in object run information implementation of test cases, including:Judge test case In test operation whether be universal test operation, universal test operate the end with different system type information operation believe Manner of breathing is same;In response to determining that test operation is not universal test operation, transfer test operation it is associated, with the system class of destination end The operation information that type matches is as object run information, based on the test operation in object run information implementation of test cases.
In some embodiments, before obtaining the associated test case of configuration data with test operation, the above method Further include:The system type information update test behaviour of the destination end of configuration data and execution test operation based on test operation Make corresponding application program;Whether detection test environment meets preset test condition;And above-mentioned acquisition and test operation The associated test case of configuration data, including:In response to determining that test environment meets preset test condition, it is based on grasping with test The configuration data of work obtains associated test case.
Second aspect, the embodiment of the present application provide a kind of automatic test device, including:Resolution unit is configured to The test execution order that has obtained is parsed, is with the destination end for obtaining the configuration data of test operation and execute test operation System type information;Acquiring unit is configured to obtain the associated test case of configuration data with test operation;Execution unit, It is configured to transfer the object run information associated by the test operation in test case according to the system type information of destination end, Based on the test operation in object run information implementation of test cases;Generation unit is configured to the execution according to test operation As a result test report is generated.
In some embodiments, above-mentioned apparatus further includes:Associative cell is configured to the test operation in test case It is associated with the operation information suitable for predetermined system type.
In some embodiments, aforesaid operations information includes interface function;Associative cell is further configured to according to such as Under type is associated with suitable for the operation information of predetermined system type by the test operation in test case:It will be used to execute survey Test operation in example on probation, the behaviour of the test implementation of test cases is encapsulated as suitable for the interface function of predetermined system type Make called interface function.
In some embodiments, above-mentioned execution unit is further configured to:Judging the test operation in test case is No to be operated for universal test, operation information of the universal test operation at the end with different system type information is identical;In response to It determines test operation not and is universal test operation, transfer the behaviour that test operation is associated, matches with the system type of destination end Make information as object run information, based on the test operation in object run information implementation of test cases.
In some embodiments, above-mentioned apparatus further includes:Updating unit is configured to obtaining the configuration with test operation Before the test case of data correlation, the system class of the destination end of configuration data and execution test operation based on test operation The corresponding application program of type information update test operation;Detection unit is configured to obtaining the configuration data with test operation Before associated test case, whether detection test environment meets preset test condition;And above-mentioned acquiring unit is further It is configured in response to determine that test environment meets preset test condition, be associated with based on being obtained with the configuration data of test operation Test case.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, including:One or more processors;Storage dress It sets, the one or more programs of storage is stored thereon with, when one or more programs are executed by one or more processors so that one A or multiple processors realize the automated testing method provided such as first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, In, the automated testing method that first aspect provides is realized when program is executed by processor.
The automated testing method and device of the above embodiments of the present application, by parsing the test execution order obtained, To obtain the system type information of the configuration data of test operation and the destination end of execution test operation, then obtains and test The associated test case of configuration data of operation, then transfers the test in test case according to the system type information of destination end The associated object run information of operation, based on the test operation in object run information implementation of test cases, finally according to survey The implementing result of examination operation generates test report, the automatic test of cross-system type is realized, by using unified test Use-case transfers the object run information suitable for different system type, need not be each system in application program or renewal of the page The terminal of system type rewrites test case, need to only change the parameter of test operation in unified test case, effectively Reduce test case writes cost, improves testing efficiency.
Description of the drawings
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the automated testing method of the application;
Fig. 3 is the flow chart according to another embodiment of the automated testing method of the application;
Fig. 4 is the schematic diagram of an automated test frame used by automated testing method according to the application;
Fig. 5 is a structural schematic diagram according to the automatic test device of the application;
Fig. 6 is adapted for the structural schematic diagram of the computer system of the electronic equipment for realizing the embodiment of the present application.
Specific implementation mode
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, is illustrated only in attached drawing and invent relevant part with related.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the exemplary system frame of the automated testing method or automatic test device that can apply the application Structure 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105、106.Network 104 between terminal device 101,102 and server 105,106 provide communication link medium, with And the medium of communication link is provided between terminal device 103 and server 106.Network 104 may include various connection types, Such as wired, wireless communication link or fiber optic cables etc..
Terminal device 101,102 can be interacted by network 104 with server 105, to receive or send message etc..Terminal Equipment 101,102 can be the electronic equipment for having display screen and supporting internet access, including but not limited to smart mobile phone, flat Plate computer, smartwatch, laptop etc..Various internet interactive class applications can be installed on terminal device 101,102, Such as the application of web browser, social platform class, video player etc..
Server 105 can be to provide the network server of the background service of various application software, and server 105 can connect The internet access request that terminal device 101,102 is sent out is received, and internet access request is parsed, searches dependency number According to, and parsing and lookup result are returned into terminal device 101,102.
User 110 can be interacted by network 104 with server 106 using terminal device 103.User 110 can be surveyed Examination personnel, terminal device 103 can be the electronic equipments for the test environment for having display screen and can providing software automated testing. Server 106 can be to provide the server of automatic test service.User 110 can be by terminal device 103 to server 106 send out test request, and test data, which is forwarded to terminal device 101,102, after the parsing test request of server 106 executes survey Examination operation.
It should be noted that the automated testing method that the embodiment of the present application is provided can be by terminal device 101,102 Or server 106 executes, correspondingly, automatic test device can be set in terminal device 101,102 or server 106.
It should be noted that server can be hardware, can also be software.When server is hardware, may be implemented At the distributed server cluster that multiple servers form, individual server can also be implemented as.It, can when server is software To be implemented as multiple softwares or software module (such as providing multiple software modules of Distributed Services), can also be implemented as Single software or software module.It is not specifically limited herein.
It should be understood that the terminal device, network, the number of server in Fig. 1 are only schematical.According to realization need It wants, can have any number of terminal device, network, server.
With continued reference to Fig. 2, it illustrates the flows 200 according to one embodiment of the automated testing method of the application. The automated testing method, includes the following steps:
Step 201, the test execution order obtained is parsed, to obtain the configuration data of test operation and execute test The system type information of the destination end of operation.
In the present embodiment, the electronic equipment of automated testing method operation thereon can obtain test execution order, And test execution order is parsed.Wherein, test execution order can be surveyed to the function of application program or the page The order of examination can be sent out by tester by the automated test tool of installation on the client.In test execution order It can be with the system type information of the targeted destination end of packaging and testing, configuration data of test operation etc..The configuration of test operation Data can be the preconfigured and associated data of test operation, may include being used to indicate the targeted item of test operation The expected result etc. of purpose data, test operation.
Destination end is to execute the end of test operation, and the system type information of destination end can be the system banner of destination end, Including but not limited to Android (Android), ios, windows (operating system of the web browser at the ends PC).It is used to indicate test The data for operating targeted project can be, for example, the mark of test operation, such as the label in test page is clicked It can be " test label redirects " that whether can normally jump to the mark of the test operation of the function of predetermined page afterwards.Test operation Expected result it is desired when can be the function normal operation when application program or the page as a result, for example above-mentioned " test Label redirects " the corresponding expected result of test operation can be to jump to the scheduled page.
It is sent out by the client of testing results tool in tester and is comprising the targeted destination end of above-mentioned test After the test instruction of the configuration data of system type information, test operation etc., it can will test to instruct be sent to providing to test taking The server-side of business, server-side listen to after test instruction, the test received are instructed according to itself and automated testing method Executive agent between interconnection protocol be packaged to generate and test execution order and be transmitted to above-mentioned executive agent.It is then above-mentioned to hold Row main body can parse test execution order, obtain the configuration data of test operation and execute the destination end of test operation is System type information.
The operating system configuration of the corresponding terminal device of different system type differs, and same function is with not homology The realization logic united on the different terminal equipment of type information also differs.For example, it is held in Android system and ios systems The interface function called required for row label clicking operation differs.It in the present embodiment, can be true based on test execution order The system type information of destination end to be tested is made, it is possible thereby to be determined when subsequent execution specifically operates corresponding Realize logic.
Step 202, the associated test case of configuration data with test operation is obtained.
In the present embodiment, the test case of the various functions or interface for test application program can be stored.Test Use-case can have application program identification and/or project label.Application program identification is applied thereon for characterization test use-case Application program, such as Online Video playout software.Project label operates the project being directed to for characterization test, such as regards online The barrage of frequency is shown.Above-mentioned executive agent can be included according to test configurations data with the associated data search of test operation To corresponding test case.It can specifically have been provided accordingly according to the data search for being used to indicate the targeted project of test operation Project label test case.
The incidence relation between the configuration data and test case of above-mentioned test operation can be pre-established, such as can be with base The dependency number of application program in the configuration data of application program identification or project label and test operation in test case According to or the configuration data of test operation in test event related data it is associated.Tester when writing test case, It can be with the targeted application program identification of configuration testing use-case and/or project label, and by test case and automatic test work The configuration data of corresponding test operation in tool is associated with.
Test case can be one group of test input, execution condition and the expected results of establishment, to test some program Whether path or verification meet the example of some particular demands.One illustrative test case is:A clients are opened, into B Column clicks the C labels in column, checks whether and jump to the corresponding landing page D of C labels.
After internet product update, the pattern or function of product are changed, and test case is needed according to product Change and change, to adapt to updated product.In some optional realization methods of the present embodiment, test case can be with With applicable running environment information.Here running environment information may include the version of the targeted application program of test case The system type information that this information and test case are applicable in.In this way, when obtaining test case, it can be according to operation ring The corresponding test case of border acquisition of information, such as test case t1 and t2 are respectively suitable for the V2.1 of Online Video playout software Version and V2.2 versions.After parsing test execution order, it can be extracted from the configuration data of test operation to be tested Then software version information obtains the test case for being suitable for corresponding version according to the software version information in configuration data.
Step 203, the target associated by the test operation in test case is transferred according to the system type information of destination end Operation information executes test operation based on object run information.
Usually each test case may include multiple test operations.Such as comprising beating in the test case of above-mentioned example A clients are opened, into B columns, the C labels in column is clicked, checks whether and jump to the corresponding landing page D of C labels totally four Test operation.When each test operation in implementation of test cases, need to transfer the associated operation information of the test operation. Herein, the operation information associated by test operation may include the title of test operation.The execution logic of test operation, test The parameter etc. called required for operation.
The end of different system type can be executed based on different operation informations for the same test in test case Operation.Such as execution logic of the operation of " clicking the C labels in B columns " at the end of different system type differs.In this reality It applies in example, when testing results use-case, can be transferred according to the system type information for the destination end that parsing test execution order obtains The corresponding operation information for realizing the test operation in test case of system type of destination end is as object run information. It then can be according to object run information come the test operation in implementation of test cases.It can specifically be grasped according to the test being deployed into The execution logic of work, relevant parameter of test operation etc. execute test operation.
Step 204, test report is generated according to the implementing result of test operation.
In the present embodiment, above-mentioned executive agent can generate test report according to the implementing result of test operation.Tool Body may determine that whether the implementing result of test operation consistent with expected results, can also record parameter in test process, when Intermediate node etc..Test report may include above-mentioned implementing result, such as may include the results page executed after test operation Sectional drawing, can also be including the difference between the sectional drawing and the sectional drawing of the expected result page of results page.Test report can be with The reason of running the status information of success or failure including characterization test use-case, and failure run for characterization test use-case Information etc..By the test report, tester can know the test result of project.
The automated testing method of the above embodiments of the present application is transferred by using unified test case suitable for difference The object run information of system type need not be that the terminal of each system type is compiled again in application program or renewal of the page Test case is write, the parameter of test operation in unified test case need to be only changed, effectively reduce the volume of test case It is write as this, improves testing efficiency.
In some embodiments, above-mentioned automatic before obtaining the associated test case of configuration data with test operation Changing test method can also include:The system type of the destination end of configuration data and execution test operation based on test operation The corresponding application program of information update test operation;Whether detection test environment meets preset test condition.Obtaining survey Before example on probation, it can detect whether tested application program is updated to newest version according to the configuration data of test operation This, and detect running environment whether configure it is perfect.Specifically can according to judge mounted application version whether with it is corresponding In the latest edition matching of the system type of destination end, or judge that the electronic equipment of automated testing method operation thereon is Automated testing method can be run the agency of electronic equipment thereon by the no application program for having installed latest edition later Server under to line then may determine that the software and hardware ring of server under line to capture data by server under the line Whether border is satisfied with the software and hardware environmental index for being, to determine whether test environment meets preset test condition.
At this moment, the step 202 of the associated test case of the configuration data of above-mentioned acquisition and test operation may include:It rings Preset test condition should be met in determining test environment, used based on associated test is obtained with the configuration data of test operation Example.I.e. when test environment checks preset test condition, test case can be obtained and execute the fortune of subsequent test case Row operation.
In some embodiments, it can be associated with test operation in test case in advance and be suitable for each optional system type Operation information.Referring to FIG. 3, it illustrates the flows 300 according to one embodiment of the automated testing method of the application. The automated testing method, includes the following steps:
Step 301, the test execution order obtained is parsed, to obtain the configuration data of test operation and execute test The system type information of the destination end of operation.
In the present embodiment, the electronic equipment of automated testing method operation thereon can obtain test execution order, And test execution order is parsed.It can be believed with the system type of the targeted destination end of packaging and testing in test execution order The configuration data etc. of breath, test operation.The configuration data of test operation can be the preconfigured and associated number of test operation According to may include the data for being used to indicate the targeted project of test operation, expected result of test operation etc..Destination end is held The end of row test operation, the system type information of destination end can be the system banners of destination end.By to test execution order Parsing, can obtain the configuration data of test operation and the system type information of destination end.
Step 302, the associated test case of configuration data with test operation is obtained.
In the present embodiment, the test case of the various functions or interface for test application program can be stored.Test Use-case can have application program identification and/or project label.Application program identification is applied thereon for characterization test use-case Application program, such as Online Video playout software.Project label operates the project being directed to for characterization test, such as regards online The barrage of frequency is shown.Above-mentioned executive agent can be included according to test configurations data with the associated data search of test operation To corresponding test case.
Step 303, the test operation in test case is associated with suitable for the operation information of predetermined system type.
In the present embodiment, above-mentioned executive agent can be performed before in test case by the test behaviour in test case Make associated with suitable for the operation information of predetermined system type.The operation of the test operation in test case can specifically be connect It mouthful is associated with the operation information for being suitable for predetermined system type, in this way, when test operation in implementation of test cases, Ke Yitong Cross the operation information that corresponding operate interface transfers corresponding system type.Herein, predetermined system type may include Android system The windows systems etc. that system, ios systems, web browser are run on.For same test operation, each predetermined system type can be with With mutually different operation information.
It, can be in test case when test operation in the operation information and test case for being associated with each predetermined system type In test operation in addition judge the sub-operation of system type, to transfer corresponding system type after determining system type Operation information.
In some optional realization methods of the present embodiment, aforesaid operations information may include interface function, at this moment, on Stating can wrap the step 303 associated with the operation information of predetermined system type is suitable for of the test operation in test case It includes:It is encapsulated as the test operation in the implementation of test cases, interface function suitable for predetermined system type to execute survey The interface function that test operation in example on probation is called.
In other words, can by suitable for each predetermined system type for realizing same test operation test case Each interface function is packaged, and the general-purpose interface function of the test operation, the general-purpose interface letter of the test operation are formed after encapsulation When number is called, the system type for executing the destination end of test operation can be first determined whether, then call and be suitable for corresponding system The interface function for realizing the test operation of type.
It, can be directly logical using this characteristics of end without considering different system type in this way, when writing test case Test case is built with interface function.When version updating occurs for tested application program, such as call in the updated general " the clicking C labels " of interface function " clickTag () " replaces with " clicking D labels ", it is only necessary to it is logical to change this in test case Need not be the end point of the different systems types such as Android, ios again with the parameter in interface function " clickTag () " Test case is not rewritten, cost is write to reduce test case.
Step 304, the target associated by the test operation in test case is transferred according to the system type information of destination end Operation information, based on the test operation in object run information implementation of test cases.
The end of different system type can be executed based on different operation informations for the same test in test case Operation.Such as execution logic of the operation of " clicking the C labels in B columns " at the end of different system type differs.In this reality It applies in example, the test operation in test case is associated with suitable for each operation information of predetermined system type.In testing results , can be according to the system type information of destination end when use-case, determination is suitable for for realizing the test operation in test case The operation information of the system type of the destination end is as object run information.Then according in the object run information being deployed into The execution logic of test operation, relevant parameter of test operation etc. execute test operation.
In some optional realization methods of the present embodiment, the above-mentioned system type information according to destination end transfers test Object run information associated by test operation in use-case, based on the test operation in object run information implementation of test cases Step 304 may include:Judge whether the test operation in test case is universal test operation, and universal test operation is having There is the operation information at the end of different system type information identical;In response to determining that test operation is not universal test operation, transfer Test operation is associated, is used as object run information with the operation information that the system type of destination end matches, based on target behaviour Make the test operation in information implementation of test cases.
Specifically, above-mentioned executive agent can prestore universal test operating list, in testing results use-case When test operation, it can judge whether current pending test operation is universal test according to universal test operating list first Operation.Herein, universal test operation is the operation that can be directly executed at the end of various predetermined system types, such as " opens A visitors The interface function that test operation of the test operation at family end " at the end of the different systems type such as Android, ios is called is " launchApp (" A ") ", you can with the interface function directly by calling the test operation that " A clients should be opened " " launchApp (" A ") " opens A clients in the destination end for executing test operation.
If it is judged that be not universal test operation for the test operation in test case, then it can be further according to mesh The system type information at end is marked, determines the system type suitable for the destination end for realizing the test operation in test case Operation information as object run information.Then patrolled according to the execution of the test operation in the object run information being deployed into Volume, the relevant parameter of test operation etc. execute test operation.
Referring to FIG. 4, the signal of an automated test frame used by test method it illustrates the present embodiment Figure.
As shown in figure 4, automated test frame used by the present embodiment may include fundamental operation layer, service logic Layer, test case layer, drive module and public method module.Wherein, fundamental operation layer may include each predetermined system type Fundamental operation realization logic, fundamental operation can include but is not limited to:Click, sectional drawing, compares picture at screen sliding.Business is patrolled It may include general-purpose interface (Common API) to collect layer, these general-purpose interfaces are the execution that will be suitable for different predetermined system types The interface formed after the interface function encapsulation of same test operation.It can be according to system specified type point by the general-purpose interface Do not carry out executing the operation logic of corresponding system type.Test case layer may include the test use suitable for each system type Example, such as may include Android test case, ios test cases, PC (be usually windows systems) test case, WAP (logical It is often relied on the running environment of the browser of mobile device) test case etc..These test cases can be based on service logic General-purpose interface in layer is assembled.Drive module can be used for controlling testing sequence, act on behalf of mobile phone to server under line To capture data packet, cycle implementation of test cases to obtain the result etc. repeatedly tested.Public method module can include to execute The logic of necessary public operation in test, such as can include the functions such as daily record crawl, configuration reading, test report generation Realize logic.
Survey need not be changed when tested application program or renewal of the page upgrade using the automated test frame The fundamental operation of the test case and fundamental operation layer of example layer on probation, it is only necessary to which the test operation that modification is changed is corresponding logical With interface, such as the parameter that general-purpose interface is called can be changed and improved so that test case can be repeatedly multiplexed Testing efficiency.
Step 305, test report is generated according to the implementing result of test operation.
In the present embodiment, above-mentioned executive agent can generate test report according to the implementing result of test operation.Tool Body may determine that whether the implementing result of test operation consistent with expected results, can also record parameter in test process, when Intermediate node etc..Test report may include above-mentioned implementing result, and characterization test use-case runs the status information of success or failure, And the information etc. for the reason of failing is run for characterization test use-case.
From figure 3, it can be seen that the present embodiment is with suitable for default by the test operation being associated in advance in test case The operation information for type of uniting, can rapidly find in testing results use-case corresponding to unified test operation interface Object run information, to improve automatic test speed.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides a kind of automatic tests One embodiment of device, the device embodiment is corresponding to embodiment of the method shown in Fig. 4 with Fig. 2, which specifically can be with Applied in various electronic equipments.
As shown in figure 5, the automatic test device 500 of the present embodiment includes:Resolution unit 501, is held acquiring unit 502 Row unit 503 and generation unit 504.Wherein, resolution unit 501 may be configured to the test execution life that parsing has obtained It enables, to obtain the system type information of the configuration data of test operation and the destination end of execution test operation;Acquiring unit 502 It may be configured to obtain the associated test case of configuration data with test operation;Execution unit 503 may be configured to root The object run information associated by the test operation in test case is transferred according to the system type information of destination end, is grasped based on target Make the test operation in information implementation of test cases;Generation unit 504 may be configured to the implementing result according to test operation Generate test report.
In some embodiments, above-mentioned apparatus 500 can also include:Associative cell, being configured to will be in test case Test operation is associated with suitable for the operation information of predetermined system type.
In some embodiments, aforesaid operations information may include interface function;Above-mentioned associative cell can further by It is configured to as follows that the test operation in test case is associated with suitable for the operation information of predetermined system type: For the test operation in the implementation of test cases, interface function suitable for predetermined system type is encapsulated as to execute test use The interface function that test operation in example is called.
In some embodiments, above-mentioned execution unit 503 can be further configured to:Judge the test in test case Whether operation is universal test operation, and operation information of the universal test operation at the end with different system type information is identical; In response to determining that test operation is not universal test operation, transfer that test operation is associated, system type phase with destination end The operation information matched is as object run information, based on the test operation in object run information implementation of test cases.
In some embodiments, above-mentioned apparatus 500 can also include:Updating unit is configured to obtaining and test behaviour Before the associated test case of configuration data of work, the destination end of configuration data and execution test operation based on test operation The corresponding application program of system type information update test operation;And detection unit, it is configured to obtaining and test behaviour Before the associated test case of configuration data of work, whether detection test environment meets preset test condition.Above-mentioned acquisition list Member 502 can be further configured in response to determine test environment meet preset test condition, based on test operation Configuration data obtains associated test case.
All units described in device 500 are corresponding with each step in the method described referring to figs. 2 and 3.As a result, Operation and feature above with respect to method description are equally applicable to device 500 and unit wherein included, and details are not described herein.
The test execution life that the parsing of the automatic test device of the above embodiments of the present application, first resolution unit has obtained It enables, to obtain the system type information of the configuration data of test operation and the destination end of execution test operation, then obtains single Member obtain with the associated test case of configuration data of test operation, then execution unit is according to the system type information of destination end The object run information associated by the test operation in test case is transferred, based in object run information implementation of test cases Test operation ultimately produces unit and generates test report according to the implementing result of test operation, realizes cross-system type oneself Dynamicization is tested, and the object run information suitable for different system type is transferred by using unified test case, using journey When sequence or renewal of the page, it need not be that the terminal of each system type rewrites test case, need to only change unified test and use The parameter of test operation in example, effectively reduce test case writes cost, improves testing efficiency.
Below with reference to Fig. 6, it illustrates the computer systems 600 suitable for the electronic equipment for realizing the embodiment of the present application Structural schematic diagram.Electronic equipment shown in Fig. 6 is only an example, to the function of the embodiment of the present application and should not use model Shroud carrys out any restrictions.
As shown in fig. 6, computer system 600 includes central generation unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various actions appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
It is connected to I/O interfaces 605 with lower component:Importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loud speaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on driver 610, as needed in order to be read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed by communications portion 609 from network, and/or from detachable media 611 are mounted.When the computer program is executed by central generation unit (CPU) 601, limited in execution the present processes Above-mentioned function.It should be noted that the computer-readable medium of the application can be computer-readable signal media or calculating Machine readable storage medium storing program for executing either the two arbitrarily combines.Computer readable storage medium for example can be --- but it is unlimited In --- electricity, system, device or the device of magnetic, optical, electromagnetic, infrared ray or semiconductor, or the arbitrary above combination.It calculates The more specific example of machine readable storage medium storing program for executing can include but is not limited to:Being electrically connected, be portable with one or more conducting wires Formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In this application, can be any include computer readable storage medium or storage program Tangible medium, the program can be commanded execution system, device either device use or it is in connection.And in this Shen Please in, computer-readable signal media may include in a base band or as the data-signal that a carrier wave part is propagated, In carry computer-readable program code.Diversified forms may be used in the data-signal of this propagation, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable Any computer-readable medium other than storage medium, the computer-readable medium can send, propagate or transmit for by Instruction execution system, device either device use or program in connection.The journey for including on computer-readable medium Sequence code can transmit with any suitable medium, including but not limited to:Wirelessly, electric wire, optical cable, RF etc. or above-mentioned Any appropriate combination.
The calculating of the operation for executing the application can be write with one or more programming languages or combinations thereof Machine program code, programming language include object oriented program language-such as Java, Smalltalk, C++, also Including conventional procedural programming language-such as " C " language or similar programming language.Program code can be complete It executes, partly executed on the user computer on the user computer entirely, being executed as an independent software package, part Part executes or executes on a remote computer or server completely on the remote computer on the user computer.It is relating to And in the situation of remote computer, remote computer can pass through the network of any kind --- including LAN (LAN) or extensively Domain net (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as provided using Internet service Quotient is connected by internet).
Flow chart in attached drawing and block diagram, it is illustrated that according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part for a part for one module, program segment, or code of table, the module, program segment, or code includes one or more uses The executable instruction of the logic function as defined in realization.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depended on the functions involved.Also it to note Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit can also be arranged in the processor, for example, can be described as:A kind of processor packet Include resolution unit, acquiring unit, execution unit and generation unit.Wherein, the title of these units not structure under certain conditions The restriction of the pairs of unit itself, for example, resolution unit be also described as " the test execution order that parsing has obtained, with It obtains the configuration data of test operation and executes the unit of the system type information of the destination end of test operation ".
As on the other hand, present invention also provides a kind of computer-readable medium, which can be Included in device described in above-described embodiment;Can also be individualism, and without be incorporated the device in.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device so that should Device:The test execution order obtained is parsed, to obtain the configuration data of test operation and execute the target of test operation The system type information at end;Obtain the associated test case of configuration data with test operation;According to the system type of destination end Information transfers the object run information associated by the test operation in test case, is based on object run information implementation of test cases In test operation;Test report is generated according to the implementing result of test operation.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art Member should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Other technical solutions of arbitrary combination and formation.Such as features described above has similar work(with (but not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of automated testing method, including:
The test execution order obtained is parsed, to obtain the configuration data of test operation and execute the destination end of test operation System type information;
Obtain the associated test case of configuration data with the test operation;
The object run associated by the test operation in the test case is transferred according to the system type information of the destination end Information executes the test operation in the test case based on the object run information;
Test report is generated according to the implementing result of the test operation.
2. according to the method described in claim 1, wherein, the method further includes:
Test operation in the test case is associated with suitable for the operation information of predetermined system type.
3. according to the method described in claim 2, wherein, the operation information includes interface function;
The test operation by the test case is associated with suitable for the operation information of predetermined system type, including:
By for execute the test operation in the test case, suitable for the predetermined system type interface function encapsulate To execute the interface function that the test operation in the test case is called.
4. according to the method described in claim 2, wherein, the system type information according to the destination end transfers the survey The object run information associated by test operation in example on probation, is executed based on the object run information in the test case Test operation, including:
Judge whether the test operation in the test case is universal test operation, and the universal test operation is with difference The operation information at the end of system type information is identical;
In response to the determination test operation be not universal test operation, transfer the test operation it is associated, with the target The operation information that the system type at end matches executes the test as object run information, based on the object run information Test operation in use-case.
5. according to claim 1-4 any one of them methods, wherein be associated with the configuration data of the test operation obtaining Test case before, the method further includes:
The system type information of the destination end of configuration data and execution test operation based on test operation updates the test Operate corresponding application program;
Whether detection test environment meets preset test condition;And
The associated test case of configuration data of the acquisition and the test operation, including:
Meet preset test condition in response to the determination test environment, based on the acquisition of the configuration data of the test operation Associated test case.
6. a kind of automatic test device, including:
Resolution unit is configured to the test execution order that parsing has obtained, to obtain the configuration data of test operation and hold The system type information of the destination end of row test operation;
Acquiring unit is configured to obtain the associated test case of configuration data with the test operation;
Execution unit is configured to transfer the test operation in the test case according to the system type information of the destination end Associated object run information executes the test operation in the test case based on the object run information;
Generation unit is configured to generate test report according to the implementing result of the test operation.
7. device according to claim 6, wherein described device further includes:
Associative cell, be configured to by the test case test operation with suitable for predetermined system type operation information It is associated.
8. device according to claim 7, wherein the operation information includes interface function;
The associative cell be further configured to as follows by the test case test operation be suitable for The operation information of predetermined system type is associated:
By for execute the test operation in the test case, suitable for the predetermined system type interface function encapsulate To execute the interface function that the test operation in the test case is called.
9. device according to claim 7, wherein the execution unit is further configured to:
Judge whether the test operation in the test case is universal test operation, and the universal test operation is with difference The operation information at the end of system type information is identical;
In response to the determination test operation be not universal test operation, transfer the test operation it is associated, with the target The operation information that the system type at end matches executes the test as object run information, based on the object run information Test operation in use-case.
10. according to claim 6-9 any one of them devices, wherein described device further includes:
Updating unit is configured to before obtaining the associated test case of configuration data with the test operation, based on survey The system type information update test operation for trying the configuration data of operation and executing the destination end of test operation is corresponding Application program;
Detection unit is configured to before obtaining the associated test case of configuration data with the test operation, and detection is surveyed Whether test ring border meets preset test condition;And
The acquiring unit is further configured to meet preset test condition in response to the determination test environment, based on The configuration data of the test operation obtains associated test case.
11. a kind of electronic equipment, including:
One or more processors;
Storage device is stored thereon with the one or more programs of storage,
When one or more of programs are executed by one or more of processors so that one or more of processors are real The now method as described in any in claim 1-5.
12. a kind of computer-readable medium, is stored thereon with computer program, wherein real when described program is executed by processor The now method as described in any in claim 1-5.
CN201810372618.9A 2018-04-24 2018-04-24 Automated testing method and device Pending CN108614774A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810372618.9A CN108614774A (en) 2018-04-24 2018-04-24 Automated testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810372618.9A CN108614774A (en) 2018-04-24 2018-04-24 Automated testing method and device

Publications (1)

Publication Number Publication Date
CN108614774A true CN108614774A (en) 2018-10-02

Family

ID=63660720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810372618.9A Pending CN108614774A (en) 2018-04-24 2018-04-24 Automated testing method and device

Country Status (1)

Country Link
CN (1) CN108614774A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344074A (en) * 2018-10-19 2019-02-15 中国银行股份有限公司 A kind of cross-platform automated testing method and system
CN109885473A (en) * 2018-12-14 2019-06-14 平安万家医疗投资管理有限责任公司 Automated testing method and device, terminal and computer readable storage medium
CN109933531A (en) * 2019-03-19 2019-06-25 湖南国科微电子股份有限公司 Automatic testing method, device and electronic equipment
CN110287115A (en) * 2019-06-26 2019-09-27 北京金山云网络技术有限公司 Generation method, device and the server of test report
CN110515848A (en) * 2019-08-29 2019-11-29 行吟信息科技(上海)有限公司 Automatization test system and automated testing method
CN111163067A (en) * 2019-12-18 2020-05-15 支付宝(杭州)信息技术有限公司 Safety testing method and device and electronic equipment
CN111190825A (en) * 2019-12-28 2020-05-22 深圳市优必选科技股份有限公司 Automatic test method, system and robot
CN111258873A (en) * 2018-11-30 2020-06-09 阿里巴巴集团控股有限公司 Test method and device
CN111475412A (en) * 2020-04-01 2020-07-31 广州虎牙科技有限公司 Software testing method and device, electronic equipment and computer readable storage medium
CN111813685A (en) * 2020-07-17 2020-10-23 京东数字科技控股股份有限公司 Automatic testing method and device
CN111858360A (en) * 2020-07-23 2020-10-30 百度在线网络技术(北京)有限公司 Applet test method, device, equipment and storage medium
CN111930629A (en) * 2020-08-14 2020-11-13 工银科技有限公司 Page testing method and device, electronic equipment and storage medium
CN112286741A (en) * 2020-10-09 2021-01-29 湖南中联重科智能技术有限公司 Hardware testing method and device, electronic equipment and storage medium
CN112597026A (en) * 2020-12-25 2021-04-02 中国农业银行股份有限公司 Test case generation method and device
CN112765040A (en) * 2021-02-04 2021-05-07 深圳市捷视飞通科技股份有限公司 Page testing method, system, computer equipment and storage medium
CN113890846A (en) * 2021-09-23 2022-01-04 深圳Tcl新技术有限公司 Distribution network detection method, device and system, storage medium and terminal equipment
CN114745064A (en) * 2022-03-11 2022-07-12 福州华纳信息科技有限公司 Stability testing method and equipment for DTU
CN114817076A (en) * 2022-06-22 2022-07-29 国汽智控(北京)科技有限公司 Data processing method, device, equipment, medium and product of vehicle-mounted operating system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778124A (en) * 2015-04-13 2015-07-15 上海新炬网络信息技术有限公司 Automatic testing method for software application
US20150234734A1 (en) * 2014-02-18 2015-08-20 Hariprakash Agrawal System and method to implement an electronic document based automated testing of a software application
CN104978258A (en) * 2014-04-01 2015-10-14 中国银联股份有限公司 Software automation test method and system
CN105677561A (en) * 2015-12-31 2016-06-15 广州华多网络科技有限公司 Mobile product multi-platform testing method and system
CN106874206A (en) * 2017-02-27 2017-06-20 网易(杭州)网络有限公司 Method, device and electronic equipment for cross-platform automatic test
CN107451068A (en) * 2017-09-20 2017-12-08 广州阿里巴巴文学信息技术有限公司 Use-case operation method, device, computing device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150234734A1 (en) * 2014-02-18 2015-08-20 Hariprakash Agrawal System and method to implement an electronic document based automated testing of a software application
CN104978258A (en) * 2014-04-01 2015-10-14 中国银联股份有限公司 Software automation test method and system
CN104778124A (en) * 2015-04-13 2015-07-15 上海新炬网络信息技术有限公司 Automatic testing method for software application
CN105677561A (en) * 2015-12-31 2016-06-15 广州华多网络科技有限公司 Mobile product multi-platform testing method and system
CN106874206A (en) * 2017-02-27 2017-06-20 网易(杭州)网络有限公司 Method, device and electronic equipment for cross-platform automatic test
CN107451068A (en) * 2017-09-20 2017-12-08 广州阿里巴巴文学信息技术有限公司 Use-case operation method, device, computing device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李君丽: ""移动平台上基于UI的自动化测试技术的研究与应用"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
遵达: ""跨平台企业移动应用UI自动化测试框架的设计与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344074A (en) * 2018-10-19 2019-02-15 中国银行股份有限公司 A kind of cross-platform automated testing method and system
CN111258873A (en) * 2018-11-30 2020-06-09 阿里巴巴集团控股有限公司 Test method and device
CN111258873B (en) * 2018-11-30 2023-06-27 阿里巴巴集团控股有限公司 Test method and device
CN109885473A (en) * 2018-12-14 2019-06-14 平安万家医疗投资管理有限责任公司 Automated testing method and device, terminal and computer readable storage medium
CN109933531A (en) * 2019-03-19 2019-06-25 湖南国科微电子股份有限公司 Automatic testing method, device and electronic equipment
CN110287115A (en) * 2019-06-26 2019-09-27 北京金山云网络技术有限公司 Generation method, device and the server of test report
CN110515848A (en) * 2019-08-29 2019-11-29 行吟信息科技(上海)有限公司 Automatization test system and automated testing method
CN111163067A (en) * 2019-12-18 2020-05-15 支付宝(杭州)信息技术有限公司 Safety testing method and device and electronic equipment
CN111163067B (en) * 2019-12-18 2022-05-03 支付宝(杭州)信息技术有限公司 Safety testing method and device and electronic equipment
CN111190825A (en) * 2019-12-28 2020-05-22 深圳市优必选科技股份有限公司 Automatic test method, system and robot
CN111475412A (en) * 2020-04-01 2020-07-31 广州虎牙科技有限公司 Software testing method and device, electronic equipment and computer readable storage medium
CN111475412B (en) * 2020-04-01 2024-02-09 广州虎牙科技有限公司 Software testing method, device, electronic equipment and computer readable storage medium
CN111813685A (en) * 2020-07-17 2020-10-23 京东数字科技控股股份有限公司 Automatic testing method and device
CN111813685B (en) * 2020-07-17 2023-12-05 京东科技控股股份有限公司 Automatic test method and device
CN111858360A (en) * 2020-07-23 2020-10-30 百度在线网络技术(北京)有限公司 Applet test method, device, equipment and storage medium
CN111858360B (en) * 2020-07-23 2023-09-29 百度在线网络技术(北京)有限公司 Applet testing method, device, equipment and storage medium
CN111930629A (en) * 2020-08-14 2020-11-13 工银科技有限公司 Page testing method and device, electronic equipment and storage medium
CN112286741A (en) * 2020-10-09 2021-01-29 湖南中联重科智能技术有限公司 Hardware testing method and device, electronic equipment and storage medium
CN112597026A (en) * 2020-12-25 2021-04-02 中国农业银行股份有限公司 Test case generation method and device
CN112765040A (en) * 2021-02-04 2021-05-07 深圳市捷视飞通科技股份有限公司 Page testing method, system, computer equipment and storage medium
CN112765040B (en) * 2021-02-04 2024-01-26 深圳市捷视飞通科技股份有限公司 Page test method, system, computer equipment and storage medium
CN113890846A (en) * 2021-09-23 2022-01-04 深圳Tcl新技术有限公司 Distribution network detection method, device and system, storage medium and terminal equipment
CN114745064A (en) * 2022-03-11 2022-07-12 福州华纳信息科技有限公司 Stability testing method and equipment for DTU
CN114817076A (en) * 2022-06-22 2022-07-29 国汽智控(北京)科技有限公司 Data processing method, device, equipment, medium and product of vehicle-mounted operating system

Similar Documents

Publication Publication Date Title
CN108614774A (en) Automated testing method and device
CN102597993B (en) Managing application state information by means of uniform resource identifier (URI)
CN107357914B (en) Information processing method and device
CN109446071A (en) Interface test method, interface test device, electronic equipment and storage medium
CN109697075A (en) File updating method, system and device
CN105630684B (en) Software Development Kit recognition methods and device
CN108494860A (en) WEB accesses system, WEB access methods and device for client
CN109815105A (en) Applied program testing method and device based on Btrace
CN109062563A (en) Method and apparatus for generating the page
CN109325213A (en) Method and apparatus for labeled data
CN107295607A (en) Method and apparatus for connecting WAP
CN109582873A (en) Method and apparatus for pushed information
CN109359194A (en) Method and apparatus for predictive information classification
US20170161028A1 (en) State machine representation of a development environment deployment process
CN107463453A (en) Method, apparatus, equipment and the storage medium to be communicated between same terminal different application
CN109254914A (en) Software development kit test method, system, computer installation and readable storage medium storing program for executing
CN108959087A (en) test method and device
CN110362488A (en) A kind of page test method, device, electronic equipment and storage medium
US10291492B2 (en) Systems and methods for discovering sources of online content
CN109032620A (en) The configuration file generation method and device of application program
US20170161026A1 (en) Deployment of development environments
CN108694120A (en) The method and apparatus of testing service component
CN107273250A (en) The method of testing and device of electronic declaration form automatic cover system
CN109299124A (en) Method and apparatus for more new model
CN109918146A (en) Page generation method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181002