CN106681899A - Android-UI automatic testing method and system based on Jmeter - Google Patents

Android-UI automatic testing method and system based on Jmeter Download PDF

Info

Publication number
CN106681899A
CN106681899A CN201510753145.3A CN201510753145A CN106681899A CN 106681899 A CN106681899 A CN 106681899A CN 201510753145 A CN201510753145 A CN 201510753145A CN 106681899 A CN106681899 A CN 106681899A
Authority
CN
China
Prior art keywords
jmeter
script
playback
arixtra
incoming 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
CN201510753145.3A
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 Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201510753145.3A priority Critical patent/CN106681899A/en
Publication of CN106681899A publication Critical patent/CN106681899A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides an Android-UI automatic testing method and system based on Jmeter. The Android-UI automatic testing method includes the steps that A, the operating process of a control in a mobile device APP is recorded, and a corresponding input event is generated; B, the analysis result is obtained based on the input event; C, a playback script is generated based on the analysis result; D, a Jmeter script is generated based on the playback script. According to the automatic testing method and system, the characteristics of the Jmeter are used so that high-quality join between Android-UI automatic testing and other mobile App testing can be achieved.

Description

ARIXTRA UI automated testing method and system based on Jmeter
Technical field
The present invention relates to a kind of software test field, and in particular to a kind of ARIXTRA based on Jmeter UI automated testing methods and system.
Background technology
Automatic test is referred to by automated test tool or other means, according to tester Test plan tested automatically, it is therefore an objective to mitigate the workload of manual test, so as to improve Software quality.For manual test, the major advance of automatic test is automatization The introducing of testing tool.
In fact, the ARIXTRA UI automatic test scheme of many maturations is presently in existence, for example Instrumentation and UI Automator etc., but ARIXTRA UI automatization of the prior art Method of testing is only operated and asserted to UI elements, lack by ARIXTRA UI automatization and other The method of test linking.
The content of the invention
It is an object of the invention to provide a kind of ARIXTRA UI automatic test side based on Jmeter Method and system, make user terminal support generate Jmeter scripts, make ARIXTRA UI automatic test with Other movements App tests realize that high-quality is connected.
Technical program of the present invention lies in providing a kind of ARIXTRA UI automatization survey based on Jmeter Method for testing, the method for testing includes:Step A, is recorded in mobile device App to control Operating process, generates corresponding incoming event;Step B, based on the incoming event, is parsed As a result;Step C, based on the analysis result, generates playback script;Step D, based on the playback Script, generates Jmeter scripts.
Optionally, step A includes:The incoming event for generating is stored to input equipment and is referred to Order caching.
Optionally, step C also includes, based on the analysis result, verifies the playback foot for generating Whether this is correct.
Optionally, step D includes:Based on the playback script, by the OS of Jmeter Sampler, generates the Jmeter scripts.
The present invention also provides a kind of ARIXTRA UI automatization test system based on Jmeter, the peace Tall and erect automatization test system includes:Script record module, for being recorded in mobile device App in Operating process to control, generates corresponding incoming event;Parsing module, for defeated based on this Incoming event, obtains analysis result.Playback script generation module, for being based on the analysis result, Generate playback script.Terminal module, based on the playback script, generates Jmeter scripts.
Optionally, the test system also includes:Input equipment instruction buffer, for by generate The incoming event is stored into the input equipment instruction buffer.
Optionally, the terminal module also includes:Script authentication module, for returning that checking is generated Whether correct put script.
Optionally, based on the playback script, by the OS Sampler of Jmeter, the Jmeter is generated Script.
Automated testing method and system that the present invention is provided, by using the characteristic of Jmeter, So that ARIXTRA UI automatic test realizes that high-quality is connected with other movements App tests.
Description of the drawings
Technical scheme in order to be illustrated more clearly that the embodiment of the present invention, below will be to embodiment The accompanying drawing to be used needed for description is briefly described, it should be apparent that, in describing below Accompanying drawing is only some embodiments of the present invention, for those of ordinary skill in the art, On the premise of not paying creative work, can be with according to these other accompanying drawings of accompanying drawings acquisition. In the accompanying drawings:
Fig. 1 is the ARIXTRA UI automated testing method flow chart based on Jmeter of the present invention;
Fig. 2 is the ARIXTRA UI automatization test system schematic diagram based on Jmeter of the present invention;
Fig. 3 is the ARIXTRA UI automatization test system structure chart based on Jmeter of the present invention.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention becomes more apparent, below The embodiment of the present invention is described in further details with reference to accompanying drawing.Here, the present invention's is schematic Embodiment and its illustrate for explaining the present invention but not as a limitation of the invention.
Fig. 1 is the ARIXTRA UI automated testing method flow chart based on Jmeter of the present invention. As shown in Figure 1 automatic test step is as follows:
Step A, is recorded in mobile device App to the operating process of control, generates corresponding Incoming event;
Step B, based on the incoming event, obtains analysis result,
Step C, based on the analysis result, generates playback script;
Step D, based on the playback script, generates Jmeter scripts.
Optionally, step A includes:The incoming event for generating is stored to input equipment and is referred to Order caching 205.
Optionally, step C also includes, based on the analysis result, verifies the playback foot for generating This.
Optionally, step D is specifically included:Based on the playback script, by Jmeter's OS Sampler, generate the Jmeter scripts.
The present invention is specifically described with reference to a specific embodiment, but is worth note Meaning is the specific embodiment merely to preferably describing the present invention, is not constituted to the present invention Improper restriction.
Tester is connected Android device with computer, opens the App to be measured in Android device, Start the user terminal on computer.
Button is recorded by " beginning " clicked on user terminal, then in Android device App to be measured is operated, and after the operation was ended, " termination " record is clicked on the subscriber terminal Button processed, user terminal can record the process that tester operates App in Android device, and Generate corresponding shell playback scripts.Now just complete the process of the recording in automatic test.
After recording process is completed, tester passes through to click on the playback button on user terminal, User terminal will perform this shell playback script, and the Android device being connected with user terminal On App will automatically perform operating process before tester, the purpose of the replayed section It is whether the script that checking is generated is correct.
Then, tester clicks on the generation Jmeter script buttons on user terminal, user's end The OS Sampler reference formats of matching jmeter are generated by obtaining the store path of shell scripts XML texts, then by shell script store paths insert wherein, with this pass through shell feet XML texts are converted to the file that a suffix is " .jmx " for this, comprising generation in this document OS Sampler content.Then, tester is run this " .jmx " with Jmeter instruments File, can pass through Android device and perform the process that above-mentioned tester operates App automatically with this.
Tester can be automatic in ARIXTRA UI after with Jmeter TOs " .jmx " file That changes test adds in front and back others test scenes, such as first toward lane database before repetitive operation Add and prepare data, or inquire about data base after the activation and see whether data are correctly inserted into.
Fig. 2 is the ARIXTRA UI automatization test system structure chart based on Jmeter of the present invention. As shown in Fig. 2 automatization test system includes:
Script records module 201, for being recorded in mobile device App in operation to control Journey, generates corresponding incoming event;
Parsing module 202, for based on the incoming event, obtaining analysis result.
Playback script generation module 203, for based on the analysis result, generating playback script.
Terminal module 204, based on the playback script, generates Jmeter scripts.
Optionally, the test system also includes:Input equipment instruction buffer 205, for giving birth to Into the incoming event store into the input equipment instruction buffer 205.
Optionally, the terminal module 204 also includes:Script authentication module 206, for verifying The playback script of generation.
Optionally, based on the playback script, by the OS Sampler of Jmeter, the Jmeter is generated Script.
The present invention is specifically described with reference to Fig. 3, however, it should be noted that this is concrete Embodiment merely to preferably describe the present invention, do not constitute inappropriate limitation of the present invention.
What the present invention was provided is included based on the ARIXTRA UI automatization test system of Jmeter:Terminal Module 204, for playing back the UI interfaces in Android mobile phone in App various operations are carried out, and are propped up Hold generation Jmeter scripts;Specifically, user can trigger recording by UI interfaces, terminate Record, generate the functions such as Jmeter scripts, playback.
When starting to record, tester records button by " beginning " clicked on user terminal, Terminal module 204 starts to call script recording module 201 to be recorded, and now script records mould The various operating procedures that block 201 passes through recording user operation user terminal, generate corresponding code. Additionally, the present invention can also drive UI ARIXTRA automatization by adb shell send event.Tool Body ground, the module is parsed by using the adb orders getevent that Android system is carried / dev/input/eventX files reading the user input event of Android operation system in real time, then Original device directive is cached in input equipment instruction buffer 205, the input of user is stored Event.Especially, because the incoming event has different results according to distinct device.For example For ARIXTRA simulator, event0 is represented and is preserved screen incoming event and keypad input event, and In some Android devices, same incoming event can be represented with event1.
When terminating to record, terminal module 204 is carried out by calling playback script generation module 203 Script is played back, and then generates the playback script of shell-command row format.Wherein, playback script life It is simple parsing and the output result that individual instructions are carried out according to parsing module 202 into module 203, The shell scripts of playback whole operation process are generated according to generating algorithm, is then verified by script Whether the script that the checking of module 206 is generated is correct, and parsing module 202 is to refer to input equipment These original device directives are resolved to order caching 205 user instruction of a rule, for example " X, y location carries out clicking operation " etc..Specifically, parsing module 202 is used to parse wall scroll Device directive, its major function is as follows:Judge whether present instruction is the instruction for arranging X-coordinate; Judge whether present instruction is the instruction for arranging Y-coordinate;Judge whether present instruction is click on lift Play instruction;Judge whether present instruction is click on by giving an order;Judge present instruction be whether by Key is pressed and given an order;Judge whether present instruction is that button lifts instruction;Whether judge present instruction It is do-nothing instruction;Corresponding A SCII is converted to according to keyboard input devices instruction.
Finally, terminal module 204 is driven using the OS Sampler of Jmeter, is called back Put script (shell scripts) and generate " .jmx " script for being available for Jmeter to drive.Due to herein Implementation is identical with preceding method, therefore detailed process will not be described here.
By the present invention provide automated testing method and system, tester can with After Jmeter TO .jmx before and after ARIXTRA UI automatic test add others checkout areas Scape, such as first add toward lane database before repetitive operation and prepare data, or looks into after the activation Ask data base.Test script recording mode is more friendly for tester, and test threshold is low. Additionally, record script can be multiplexed to same model test machine.Jmeter scripts to tester compared with It is familiar, test threshold is low.ARIXTRA UI automatic test can be integrated with other tests. For example check background data base after UI operations.By using the characteristic of Jmeter, so that ARIXTRA UI automatic tests realize that high-quality is connected with other movements App tests.
Particular embodiments described above, to the purpose of the present invention, technical scheme and beneficial effect Further described, should be understood that and the foregoing is only the concrete of the present invention Embodiment, the protection domain being not intended to limit the present invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements done etc. should be included in the present invention Protection domain within.

