CN109344058A - A kind of small routine automated testing method - Google Patents
A kind of small routine automated testing method Download PDFInfo
- Publication number
- CN109344058A CN109344058A CN201811090663.1A CN201811090663A CN109344058A CN 109344058 A CN109344058 A CN 109344058A CN 201811090663 A CN201811090663 A CN 201811090663A CN 109344058 A CN109344058 A CN 109344058A
- Authority
- CN
- China
- Prior art keywords
- mobile phone
- small routine
- interface
- page
- elements
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Abstract
The invention discloses a kind of small routine automated testing methods finally to parse and filter non-present page elements, the i.e. effective element of acquisition current interface by the engine and small routine communication, acquisition small routine current page element inside mobile phone.Send an instruction to the engine inside mobile phone by the end PC, for example want to look up some elements A on mobile phone interface, then the engine inside mobile phone will automatically retrieval come out whether current page includes this elements A, so as to realize the automation of small routine test.Due to that the element wanted to look up can be sent to mobile phone by PC, any desired interface element can be searched, so as to realize the customization of test.
Description
Technical field
This application involves the control technology fields more particularly to a kind of little Cheng of testing tool and Android mobile phone wechat small routine
Sequence automated testing method.
Background technique
Wechat small routine, abbreviation small routine are that one kind does not need the i.e. workable application of downloading installation, it realizes application
The dream of " within reach ", user, which sweeps, sweeps or searches i.e. openable application.Present small routine test can pass through Tencent
TBS Studio tool, but the tool be it is closed, can not achieve customization and automation.So it is a set of may be implemented it is small
Programming automation test method very it is necessary to.
Summary of the invention
In view of the deficiencies of the prior art, the present invention is intended to provide a kind of small routine automated testing method, may be implemented small
The automation of program test customizes.
To achieve the goals above, the present invention adopts the following technical scheme:
A kind of small routine automated testing method, includes the following steps:
S1, mobile phone interface is rested on to wechat small routine interface;
S2, mobile phone engine scan UNIX Domain Socket, obtain the port with the process communication of wechat small routine, obtain
To multiple port numbers of wechat small routine;
S3, mobile phone engine request the port numbers of all wechat small routines by LocalSocket striding course, obtain each port
Number corresponding page details, including page status;
S4, all DOM contents for obtaining the page: the address websocket inside mobile phone engine requests page details, request
The address websocket obtains all elements of current page;
S5, mobile phone engine filter out hiding, content sky page elements, the non-focusing state of interface DOM and non-work as
The interface of preceding wechat small routine, obtains all elements of current interface;
S6, the key element for recording current interface required for recording when writing test logic, are carrying out automatic test
When, the look-up command of key element is sent to mobile phone engine by the end PC, mobile phone engine obtains current in step s 5
The key element is searched in all elements at interface, current interface is desired as a result, otherwise directly report if finding
Mistake.
Further, in step S3, the page status includes the width of the page, height, display, position, websocket
Location, description.
Further, step S4 is executed especially by js.
The beneficial technical effect of the present invention lies in:
The method of the present invention passes through engine and small routine communication inside mobile phone, obtains small routine current page element, finally
Parsing and filtering non-present page elements, that is, obtain the effective element of current interface.An instruction is sent to mobile phone by the end PC
The engine of the inside, for example want to look up some elements A on mobile phone interface, then engine inside mobile phone will automatically retrieval go out
Come whether current page includes this elements A, so as to realize the automation of small routine test.Due to that can will be wanted by PC
The element of lookup is sent to mobile phone, therefore can search any desired interface element, so as to realize the customization of test.
The present invention can simultaneously operational effect of the automatic test small routine in different mobile phone brands and mobile phone version,
Human cost and time is greatly saved, improves the efficiency of test.
Detailed description of the invention
Fig. 1 is the Method And Principle schematic diagram of the embodiment of the present invention.
Specific embodiment
Below with reference to attached drawing, the invention will be further described, it should be noted that following embodiment is with this technology
Premised on scheme, the detailed implementation method and specific operation process are given, but protection scope of the present invention is not limited to this
Embodiment.
As shown in Figure 1, a kind of small routine automated testing method, includes the following steps:
S1, mobile phone interface is rested on to wechat small routine interface;
S2, mobile phone engine scan UNIX Domain Socket, obtain the port with the process communication of wechat small routine, obtain
To multiple port numbers of wechat small routine;
S3, mobile phone engine request the port numbers of all wechat small routines by LocalSocket striding course, obtain each port
Number corresponding page details, including page status (width, height, display, position, the address websocket, description etc.).
S4, all DOM contents for obtaining the page: the address websocket inside mobile phone engine requests page details, request
The address websocket obtains all elements of current page.It is executed especially by js, the resultant content executed, including
Page all elements, such as input account text box, the input cryptogram frame, Button Login etc. of log-in interface.
S5, mobile phone engine filter out hiding, content sky page elements, the non-focusing state of interface DOM and non-work as
The interface of preceding wechat small routine, obtains all elements of current interface;
S6, the key element for recording current interface required for recording when writing test logic, are carrying out automatic test
When, the look-up command of key element is sent to mobile phone engine by the end PC, mobile phone engine obtains current in step s 5
The key element is searched in all elements at interface, current interface is desired as a result, otherwise directly report if finding
Mistake.
Embodiment 1
In the present embodiment, required automatic test logic are as follows:
1, in log-in interface-record log-in interface key element A
2, selection input account-- record input account text box element B
3, then input password-record inputs cryptogram frame Elements C
4, Button Login-record Button Login element D is clicked
5, it logs in successfully interface-record and logs in successfully interface key element E
By the method flow of Fig. 1, getting sequencing is mono- 5 element of A, B, C, D, E as automatic test
Main line process.This process is exactly to realize the main logic of automatic test.
Step during automatic test:
1, element A is first obtained by the process of Fig. 1, obtained successfully, calculated element A in the coordinate of screen, pass through Android
The operation of account is clicked to element A and inputted to uiautomator automated test frame.
2, it is identical that B, C element and step 1 are searched.
3, D is searched as step 1, only does the operation clicked when executing.
4, E is searched as step 1, is only verified when executing, and illustrates that entire automation is surveyed if there is E element
Examination process be by, also to log in be successful to explanation.If it is failure, then illustrate that there are problems for centre, can be retained with screenshot
The information of failure.
5, thus automatic test can be realized with the script file for the main logic testing process recorded.This
Sample can be recorded to avoid the manual test of the more equipment of more people, one script file of a people, so that it may realize one to more equipment
Automated execution test.
For those skilled in the art, it can be provided various corresponding according to above technical solution and design
Change and modification, and all these change and modification, should be construed as being included within the scope of protection of the claims of the present invention.
Claims (3)
1. a kind of small routine automated testing method, which comprises the steps of:
S1, mobile phone interface is rested on to wechat small routine interface;
S2, mobile phone engine scan UNIX Domain Socket, obtain the port with the process communication of wechat small routine, obtain micro-
Believe multiple port numbers of small routine;
S3, mobile phone engine request the port numbers of all wechat small routines by LocalSocket striding course, obtain each port numbers pair
The page details answered, including page status;
S4, all DOM contents for obtaining the page: the address websocket inside mobile phone engine requests page details, request should
The address websocket obtains all elements of current page;
It is micro- that S5, mobile phone engine filter out hiding, content sky page elements, the non-focusing state of interface DOM and non-present
The interface for believing small routine, obtains all elements of current interface;
S6, record write test logic when record required for current interface key element, carry out automatic test when
It waits, sends the look-up command of key element, the current interface that mobile phone engine obtains in step s 5 to mobile phone engine by the end PC
All elements in search the key element, if finding current interface be it is desired as a result, otherwise directly report mistake.
2. small routine automated testing method according to claim 1, which is characterized in that in step S3, the page shape
State includes the width, height, display, position, the address websocket, description of the page.
3. small routine automated testing method according to claim 1, which is characterized in that in step S4, step S4 is specific
It is executed by js.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811090663.1A CN109344058B (en) | 2018-09-18 | 2018-09-18 | Automatic small program testing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811090663.1A CN109344058B (en) | 2018-09-18 | 2018-09-18 | Automatic small program testing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109344058A true CN109344058A (en) | 2019-02-15 |
CN109344058B CN109344058B (en) | 2021-06-15 |
Family
ID=65306071
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811090663.1A Active CN109344058B (en) | 2018-09-18 | 2018-09-18 | Automatic small program testing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109344058B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110750463A (en) * | 2019-10-29 | 2020-02-04 | 百度在线网络技术(北京)有限公司 | Applet testing method, device, system, equipment and medium |
CN110928791A (en) * | 2019-11-27 | 2020-03-27 | 腾讯科技(深圳)有限公司 | Program testing method, program testing device, computer equipment and storage medium |
CN111881338A (en) * | 2020-08-03 | 2020-11-03 | 深圳一块互动网络技术有限公司 | Printed matter content retrieval method based on social software light application applet |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1394091A (en) * | 2001-06-22 | 2003-01-29 | 摩托罗拉公司 | Method and apparatus for transmitting data in communication system |
CN102129405A (en) * | 2010-01-13 | 2011-07-20 | 微软公司 | Cross-browser interactivity testing |
CN103927253A (en) * | 2013-01-11 | 2014-07-16 | 阿里巴巴集团控股有限公司 | Multiple browser compatibility testing method and system |
CN104881358A (en) * | 2015-05-28 | 2015-09-02 | 南京南瑞继保电气有限公司 | Program simulation testing method and system |
US20160241588A1 (en) * | 2014-03-15 | 2016-08-18 | Kenneth F. Belva | Methods for determining cross-site scripting and related vulnerabilities in applications |
US20160308921A1 (en) * | 2008-11-25 | 2016-10-20 | Polycom, Inc. | Method and system for dispatching received sessions between a pluratlity of instances of an application using the same ip port |
US20170337122A1 (en) * | 2016-05-18 | 2017-11-23 | Dynatrace Llc | Synthetic test recorder installed inline with a web portal |
CN107729230A (en) * | 2017-09-18 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of WEB automatic test devices and method of testing based under control scheme |
CN107728999A (en) * | 2017-11-14 | 2018-02-23 | 苏州奇松软件有限公司 | A kind of App, the method and system of small routine interface simulation |
-
2018
- 2018-09-18 CN CN201811090663.1A patent/CN109344058B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1394091A (en) * | 2001-06-22 | 2003-01-29 | 摩托罗拉公司 | Method and apparatus for transmitting data in communication system |
US20160308921A1 (en) * | 2008-11-25 | 2016-10-20 | Polycom, Inc. | Method and system for dispatching received sessions between a pluratlity of instances of an application using the same ip port |
CN102129405A (en) * | 2010-01-13 | 2011-07-20 | 微软公司 | Cross-browser interactivity testing |
CN103927253A (en) * | 2013-01-11 | 2014-07-16 | 阿里巴巴集团控股有限公司 | Multiple browser compatibility testing method and system |
US20160241588A1 (en) * | 2014-03-15 | 2016-08-18 | Kenneth F. Belva | Methods for determining cross-site scripting and related vulnerabilities in applications |
CN104881358A (en) * | 2015-05-28 | 2015-09-02 | 南京南瑞继保电气有限公司 | Program simulation testing method and system |
US20170337122A1 (en) * | 2016-05-18 | 2017-11-23 | Dynatrace Llc | Synthetic test recorder installed inline with a web portal |
CN107729230A (en) * | 2017-09-18 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of WEB automatic test devices and method of testing based under control scheme |
CN107728999A (en) * | 2017-11-14 | 2018-02-23 | 苏州奇松软件有限公司 | A kind of App, the method and system of small routine interface simulation |
Non-Patent Citations (1)
Title |
---|
朱桂彪: ""移动端(微信等)使用 vConsole调试console"", 《HTTPS://BLOG.CSDN.NET/M0_37036014/ARTICLE/DETAILS/80113635》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110750463A (en) * | 2019-10-29 | 2020-02-04 | 百度在线网络技术(北京)有限公司 | Applet testing method, device, system, equipment and medium |
CN110928791A (en) * | 2019-11-27 | 2020-03-27 | 腾讯科技(深圳)有限公司 | Program testing method, program testing device, computer equipment and storage medium |
CN110928791B (en) * | 2019-11-27 | 2022-03-01 | 腾讯科技(深圳)有限公司 | Program testing method, program testing device, computer equipment and storage medium |
CN111881338A (en) * | 2020-08-03 | 2020-11-03 | 深圳一块互动网络技术有限公司 | Printed matter content retrieval method based on social software light application applet |
Also Published As
Publication number | Publication date |
---|---|
CN109344058B (en) | 2021-06-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9152521B2 (en) | Systems and methods for testing content of mobile communication devices | |
CN104598380A (en) | Method and system for automatic testing based on control | |
US9161238B2 (en) | Mobile device monitoring and testing | |
CN105354143A (en) | Test method and device for application programs | |
CN109344058A (en) | A kind of small routine automated testing method | |
CN104679658A (en) | Test method and test system for WEB pages | |
CN103744787A (en) | Cellphone automated testing method | |
CN107480036A (en) | Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions | |
CN104902547A (en) | WiFi (wireless fidelity) network connection method and WiFi network connection device | |
CN110716853A (en) | Test script recording method, application program testing method and related device | |
US9798650B1 (en) | Application testing system and method | |
CN105740144A (en) | Automated testing method and system for Android mobile Terminal | |
CN109783343A (en) | Components testing method, apparatus, client device and computer readable storage medium | |
CN105809163A (en) | Method and device for connecting to WIFI | |
CN105579976A (en) | Webpage automatic test method and apparatus | |
TW202121206A (en) | Method and system for automatically identifying valid data acquisition module | |
CN105515909A (en) | Data collection test method and device | |
CN104991857B (en) | Trace debug method and device | |
CN111444109B (en) | Mobile terminal UI automatic test method and system | |
US20170277710A1 (en) | Data comparison | |
CN104063306A (en) | Automatic login method, device and system in intelligent terminal software testing | |
US10360139B2 (en) | Identifying transport-level encoded payloads | |
CN113590564B (en) | Data storage method, device, electronic equipment and storage medium | |
CN113206849B (en) | Vulnerability scanning method and device based on ghidra and related equipment | |
CN113849415A (en) | Control testing method and device, storage medium and electronic equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |