CN110489342A - A kind of Android application testing method, system, device and storage medium - Google Patents

A kind of Android application testing method, system, device and storage medium Download PDF

Info

Publication number
CN110489342A
CN110489342A CN201910701474.1A CN201910701474A CN110489342A CN 110489342 A CN110489342 A CN 110489342A CN 201910701474 A CN201910701474 A CN 201910701474A CN 110489342 A CN110489342 A CN 110489342A
Authority
CN
China
Prior art keywords
test
mobile phone
android application
simulated operation
operation event
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
CN201910701474.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.)
Guangzhou Microcomputer Interconnection Information Technology Co Ltd
Original Assignee
Guangzhou Microcomputer Interconnection Information 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 Guangzhou Microcomputer Interconnection Information Technology Co Ltd filed Critical Guangzhou Microcomputer Interconnection Information Technology Co Ltd
Priority to CN201910701474.1A priority Critical patent/CN110489342A/en
Publication of CN110489342A publication Critical patent/CN110489342A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a kind of Android application testing method, system, device and storage medium, method includes: to establish connection with mobile phone;Read test use-case document, and according to test case document structure tree simulated operation event;It sends simulated operation event in mobile phone and check test is carried out to Android application, and test report is generated according to test result.The present invention is according to the test case document structure tree simulated operation time and is sent in mobile phone to Android application progress check test, the simulation of artificial most application operatings can have been accomplished by not needing manual operation so also, and all brands, the resolution ratio of Android mobile phone can be adapted to, pass through customized operating procedure, so as to carry out automatic test in any Android mobile phone, operational trials and compatibility test efficiency are greatly improved.It the composite can be widely applied in Android application test.

Description

