CN108932194A - Automated testing method, device, system, medium and electronic equipment - Google Patents

Automated testing method, device, system, medium and electronic equipment Download PDF

Info

Publication number
CN108932194A
CN108932194A CN201810646234.1A CN201810646234A CN108932194A CN 108932194 A CN108932194 A CN 108932194A CN 201810646234 A CN201810646234 A CN 201810646234A CN 108932194 A CN108932194 A CN 108932194A
Authority
CN
China
Prior art keywords
test
tested
information
equipment
configuration file
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
CN201810646234.1A
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.)
Beijing Jingdong Financial Technology Holding Co Ltd
Original Assignee
Beijing Jingdong Financial Technology Holding 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 Jingdong Financial Technology Holding Co Ltd filed Critical Beijing Jingdong Financial Technology Holding Co Ltd
Priority to CN201810646234.1A priority Critical patent/CN108932194A/en
Publication of CN108932194A publication Critical patent/CN108932194A/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 invention provides a kind of automated testing method, device, system, medium and electronic equipment, which includes: the facility information information list corresponding with test information for obtaining multiple equipment to be tested;Configuration file is automatically generated according to the information list, the configuration file is the configuration file that TestNG frame executes the test case;Compiler test case script;Based on the configuration file, the test case script is executed using the TestNG frame and Appium, to complete the test of the multiple equipment to be tested parallel.The efficiency of automatic test can be improved in the technical solution of the embodiment of the present invention, is provided simultaneously with higher safety and low cost.

Description

