CN110569187A - Automatic testing method, device and equipment for multi-platform system application - Google Patents

Automatic testing method, device and equipment for multi-platform system application Download PDF

Info

Publication number
CN110569187A
CN110569187A CN201910748284.5A CN201910748284A CN110569187A CN 110569187 A CN110569187 A CN 110569187A CN 201910748284 A CN201910748284 A CN 201910748284A CN 110569187 A CN110569187 A CN 110569187A
Authority
CN
China
Prior art keywords
virtual application
application
platform system
automated testing
interface
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
Application number
CN201910748284.5A
Other languages
Chinese (zh)
Other versions
CN110569187B (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.)
Xiamen Yealink Network Technology Co Ltd
Original Assignee
Xiamen Yealink Network 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 Xiamen Yealink Network Technology Co Ltd filed Critical Xiamen Yealink Network Technology Co Ltd
Priority to CN201910748284.5A priority Critical patent/CN110569187B/en
Publication of CN110569187A publication Critical patent/CN110569187A/en
Application granted granted Critical
Publication of CN110569187B publication Critical patent/CN110569187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

the invention discloses an automatic testing method for multi-platform system application, which comprises the following steps: constructing a virtual application; instantiating the virtual application for a particular system; and carrying out operation test on the instantiated virtual application according to the driving event. The invention provides an automatic testing method, device and equipment for multi-platform system application, which can uniformly perform automatic testing on multi-platform application, improve the compiling efficiency of an automatic script and reduce the maintenance cost.

Description

