Movatterモバイル変換


[0]ホーム

URL:


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
CN106681899ACN201510753145.3ACN201510753145ACN106681899ACN 106681899 ACN106681899 ACN 106681899ACN 201510753145 ACN201510753145 ACN 201510753145ACN 106681899 ACN106681899 ACN 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 LtdfiledCriticalBeijing Jingdong Century Trading Co Ltd
Priority to CN201510753145.3ApriorityCriticalpatent/CN106681899A/en
Publication of CN106681899ApublicationCriticalpatent/CN106681899A/en
Pendinglegal-statusCriticalCurrent

Links

Landscapes

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 JmeterUI automated testing methods and system.
Background technology
Automatic test is referred to by automated test tool or other means, according to testerTest plan tested automatically, it is therefore an objective to mitigate the workload of manual test, so as to improveSoftware quality.For manual test, the major advance of automatic test is automatizationThe introducing of testing tool.
In fact, the ARIXTRA UI automatic test scheme of many maturations is presently in existence, for exampleInstrumentation and UI Automator etc., but ARIXTRA UI automatization of the prior artMethod of testing is only operated and asserted to UI elements, lack by ARIXTRA UI automatization and otherThe 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 JmeterMethod and system, make user terminal support generate Jmeter scripts, make ARIXTRA UI automatic test withOther 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 JmeterMethod for testing, the method for testing includes:Step A, is recorded in mobile device App to controlOperating process, generates corresponding incoming event;Step B, based on the incoming event, is parsedAs a result;Step C, based on the analysis result, generates playback script;Step D, based on the playbackScript, generates Jmeter scripts.
Optionally, step A includes:The incoming event for generating is stored to input equipment and is referred toOrder caching.
Optionally, step C also includes, based on the analysis result, verifies the playback foot for generatingWhether this is correct.
Optionally, step D includes:Based on the playback script, by the OS of JmeterSampler, generates the Jmeter scripts.
The present invention also provides a kind of ARIXTRA UI automatization test system based on Jmeter, the peaceTall and erect automatization test system includes:Script record module, for being recorded in mobile device App inOperating process to control, generates corresponding incoming event;Parsing module, for defeated based on thisIncoming 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 generateThe incoming event is stored into the input equipment instruction buffer.
Optionally, the terminal module also includes:Script authentication module, for returning that checking is generatedWhether correct put script.
Optionally, based on the playback script, by the OS Sampler of Jmeter, the Jmeter is generatedScript.
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 embodimentThe accompanying drawing to be used needed for description is briefly described, it should be apparent that, in describing belowAccompanying 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, belowThe embodiment of the present invention is described in further details with reference to accompanying drawing.Here, the present invention's is schematicEmbodiment 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 correspondingIncoming 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 toOrder caching 205.
Optionally, step C also includes, based on the analysis result, verifies the playback foot for generatingThis.
Optionally, step D is specifically included:Based on the playback script, by Jmeter'sOS Sampler, generate the Jmeter scripts.
The present invention is specifically described with reference to a specific embodiment, but is worth noteMeaning is the specific embodiment merely to preferably describing the present invention, is not constituted to the present inventionImproper 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 deviceApp to be measured is operated, and after the operation was ended, " termination " record is clicked on the subscriber terminalButton processed, user terminal can record the process that tester operates App in Android device, andGenerate 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 terminalOn App will automatically perform operating process before tester, the purpose of the replayed sectionIt is whether the script that checking is generated is correct.
Then, tester clicks on the generation Jmeter script buttons on user terminal, user's endThe OS Sampler reference formats of matching jmeter are generated by obtaining the store path of shell scriptsXML texts, then by shell script store paths insert wherein, with this pass through shell feetXML texts are converted to the file that a suffix is " .jmx " for this, comprising generation in this documentOS Sampler content.Then, tester is run this " .jmx " with Jmeter instrumentsFile, 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 " fileThat changes test adds in front and back others test scenes, such as first toward lane database before repetitive operationAdd 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 controlJourney, 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 toInto the incoming event store into the input equipment instruction buffer 205.
Optionally, the terminal module 204 also includes:Script authentication module 206, for verifyingThe playback script of generation.
Optionally, based on the playback script, by the OS Sampler of Jmeter, the Jmeter is generatedScript.
The present invention is specifically described with reference to Fig. 3, however, it should be noted that this is concreteEmbodiment 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:TerminalModule 204, for playing back the UI interfaces in Android mobile phone in App various operations are carried out, and are propped upHold generation Jmeter scripts;Specifically, user can trigger recording by UI interfaces, terminateRecord, 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 mouldThe 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.ToolBody 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, thenOriginal device directive is cached in input equipment instruction buffer 205, the input of user is storedEvent.Especially, because the incoming event has different results according to distinct device.For exampleFor ARIXTRA simulator, event0 is represented and is preserved screen incoming event and keypad input event, andIn 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 203Script is played back, and then generates the playback script of shell-command row format.Wherein, playback script lifeIt 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 scriptWhether the script that the checking of module 206 is generated is correct, and parsing module 202 is to refer to input equipmentThese 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 scrollDevice 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 liftPlay instruction;Judge whether present instruction is click on by giving an order;Judge present instruction be whether byKey is pressed and given an order;Judge whether present instruction is that button lifts instruction;Whether judge present instructionIt 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 backPut script (shell scripts) and generate " .jmx " script for being available for Jmeter to drive.Due to hereinImplementation 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 withAfter Jmeter TO .jmx before and after ARIXTRA UI automatic test add others checkout areasScape, such as first add toward lane database before repetitive operation and prepare data, or looks into after the activationAsk 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 withIt 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 ARIXTRAUI 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 effectFurther described, should be understood that and the foregoing is only the concrete of the present inventionEmbodiment, the protection domain being not intended to limit the present invention, it is all the present invention spirit andWithin principle, any modification, equivalent substitution and improvements done etc. should be included in the present inventionProtection domain within.

