CN114006847B - Automatic test method for private network terminal - Google Patents

Automatic test method for private network terminal Download PDF

Info

Publication number
CN114006847B
CN114006847B CN202010674209.1A CN202010674209A CN114006847B CN 114006847 B CN114006847 B CN 114006847B CN 202010674209 A CN202010674209 A CN 202010674209A CN 114006847 B CN114006847 B CN 114006847B
Authority
CN
China
Prior art keywords
private network
network terminal
service
interface
test
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
Application number
CN202010674209.1A
Other languages
Chinese (zh)
Other versions
CN114006847A (en
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.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech 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 Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN202010674209.1A priority Critical patent/CN114006847B/en
Publication of CN114006847A publication Critical patent/CN114006847A/en
Application granted granted Critical
Publication of CN114006847B publication Critical patent/CN114006847B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The application discloses an automatic test method of a private network terminal, which comprises the following steps: the method comprises the steps that a tested private network terminal is connected with a service computer, a first test program is installed and started for the private network terminal by the service computer, the service computer is used for acquiring network information of the private network terminal, creating an http service, starting a port and monitoring a POST service on the private network terminal, the network information comprises an IMSI (international mobile subscriber identity) and an IP (Internet protocol) address and port number of the private network terminal, and a sessionId of the http service is set as the IMSI of the private network terminal; each service related in the cluster service is started by the service computer, and the IP address and the port number of each service and the network information of the private network terminal are reported to a cloud server; the test computer acquires the IP address and port number of the tested application and the network information of the private network terminal from the cloud server, and acquires the IP address and port number of the service required by testing the tested application; and controlling the private network terminal and the corresponding service by using the acquired IP address, port number and network information to complete the test task of the tested application. By applying the method and the device, the test requirement of the private network terminal can be met.

Description

Automatic test method for private network terminal
Technical Field
The application relates to a clustering technology, in particular to an automatic testing method for private network terminals.
Background
Private network communication refers to services such as emergency communication, command scheduling, daily work communication and the like provided for government and public security, public utilities, industry and commerce and the like, and refers to a communication network built for meeting the requirements of organization management, safe production, scheduling command and the like in some industries, departments or units, wherein the basic network is generally independent from a public cellular mobile communication network.
With the rapid development of the domestic telecommunication industry in recent years, the network scale of private network communication is rapidly increased, and the technical level and public network basically keep synchronous development. Terminals used in private network communication are called private network terminals.
At present, no automatic test method and system for private network terminals exist in a private network system. The automatic test method for the public network terminal cannot be directly applied to the private network terminal, and the automatic test requirement of the private network terminal cannot be met.
Specifically, in the existing public network terminal, an automation test framework of the public network terminal in different modes provided by an Android system is shown in fig. 1. The main test frames are as follows:
1) The UIIAUTomator, the version V1 supports the version below Android4.3, the version V2 supports the terminal with the version above Android4.4, the UIAutomation framework, google provides a new UIAutomation automation testing framework when Android4.3 is released, and the framework simulates interaction between a user and a terminal interface by using Accessibility APIs: such as get window interface controls and inject events. The UiAutomator tool injects KeyEvent through InputManager, windowManager as before 4.3, and Accessibility APIs used by the new framework UiAutomation after 4.3. Under the automatic test framework, the terminal is connected with a computer through a USB wire, and the computer runs a test script to test specific applications in the terminal. The remote control of the UE is not supported in this test mode, nor is the terminal controlled over IP.
2) In the test mode, the test script and the target app run in the same process, and can only independently test a single terminal, and cannot support interaction among different terminals; the tested application and the test script test-apk are required to have the same signature, and meanwhile, the operation of a remote control terminal and a cross-application is not supported.
When the automatic test is performed on the public network terminal, the automatic test is often performed on some applications on the terminal. And typically do not involve interworking between different applications or interaction between different terminals. The private network terminal product belongs to a deep customized product, the service is complex and has numerous service interactions, all the loaded services are closely related to UDC, MDC, DC, OTA, a plurality of applications on the private network terminal are required to cooperate with each other for a plurality of private network terminals, and meanwhile, a plurality of private network terminals are also required to perform coordinated tests, and an Android (terminal UE), a Web (MDC, UDC), a Gui (OTA, DC) and the like are required to be operated for an automatic test of the private network terminal, so that a single automatic test system adopted by a public network terminal cannot meet the automatic test requirement of the private network terminal.
In addition, some test frameworks (such as Robotium) of the public network terminal require that the tested application aut.apk and the test script test.apk signature must be consistent, but the signature consistency of the tested application and the test script cannot be realized in the field of the private network terminal due to the encryption mechanism of the private network terminal.
From the foregoing, it can be seen that the foregoing method and system for automatically testing a public network terminal cannot meet the test requirement of a private network terminal.
Disclosure of Invention
The application provides an automatic test method and system for private network terminals, which can meet the test requirements of the private network terminals.
In order to achieve the above purpose, the present application adopts the following technical scheme:
an automated testing method for private network terminals, comprising:
the method comprises the steps that a tested private network terminal is connected with a service computer, a first test program is installed and started for the private network terminal by the service computer, the service computer is used for acquiring network information of the private network terminal, creating an http service, starting a port and monitoring a POST service on the private network terminal, the network information comprises an IMSI (international mobile subscriber identity) and an IP (Internet protocol) address and port number of the private network terminal, and a sessionId of the http service is set as the IMSI of the private network terminal;
each service related in the cluster service is started by the service computer, and the IP address and the port number of each service and the network information of the private network terminal are reported to a cloud server;
the test computer acquires the IP address and port number of the tested application and the network information of the private network terminal from the cloud server, and acquires the IP address and port number of the service required by testing the tested application; and controlling the private network terminal and the corresponding service by using the acquired IP address, port number and network information to complete the test task of the tested application.
Preferably, in the http service, various control interfaces of the private network terminal are provided.
Preferably, the control interface includes: an interface for acquiring a service state, an interface for acquiring a current session id of a private network terminal, an interface for acquiring a current PLMN of the private network terminal, an interface for creating a session=imsi of the private network terminal, an interface for intercepting a screen, an interface for acquiring a short number of the private network terminal, an interface for acquiring a user name of the private network terminal, an interface for acquiring group information of the private network terminal, an interface for press key code, an interface for longpress key code, an interface for touch down, an interface for touch up, and/or an interface for touch move.
Preferably, the services related to the cluster service include: private network terminal services, web services, GUI services, and/or TMSS services.
As can be seen from the above technical solution, in the present application, after a tested private network terminal is connected to a service computer, a first test program is installed and started to obtain network information of the private network terminal, where the network information includes an IMSI of the private network terminal; the service computer creates an http service and sets the sessionId of the service as the IMSI of the private network terminal; the service computer starts all the services related in the cluster service, and reports the IP addresses and port numbers of all the services and the network information of the private network terminal to the cloud server; the test computer acquires the IP address and port number of the tested application and the network information of the private network terminal from the cloud server, and acquires the IP address and port number of the service required by the tested application; and controlling the private network terminal and the corresponding service by using the acquired IP address, port number and network information to complete the test task of the tested application. Through the mode, the test computer can acquire the IP addresses and ports of the service and test terminals, so that various service and test terminals are called and controlled, the test task is completed, and the test requirement of the private network terminal is met.
Drawings
Fig. 1 is a schematic diagram of an Android terminal automation test framework;
FIG. 2 is a schematic flow chart of the automated testing method in the present application;
FIG. 3 is a schematic diagram of an automated test method performed in an automated test system of the present application;
FIG. 4 is a functional schematic of a first test procedure;
FIG. 5 is a schematic diagram of a collaboration test between multiple devices.
Detailed Description
In order to make the objects, technical means and advantages of the present application more apparent, the present application is further described in detail below with reference to the accompanying drawings.
The application provides an automatic test system of private network terminal, which can meet the automatic demand of the private network terminal and comprises mutual cooperation of a plurality of terminals, mutual cooperation of a plurality of services, remote control of the terminals and the services and the like.
The automated test system in the present application includes a private network terminal for testing, a computer for running various services related to a cluster service (hereinafter referred to as a service computer), a computer for running a test script, performing a test operation (hereinafter referred to as a test computer), and a cloud server.
Fig. 2 is a schematic flow chart of a method for performing an automated test in the automated test system of the present application, and fig. 3 is a schematic diagram of a method for performing an automated test in the automated test system. As shown in fig. 2 and 3, the method includes:
in step 201, the tested private network terminal is connected with a service computer.
The private network terminal may be connected to the service computer (i.e., the server in fig. 3) through a USB cable.
Step 202, the service computer installs and starts a first test program for the private network terminal.
After the private network terminal is connected to the service computer, the service computer installs a first test program (hereinafter referred to as trunk. Apk) on the private network terminal, and the private network terminal starts the first test program.
The functions of the first test program include: network information of the private network terminal is acquired, an http service is created on the private network terminal, a port is started and a POST service is monitored, as shown in fig. 4. Here, the service computer needs to start a port, and the terminal also needs to start a port in the background, and the specific port can be 6280 port; in the monitoring POST service, the target address of the POST request is a private network terminal.
The network information of the private network terminal at least includes an IP address, a port number, and an IMSI of the private network terminal, and in addition, the network information may further include a working frequency band, PLMN, group information, and the like of the private network terminal. Because the private network terminal is a customized terminal, the acquisition of the IP address and port number of the terminal can be realized. In addition, the first test program also provides various interface APIs for other devices to control the private network terminal, such as shown in table 1.
API-GET Description of the invention
/api/status Acquiring service status
/api/session/sessionId Acquiring current sessionID of private network terminal
/api/session/plmn Acquiring current PLMN of private network terminal
/api/session/create Creating private network terminal sessionid=imsi
/api/session/SsessionId/imsi/capture Intercepting screen
/api/session/SsessionId/number Acquiring private network terminal short number
/api/session/SsessionId/name Acquiring private network terminal user name
/api/session/SsessionId/group Acquiring private network terminal group information
/api/session/SsessionId/cluster Acquiring private network terminal group information
/api/session/:sessionId/device/press_keycode PressKeyCode
/api/session/:sessionId/device/long_press_keycode LongPressKeyCode
/api/session/:sessionId/touch/down TouchDown
/api/session/:sessionId/touch/up TouchUp
/api/session/:sessionId/touch/move TouchMove
TABLE 1
When the http service is created on the private network terminal, setting the sessionId of the http service as the IMSI of the private network terminal. Thus, other private network terminals, service computers and test computers participating in the test can conveniently find out and test the private network terminals. The http service can be created based on WebDriver, and a W3C design mode can be adopted. Various interface APIs provided by the first test program to control the private network terminal may be provided in the http service.
In step 203, the service computer starts up the services related to the cluster service.
The method for starting the cluster service and related services on the computer providing the cluster service specifically comprises the following steps: private network terminal services, web services, guil services, and/or Tmss services. Specifically, when the application under test (SUT) belongs to a Web page, a Web service is required; when the SUT belongs to the GUI system, a GUI service is required. The http service created in the first test procedure started in step 202 includes the private network terminal service started in this step and the Web service on the service computer.
In addition, the steps 201 and 202 are performed sequentially, and the two sets of processing 201+202 and 203 may be performed in different orders. For example, 201+202 and 203 may be performed synchronously, step 203 may be performed first, and then step 201+202 may be performed, or step 201+202 may be performed first, and then step 203 may be performed.
And 204, the service computer reports the IP address and port number of each service started in the step 203 and the network information of the private network terminal acquired in the step 202 to the cloud server.
In order to realize remote control of each service and the private network terminal, the IP address and port number of each service and the network information of the private network terminal are reported to a cloud server (i.e. a database server in fig. 3). Thus, the corresponding service can be remotely controlled by using the IP address and the port number of the service; the private network terminal can be remotely controlled by utilizing the network information of the private network terminal.
In step 205, the test computer obtains the IP address and port number of the application to be tested and the network information of the private network terminal from the cloud server, and obtains the IP address and port number of the service required by the application to be tested.
The computer (i.e. Test Case in fig. 3) running the Test script is used for completing the Test task, and because the Test task needs to control some services related to the application under Test, the private network terminal and the cluster service, the Test computer needs to obtain the control right of the private network terminal and the corresponding service of the application under Test, so as to control the private network terminal and the corresponding service to complete the Test task.
Specifically, after the test computer loads the test script, test resources are requested to the cloud server, namely, the IP addresses, port numbers and network information of related services, private network terminals and tested applications are obtained. And after receiving the resource measurement request, the cloud server sends corresponding information to the test computer.
And 206, controlling the private network terminal and the corresponding service by the test computer by using the acquired IP address, port number and network information, and completing the test task of the tested application.
Specifically, as described above, in step 202, various interface APIs are provided for other devices to control the private network terminal according to the first test program, where the test computer uses these interface APIs to control the private network terminal, obtain corresponding information, and cooperate with other private network terminals and services to complete the test task.
Thus, the flow of the automatic test method in the application is ended.
In the automatic test system and the automatic test method, because the IP addresses and the ports of the private network terminals and the services can be acquired, the private network terminals and the services can be controlled remotely, so that the test requirements of the private network terminals, such as cross-service, cross-application collaboration, participation of a plurality of private network terminals and the like, are met. Meanwhile, due to the implementation of remote control, in the test process, the service computers and the test computers can be mutually independent, the number of the service computers can be multiple, and the number of the test computers can also be multiple, so that the cooperative test among multiple devices is realized, as shown in fig. 5.
Through the automatic test system and the automatic test method, the http service session ID=IMSI of the private network terminal, the consistency of all links can be ensured by the service based on the IMSI, the script can still be executed after the terminal is restarted, and the private network terminal user information and the group information can be synchronously searched on the private network user and the equipment control center (UDC) through the IMSI+PLMN. The upgrade task can be issued on an upgrade platform (OTA), the dispatching operation can be performed on a dispatching Desk (DC), the automatic parameterization cost of the private network terminal is reduced, and the service connection among all network elements is opened. According to the method and the device, the E2E-based private network terminal automatic test system can be rapidly deployed, automatic test is rapidly developed, test efficiency is improved, and a set of standard private network terminal automatic test system is established. The method solves the problems that the automatic test environment of the private network terminal is complex to deploy, the driving dependency is high, the realization is realized without deploying the environment, the private network terminal is visualized depending on factors, all links of the private network terminal are opened, the same network environment can share the private network test environment and the test terminal with all persons, and the material cost of the automatic test is saved.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the invention.