Automatic testing method, device and equipment for multi-platform system application
Technical Field
the invention relates to the technical field of information processing, in particular to an automatic testing method, device and equipment for multi-platform system application.
background
Thanks to the explosive development of the mobile internet over the last decade, a large number of functionally diverse APPs (applications) are emerging on the market, followed by application automation testing techniques. The technology greatly reduces the testing cost and improves the testing efficiency, but the existing application automation testing technology is not mature. The existing application automation test technology, no matter the IOS and Android systems of the mobile terminal or the Windows and Mac systems of the PC terminal, is based on different tools to carry out automation test on respective independent platforms, so that the technical stacks of related technicians are not uniform, scripts need to be managed respectively, the complexity of compiling automation scripts is increased, and the aim of improving efficiency is violated.
Disclosure of Invention
Aiming at the technical problems, the invention provides an automatic testing method, device and equipment for multi-platform system application, which can uniformly perform automatic testing on multi-platform application, improve the compiling efficiency of automatic scripts and reduce the maintenance cost. The technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an automated testing method for multi-platform system applications, including:
constructing a virtual application;
Instantiating the virtual application for a particular system;
and carrying out operation test on the instantiated virtual application according to the driving event.
In a first possible implementation manner of the first aspect of the present invention, the constructing a virtual application specifically includes:
extracting interface elements and application data of the applications of the same service type of each system;
And expressing the interface of the virtual application through a configuration file according to the interface element, and simultaneously saving the application data to be called when the virtual application runs.
In a second possible implementation manner of the first aspect of the present invention, the expressing the interface of the virtual application through the configuration file specifically includes:
Different application interfaces are virtualized using the yaml file.
In a third possible implementation manner of the first aspect of the present invention, the instantiating the virtual application for the specific system specifically includes:
configuring a driver for an action corresponding to a property of an interface element based on an automation tool of the system.
in a second aspect, an embodiment of the present invention provides an automatic testing apparatus for multi-platform system applications, including:
The abstract layer module is used for constructing virtual application;
the driving layer module is used for instantiating the virtual application aiming at a specific system;
And the implementation layer module is used for carrying out operation test on the instantiated virtual application according to the driving event.
In a first possible implementation manner of the second aspect of the present invention, the abstraction layer module includes:
The extraction processing module is used for extracting interface elements and application data of the applications with the same service type in each system;
and the virtual application module is used for expressing the interface of the virtual application through a configuration file according to the interface element, and simultaneously saving the application data to be called when the virtual application runs.
In a second possible implementation manner of the second aspect of the present invention, the driving layer module includes:
and the driving module is used for configuring a driving program aiming at the action corresponding to the attribute of the interface element based on an automation tool of the system.
in a third aspect, an embodiment of the present invention provides an automated testing apparatus for a multi-platform system application, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the automated testing method for the multi-platform system application as described above when executing the computer program.
compared with the prior art, the embodiment of the invention has the following beneficial effects:
The invention abstracts a virtual application which can be identified by a computer from the applications of different systems with the same service type, then enables the virtual application to have an operation function through instantiation, and automatically provides a scene execution test, thereby completing the automatic test of an application program, being beneficial to improving the efficiency of compiling and maintaining an automatic script and the unified management of the script. The invention not only can solve the test problem of various platforms, but also slows down the work that different versions need to be subjected to script adaptation, and when the application program product is updated and iterated, the automatic test method applied by the multi-platform system of the invention only needs to perform proper incremental configuration on the original version without following the version update of the application program, thereby reducing the modification amount of the automatic test script.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for automated testing of multi-platform system applications in accordance with an embodiment of the present invention;
FIG. 2 is a schematic diagram of a method for automated testing of multi-platform system applications in an embodiment of the present invention;
fig. 3 is a block diagram of an automated testing apparatus for multi-platform system applications according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
referring to fig. 1 and 2, which illustrate an exemplary embodiment of the present invention, a method for automated testing of multi-platform system applications includes the steps of:
s101, constructing a virtual application;
S102, instantiating the virtual application aiming at a specific system;
s103, according to the driving event, carrying out operation test on the instantiated virtual application.
it can be understood that there is a product, and the product exists in different system platforms, for example, WeChat, in different systems such as android, ios, windows, mac, etc., and the service functions are basically consistent. In this embodiment, the goal is to abstract a platform-agnostic product for optimizing UI automation testing. Moreover, the virtualization does not need to consider the logic of the test script, and only needs to directly configure the interface, so that the test method which does not need to write the script and achieves automatic traversal can be supported.
instantiation refers to a process of creating an object by using a class in object-oriented programming and is called instantiation. Is the process of embodying an abstract conceptual class to the class of real objects. The instantiation process is generally composed of a class name object name (new class name) (parameter 1, parameter 2.. parameter n).
the driving event is an operation event such as clicking, inputting, operating system key and the like.
The test of the embodiment of the invention is based on the service function firstly, and different applications have different functions. For the same application, the business functions are mostly consistent no matter in a mobile system (IOS, Android) or a PC system (Mac, Windows). For example, the core functions of a billion VCS terminal are as follows: most functions of account registration, audio and video conference, conference control operation and the like are consistent, and only a small part of functions are cut and adapted due to different system platforms. The traditional mode needs to create different script projects aiming at different platforms respectively, then uses different tools to compile scripts, and if an application interface changes, the script project corresponding to version upgrading also needs to be subjected to version correspondence. Based on the service background, the method firstly abstracts a virtual application which can be identified by a computer from the same application of four different platforms, then sets a driving layer to realize an event stream which can be operated for the abstracted application, and finally uniformly provides a cross-platform API based on the service function, thereby improving the efficiency of writing and maintaining the automatic script.
Preferably, the constructing of the virtual application specifically includes:
Extracting interface elements and application data of the applications of the same service type of each system;
and expressing the interface of the virtual application through a configuration file according to the interface element, and simultaneously saving the application data to be called when the virtual application runs.
it is understood that an APP (application) is a computer that switches between different UI interfaces and presents data, and various platform UI automation also operates based on UI elements on the APP, such as clicking a button to enter a text in an input box. Just from platform to platform, the representations of these controls may differ. This approach solves the problem of controls that the computer can recognize and separates the operation flow from the corresponding UI object.
and the configuration file records the attributes and the actions of the interface elements in the interface and the logical relation of jump among the interfaces.
the data comprises resources which cannot be expressed on a non-interface and have application relations. For example: log path, package name, process name, etc. of APP. The data can be directly called in corresponding automation steps, for example, when an android starts an application, a packet name needs to be acquired, log needs to be stored when problems occur through configuration reading, and a configured log path is directly processed. In this embodiment, the account and data in the operation event abstraction layer are completed through two modules, namely pocoui and airtest.
in this embodiment, the login page generally has an account number, a password input box, and a login button. The 3 UI elements are often presented differently on different system platforms, for example, ios and android, and the control ids may be different. Not only will the UI change from platform to platform, but often the basic core functionality will remain. The reference codes used in particular are as follows:
Preferably, different application interfaces are virtualized using yaml files.
the technology of using the yaml file is a data serialization format which can be intuitively recognized by a computer, and the readability is easy to read by human beings and easy to interact with scripting language.
Preferably, the instantiating the virtual application is performed for a specific system, specifically:
configuring a driver for an action corresponding to a property of an interface element based on an automation tool of the system.
the action includes, but is not limited to, clicking, inputting, dragging, pressing a key, sliding and other actions of system operation.
it is understood that instantiating the virtual application is the completion of the association of the attributes and actions of the various interface elements, such as the click of a button and the entry of a text box. Due to the fact that different system platforms are involved, tools of different platforms are called in specific implementation.
In this embodiment, to implement an account login operation, such as a login operation, the operation object uses the keywords configured in the yaml file, that is, the key names of the virtual objects. The detailed run code is as follows:
def login(account=None,pwd=None):
my_handler.handle_object("ACCOUNT_EDIT",account)
my_handler.handle_object("PWD_EDIT",pwd)
my_handler.handle_object("LOGIN_BTN")
Referring to fig. 3, an embodiment of the present invention provides an automatic testing apparatus for multi-platform system applications, including:
An abstraction layer module 201 for constructing virtual applications;
a driver layer module 202, configured to instantiate the virtual application for a specific system;
and the implementation layer module 203 is used for performing operation test on the instantiated virtual application according to the driving event.
Preferably, the abstraction layer module includes:
The extraction processing module is used for extracting interface elements and application data of the applications with the same service type in each system;
and the virtual application module is used for expressing the interface of the virtual application through a configuration file according to the interface element, and simultaneously saving the application data to be called when the virtual application runs.
Preferably, the driving layer module includes:
and the driving module is used for configuring a driving program aiming at the action corresponding to the attribute of the interface element based on an automation tool of the system.
The embodiment of the invention provides an automatic test device for multi-platform system application, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to realize the automatic test method for the multi-platform system application.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