Claims (8)

1. a kind of ARIXTRA UI automated testing method based on Jmeter, it is characterised in that institute Stating ARIXTRA UI automated testing method includes:
Step A, is recorded in mobile device App to the operating process of control, generates corresponding Incoming event;
Step B, based on the incoming event, obtains analysis result;
Step C, based on the analysis result, generates playback script;
Step D, based on the playback script, generates Jmeter scripts.
2. method according to claim 1, it is characterised in that step A also includes:
The incoming event for generating is stored to input equipment instruction buffer.
3. method according to claim 1, it is characterised in that step C also includes,
Based on the analysis result, verify whether the playback script for generating is correct.
4. method according to claim 1, it is characterised in that step D includes:
Based on the playback script, by the OS Sampler of Jmeter, the Jmeter is generated Script.
5. a kind of ARIXTRA UI automatization test system based on Jmeter, it is characterised in that institute Stating ARIXTRA UI automatization test system includes:
Script records module, for being recorded in mobile device App in operating process to control, Generate corresponding incoming event;
Parsing module, for based on the incoming event, obtaining analysis result.
Playback script generation module, for based on the analysis result, generating playback script.
Terminal module, based on the playback script, generates Jmeter scripts.
6. system according to claim 5, it is characterised in that the system also includes:
Input equipment instruction buffer, for the incoming event for generating to be stored to the input In device directive caching.
7. system according to claim 5, it is characterised in that the terminal module is also wrapped Include:
Whether script authentication module, the playback script generated for checking is correct.
8. system according to claim 5, it is characterised in that the terminal module is based on The playback script, by the OS Sampler of Jmeter, generates the Jmeter scripts.
CN201510753145.3A 2015-11-06 2015-11-06 Android-UI automatic testing method and system based on Jmeter Pending CN106681899A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510753145.3A CN106681899A (en) 2015-11-06 2015-11-06 Android-UI automatic testing method and system based on Jmeter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510753145.3A CN106681899A (en) 2015-11-06 2015-11-06 Android-UI automatic testing method and system based on Jmeter