Claims (4)

1. An automated testing method for private network terminals is characterized by comprising the following steps:
the method comprises the steps that a tested first private network terminal is connected with a service computer, a first test program is installed and started for the first private network terminal by the service computer, network information of the first private network terminal is obtained, an http service is created on the first private network terminal, a port is started and a POST service is monitored, wherein the network information comprises an IMSI (international mobile subscriber identity) and an IP (Internet protocol) address and a port number of the first private network terminal, the sessionId of the http service is set as the IMSI of the first private network terminal, and the service computer and the test computer are used for identifying the first private network terminal;
each service related in the cluster service is started by the service computer, and the IP address and the port number of each service and the network information of the first private network terminal are reported to a cloud server;
the test computer obtains the IP address and port number of the tested application and the network information of the first private network terminal from the cloud server, and obtains the IP address and port number of the service required by testing the tested application; and controlling the first private network terminal and the corresponding service by using the acquired IP address, port number and network information to complete the test task of the tested application.
2. A method according to claim 1, characterized in that in the http service, various control interfaces of the first private network terminal are provided.
3. The method of claim 2, wherein the control interface comprises: an interface for acquiring a service state, an interface for acquiring a current session id of a private network terminal, an interface for acquiring a current PLMN of the private network terminal, an interface for creating a session=imsi of the private network terminal, an interface for intercepting a screen, an interface for acquiring a short number of the private network terminal, an interface for acquiring a user name of the private network terminal, an interface for acquiring group information of the private network terminal, an interface for press key code, an interface for longpress key code, an interface for touch down, an interface for touch up, and/or an interface for touch move.
4. The method of claim 1, wherein the services to which the cluster service relates comprise: private network terminal services, web services, GUI services, and/or TMSS services.
CN202010674209.1A 2020-07-14 2020-07-14 Automatic test method for private network terminal Active CN114006847B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010674209.1A CN114006847B (en) 2020-07-14 2020-07-14 Automatic test method for private network terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010674209.1A CN114006847B (en) 2020-07-14 2020-07-14 Automatic test method for private network terminal