Claims (8)

1. An automated testing method for multi-platform system applications is characterized by comprising the following steps:
Constructing a virtual application;
Instantiating the virtual application for a particular system;
and carrying out operation test on the instantiated virtual application according to the driving event.
2. the automated testing method for multi-platform system applications according to claim 1, wherein the building of the virtual application specifically comprises:
Extracting interface elements and application data of the applications of the same service type of each system;
And expressing the interface of the virtual application through a configuration file according to the interface element, and simultaneously saving the application data to be called when the virtual application runs.
3. The automated testing method for multi-platform system applications according to claim 2, wherein the interface of the virtual application is expressed by a configuration file, specifically:
Different application interfaces are virtualized using the yaml file.
4. The automated testing method for multi-platform system applications according to claim 1, wherein the instantiating of the virtual application is performed for a specific system, specifically:
configuring a driver for an action corresponding to a property of an interface element based on an automation tool of the system.
5. an automated testing apparatus for multi-platform system applications, comprising:
the abstract layer module is used for constructing virtual application;
The driving layer module is used for instantiating the virtual application aiming at a specific system;
And the implementation layer module is used for carrying out operation test on the instantiated virtual application according to the driving event.
6. The apparatus for automated testing of multi-platform system applications according to claim 5, wherein the abstraction layer module comprises:
The extraction processing module is used for extracting interface elements and application data of the applications with the same service type in each system;
And the virtual application module is used for expressing the interface of the virtual application through a configuration file according to the interface element, and simultaneously saving the application data to be called when the virtual application runs.
7. The automated testing apparatus for multi-platform system applications according to claim 5, wherein the driver layer module comprises:
And the driving module is used for configuring a driving program aiming at the action corresponding to the attribute of the interface element based on an automation tool of the system.
8. an automated testing apparatus for multi-platform system applications, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the automated testing method for multi-platform system applications according to any one of claims 1 to 4 when executing the computer program.
CN201910748284.5A 2019-08-14 2019-08-14 Automatic testing method, device and equipment for multi-platform system application Active CN110569187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910748284.5A CN110569187B (en) 2019-08-14 2019-08-14 Automatic testing method, device and equipment for multi-platform system application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910748284.5A CN110569187B (en) 2019-08-14 2019-08-14 Automatic testing method, device and equipment for multi-platform system application