Publications (1)

Publication Number Publication Date
CN106681899A true CN106681899A (en) 2017-05-17

Family

ID=58862906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510753145.3A Pending CN106681899A (en) 2015-11-06 2015-11-06 Android-UI automatic testing method and system based on Jmeter

Country Status (1)

Country Link
CN (1) CN106681899A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905417A (en) * 2021-02-24 2021-06-04 广东南电智控系统有限公司 Business performance monitoring design method based on Jmeter
CN115858400A (en) * 2023-02-27 2023-03-28 广州市玄武无线科技股份有限公司 Mobile app automatic test task arrangement system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050108057A1 (en) * 2003-09-24 2005-05-19 Michal Cohen Medical device management system including a clinical system interface
CN103365779A (en) * 2013-07-09 2013-10-23 广东欧珀移动通信有限公司 Software test method and system
CN104881364A (en) * 2015-06-26 2015-09-02 上海斐讯数据通信技术有限公司 Automated testing method and system applied to Android system
CN104932974A (en) * 2015-05-28 2015-09-23 国家计算机网络与信息安全管理中心 Script conversion method and script conversion device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050108057A1 (en) * 2003-09-24 2005-05-19 Michal Cohen Medical device management system including a clinical system interface
CN103365779A (en) * 2013-07-09 2013-10-23 广东欧珀移动通信有限公司 Software test method and system
CN104932974A (en) * 2015-05-28 2015-09-23 国家计算机网络与信息安全管理中心 Script conversion method and script conversion device
CN104881364A (en) * 2015-06-26 2015-09-02 上海斐讯数据通信技术有限公司 Automated testing method and system applied to Android system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905417A (en) * 2021-02-24 2021-06-04 广东南电智控系统有限公司 Business performance monitoring design method based on Jmeter
CN115858400A (en) * 2023-02-27 2023-03-28 广州市玄武无线科技股份有限公司 Mobile app automatic test task arrangement system