Publications (2)

Publication Number Publication Date
CN114006847A CN114006847A (en) 2022-02-01
CN114006847B true CN114006847B (en) 2023-07-07

Family

ID=79920102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010674209.1A Active CN114006847B (en) 2020-07-14 2020-07-14 Automatic test method for private network terminal

Country Status (1)

Country Link
CN (1) CN114006847B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114884848B (en) * 2022-03-18 2023-08-18 潍柴动力股份有限公司 Vehicle-mounted network connection terminal, and adjustment and measurement method, adjustment and measurement device and adjustment and measurement system thereof
CN115802387B (en) * 2023-01-04 2023-05-30 阿里巴巴(中国)有限公司 Equipment management and control method, storage medium and electronic equipment
CN116668350B (en) * 2023-07-28 2023-10-03 中国电子科技集团公司第三十研究所 Communication terminal of digital private network and matched encryption component detection system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463499A (en) * 2017-08-08 2017-12-12 百度在线网络技术(北京)有限公司 The long-range connection methods of ADB, device, equipment and storage medium
CN108574604A (en) * 2017-03-07 2018-09-25 北京京东尚科信息技术有限公司 test method and device
CN110086889A (en) * 2019-05-16 2019-08-02 北京字节跳动网络技术有限公司 Terminal device adjustment method and equipment
CN110650444A (en) * 2019-09-20 2020-01-03 南京高达软件有限公司 System and method for realizing public and private combination of TD-LTE network cluster service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108574604A (en) * 2017-03-07 2018-09-25 北京京东尚科信息技术有限公司 test method and device
CN107463499A (en) * 2017-08-08 2017-12-12 百度在线网络技术(北京)有限公司 The long-range connection methods of ADB, device, equipment and storage medium
CN110086889A (en) * 2019-05-16 2019-08-02 北京字节跳动网络技术有限公司 Terminal device adjustment method and equipment
CN110650444A (en) * 2019-09-20 2020-01-03 南京高达软件有限公司 System and method for realizing public and private combination of TD-LTE network cluster service