Publications (2)

Publication Number Publication Date
CN110569187A true CN110569187A (en) 2019-12-13
CN110569187B CN110569187B (en) 2022-08-09

Family

ID=68775309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910748284.5A Active CN110569187B (en) 2019-08-14 2019-08-14 Automatic testing method, device and equipment for multi-platform system application

Country Status (1)

Country Link
CN (1) CN110569187B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797008A (en) * 2020-06-18 2020-10-20 北京每日优鲜电子商务有限公司 Automatic verification method, equipment and storage medium for mobile terminal buried point data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030204A (en) * 2006-02-27 2007-09-05 株式会社日立制作所 Access server and method for generating client interface on client terminals
US20100037206A1 (en) * 2008-08-07 2010-02-11 Code Systems Corporation Method and system for configuration of virtualized software applications
CN102792268A (en) * 2010-03-08 2012-11-21 微软公司 Virtual software application deployment configurations
CN103116544A (en) * 2013-01-25 2013-05-22 浪潮电子信息产业股份有限公司 Automated cross-platform multi-server multi-application test method
CN103914375A (en) * 2013-01-07 2014-07-09 百度国际科技(深圳)有限公司 Method and device for testing owner-drawing interface software

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030204A (en) * 2006-02-27 2007-09-05 株式会社日立制作所 Access server and method for generating client interface on client terminals
US20100037206A1 (en) * 2008-08-07 2010-02-11 Code Systems Corporation Method and system for configuration of virtualized software applications
CN102792268A (en) * 2010-03-08 2012-11-21 微软公司 Virtual software application deployment configurations
CN103914375A (en) * 2013-01-07 2014-07-09 百度国际科技(深圳)有限公司 Method and device for testing owner-drawing interface software
CN103116544A (en) * 2013-01-25 2013-05-22 浪潮电子信息产业股份有限公司 Automated cross-platform multi-server multi-application test method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797008A (en) * 2020-06-18 2020-10-20 北京每日优鲜电子商务有限公司 Automatic verification method, equipment and storage medium for mobile terminal buried point data
CN111797008B (en) * 2020-06-18 2024-05-14 北京每日优鲜电子商务有限公司 Automatic verification method, equipment and storage medium for mobile terminal embedded point data

Also Published As

Publication number Publication date
CN110569187B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
US7398514B2 (en) Test automation stack layering
CN111126781A (en) RPA service flow establishing method and system
US20060265469A1 (en) XML based scripting framework, and methods of providing automated interactions with remote systems
US11593342B2 (en) Systems and methods for database orientation transformation
CN110362490B (en) Automatic testing method and system for integrating iOS and Android mobile applications
CN103198009A (en) Universal testing method, system and corresponding device
CN104991763A (en) Universal game interface behavior control system
US20210397157A1 (en) Robust user interface related robotic process automation
CN100555219C (en) Atom manipulation encapsulation apparatus and method
WO2017020459A1 (en) Method and apparatus for configuring plugin package for host
CN115983221B (en) Visual RPA table operation recording and automatic executing method and system
CN111949522A (en) User interface automatic testing method and device
US8832573B2 (en) Creating portals having consistent appearances
CN114217951A (en) Multi-cloud multi-cluster kubernets cluster management method and system
CN110569187B (en) Automatic testing method, device and equipment for multi-platform system application
CN113919158A (en) Simulation method and device for flight control panel and storage medium
CN113515441A (en) Application information acquisition method and system, electronic equipment and storage medium
CN114356430B (en) DAG dependent configuration tool based on airflow scheduling system
CN107015787B (en) Method and device for designing interactive application framework
CN112988139B (en) Method and device for developing event processing file
CN114840198A (en) Function execution method, building block function rewriting method and related equipment
CN114297057A (en) Design and use method of automatic test case
CN114461514A (en) Automatic testing method and system based on low codes
CN112527466A (en) Multi-language intelligent contract compatibility method and system based on EVM and Wasm virtual machine
CN112698918A (en) Virtual machine file generation method and device based on construction environment

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