Automated testing method, device, system, medium and electronic equipment
Technical field
The present invention relates to field of computer technology, in particular to a kind of automated testing method, device, system, Jie Matter and electronic equipment.
Background technique
Appium is open source, a cross-platform test frame, can be used to test primary and mixed mobile terminal application, And support IOS, Android and FirefoxOS platform.Such as Android user interface (User Interface, referred to as: UI).Android UI automatic test is mostly based on Appium frame at present.In test process, needs to write test script, match Set Android device information, Appium server configuration and test case code.Since Android device is numerous, doing It during regression test, needs repeatedly to modify test code, connection equipment, and final result queries needs is checked more Part test report.Such automatic test efficiency is to be improved.
Currently, numerous mobile terminal clouds survey platforms automate UI and provide certain support, but higher cost and safety Property is lower.
It should be noted that information is only used for reinforcing the reason to background of the invention disclosed in above-mentioned background technology part Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
Be designed to provide a kind of automated testing method, device, system, medium and the electronics of the embodiment of the present invention are set It is standby, and then solve the problems, such as existing automatic test low efficiency at least to a certain extent.
Other characteristics and advantages of the invention will be apparent from by the following detailed description, or partially by the present invention Practice and acquistion.
According to a first aspect of the embodiments of the present invention, a kind of automated testing method is provided, comprising: obtain multiple to be measured Try the facility information information list corresponding with test information of equipment;Configuration file is automatically generated according to the information list, institute Stating configuration file is the configuration file that TestNG frame executes the test case script;Compiler test case script;Based on institute Configuration file is stated, executes the test case script using the TestNG frame and Appium, it is the multiple to complete parallel The test of equipment to be tested.
In an embodiment of the present invention, configuration file is automatically generated according to the information list, comprising: according to described The corresponding relationship for testing information and the facility information, is automatically generated the configuration file, is existed with the test case for controlling different It is tested in corresponding equipment to be tested.
In an embodiment of the present invention, the test case script is executed using the TestNG frame and Appium Before, further includes: the configuration information of the multiple equipment to be tested is obtained according to the information list;Parameterize it is the multiple to The configuration information of test equipment;The configuration information after parametrization is packaged into foundation class, to be tested is set for the multiple Standby test case is inherited.
In an embodiment of the present invention, the test case script is executed using the TestNG frame and Appium Later, further includes: the displaying template of test result is determined according to the foundation class;By the test knot of each equipment to be tested The displaying template is written after fruit parametrization.
In an embodiment of the present invention, after the test result of each equipment to be tested being parameterized described in write-in Show template, comprising: write-in shows template to generate test report after parameterizing the test result of each equipment to be tested It accuses, the test report is html format.
In an embodiment of the present invention, the configuration information includes device model;It parameterizes the multiple to be tested The configuration information of equipment, comprising: the different device models is assigned into different values.
In an embodiment of the present invention, the configuration information includes device model;Using the TestNG frame and Appium is executed before the test case script, further includes: by the different device models in the test case script It is middle to assign different values.
According to a second aspect of the embodiments of the present invention, a kind of automatic test device is provided, comprising: obtain module, institute It states and obtains the facility information information list corresponding with test information that module is used to obtain multiple equipment to be tested;Determining module, The determining module is used to automatically generate configuration file according to the information list, and the configuration file is the execution of TestNG frame The configuration file of the test case script;Collector, the collector are used for compiler test case script;Execute mould Block, the execution module are used to be based on the configuration file, execute the test using the TestNG frame and Appium and use Case script, to complete the test of the multiple equipment to be tested parallel.
In an embodiment of the present invention, automatic test device further include: foundation class generation module;The foundation class Generation module is used for: the configuration information of the multiple equipment to be tested is obtained according to the information list;It parameterizes the multiple The configuration information of equipment to be tested;The configuration information after parametrization is packaged into foundation class, for the multiple to be tested The test case of equipment is inherited.
In an embodiment of the present invention, automatic test device further include: result treatment module;The result treatment Module is used for: the displaying template of test result is determined according to the foundation class;By the test result of each equipment to be tested The displaying template is written after parametrization to generate test report, the test report is html format.
According to a third aspect of the embodiments of the present invention, a kind of automatization test system is provided, comprising: the client is used In the facility information information list corresponding with test information for obtaining multiple equipment to be tested, and it is transferred to the server end; The server end includes: preprocessing module and result treatment module;Wherein, the preprocessing module is used for according to the information List automatically generates configuration file, and the configuration file is the configuration file that TestNG frame executes the test case script, And compiler test case script;The result treatment module is used to be based on the configuration file, utilizes the TestNG frame The test case script is executed with Appium, to complete the test of the multiple equipment to be tested parallel.
In an embodiment of the present invention, the result treatment module is also used to according to the multiple equipment to be tested Configuration information configures the displaying template of test result, and institute will be written after the test result of each equipment to be tested parametrization State displaying template.
In an embodiment of the present invention, the result treatment module is also by the test knot of each equipment to be tested Write-in shows template to generate test report after fruit parametrization, and the test report is html format.
According to a fourth aspect of the embodiments of the present invention, a kind of computer-readable medium is provided, computer is stored thereon with Program realizes the automated testing method as described in first aspect in above-described embodiment when described program is executed by processor.
According to a fifth aspect of the embodiments of the present invention, a kind of electronic equipment is provided, comprising: one or more processors; Storage device, for storing one or more programs, when one or more of programs are held by one or more of processors When row, so that one or more of processors realize the automated testing method as described in first aspect in above-described embodiment.
Technical solution provided in an embodiment of the present invention can include the following benefits: in some embodiments of the present invention institute In the technical solution of offer, configuration file needed for determining TestNG frame implementation of test cases script by information list, into And multiple use-cases are tested in conjunction with TestNG and Appium realization, it avoids since multiple equipment to be tested are with confidence The problem of ceasing difference and need to being modified one by one it during the test, realizes the mesh of multiple equipment concurrent testings to be tested , to improve automatic test efficiency.Meanwhile automatic test provided in this embodiment is put to survey without mobile terminal cloud and be put down Platform, thus safety with higher and at low cost.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 shows the system architecture schematic diagram in disclosure exemplary embodiment for realizing network establishing method;
Fig. 2 shows the flow diagrams of the automated testing method of an embodiment according to the present invention;
Fig. 3 shows the flow diagram of automated testing method according to another embodiment of the present invention;
Fig. 4 shows the structural schematic diagram of the automatic test device of embodiment according to the present invention;
Fig. 5 shows the structural schematic diagram of the automatization test system of embodiment according to the present invention;
Fig. 6 shows the flow diagram of the UI automatization test system of embodiment according to the present invention;
Fig. 7 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present invention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner In example.In the following description, many details are provided to provide and fully understand to the embodiment of the present invention.However, It will be appreciated by persons skilled in the art that technical solution of the present invention can be practiced without one or more in specific detail, Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side Method, device, realization or operation are to avoid fuzzy each aspect of the present invention.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step, It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
Equipment to be tested refers to have the various operating systems such as IOS, Android or FirefoxOS in this example embodiment Electronic equipment, for example, mobile phone etc..In existing test method, as the type of equipment to be tested is more and more abundant, to it Also the modification for just carrying out corresponding configuration information during being tested along with the equipment to be tested to different type of machines, causes Testing efficiency is lower.
A kind of system architecture for realizing network establishing method is provided firstly in this example embodiment, can be applied In various identification scenes, such as image recognition, Activity recognition etc..Refering to what is shown in Fig. 1, the system architecture 100 may include end End equipment 101,102,103, network 104 and server 105.Network 104 is in terminal device 101,102,103 and server The medium of communication link is provided between 105.Network 104 may include various connection types, for example, wired, wireless communication link or Person's fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send request instruction etc..Various telecommunication customer end applications can be installed, such as picture processing is answered on terminal device 101,102,103 With, shopping class application, web browser applications, searching class application, instant messaging tools, mailbox client, social platform software Deng.
Terminal device 101,102,103 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 105 can be to provide the server of various services, such as utilize terminal device 101,102,103 to user The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception To the data such as information query request analyze etc. processing, and by processing result (such as target push information, product letter Breath -- merely illustrative) feed back to terminal device.
It should be noted that network establishing method provided by the embodiment of the present application is generally executed by server 105, accordingly Ground, network struction device are generally positioned in terminal device 101.
In the embodiment of following exemplary, it is illustrated by taking the UI automatic test to Android as an example.The prior art In, when executing UI automatic test script using Appium, need in test script to device model information, Android installation kit (Android Package, referred to as: APK) information etc. is configured.When replacing the equipment of different model, need to change test foot This, leads to the waste to the man power and material of test, and affect testing efficiency.
Based on the system architecture 100 in Fig. 1, automated testing method is provided in this example, at least to a certain extent Solve the problems, such as existing automatic test low efficiency.Refering to what is shown in Fig. 2, the network establishing method may comprise steps of:
Step S201 obtains the facility information information list corresponding with test information of multiple equipment to be tested;
Step S202 automatically generates configuration file according to the information list, and the configuration file is that TestNG frame is held The configuration file of the row test case script;
Step S203, compiler test case script;
Step S204 is based on the configuration file, executes the test case using the TestNG frame and Appium Script, to complete the test of the multiple equipment to be tested parallel.
In the technical solution of embodiment shown in Fig. 2, TestNG frame implementation of test cases foot is determined by information list Configuration file needed for this is tested multiple use-cases in conjunction with TestNG and Appium realization, is avoided due to multiple in turn The configuration information of equipment to be tested is different and the problem of need to be modified one by one it during the test, realize multiple to be measured The purpose for trying equipment concurrent testing, to improve automatic test efficiency.Meanwhile automatic test provided in this embodiment is put Platform is surveyed without mobile terminal cloud, thus safety with higher and at low cost.
The realization details of each step shown in Fig. 2 is described in detail below:
Illustratively, in step s 201, it is first determined then target test equipment, i.e., multiple equipment to be tested obtain The information list of equipment to be tested.Wherein, the facility information of equipment to be tested includes configuration information, and test information includes that test is used Example information.Multiple facility informations to be tested and test information are integrated, so that it is determined that the information of multiple equipment to be tested List.Wherein, the content of information list include: number of devices, device identification, device systems version, sequence number, execution test The information such as use-case.
Illustratively, in step S202, TestNG frame is automatically generated according to above- mentioned information list and executes the test The configuration file needed for case script.TestNG frame reads above-mentioned configuration file automatically with flexible organization test case, control Test process.Illustratively, it includes parallel line number of passes, parallel grain that TestNG frame, which can be used for configuring the executive mode of test case, Degree etc., it may also be used for specified use-case etc. is tested in control in specified equipment to be tested.
In the exemplary embodiment, it writes program and reads above- mentioned information list, and then automatic screening arranges and generates configuration Parameter described in file, to generate above-mentioned configuration file.Illustratively, according to the test information and the facility information Corresponding relationship (such as A test case, for testing first group of equipment to be tested, B test case is to be tested for testing second group Equipment etc.) configuration file is automatically generated, and then control different test cases and surveyed in corresponding equipment to be tested Examination.Wherein, above-mentioned configuration file is xml format.
In step S204, it is based on TestNG frame configuration file, test is executed in conjunction with TestNG frame and Appium and uses Case script, to complete the test of the multiple equipment to be tested parallel.Specifically, executing multiple equipment to be tested parallel can be Multiple equipment is performed simultaneously a test case, can also be that distinct device is performed simultaneously different test cases.
Fig. 3 shows the flow diagram of automated testing method according to another embodiment of the present invention, with reference to Fig. 3, The method comprising the steps of S301- step S309.
Wherein, the specific implementation of step S301- step S303 is identical as step S201- step S203, step S307 Specific implementation identical as step S204 details are not described herein.
Illustratively, before executing the test case script using the TestNG frame and Appium, in step In S304, the configuration information of multiple equipment to be tested is obtained according to above- mentioned information list.And in step S305, to multiple to be measured The configuration information of examination equipment is parameterized, and further, in step S306, the configuration information after parametrization is encapsulated At foundation class, so that the test case of the multiple equipment to be tested is inherited.Wherein, configuration information include device model information and Package informatin is installed.
It should be noted that when a test case script executes in multiple equipment to be tested, since different set Standby configuration parameter is different, and leading to the equipment initialization section of script, inconsistent (test case part is consistent, is test case Information), therefore, the configuration information of equipment to be tested is parameterized, and then be packaged into foundation class, in order to a test case foot Originally the concurrent testing in multiple equipment to be tested.To no longer need to change equipment to be tested when executing different test cases Configuration information, only change test case part.When solving the equipment for replacing different model in the prior art, need The problem of changing test script, saves the testing time, further improves testing efficiency and convenience.
In the exemplary embodiment, for including the functions such as login in multiple equipment to be tested in application, in correspondence Concurrent testing during need to solve more equipment and log in mutually to kick limitation.Illustrative settling mode includes: in above-mentioned parameter In the process, different values is assigned for the equipment to be tested of different type of machines, and then is packaged foundation class.Illustrative settling mode Further include: before step S204, the different device models is assigned into different values in the test case script.
In step S308, the displaying template of test result is configured according to the configuration information of the multiple equipment to be tested.
In step S309, the displaying template is written after the test result of each equipment to be tested is parameterized.
In the exemplary embodiment, the displaying template of test result is configured according to above-mentioned foundation class.Step S304 is obtained Test result after, each test result in the form of parameter be passed to show template, show template include multiple equipment Multiple test cases test report, user is not necessarily to check test result for each equipment to be tested, or is directed to each Test case checks test result, thus, the convenience that user checks test result is improved, meanwhile, it saves user and checks, always The time for tying test result, improve testing efficiency.
In the exemplary embodiment, the test report of a html format is formed according to above-mentioned displaying template.
In the exemplary embodiment, screenshot function can be called in test case script, by cutting in test process Figure is shown in the displaying template, in order to which the screenshot during user's binding test checks test result, Jin Eryong Test process is expressly understood in family, consequently facilitating customer analysis test result.
The device of the invention embodiment introduced below can be used for executing the above-mentioned automated testing method of the present invention.
Fig. 4 shows the structural schematic diagram of the automatic test device of embodiment according to the present invention, should be certainly with reference to Fig. 4 Dynamicization test device 400 includes: to obtain module 401, determining module 402, collector 403 and execution module 404.
Wherein, the facility information for obtaining module 401 for obtaining multiple equipment to be tested is corresponding with test information Information list;The determining module 402 is used to automatically generate configuration file according to the information list, and the configuration file is TestNG frame executes the configuration file of the test case script;The collector 403 is used for compiler test case script; The execution module 404 is used to be based on the configuration file, executes the test using the TestNG frame and Appium and uses Case script, to complete the test of the multiple equipment to be tested parallel.
In the exemplary embodiment, the determining module 402 is specifically used for according to the test information and the equipment The corresponding relationship of information automatically generates the configuration file, to control different test cases in corresponding equipment to be tested It is tested.
In the exemplary embodiment, the automatic test device 400 further include: foundation class generation module 405;Basis Class generation module is used to obtain the configuration information of the multiple equipment to be tested according to the information list;It parameterizes the multiple The configuration information of equipment to be tested;The configuration information after parametrization is packaged into foundation class, for the multiple to be tested The test case of equipment is inherited.
In the exemplary embodiment, the determining module 402 is also used to the equipment to be tested for different type of machines, in institute It is different to state assignment in test profile.
In the exemplary embodiment, the automatic test device 400 further include: result treatment module 406;The knot Fruit processing module 406 is used to determine the displaying template of test result according to the foundation class;By each equipment to be tested The displaying template is written after test result parametrization.
In the exemplary embodiment, the result treatment module 406 is used for the test of each equipment to be tested Write-in shows template to generate test report after result parameter, and the test report is html format
In the exemplary embodiment, the configuration information includes device model, and foundation class generation module 405 is used for parameter When changing the configuration information of the multiple equipment to be tested, specifically for the different device models is assigned different values.
In the exemplary embodiment, the determining module 402 also particularly useful for by the different device models in institute It states and assigns different values in test case script.
Each functional module and above-mentioned automatic test due to the automatic test device of example embodiments of the present invention The step of example embodiment of method, is corresponding, therefore for undisclosed details in apparatus of the present invention embodiment, please refers to this hair The embodiment of bright above-mentioned automated testing method.
System embodiment of the invention introduced below can be used for executing the above-mentioned automated testing method of the present invention.
Fig. 5 shows the structural schematic diagram of the automatization test system of embodiment according to the present invention, should be certainly with reference to Fig. 5 Dynamicization test macro 500 includes: client 501, server end 502, multiple equipment 503 to be tested and hub 504.Below UI automatic test course as shown in connection with fig. 6 explains the system.
In the exemplary embodiment, the client 501, i.e. web terminal are stored with list of devices to be tested, to be measured The script listing of example on probation and the installation packet sequence of equipment to be tested.Client 501 is for obtaining setting for multiple equipment to be tested Standby information information list corresponding with information is tested, and the information list is transferred to the server end.With reference to Fig. 6, Client 501 executes step S601, selects equipment to be tested, and use-case information and the APK for obtaining each equipment to be tested are (i.e. above-mentioned Configuration information) etc..
In the exemplary embodiment, the server end 502 includes: preprocessing module 5021, Appium Server control Molding block 5022 and result treatment module 5023.
Wherein, the preprocessing module 5021 is used to automatically generate configuration file, the configuration according to the information list File is the configuration file that TestNG frame executes the test case script (i.e. preprocessing module 5021 executes step S602). The preprocessing module 5021 is also used to compiler test case script (i.e. preprocessing module 5021 also executes step S603).It is described Appium server management module 5022 generates usable interface list, by multiple equipment to be tested for executing step S604 503 are connected to hub 504 (i.e. step S606) according to interface list.The Appium server management module 5022 is also used In executing step S605, start Appium server.
The result treatment module 5023 is used to be based on the configuration file, is held using the TestNG frame and Appium The row test case script, to complete test (the i.e. described result treatment module 5023 of the multiple equipment to be tested parallel Execute step S607).The result treatment module 5023 is also used to be configured according to the configuration information of the multiple equipment to be tested The displaying template of test result, and the displaying template will be written after the test result of each equipment to be tested parametrization (the i.e. described result treatment module 5023 executes step S608).
In the exemplary embodiment, the result treatment module 5023 is also used to the survey of each equipment to be tested The displaying template is written after test result parametrization to generate test report, the test report is html format.
In the exemplary embodiment, the preprocessing module 5021 is specifically used for according to the test information and described sets The corresponding relationship of standby information, automatically generates the configuration file, to control different test cases in corresponding equipment to be tested In tested.
In the exemplary embodiment, the preprocessing module 5021 is specifically used for according to information list acquisition The configuration information of multiple equipment to be tested;Parameterize the configuration information of the multiple equipment to be tested;Described in after parametrization Configuration information is packaged into foundation class, so that the test case of the multiple equipment to be tested is inherited.
In the exemplary embodiment, the preprocessing module 5021 is specifically used for parameterizing the multiple equipment to be tested Configuration information when, the different device models is assigned into different values, with solve more equipment during concurrent testing log in it is mutual Kick restricted problem.
In the exemplary embodiment, the preprocessing module 5021 specifically with by the different device models described Different values is assigned in test case script, mutually kicks restricted problem to solve more equipment logins during concurrent testing.
Due to each component part and above-mentioned automatic test of the automatization test system of example embodiments of the present invention The step of example embodiment of method, is corresponding, therefore for undisclosed details in present system embodiment, please refers to this hair The embodiment of bright above-mentioned automated testing method.
Below with reference to Fig. 7, it illustrates the computer systems 700 for the electronic equipment for being suitable for being used to realize the embodiment of the present invention Structural schematic diagram.The computer system 700 of electronic equipment shown in Fig. 7 is only an example, should not be to the embodiment of the present invention Function and use scope bring any restrictions.
As shown in fig. 7, computer system 700 includes central processing unit (CPU) 701, it can be read-only according to being stored in Program in memory (ROM) 702 or be loaded into the program in random access storage device (RAM) 703 from storage section 708 and Execute various movements appropriate and processing.In RAM 703, it is also stored with various programs and data needed for system operatio.CPU 701, ROM 702 and RAM 703 is connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to bus 704。
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.; And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon Computer program be mounted into storage section 708 as needed.
Particularly, according to an embodiment of the invention, may be implemented as computer above with reference to the process of flow chart description Software program.For example, the embodiment of the present invention 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 from network by communications portion 709, and/or from detachable media 711 are mounted.When the computer program is executed by central processing unit (CPU) 701, executes and limited in the system of the application Above-mentioned function.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, 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 of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in unit involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part realizes that described unit also can be set in the processor.Wherein, the title of these units is in certain situation Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment. Above-mentioned computer-readable medium carries one or more program, when the electronics is set by one for said one or multiple programs When standby execution, so that the electronic equipment realizes such as above-mentioned automated testing method as described in the examples.
For example, the electronic equipment may be implemented as shown in Figure 2: step S201 obtains multiple equipment to be tested Facility information and the corresponding information list of test information;Step S202 automatically generates configuration file according to the information list, The configuration file is the configuration file that TestNG frame executes the test case script;Step S203, compiler test use-case Script;Step S204 is based on the configuration file, executes the test case foot using the TestNG frame and Appium This, to complete the test of the multiple equipment to be tested parallel.
For another example, each step as shown in Figure 2 may be implemented in the electronic equipment.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description Member, but this division is not enforceable.In fact, embodiment according to the present invention, it is above-described two or more Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, touch control terminal or network equipment etc.) executes embodiment according to the present invention Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (15)