A kind of Android application testing method, system, device and storage medium
Technical field
The present invention relates to the field of test technology more particularly to a kind of Android application testing method, system, device and storage to be situated between Matter.
Background technique
Android application carries all business of company, and business scenario is more, needs to carry out full-service before new version is online and tests Card, and Android mobile phone brand is numerous, and most of home brands have all carried out secondary development to Android system, improve Android and answer With the difficulty of compatibility.It carries out returning by hand and compatibility test inefficiency, needs to take a substantial amount of time and human resources.
Summary of the invention
In order to solve the above-mentioned technical problem, the object of the present invention is to provide a kind of Android applications that can improve testing efficiency to survey Method for testing, system, device and storage medium.
The technical solution used in the present invention is:
A kind of Android application testing method, comprising the following steps:
Connection is established with mobile phone;
Read test use-case document, and according to test case document structure tree simulated operation event;
It sends simulated operation event in mobile phone and check test is carried out to Android application, and generated and surveyed according to test result Examination report.
It is described to send simulated operation event to as a kind of further improvement of Android application testing method Carry out check test in mobile phone, the step for before it is further comprising the steps of:
Starting log acquires process, and particular path file is written in log content.
It is described to establish connection with mobile phone as a kind of further improvement of Android application testing method, this Step specifically includes:
Obtain the device identification of mobile phone;
According to device identification, the Android system version number of mobile phone is obtained;
According to device identification and Android system version number, the session connection between mobile phone is established.
As a kind of further improvement of Android application testing method, the read test use-case document, and According to test case document structure tree simulated operation event, the step for specifically include:
Read test use-case document;
According to the preliminary simulated operation event of test case document structure tree;
According to the event value field data of test case document, the attribute value of preliminary simulated operation event is filled out It fills, obtains filled simulated operation event.
As a kind of further improvement of Android application testing method, the read test use-case document, and According to test case document structure tree simulated operation event, the step for further include:
According to the screenshot field data in test case document, judge whether to need shot operation, if so, combining filling Simulated operation event afterwards generates the simulated operation event of screenshot screen;Conversely, not needing then again to filled simulated operation Event is handled.
It is described to send simulated operation event to as a kind of further improvement of Android application testing method In mobile phone to Android application carry out check test, and according to test result generate test report, the step for specifically include:
It sends simulated operation event in mobile phone, so that mobile phone is to Android application execution simulated operation event;
Judge mobile phone execute simulated operation event it is complete after the Android application whether collapse phenomenon occurs, if so, test knot Fruit is test crash, and records fail step serial number;Conversely, then test result is that test passes through;
Test report is generated according to test result.
Another technical solution of the present invention is:
A kind of Android application test systems, comprising:
Connection unit, for establishing connection with mobile phone;
Event generation unit is used for read test use-case document, and according to test case document structure tree simulated operation event;
Check test unit carries out check test to Android application for sending simulated operation event in mobile phone, and Test report is generated according to test result.
Further improvement as a kind of Android application test systems, further includes:
Log collection unit acquires process for starting log, and particular path file is written in log content.
Another technical solution of the present invention is:
A kind of Android application test device, comprising:
At least one processor;
At least one processor, for storing at least one program;
When at least one described program is executed by least one described processor, so that at least one described processor is realized The Android application testing method.
Another technical solution of the present invention is:
A kind of computer readable storage medium, which is characterized in that including computer program, when the computer program is being counted When being run on calculation machine, so that the Android application testing method is performed.
The beneficial effects of the present invention are:
A kind of Android application testing method of the present invention, system, device and storage medium are according to test case document structure tree mould The quasi- operating time is simultaneously sent in mobile phone to Android application progress check test, and people can also have been accomplished by not needing manual operation in this way The simulation of work overwhelming majority application operating, and it can be adapted to all brands, the resolution ratio of Android mobile phone, pass through customized behaviour Make step, so as to carry out automatic test in any Android mobile phone, greatly improves operational trials and compatibility Testing efficiency.
Detailed description of the invention
Fig. 1 is a kind of step flow chart of Android application testing method of the present invention;
Fig. 2 is a kind of block diagram of Android application test systems of the present invention.
Specific embodiment
Specific embodiments of the present invention will be further explained with reference to the accompanying drawing:
With reference to Fig. 1, the embodiment of the invention provides a kind of Android application testing methods, comprising the following steps:
S1, connection is established with mobile phone;
S2, read test use-case document, and according to test case document structure tree simulated operation event;
S3, it sends simulated operation event in mobile phone to Android application progress check test, and according to test result life At test report.
In the present embodiment, test case document includes step number, component identification, action event, event value and screenshot, institute State sequence of the step number for definition step;Component identification is used to define the unique identification of application interface element;Action event For defining the classification of modeling event, such as click, input, sliding;Event value is used to define the attribute value of modeling event, such as defeated Enter frame input account data etc.;Screenshot for define the step whether screen printing.
It is further used as preferred embodiment, described send simulated operation event in mobile phone carries out verification survey Examination, the step for before it is further comprising the steps of:
Starting log acquires process, and particular path file is written in log content.
Be further used as preferred embodiment, it is described to establish connection with mobile phone, the step for specifically include:
S11, the device identification for obtaining mobile phone;
S12, according to device identification, obtain the Android system version number of mobile phone;
S13, the session connection according to device identification and Android system version number, between foundation and mobile phone.
The device identification of mobile phone is obtained in the present embodiment by adb order;Then it by device identification, is obtained toward mobile phone transmission Take the adb order of Android system version number;Device identification and Android system version number finally by mobile phone assemble appimu work The parameter of tool connection mobile phone, it is established that the session between tool and mobile phone.
It is further used as preferred embodiment, read test use-case document described in the present embodiment, and according to test Use-case document structure tree simulated operation event, the step for specifically include:
S21, read test use-case document;
S22, according to the preliminary simulated operation event of test case document structure tree;
Using the simulated operation event of appium tool simulation operation interface element in the present embodiment.
S23, the event value field data according to test case document carry out the attribute value of preliminary simulated operation event Filling, obtains filled simulated operation event.
Wherein, attribute value includes input frame input data, the speed for clicking event etc..
It is further used as preferred embodiment, the read test use-case document, and is given birth to according to test case document At simulated operation event, the step for further include:
According to the screenshot field data in test case document, judge whether to need shot operation, if so, combining filling Simulated operation event afterwards generates the simulated operation event of screenshot screen;Conversely, not needing then again to filled simulated operation Event is handled.
Be further used as preferred embodiment, it is described by simulated operation event be sent in mobile phone to Android apply into Row check test, and according to test result generate test report, the step for specifically include:
S31, it sends simulated operation event in mobile phone, so that mobile phone is to Android application execution simulated operation event;
S32, judge mobile phone execute simulated operation event it is complete after the Android application whether collapse phenomenon occurs, if so, survey Test result is test crash, and records fail step serial number;Conversely, then test result is that test passes through;
S33, test report is generated according to test result.
After all operations step defined in the present embodiment has executed, if using there is no collapse phenomenons, then it represents that Business scenario test passes through.Such as there is collapse phenomenon, then illustrates to need to be determined according to Android system log using problematic Position, it is therefore desirable to acquire the log.The phenomenon that can not find element in the presence of erroneous judgement due to appium tool, the health for detecting application need It to be detected by adb order, cycle detection just can determine that there is no collapses three times, using normal survival.
With reference to Fig. 2, a kind of Android application test systems are present embodiments provided, comprising:
Connection unit, for establishing connection with mobile phone;
Event generation unit is used for read test use-case document, and according to test case document structure tree simulated operation event;
Check test unit carries out check test to Android application for sending simulated operation event in mobile phone, and Test report is generated according to test result.
Suitable for this system embodiment, this system embodiment is implemented content in above method embodiment Function is identical as above method embodiment, and the beneficial effect reached and above method embodiment beneficial effect achieved It is identical.
It is further used as preferred embodiment, further includes:
Log collection unit acquires process for starting log, and particular path file is written in log content.
The present embodiment additionally provides a kind of Android application test device, comprising:
At least one processor;
At least one processor, for storing at least one program;
When at least one described program is executed by least one described processor, so that at least one described processor is realized The Android application testing method.
Suitable for present apparatus embodiment, present apparatus embodiment is implemented content in above method embodiment Function is identical as above method embodiment, and the beneficial effect reached and above method embodiment beneficial effect achieved It is identical.
The present embodiment additionally provides a kind of computer readable storage medium, which is characterized in that including computer program, works as institute When stating computer program and running on computers, so that the Android application testing method is performed.
Suitable for this storage medium embodiment, this storage medium embodiment is had content in above method embodiment The function that body is realized is identical as above method embodiment, and the beneficial effect reached with above method embodiment is achieved has Beneficial effect is also identical.
In conclusion a kind of Android application testing method of the present invention, system, device and storage medium are according to test case text Shelves, which generate the simulated operation time and are sent in mobile phone, carries out check test to Android application, does not need manual operation in this way and also can The simulation of artificial most application operatings is accomplished, and all brands, the resolution ratio of Android mobile phone can be adapted to, by certainly The operating procedure of definition greatly improves operational trials so as to carry out automatic test in any Android mobile phone With compatibility test efficiency.
It should be appreciated that the embodiment of the present invention can be by computer hardware, the combination of hardware and software or by depositing The computer instruction in non-transitory computer-readable memory is stored up to be effected or carried out.Standard volume can be used in the method Journey technology-includes that the non-transitory computer-readable storage media configured with computer program is realized in computer program, In configured in this way storage medium computer is operated in a manner of specific and is predefined --- according in a particular embodiment The method and attached drawing of description.Each program can with the programming language of level process or object-oriented come realize with department of computer science System communication.However, if desired, the program can be realized with compilation or machine language.Under any circumstance, which can be volume The language translated or explained.In addition, the program can be run on the specific integrated circuit of programming for this purpose.
In addition, the operation of process described herein can be performed in any suitable order, unless herein in addition instruction or Otherwise significantly with contradicted by context.Process described herein (or modification and/or combination thereof) can be held being configured with It executes, and is can be used as jointly on the one or more processors under the control of one or more computer systems of row instruction The code (for example, executable instruction, one or more computer program or one or more application) of execution, by hardware or its group It closes to realize.The computer program includes the multiple instruction that can be performed by one or more processors.
Further, the method can be realized in being operably coupled to suitable any kind of computing platform, wrap Include but be not limited to PC, mini-computer, main frame, work station, network or distributed computing environment, individual or integrated Computer platform or communicated with charged particle tool or other imaging devices etc..Each aspect of the present invention can be to deposit The machine readable code on non-transitory storage medium or equipment is stored up to realize no matter be moveable or be integrated to calculating Platform, such as hard disk, optical reading and/or write-in storage medium, RAM, ROM, so that it can be read by programmable calculator, when Storage medium or equipment can be used for configuration and operation computer to execute process described herein when being read by computer.This Outside, machine readable code, or part thereof can be transmitted by wired or wireless network.When such media include combining microprocessor Or other data processors realize steps described above instruction or program when, invention as described herein including these and other not The non-transitory computer-readable storage media of same type.When methods and techniques according to the present invention programming, the present invention It further include computer itself.
Computer program can be applied to input data to execute function as described herein, to convert input data with life At storing to the output data of nonvolatile memory.Output information can also be applied to one or more output equipments as shown Device.In the preferred embodiment of the invention, the data of conversion indicate physics and tangible object, including the object generated on display Reason and the particular visual of physical objects are described.
It is to be illustrated to preferable implementation of the invention, but the invention is not limited to the implementation above Example, those skilled in the art can also make various equivalent variations on the premise of without prejudice to spirit of the invention or replace It changes, these equivalent deformations or replacement are all included in the scope defined by the claims of the present application.