Similar Documents

Publication Publication Date Title
CN107516510B (en) Automatic voice testing method and device for intelligent equipment
CN111159049B (en) Automatic interface testing method and system
US10853232B2 (en) Adaptive system for mobile device testing
CN108717393B (en) Application program testing method and mobile terminal
CN104809056B (en) A kind of generation method and device of interface testing code
CN106547687A (en) Application testing method, apparatus and system
CN109871326A (en) A kind of method and apparatus that script is recorded
CN105338110A (en) Remote debugging method, platform and server
CN107562637B (en) Method, device, system and storage medium for software testing
CN110716853A (en) Test script recording method, application program testing method and related device
KR100618319B1 (en) Error test method for mobile communication terminals
CN103268289A (en) Method and system for transcribing and applying test script on mobile terminal
CN101262681A (en) Automatic testing mobile terminal and its implementation method
KR100892141B1 (en) Test method for automatically testing portable device and apparatus there-for
CN106681899A (en) Android-UI automatic testing method and system based on Jmeter
KR101792864B1 (en) System and Method for verifying application
CN112367220B (en) Interface testing method and device, storage medium and electronic equipment
KR20070104202A (en) Automation test service system for view software of portable telephone and method thereof
KR100585577B1 (en) Test method for mobile communication terminals based on auto-making of test scenario file
CN104239202A (en) Non-Root testing method and system of interactive intelligent equipment
CN113282476B (en) Interface performance testing method and device and electronic equipment
CN110737900B (en) Webpage function testing method and device, server and computer readable storage medium
CN106844186B (en) Offline test method of application and terminal equipment
CN103377118B (en) A kind of method and device for testing Flash engine
CN112188192A (en) Code stream adaptability test method, system, computer equipment and storage medium

Legal Events

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

Application publication date: 20170517