Claims (8)

CN201510753145.3A2015-11-062015-11-06Android-UI automatic testing method and system based on JmeterPendingCN106681899A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201510753145.3ACN106681899A (en)2015-11-062015-11-06Android-UI automatic testing method and system based on Jmeter

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510753145.3ACN106681899A (en)2015-11-062015-11-06Android-UI automatic testing method and system based on Jmeter

Publications (1)

Publication NumberPublication Date
CN106681899Atrue CN106681899A (en)2017-05-17

Family

ID=58862906

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510753145.3APendingCN106681899A (en)2015-11-062015-11-06Android-UI automatic testing method and system based on Jmeter

Country Status (1)

CountryLink
CN (1)CN106681899A (en)

Cited By (2)

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

Citations (4)

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

Patent Citations (4)

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

Cited By (2)

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

Similar Documents

PublicationPublication DateTitle
CN111159049B (en)Automatic interface testing method and system
CN108717393B (en)Application program testing method and mobile terminal
US10853232B2 (en)Adaptive system for mobile device testing
CN107516510B (en)Automatic voice testing method and device for intelligent equipment
CN101521899B (en) On-board testing system and method for mobile applications
CN201392526Y (en) On-board test system for mobile applications
CN103729294B (en)Method and device for testing performance script of application software
CN109871326A (en) Method and device for recording a script
CN100535869C (en)Software test automated system based on apparatus and the method
CN112559348B (en)Test analysis method, system, equipment and medium based on jacoco
CN110716853A (en) A test script recording method, application program testing method and related device
CN107562637B (en)Method, device, system and storage medium for software testing
CN113282476B (en)Interface performance testing method and device and electronic equipment
CN101287266A (en)Test system and method for mobile phone
CN103268289A (en)Method and system for transcribing and applying test script on mobile terminal
CN101262681A (en)Automatic testing mobile terminal and its implementation method
CN103984626A (en)Method and device for generating test-case script
CN107729238A (en)A kind of plug-in unit adjustment method, system, device and computer-readable recording medium
WO2007061241A1 (en)Error test method for mobile communication terminals
CN114519008A (en)Recommendation method, device, medium and equipment for regression test case
KR100892141B1 (en) Automatic verification method of portable device and device
CN111078563A (en)Coverage rate data processing method, terminal device and computer readable storage medium
CN112367220B (en)Interface testing method and device, storage medium and electronic equipment
CN110322587B (en)Evaluation recording method, device and equipment in driving process and storage medium
CN110737900B (en)Webpage function testing method and device, server and computer readable storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20170517


[8]ページ先頭

©2009-2025 Movatter.jp