1. a kind of automated testing method characterized by comprising
Obtain the facility information information list corresponding with test information of multiple equipment to be tested;
Configuration file is automatically generated according to the information list, the configuration file is that TestNG frame executes the test case The configuration file of script;
Compiler test case script;
Based on the configuration file, the test case script is executed using the TestNG frame and Appium, with parallel complete At the test of the multiple equipment to be tested.
2. being wrapped the method according to claim 1, wherein automatically generating configuration file according to the information list It includes:
According to the corresponding relationship of the test information and the facility information, the configuration file is automatically generated, to control difference Test case tested in corresponding equipment to be tested.
3. the method according to claim 1, wherein executing the survey using the TestNG frame and Appium Before case script on probation, further includes:
The configuration information of the multiple equipment to be tested is obtained according to the information list;
Parameterize the configuration information of the multiple equipment to be tested;
The configuration information after parametrization is packaged into foundation class, for the multiple equipment to be tested test case after It holds.
4. according to the method described in claim 3, it is characterized in that, executing the survey using the TestNG frame and Appium After case script on probation, further includes:
The displaying template of test result is determined according to the foundation class;
The displaying template is written after the test result of each equipment to be tested is parameterized.
5. according to the method described in claim 4, it is characterized in that, the test result of each equipment to be tested is parameterized After the displaying template is written, comprising:
Write-in shows template to generate test report, the test after the test result of each equipment to be tested is parameterized It is reported as html format.
6. according to the method described in claim 3, it is characterized in that, the configuration information includes device model;Described in parametrization The configuration information of multiple equipment to be tested, comprising:
The different device models is assigned into different values.
7. the method according to claim 1, wherein the configuration information includes device model;Using described TestNG frame and Appium are executed before the test case script, further includes:
The different device models is assigned into different values in the test case script.
8. a kind of automatic test device characterized by comprising
Obtain module, the facility information information corresponding with test information for obtaining module and being used to obtain multiple equipment to be tested List;
Determining module, the determining module are used to automatically generate configuration file according to the information list, and the configuration file is TestNG frame executes the configuration file of the test case script;
Collector, the collector are used for compiler test case script;
Execution module, the execution module are used to be based on the configuration file, be executed using the TestNG frame and Appium The test case script, to complete the test of the multiple equipment to be tested parallel.
9. device according to claim 8, which is characterized in that further include: foundation class generation module;
The foundation class generation module is used for: the configuration information of the multiple equipment to be tested is obtained according to the information list; Parameterize the configuration information of the multiple equipment to be tested;The configuration information after parametrization is packaged into foundation class, for The test case of the multiple equipment to be tested is inherited.
10. device according to claim 9, which is characterized in that further include: result treatment module;
The result treatment module is used for: the displaying template of test result is determined according to the foundation class;It will be described each to be measured The displaying template is written after the test result parametrization of examination equipment to generate test report, the test report is html lattice Formula.
11. a kind of automatization test system characterized by comprising client, server end and multiple equipment to be tested;
The client is used to obtain the facility information information list corresponding with test information of multiple equipment to be tested, and transmits To the server end;
The server end includes: preprocessing module and result treatment module;
Wherein, the preprocessing module is used to determine that configuration file, the configuration file are TestNG according to the information list Frame configuration file and compiler test case script;
The result treatment module is used to be based on the configuration file, executes the survey using the TestNG frame and Appium Case script on probation, to complete the test of the multiple equipment to be tested parallel.
12. system according to claim 11, which is characterized in that the result treatment module is also used to according to the multiple The displaying template of the configuration information configuration test result of equipment to be tested, and the test result of each equipment to be tested is joined The displaying template is written after numberization.
13. system according to claim 12, which is characterized in that the result treatment module be also used to by it is described it is each to Write-in shows template to generate test report after the test result parametrization of test equipment, and the test report is html format.
14. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor The automated testing method as described in any one of claims 1 to 7 is realized when row.
15. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing When device executes, so that one or more of processors realize the automatic test side as described in any one of claims 1 to 7 Method.
CN201810646234.1A 2018-06-21 2018-06-21 Automated testing method, device, system, medium and electronic equipment Pending CN108932194A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810646234.1A CN108932194A (en) 2018-06-21 2018-06-21 Automated testing method, device, system, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810646234.1A CN108932194A (en) 2018-06-21 2018-06-21 Automated testing method, device, system, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN108932194A true CN108932194A (en) 2018-12-04