Claims (10)

1. a kind of Android application testing method, which comprises the following steps:
Connection is established with mobile phone;
Read test use-case document, and according to test case document structure tree simulated operation event;
It sends simulated operation event in mobile phone and check test is carried out to Android application, and test report is generated according to test result It accuses.
2. a kind of Android application testing method according to claim 1, it is characterised in that: described by simulated operation event Be sent in mobile phone and carry out check test, the step for before it is further comprising the steps of:
Starting log acquires process, and particular path file is written in log content.
3. a kind of Android application testing method according to claim 1, it is characterised in that: described establish with mobile phone connects Connect, the step for specifically include:
Obtain the device identification of mobile phone;
According to device identification, the Android system version number of mobile phone is obtained;
According to device identification and Android system version number, the session connection between mobile phone is established.
4. a kind of Android application testing method according to claim 1, it is characterised in that: the read test example text Shelves, and according to test case document structure tree simulated operation event, the step for specifically include: read test use-case document;
According to the preliminary simulated operation event of test case document structure tree;
According to the event value field data of test case document, the attribute value of preliminary simulated operation event is filled, is obtained To filled simulated operation event.
5. a kind of Android application testing method according to claim 4, it is characterised in that: the read test example text Shelves, and according to test case document structure tree simulated operation event, the step for further include:
According to the screenshot field data in test case document, judge whether to need shot operation, if so, in conjunction with filled The simulated operation event of simulated operation event generation screenshot screen;Conversely, not needing then again to filled simulated operation event It is handled.
6. a kind of Android application testing method according to claim 4, it is characterised in that: described by simulated operation event Be sent in mobile phone to Android application carry out check test, and according to test result generate test report, the step for specifically wrap It includes:
It sends simulated operation event in mobile phone, so that mobile phone is to Android application execution simulated operation event;
Judge mobile phone execute simulated operation event it is complete after the Android application whether collapse phenomenon occurs, if so, test result is Test crash, and record fail step serial number;Conversely, then test result is that test passes through;Test report is generated according to test result It accuses.
7. a kind of Android application test systems characterized by comprising
Connection unit, for establishing connection with mobile phone;
Event generation unit is used for read test use-case document, and according to test case document structure tree simulated operation event;
Check test unit, for sending simulated operation event in mobile phone to Android application progress check test, and according to Test result generates test report.
8. a kind of Android application test systems according to claim 7, it is characterised in that: further include:
Log collection unit acquires process for starting log, and particular path file is written in log content.
9. a kind of Android application test device, it is characterised in that: include:
At least one processor;
At least one processor, for storing at least one program;
When at least one described program is executed by least one described processor, so that at least one described processor is realized as weighed Benefit requires the described in any item Android application testing methods of 1-6.
10. a kind of computer readable storage medium, which is characterized in that including computer program, when the computer program is being counted When being run on calculation machine, so that Android application testing method as described in any one of claims 1 to 6 is performed.
CN201910701474.1A 2019-07-31 2019-07-31 A kind of Android application testing method, system, device and storage medium Pending CN110489342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910701474.1A CN110489342A (en) 2019-07-31 2019-07-31 A kind of Android application testing method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910701474.1A CN110489342A (en) 2019-07-31 2019-07-31 A kind of Android application testing method, system, device and storage medium