Also Published As

Publication number Publication date
CN114006847A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
CN114006847B (en) Automatic test method for private network terminal
CN110389900B (en) Distributed database cluster testing method and device and storage medium
CN108763090B (en) Test environment deployment method, device, computer equipment and storage medium
EP2796996A1 (en) Cloud infrastructure based management system and method for performing maintenance and deployment for application system
CN110636131A (en) Internet of things testing system based on cloud technology
CN101022375B (en) Centralizing automatic testing device and method for testing radio local network
CN103973858B (en) The Auto-Test System of mobile terminal
CN110851278A (en) Distribution network automation master station mobile application service management method and system based on micro-service architecture
CN105404580B (en) Distributed pressure testing system and method
CN101847118A (en) Automatic test system
CN104270289A (en) ONU automatic testing method based on TCL script
WO2023131343A1 (en) Stress test method and system, and device and storage medium
CN110018392A (en) A kind of test macro of electrical power distribution automatization system main website
CN112019610A (en) Cloud edge coordination method and system
CN103780455A (en) TETRA digit cluster protocol test method and system based on TTCN-3
CN104967532B (en) TOC technologies operational system and application process
CN112105025B (en) eSIM-based operator network test system and method
CN106161409A (en) A kind of agent framework service system including local component and method
CN101969442B (en) Process running environment perception and migration based network analog framework implementation method
CN111768129A (en) Delivery method, device, equipment and storage medium of proprietary cloud product
CN107645727A (en) A kind of method and device of testing base station
CN107730125B (en) Laboratory management system
CN105373477B (en) Capacity testing method
CN115543793A (en) System deployment method and device of target server and operation and maintenance center station
CN113934591A (en) Data monitoring method and device, storage medium and electronic device

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