CN109144850B - Method and system for testing interactive communication of mobile terminal - Google Patents
Method and system for testing interactive communication of mobile terminal Download PDFInfo
- Publication number
- CN109144850B CN109144850B CN201810812452.8A CN201810812452A CN109144850B CN 109144850 B CN109144850 B CN 109144850B CN 201810812452 A CN201810812452 A CN 201810812452A CN 109144850 B CN109144850 B CN 109144850B
- Authority
- CN
- China
- Prior art keywords
- mobile terminal
- test
- interactive
- information
- port
- 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.)
- Active
Links
Images
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/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention discloses a method and a system for testing interactive communication of a mobile terminal. The test method comprises the following steps: the method comprises the steps that an Apium server sends an interactive test instruction to a first mobile terminal and a second mobile terminal; the method comprises the steps that a first mobile terminal calls Pipe when receiving an interactive test instruction so that the first mobile terminal is in an information sending state, and a second mobile terminal calls Pipe when receiving the interactive test instruction so that the second mobile terminal is in an information receiving state; the first mobile terminal executes the first test script to send test information to the second mobile terminal through the server; the first mobile terminal calls the Pipe to enable the first mobile terminal to be in an information receiving state; after the second mobile terminal receives the test information, calling Pipe to enable the second mobile terminal to be in an information sending state; the second mobile terminal executes the second test script to feed back the test information to the first mobile terminal. The invention ensures that each test is effective and improves the test efficiency.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and a system for testing interactive communications of a communication APP (computer application program) of a mobile terminal.
Background
Currently, communication products, such as Xcall (automatic contact call software), usually require two devices to perform interactive communication simultaneously to implement a test case. For example, operation is performed on one handset and authentication is performed on another handset. However, in the process of actually executing the case (test case), it may occur that the application of one mobile phone is not started yet, and another mobile phone has already started to make a call. The test method in the prior art often fails due to the fact that the consistency of cases executed on the two mobile phones cannot be realized, and efficiency is low.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and a system for testing interactive communication of a mobile terminal, in order to overcome the defects that the testing method in the prior art often fails to implement the consistency of cases executed on two mobile phones, and the efficiency is low.
The invention solves the technical problems through the following technical scheme:
a test system for interactive communication of a mobile terminal, the test system comprising: an Apium (automated testing open source tool) server, a first mobile terminal and a second mobile terminal;
the Apium server is used for sending an interactive test instruction to the first mobile terminal and the second mobile terminal;
the first mobile terminal is used for calling Pipe (Pipe) when receiving the interactive test instruction so as to enable the first mobile terminal to be in an information sending state;
the second mobile terminal is used for calling the Pipe when the interactive test instruction is received so as to enable the second mobile terminal to be in an information receiving state;
the first mobile terminal is further used for executing a first test script so as to send test information to the second mobile terminal through the Apium server and calling Pipe so that the first mobile terminal is in an information receiving state;
the second mobile terminal is further used for calling the Pipe after receiving the test information so that the second mobile terminal is in an information sending state, and executing a second test script so as to feed back the test information to the first mobile terminal.
Preferably, the first test script and the second test script comprise test cases;
the test case comprises: page test and call test.
Preferably, the appum server includes a first port and a second port;
and the Apium server sends an interactive test instruction to the first mobile terminal through the first port when receiving the test instruction, and sends the interactive test instruction to the second mobile terminal through the second port.
Preferably, the appum server is further configured to set the port numbers of the first port and the second port to be different from each other.
Preferably, the interaction test instruction includes a UDID (device identification code) of the first mobile terminal and a UDID of the second mobile terminal.
A testing method for interactive communication of a mobile terminal, the testing method comprising the steps of:
the method comprises the steps that an Apium server sends an interactive test instruction to a first mobile terminal and a second mobile terminal;
the first mobile terminal calls Pipe when receiving the interactive test instruction so that the first mobile terminal is in an information sending state, and the second mobile terminal calls the Pipe when receiving the interactive test instruction so that the second mobile terminal is in an information receiving state;
the first mobile terminal executes a first test script to send test information to the second mobile terminal through the Apdium server;
the first mobile terminal calls Pipe to enable the first mobile terminal to be in an information receiving state;
after receiving the test information, the second mobile terminal calls the Pipe to enable the second mobile terminal to be in an information sending state;
and the second mobile terminal executes a second test script to feed back test information to the first mobile terminal.
Preferably, the first test script and the second test script comprise test cases;
the test case comprises: page test and call test.
Preferably, the appum server includes a first port and a second port;
the method for sending the interactive test instruction to the first mobile terminal and the second mobile terminal by the Apium server specifically comprises the following steps:
and the Apium server sends an interactive test instruction to the first mobile terminal through the first port when receiving the test instruction, and sends the interactive test instruction to the second mobile terminal through the second port.
Preferably, the test method further comprises:
the Apdium server sets the port numbers of the first port and the second port to be different from each other.
Preferably, the interaction test instruction comprises the UDID of the first mobile terminal and the UDID of the second mobile terminal.
The positive progress effects of the invention are as follows: the invention adopts multi-process communication to control a plurality of mobile terminals to simultaneously carry out interactive communication test, and the sub-processes are synchronized by using Pipe to ensure that the test programs of the mobile terminals are in one-to-one correspondence in sequence, thereby effectively avoiding the situation that the application of one mobile terminal is not started and the other machine starts to run, and improving the test efficiency.
Drawings
Fig. 1 is a schematic block diagram of a test system for interactive communication of a mobile terminal according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of a method for testing interactive communication of a mobile terminal according to embodiment 2 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
The test system of the embodiment can test a plurality of mobile terminals at the same time, for example, parallel test of Android (an operating system) and iOS (an operating system) real machines is realized, and since a plurality of mobile terminals perform interactive communication test at the same time, a large amount of repeated labor is completed, so that the labor cost is saved, and the test efficiency is improved.
As shown in fig. 1, taking testing two mobile terminals as an example, the testing system of the embodiment includes: an Appium server 1, a first mobile terminal 2 and a second mobile terminal 3. The appum server includes a first port and a second port.
Before testing, the Apium server sets the port numbers of the first port and the second port to be different from each other. And modifying the UDID in the interactive test instruction into the UDIDs of two target mobile terminals needing interactive communication test, such as the UDID of the first mobile terminal and the UDID of the second mobile terminal.
When testing, the Appium server 1 starts two sub-processes, and respectively sends interactive test instructions to the first mobile terminal and the second mobile terminal. Specifically, when the Appium server receives the test instruction, one sub-process sends the interactive test instruction to the first mobile terminal through the first port, and the other sub-process sends the interactive test instruction to the second mobile terminal through the second port.
The first mobile terminal 2 calls Pipe when receiving the interactive test instruction so that the first mobile terminal is in an information sending state.
The second mobile terminal 3 calls Pipe when receiving the interactive test instruction so as to enable the second mobile terminal to be in an information receiving state, and at the moment, the second mobile terminal blocks to wait for the first mobile terminal to send the test information.
The first mobile terminal 2 executes the first test script to send the test information to the second mobile terminal through the app server, and calls the Pipe to make the first mobile terminal in the information receiving state, and at this time, the first mobile terminal blocks to wait for the second mobile terminal to feed back the test information.
After receiving the test information, the second mobile terminal 3 calls Pipe to enable the second mobile terminal to be in an information sending state, and executes a second test script to feed back the test information to the first mobile terminal.
In this embodiment, the first test script and the second test script include test cases. Test cases such as page test and talk test.
Taking the conversation test of the Xcall as an example, when two mobile terminals receive the interactive test instruction, the Xcall is started at the same time, and the Xcall of the first mobile terminal is in the information sending state, and the Xcall of the second mobile terminal is in the information receiving state, and at this time, the first mobile terminal can dial the phone of the second mobile terminal according to the test script. When the Xcall of the second mobile terminal is in the information sending state and the Xcall of the first mobile terminal is in the information receiving state, the second mobile terminal may execute a hang-up action according to the test script and feed back a result (test information) to the first mobile terminal.
When a page test is carried out, in order to solve the parameter transmission problem of a pytest (a test framework) class: the unittest (a test framework) class cannot accept parameters. Some modifications were made to unittest. First write a class inherit unittest class to accept the parameters, and then let the class to be tested inherit it. In addition, a PageObject design mode commonly used by a web (global wide area network) end test is combined with an appium server, and codes are split and layered by taking each page to be tested as a basic unit, wherein the pages to be tested comprise elements (keys, input boxes, titles and the like) required to be tested, so that the page elements can be obtained by calling page classes in the test pages, and the situation that the codes of the test pages need to be changed when the IDs or positions of the page elements are changed is avoided. All information and corresponding operations on the same page are put into one class, so that a specific test case is changed into simple calling and verifying operations.
In this embodiment, the two sub-processes respectively correspond to two different Appium services, and the Pipe is used for synchronization between the sub-processes, so as to ensure that the test programs of the two sub-processes are in one-to-one correspondence in sequence, thereby effectively avoiding the situation that the application of one mobile terminal is not started and the other mobile terminal starts to run, ensuring that each test is effective, and improving the test efficiency.
By writing the script, the embodiment can repeatedly perform the communication interaction test for many times to find many crash and bug which are difficult to operate manually, so that the test accuracy is improved. In this embodiment, the Appium server may also generate a test report, count the crash (process interruption) rate, and so on.
Example 2
As shown in fig. 2, the method for testing interactive communication of a mobile terminal in this embodiment includes the following steps:
Specifically, step 101 includes:
when receiving the test instruction, the Appium server sends an interactive test instruction to the first mobile terminal through the first port of the Appium server, and sends the interactive test instruction to the second mobile terminal through the second port.
Wherein the interaction test instruction UDID. Before testing, the UDID in the interactive test instruction needs to be modified into the UDIDs of the two target mobile terminals which need to be subjected to the interactive communication test.
And 102, the first mobile terminal calls Pipe when receiving the interactive test instruction so as to enable the first mobile terminal to be in an information sending state.
And 102', the second mobile terminal calls Pipe when receiving the interactive test instruction so as to enable the second mobile terminal to be in an information receiving state.
Step 103, the first mobile terminal executes the first test script and sends test information to the second mobile terminal through the Appium server.
And 104, the first mobile terminal calls Pipe to enable the first mobile terminal to be in an information receiving state.
And step 104', the second mobile terminal calls Pipe to enable the second mobile terminal to be in an information sending state after receiving the test information.
And 105, the second mobile terminal executes the second test script and feeds back test information to the first mobile terminal.
The first test script and the second test script comprise a plurality of test cases; the test case comprises: page test and call test.
In this embodiment, before step 101, the testing method further includes:
the appum server sets the port numbers of the first port and the second port to be different from each other.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.
Claims (10)
1. A test system for interactive communication of a mobile terminal, the test system comprising: the system comprises an Apium server, a first mobile terminal and a second mobile terminal;
the Apium server is used for starting two subprocesses and respectively sending an interactive test instruction to the first mobile terminal and the second mobile terminal;
the first mobile terminal is used for calling Pipe when the interactive test instruction is received so as to enable the first mobile terminal to be in an information sending state;
the second mobile terminal is used for calling the Pipe when the interactive test instruction is received so as to enable the second mobile terminal to be in an information receiving state;
the first mobile terminal is further used for executing a first test script so as to send test information to the second mobile terminal through the Apium server and calling Pipe so that the first mobile terminal is in an information receiving state;
the second mobile terminal is further used for calling the Pipe after receiving the test information so that the second mobile terminal is in an information sending state, and executing a second test script so as to feed back the test information to the first mobile terminal.
2. The interactive-communication test system of claim 1, wherein the first test script and the second test script comprise test cases;
the test case comprises: page test and call test.
3. The system for testing interactive communication of a mobile terminal according to claim 1, wherein said appum server comprises a first port and a second port;
and the Apium server sends an interactive test instruction to the first mobile terminal through the first port when receiving the test instruction, and sends the interactive test instruction to the second mobile terminal through the second port.
4. The system for testing interactive communication of a mobile terminal according to claim 3, wherein said Appium server is further configured to set port numbers of said first port and said second port to be different from each other.
5. The system for testing interactive communications of mobile terminals of claim 1, wherein the interactive test instructions include the UDID of the first mobile terminal and the UDID of the second mobile terminal.
6. A testing method for interactive communication of a mobile terminal is characterized by comprising the following steps:
the method comprises the following steps that an Apium server starts two subprocesses and respectively sends interactive test instructions to a first mobile terminal and a second mobile terminal;
the first mobile terminal calls Pipe when receiving the interactive test instruction so that the first mobile terminal is in an information sending state, and the second mobile terminal calls the Pipe when receiving the interactive test instruction so that the second mobile terminal is in an information receiving state;
the first mobile terminal executes a first test script to send test information to the second mobile terminal through the Apdium server;
the first mobile terminal calls Pipe to enable the first mobile terminal to be in an information receiving state;
after receiving the test information, the second mobile terminal calls the Pipe to enable the second mobile terminal to be in an information sending state;
and the second mobile terminal executes a second test script to feed back test information to the first mobile terminal.
7. The method for testing interactive communication of a mobile terminal according to claim 6, wherein said first test script and said second test script comprise test cases;
the test case comprises: page test and call test.
8. The method for testing interactive communication of a mobile terminal according to claim 6, wherein the appum server comprises a first port and a second port;
the method for sending the interactive test instruction to the first mobile terminal and the second mobile terminal by the Apium server specifically comprises the following steps:
and the Apium server sends an interactive test instruction to the first mobile terminal through the first port when receiving the test instruction, and sends the interactive test instruction to the second mobile terminal through the second port.
9. The method for testing interactive communication of a mobile terminal according to claim 8, wherein said method for testing further comprises:
the Apdium server sets the port numbers of the first port and the second port to be different from each other.
10. The method for testing interactive communication of a mobile terminal of claim 6, wherein said interactive test instruction comprises the UDID of the first mobile terminal and the UDID of the second mobile terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810812452.8A CN109144850B (en) | 2018-07-23 | 2018-07-23 | Method and system for testing interactive communication of mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810812452.8A CN109144850B (en) | 2018-07-23 | 2018-07-23 | Method and system for testing interactive communication of mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109144850A CN109144850A (en) | 2019-01-04 |
CN109144850B true CN109144850B (en) | 2022-02-11 |
Family
ID=64801440
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810812452.8A Active CN109144850B (en) | 2018-07-23 | 2018-07-23 | Method and system for testing interactive communication of mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109144850B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111026667B (en) * | 2019-12-09 | 2023-05-05 | 北京乐学帮网络技术有限公司 | Script execution method and device and electronic equipment |
CN112306884B (en) * | 2020-11-10 | 2024-07-05 | 广州华多网络科技有限公司 | Program test control, execution method and corresponding device, equipment and medium thereof |
CN115276844B (en) * | 2022-08-02 | 2023-06-13 | 上海移柯通信技术股份有限公司 | Communication module testing method and device, storage medium and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105243015A (en) * | 2015-09-25 | 2016-01-13 | 惠州Tcl移动通信有限公司 | Automated software test method and system |
CN106412192A (en) * | 2016-08-31 | 2017-02-15 | 深圳天珑无线科技有限公司 | Mobile terminal testing method and system |
CN106959921A (en) * | 2017-02-20 | 2017-07-18 | 百度在线网络技术(北京)有限公司 | Automatic test approach, terminal, platform and system |
CN106997291A (en) * | 2016-01-26 | 2017-08-01 | 中移(杭州)信息技术有限公司 | A kind of control method and master node, slave node |
CN107092555A (en) * | 2016-08-05 | 2017-08-25 | 北京小度信息科技有限公司 | A kind of method and system of test application program |
CN107231272A (en) * | 2017-05-26 | 2017-10-03 | 上海斐讯数据通信技术有限公司 | Automatic test device and method that a kind of wireless messages are obtained |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9203788B2 (en) * | 2004-11-18 | 2015-12-01 | Adobe Systems Incorporated | System and method for communicating instant message information between an instant messaging node and one or more programs |
US20150074684A1 (en) * | 2013-09-11 | 2015-03-12 | Cellrox, Ltd. | Techniques for enabling inter-process communication (ipc) among multiple personas in a mobile technology platform |
US9710368B1 (en) * | 2014-05-02 | 2017-07-18 | Amazon Technologies, Inc. | Inter-process communication automated testing framework |
CN107122293A (en) * | 2016-12-05 | 2017-09-01 | 北京小度信息科技有限公司 | software performance testing method, device, server and system |
CN107368411A (en) * | 2017-06-30 | 2017-11-21 | 北京小米移动软件有限公司 | Method of testing, apparatus and system |
CN107465572A (en) * | 2017-08-02 | 2017-12-12 | 华数传媒网络有限公司 | Intelligent terminal method of testing, apparatus and system |
-
2018
- 2018-07-23 CN CN201810812452.8A patent/CN109144850B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105243015A (en) * | 2015-09-25 | 2016-01-13 | 惠州Tcl移动通信有限公司 | Automated software test method and system |
CN106997291A (en) * | 2016-01-26 | 2017-08-01 | 中移(杭州)信息技术有限公司 | A kind of control method and master node, slave node |
CN107092555A (en) * | 2016-08-05 | 2017-08-25 | 北京小度信息科技有限公司 | A kind of method and system of test application program |
CN106412192A (en) * | 2016-08-31 | 2017-02-15 | 深圳天珑无线科技有限公司 | Mobile terminal testing method and system |
CN106959921A (en) * | 2017-02-20 | 2017-07-18 | 百度在线网络技术(北京)有限公司 | Automatic test approach, terminal, platform and system |
CN107231272A (en) * | 2017-05-26 | 2017-10-03 | 上海斐讯数据通信技术有限公司 | Automatic test device and method that a kind of wireless messages are obtained |
Non-Patent Citations (5)
Title |
---|
"Android平台电信业务的可视电话开发技术研究";刘浩;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130515(第05期);I136-390 * |
"appium多机并行测试";每天1990;《https://www.cnblogs.com/meitian/p/7590305.html》;20170925;第1页 * |
"OSA/Parlay-based middleware architecture and performance analysis for homogeneous service provision in Next Generation Networks";Nikolaos Tselikas等;《Computer Communications》;20070202;第30卷(第3期);第564-576页 * |
"Research on automated testing framework for multi-platform mobile applications";Da Zun等;《2016 4th International Conference on Cloud Computing and Intelligence Systems (CCIS)》;20160819;第82-87页 * |
"基于云的Android应用自动化测试框架研究";陈学亮 等;《电信技术》;20170625(第06期);第29-31+35页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109144850A (en) | 2019-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109144850B (en) | Method and system for testing interactive communication of mobile terminal | |
CN104281518B (en) | Terminal applies test method, device, system, platform and mobile terminal | |
CN108874677B (en) | Android terminal and test method and system thereof | |
CN104853020A (en) | Interaction test method and terminal thereof | |
CN102541700A (en) | Terminal test method, test device and terminal agency | |
CN105302722B (en) | CTS automatic testing method and device | |
CN105354118B (en) | Automatic test approach, the apparatus and system of intelligent terminal | |
CN104778121A (en) | Game program test method, device and system | |
CN107135124B (en) | Method and system for multi-Bluetooth communication parallel test | |
CN110941563A (en) | Automatic script testing method and device | |
CN105022687A (en) | Implementation method and device of sliding operation in automated testing scheme | |
CN104199780A (en) | Method and system testing POS application program | |
JP4440185B2 (en) | Scenario editing apparatus, pseudo base station test system, pseudo terminal test system, scenario editing method and test processing method, and storage medium storing computer-readable program and program | |
CN109729346B (en) | Remote debugging method and system for television, debugging terminal and television terminal | |
CN111050333A (en) | Base station automatic test method and system | |
CN114301506A (en) | Method and device for simulating NFC function, NFC terminal and storage medium | |
KR20050034661A (en) | Automatic testing system for mobile software and service | |
CN113452556A (en) | Product skill configuration method and device, storage medium and electronic device | |
CN108009084B (en) | Testing method, device and system for hybrid mobile application | |
CN108647149B (en) | Method, device and system for testing electronic equipment and storage medium | |
US11474934B1 (en) | Software development systems for creation and testing of voice and messaging applications and related methods and computers | |
CN113934552A (en) | Method and device for determining function code, storage medium and electronic device | |
CN109871288A (en) | Execute method, apparatus, equipment and the medium of android system order | |
CN110971696B (en) | System and method for realizing virtual electronic card communication | |
CN114328257A (en) | Automatic test case execution method and system 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 |