Family

ID=64446169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810646234.1A Pending CN108932194A (en) 2018-06-21 2018-06-21 Automated testing method, device, system, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108932194A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800154A (en) * 2018-12-15 2019-05-24 深圳壹账通智能科技有限公司 Loading method, device, computer equipment and the storage medium of test data
CN110515848A (en) * 2019-08-29 2019-11-29 行吟信息科技(上海)有限公司 Automatization test system and automated testing method
CN111008127A (en) * 2019-11-15 2020-04-14 拉扎斯网络科技(上海)有限公司 Multi-activity testing method and device, electronic equipment and readable storage medium
CN111240958A (en) * 2019-12-04 2020-06-05 五八同城信息技术有限公司 Interface testing method and device, electronic equipment and medium
CN111290951A (en) * 2020-01-22 2020-06-16 京东数字科技控股有限公司 Test method, terminal, server, system and storage medium
CN111352668A (en) * 2020-02-27 2020-06-30 珠海格力智能装备有限公司 Device testing method and device based on plug-in and testing system based on plug-in
CN111488275A (en) * 2020-04-03 2020-08-04 携程旅游网络技术(上海)有限公司 UI automation test method and device, storage medium and electronic equipment
CN112115055A (en) * 2020-09-21 2020-12-22 北京自如信息科技有限公司 Multi-machine automatic testing method and device and computer equipment
CN112468564A (en) * 2020-11-20 2021-03-09 浙江百应科技有限公司 Method for realizing automatic multi-machine parallel of terminal APP UI based on Apdium
CN112783780A (en) * 2021-01-28 2021-05-11 开放智能机器(上海)有限公司 Automatic testing method and system for multi-environment multi-platform embedded system
CN112905483A (en) * 2021-03-25 2021-06-04 杭州迪普科技股份有限公司 Automatic testing method and device based on webpage
CN113392026A (en) * 2021-07-07 2021-09-14 北京智慧星光信息技术有限公司 Interface automation test method, system, electronic equipment and storage medium
CN113672505A (en) * 2021-08-05 2021-11-19 浙江万朋教育科技股份有限公司 Multi-terminal interactive automatic regression testing method
CN113794513A (en) * 2021-11-16 2021-12-14 北京国科天迅科技有限公司 Method and device for automatically testing optical fiber bus protocol transmission system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2255978A1 (en) * 1997-12-18 1999-06-18 Northern Telecom Limited Apparatus and method for generating model reference tests
US20110258599A1 (en) * 2006-03-31 2011-10-20 Chunyue Li Test automation method for software programs
CN106484622A (en) * 2016-10-18 2017-03-08 网易(杭州)网络有限公司 Method of testing, apparatus and system
CN108062276A (en) * 2017-12-19 2018-05-22 北京小度信息科技有限公司 The generation method and device of test case and the generation method and device of test report

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2255978A1 (en) * 1997-12-18 1999-06-18 Northern Telecom Limited Apparatus and method for generating model reference tests
US20110258599A1 (en) * 2006-03-31 2011-10-20 Chunyue Li Test automation method for software programs
CN106484622A (en) * 2016-10-18 2017-03-08 网易(杭州)网络有限公司 Method of testing, apparatus and system
CN108062276A (en) * 2017-12-19 2018-05-22 北京小度信息科技有限公司 The generation method and device of test case and the generation method and device of test report

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SKYHANDCSDN: "[Android测试] AS+Appium+Java+Win 自动化测试之十:testng多设备并行测试实例封装", 《HTTPS://BLOG.CSDN.NET/NIUBITIANPING/ARTICLE/DETAILS/53502653》 *
星空的阿斯: "spring-test+JUnit实现springMVC测试用例", 《HTTPS://BLOG.CSDN.NET/XINGKONGDEASI/ARTICLE/DETAILS/79963827》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800154B (en) * 2018-12-15 2022-04-05 深圳壹账通智能科技有限公司 Test data loading method and device, computer equipment and storage medium
CN109800154A (en) * 2018-12-15 2019-05-24 深圳壹账通智能科技有限公司 Loading method, device, computer equipment and the storage medium of test data
CN110515848A (en) * 2019-08-29 2019-11-29 行吟信息科技(上海)有限公司 Automatization test system and automated testing method
CN111008127A (en) * 2019-11-15 2020-04-14 拉扎斯网络科技(上海)有限公司 Multi-activity testing method and device, electronic equipment and readable storage medium
CN111240958A (en) * 2019-12-04 2020-06-05 五八同城信息技术有限公司 Interface testing method and device, electronic equipment and medium
CN111290951A (en) * 2020-01-22 2020-06-16 京东数字科技控股有限公司 Test method, terminal, server, system and storage medium
CN111290951B (en) * 2020-01-22 2023-09-26 京东科技控股股份有限公司 Test method, terminal, server, system and storage medium
CN111352668A (en) * 2020-02-27 2020-06-30 珠海格力智能装备有限公司 Device testing method and device based on plug-in and testing system based on plug-in
CN111488275A (en) * 2020-04-03 2020-08-04 携程旅游网络技术(上海)有限公司 UI automation test method and device, storage medium and electronic equipment
CN111488275B (en) * 2020-04-03 2023-08-25 携程旅游网络技术(上海)有限公司 UI (user interface) automatic testing method and device, storage medium and electronic equipment
CN112115055A (en) * 2020-09-21 2020-12-22 北京自如信息科技有限公司 Multi-machine automatic testing method and device and computer equipment
CN112468564A (en) * 2020-11-20 2021-03-09 浙江百应科技有限公司 Method for realizing automatic multi-machine parallel of terminal APP UI based on Apdium
CN112783780A (en) * 2021-01-28 2021-05-11 开放智能机器(上海)有限公司 Automatic testing method and system for multi-environment multi-platform embedded system
CN112905483A (en) * 2021-03-25 2021-06-04 杭州迪普科技股份有限公司 Automatic testing method and device based on webpage
CN113392026A (en) * 2021-07-07 2021-09-14 北京智慧星光信息技术有限公司 Interface automation test method, system, electronic equipment and storage medium
CN113392026B (en) * 2021-07-07 2023-12-19 北京智慧星光信息技术有限公司 Interface automatic test method, system, electronic equipment and storage medium
CN113672505A (en) * 2021-08-05 2021-11-19 浙江万朋教育科技股份有限公司 Multi-terminal interactive automatic regression testing method
CN113794513A (en) * 2021-11-16 2021-12-14 北京国科天迅科技有限公司 Method and device for automatically testing optical fiber bus protocol transmission system