Publications (1)

Publication Number Publication Date
CN110489342A true CN110489342A (en) 2019-11-22

Family

ID=68547766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910701474.1A Pending CN110489342A (en) 2019-07-31 2019-07-31 A kind of Android application testing method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN110489342A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112560035A (en) * 2020-12-15 2021-03-26 深圳市和讯华谷信息技术有限公司 Application detection method, device, equipment and storage medium
CN113204300A (en) * 2021-07-02 2021-08-03 杭州星犀科技有限公司 Method and system for automatically executing operation by equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331363A (en) * 2014-10-17 2015-02-04 上海斐讯数据通信技术有限公司 Automatic testing method for Android device
CN106649024A (en) * 2016-09-22 2017-05-10 微梦创科网络科技(中国)有限公司 Method and device for real-time monitoring of application performance
CN109491883A (en) * 2018-09-13 2019-03-19 武汉灯塔之光科技有限公司 Performance detects control methods and system simultaneously between applying under a kind of Android platform more
CN109800123A (en) * 2018-12-14 2019-05-24 深圳壹账通智能科技有限公司 Automate electric quantity test method, apparatus, computer equipment and storage medium
CN109992494A (en) * 2017-12-29 2019-07-09 北京京东尚科信息技术有限公司 A kind of automatic test execution method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331363A (en) * 2014-10-17 2015-02-04 上海斐讯数据通信技术有限公司 Automatic testing method for Android device
CN106649024A (en) * 2016-09-22 2017-05-10 微梦创科网络科技(中国)有限公司 Method and device for real-time monitoring of application performance
CN109992494A (en) * 2017-12-29 2019-07-09 北京京东尚科信息技术有限公司 A kind of automatic test execution method and apparatus
CN109491883A (en) * 2018-09-13 2019-03-19 武汉灯塔之光科技有限公司 Performance detects control methods and system simultaneously between applying under a kind of Android platform more
CN109800123A (en) * 2018-12-14 2019-05-24 深圳壹账通智能科技有限公司 Automate electric quantity test method, apparatus, computer equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112560035A (en) * 2020-12-15 2021-03-26 深圳市和讯华谷信息技术有限公司 Application detection method, device, equipment and storage medium
CN112560035B (en) * 2020-12-15 2024-04-02 深圳市和讯华谷信息技术有限公司 Application detection method, device, equipment and storage medium
CN113204300A (en) * 2021-07-02 2021-08-03 杭州星犀科技有限公司 Method and system for automatically executing operation by equipment