Similar Documents

Publication Publication Date Title
CN108932194A (en) Automated testing method, device, system, medium and electronic equipment
US10705942B1 (en) Simulated testing of API
CN108459953A (en) test method and device
CN108958992A (en) test method and device
CN110442524A (en) It is a kind of for have Certificate Authority web service interface test method and device
CN109739478A (en) Front end project automated construction method, device, storage medium and electronic equipment
CN107122301A (en) Interface detection method and device
CN109558134A (en) The method and apparatus of business datum verification
CN108804327A (en) A kind of method and apparatus of automatic Data Generation Test
CN110109979A (en) A kind of allocation list radio button method and apparatus
CN109981322A (en) The method and apparatus of cloud resource management based on label
CN109684188A (en) Test method and device
CN110895471A (en) Installation package generation method, device, medium and electronic equipment
CN109739526A (en) Code update method and device
CN109815107A (en) The method and apparatus of automatic test
CN115237428A (en) AI application deployment method, and related platform, cluster, medium, and program product
CN109582317A (en) Method and apparatus for debugging boarding application
CN109144843A (en) The method and apparatus for testing environment deployment
CN109992496A (en) A kind of data processing method and device for automatic test
CN109814957A (en) A kind of label addition method and device for IOS system
CN109614322A (en) Unit test method, device, equipment and readable storage medium storing program for executing based on Mock
CN113760736A (en) Test method, device and system
CN110888794A (en) Interface test method and device
CN116881166A (en) Method, device and system for generating test script
CN110443034A (en) The recognition methods of risk program file, calculates equipment and medium at 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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176

Applicant before: BEIJING JINGDONG FINANCIAL TECHNOLOGY HOLDING Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181204