Similar Documents

Publication Publication Date Title
CN107908541B (en) Interface testing method and device, computer equipment and storage medium
KR101132560B1 (en) System and method for automatic interface testing based on simulation for robot software components
CN104156224B (en) A kind of software building continuous integrating method and system
CN106095673A (en) Automated testing method based on WEB interface and system
CN111078539B (en) Test method, device, system and computer readable storage medium
CN102244594A (en) Network emulation in manual and automated testing tools
CN110489343A (en) A kind of conversational services test method, system, device and storage medium
CN110286938B (en) Method and apparatus for outputting evaluation information for user
CN106897107B (en) implementation system and method for web remote data calculation and simulation
CN104484267B (en) One kind test system and method
CN103246606B (en) The performance test methods of ESB platform and system
CN108111364B (en) Service system testing method and device
CN104572072A (en) MVC (model view controller) mode-based language transformation method and equipment for program
CN111460620B (en) Test evaluation model construction method and system
CN110489342A (en) A kind of Android application testing method, system, device and storage medium
CN113204451B (en) Pressure test method, system, storage medium and terminal for Redis cluster
CN110659870A (en) Business audit test method, device, equipment and storage medium
CN114004700A (en) Service data processing method and device, electronic equipment and storage medium
US9983965B1 (en) Method and system for implementing virtual users for automated test and retest procedures
CN110162452A (en) A kind of analog detection method, device and storage medium for testing and control service
CN110134381A (en) A kind of system and method intelligently generating source code configuration for alarm host machine
CN110427277B (en) Data verification method, device, equipment and storage medium
CN111984519B (en) Test method and device for service system
CN109739754B (en) Automatic testing method and system for application program based on WeChat development
CN103312554A (en) Testing method and system of multi-server interactive services

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191122

RJ01 Rejection of invention patent application after publication