CN111767208A - Automatic test method and device - Google Patents

Automatic test method and device Download PDF

Info

Publication number
CN111767208A
CN111767208A CN202010487756.9A CN202010487756A CN111767208A CN 111767208 A CN111767208 A CN 111767208A CN 202010487756 A CN202010487756 A CN 202010487756A CN 111767208 A CN111767208 A CN 111767208A
Authority
CN
China
Prior art keywords
test
application program
task
determining
information
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
CN202010487756.9A
Other languages
Chinese (zh)
Other versions
CN111767208B (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.)
Beijing Jindi Technology Co Ltd
Original Assignee
Beijing Jindi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jindi Technology Co Ltd filed Critical Beijing Jindi Technology Co Ltd
Priority to CN202010487756.9A priority Critical patent/CN111767208B/en
Publication of CN111767208A publication Critical patent/CN111767208A/en
Application granted granted Critical
Publication of CN111767208B publication Critical patent/CN111767208B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

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)
  • Stored Programmes (AREA)

Abstract

The invention provides an automatic test method and a device, and the method comprises the following steps: receiving parameters for continuous integration, and reading configuration information of an application program according to the parameters; constructing an information file of the application program according to the read configuration information; determining a test task in the configuration information, determining test equipment based on the information file, and sending a test command aiming at the test task to the test equipment; monitoring the test process of the test equipment through a preset mobile test framework, and generating a test report when the test task is monitored to be completed; and determining a detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining redundant resources in the application program. The invention can effectively improve the test efficiency in the prior IOS development process and reduce the development cost.

Description

Automatic test method and device
Technical Field
The invention relates to the technical field of computers, in particular to an automatic testing method and device.
Background
Continuous Integration (CI) is a software development practice, in which team development members often need to integrate their respective tasks, usually at least once per member per day, meaning that multiple integrations may occur per day. Each integration is verified through automated build, including compilation, release, and automated testing, so that integration errors are discovered as soon as possible. Continuous Delivery (CD) is a software engineering technique, which allows the production process of software products to be completed in a short period, so as to ensure that the software can be stably and continuously released at any time. It aims to make the construction, testing and release of software faster and more frequent. This way, the cost and time of software development can be reduced, and the risk is reduced.
In the current development process of the operating system, an application package is constructed, delivered and deployed manually, on one hand, after long-time and high-intensity work, people are easy to fatigue, the sensitivity to wrong information such as digit of numbers, display of characters and the like is reduced, and as the interface depth of a product is deep and contains a large number of information display functions, the regression difficulty of special tests is high, the memory leakage condition is easy to send, and more test works such as robustness tests, weak network tests and the like are needed; the automatic test of the UI (user interface Design) can only cover the core business logic, the automatic test of the new function cannot be realized, and after the new version of the product is released, because the product business test volume is large, the old function cannot be returned completely, the condition of missing the test is easy to occur, thereby causing the time and labor consumption of the process of constructing, delivering and deploying the application package, not only increasing the communication cost, but also leading the development of the operating system to be heavy and slow, and the online accident rate to be high.
Disclosure of Invention
The invention aims to provide an automatic testing method and an automatic testing device, which are used for solving the problems of low testing efficiency and high development cost in the existing operating system development process.
According to a first aspect of the present invention, there is provided an automatic test method comprising:
receiving parameters for continuous integration, and reading configuration information of an application program according to the parameters;
constructing an information file of the application program according to the read configuration information;
determining a test task in the configuration information, determining test equipment based on the information file, and sending a test command aiming at the test task to the test equipment;
monitoring the test process of the test equipment through a preset mobile test framework, and generating a test report when the test task is monitored to be completed;
and determining a detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining redundant resources in the application program.
Further, the method of the present invention, prior to the step of receiving parameters for continued integration, comprises:
pre-configuring relevant tasks of continuous integration and delivery application programs;
the relevant tasks of the continuous integration and delivery application program comprise at least one of an engineering configuration task, a regression testing task, a user interface testing task, a pressure testing task and a code optimization detection task;
wherein the continuously integrated parameters comprise at least one of application version information parameters, remote version control parameters and local version control parameters.
Further, the method of the present invention, the constructing an information file of the application program according to the read configuration information, includes:
determining address information and script address information of the project engineering file of the application program according to the read configuration information;
and acquiring the project engineering file and the script file corresponding to the application program according to the address information and the script address information of the project engineering file of the application program, and constructing an information file of the application program.
Further, the method of the present invention, after the step of constructing the information file of the application program, includes:
determining an engineering configuration task of the application program according to the read configuration information;
and sending the constructed information file of the application program to a preset storage position through the engineering configuration task, and sending a construction completion notification message.
Further, the method of the present invention, the monitoring a test process of the test device through a predetermined mobile test framework, and generating a test report when it is monitored that the test task is completed, includes:
when receiving a construction completion notification message, monitoring the test process of the test equipment through a preset mobile test frame;
sending a control command for testing the running of the application program to a server corresponding to a preset mobile testing framework through a preset client library;
controlling and testing the custom operation of the application program based on the control command;
and generating a test report when the completion of the test task is monitored.
The analyzing and determining redundant resources in the application includes:
determining resource related codes of the application program according to the acquired project engineering file and the script file corresponding to the application program;
acquiring a white list of resource names, and searching each resource name to be detected which is not matched with the white list information in the resource related codes of the application program according to the white list;
determining whether the names of the resources to be detected are redundant resources or not according to a preset splicing rule;
wherein the resource-related code includes at least one of a version control code and a project library code.
Further, the method of the present invention, if it is determined that the names of the resources to be detected exist as redundant resources, further includes:
and counting each resource to be detected determined as the redundant resource, and sending a notification message of the completion of the redundant resource counting.
According to a second aspect of the present invention, there is provided an automatic test apparatus, comprising:
the receiving and reading module is used for receiving parameters for continuous integration and reading the configuration information of the application program according to the parameters;
the construction module is used for constructing an information file of the application program according to the read configuration information;
the determining and sending module is used for determining the test task in the configuration information, determining test equipment based on the information file, and sending a test command aiming at the test task to the test equipment;
the monitoring and generating module is used for monitoring the test process of the test equipment through a preset mobile test frame and generating a test report when the test task is monitored to be completed;
and the execution and analysis module is used for determining the detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining the redundant resources in the application program.
Further, the apparatus of the present invention comprises:
the pre-configuration module is used for pre-configuring relevant tasks of the continuous integration and delivery application program;
the relevant tasks of the continuous integration and delivery application program comprise at least one of an engineering configuration task, a regression testing task, a user interface testing task, a pressure testing task and a code optimization detection task;
wherein the continuously integrated parameters comprise at least one of application version information parameters, remote version control parameters and local version control parameters.
Further, the apparatus of the present invention, the building module, includes:
the first determining unit is used for determining the address information and script address information of the project engineering file of the application program according to the read configuration information;
and the acquisition unit is used for acquiring the project engineering file and the script file corresponding to the application program according to the address information and the script address information of the project engineering file of the application program and constructing the information file of the application program.
Further, the apparatus of the present invention, the building block, includes:
the second determining unit is used for determining the engineering configuration task of the application program according to the read configuration information;
and the first sending unit is used for sending the constructed information file of the application program to a preset storage position through the project configuration task and sending a construction completion notification message.
Further, in the apparatus of the present invention, the monitoring and generating module includes:
the monitoring unit is used for monitoring the test process of the test equipment through a preset mobile test frame when receiving the construction completion notification message;
the second sending unit is used for sending the control command for testing the running of the application program to a server corresponding to a preset mobile test framework through a preset client library;
the control unit is used for controlling and testing the custom operation of the application program based on the control command;
and the generating unit is used for generating a test report when the completion of the test task is monitored.
Further, the device of the present invention, the executing and analyzing module, includes:
a third determining unit, configured to determine a resource-related code of the application according to the acquired project engineering file and script file corresponding to the application;
the acquisition and search unit is used for acquiring a white list of preconfigured resource names and searching each resource name to be detected which is not matched with the white list information in the resource related code of the application program according to the white list;
a fourth determining unit, configured to determine whether each resource name to be detected is a redundant resource according to a predetermined splicing rule;
wherein the resource-related code includes at least one of a version control code and a project library code.
Further, the apparatus of the present invention, the fourth determination unit, is further configured to
And if determining that the redundant resources exist in the names of the resources to be detected, counting the resources to be detected which are determined to be the redundant resources, and sending a notification message of the completion of the counting of the redundant resources.
According to a third aspect of the present invention there is provided a storage medium storing computer program instructions for performing a method according to the present invention.
According to a fourth aspect of the invention, there is provided a computing device comprising: a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the computing device to perform the method of the invention.
By the automatic testing method, the automatic construction of the application package is realized in the development process of the operating system, the function test and the engineering optimization detection can be automatically carried out, the custom testing scheme is realized, the testing efficiency and the operating system development efficiency are improved, and the development cost and the online accident rate are greatly reduced.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an apparatus according to an embodiment of the present invention;
FIG. 3 schematically illustrates a block diagram of an electronic device according to an exemplary embodiment of the present disclosure; and
fig. 4 schematically illustrates a schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the embodiments of the disclosure can be practiced without one or more of the specific details, or with other methods, components, materials, devices, steps, and so forth. In other instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in the form of software, or in one or more software-hardened modules, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic flow chart of an automatic testing method according to an embodiment of the present invention, and as shown in fig. 1, the automatic testing method according to an embodiment of the present invention includes:
step S101, receiving parameters for continuous integration, and reading configuration information of an application program according to the parameters.
And step S102, constructing an information file of the application program according to the read configuration information.
Step S103, determining the test task in the configuration information, determining the test equipment based on the information file, and sending a test command aiming at the test task to the test equipment.
And step S104, monitoring the test process of the test equipment through a preset mobile test frame, and generating a test report when the test task is completed.
Step S105, according to the test report, determining a detection task in the configuration information, executing the detection task, analyzing and determining the redundant resources in the application program.
Wherein, prior to the step of receiving parameters for continued integration, comprising: pre-configuring relevant tasks of continuous integration and delivery application programs; specifically, the configuration can be performed by using a continuous integration tool, for example, using a WEB visualization CI open source tool Jenkins, which can set functions such as external triggering, timing construction, and sequential task execution, and the configuration process can be divided into the following steps:
1) and adding a Build task Build Job for building the application package through Jenkins, and triggering the Build Job when submitting a code to a branch develop through a webhook function in a distributed version control system Git for configuring a program for managing the file version, so as to automatically realize the functions of engineering configuration, building, uploading and the like. It should be noted that, as can be understood by those skilled in the art, webhooks is an API (Application Programming Interface) concept, and is one of the usage paradigms of the micro service API, also called as reverse API, that is: the front end does not actively send the request and is completely pushed by the back end.
2) A Test Job for automatic testing is added through Jenkins, and when the Build Job is successfully constructed, the Test Job is triggered, so that regression testing of old functions can be automatically realized.
3) And adding Auto Test Job for automatic Test through Jenkins, and triggering after the Build Job succeeds to realize automatic App random operation pressure Test.
4) And adding an Auto UI Test Job for an automatic Test task through Jenkins, and triggering after the Build Job for the task is successfully constructed, so that the Test of the UI randomly operated by an automatic application program is realized.
5) And adding an App Thin Job for automatic test through Jenkins, and triggering after the Build Job succeeds to realize automatic engineering resource and code optimization detection.
The relevant tasks of continuous integration and delivery of the application program comprise tasks such as an engineering configuration task, a regression test task, a user interface test task, a pressure test task, a code optimization detection task and the like; the parameters for continuous integration include application version information parameters, remote version control parameters, local version control parameters, and the like.
In the exemplary embodiment of the present disclosure, taking an application to an IOS operating system as an example, constructing an information file of the application according to the read configuration information includes: determining address information and script address information of the project engineering file of the application program according to the read configuration information; continuously integrating parameters such as versions of application programs, version numbers of the application programs, information of a distributed version control system Git and the like, which are transmitted by Jenkins, reading local configuration information, determining engineering configuration tasks of the application programs, copying project engineering files and script files corresponding to the obtained application programs into a temporary construction folder according to address information and script address information of the project engineering files of the application programs, executing construction of a main script, processing a private pod library, pulling and configuring corresponding Git codes and other engineering construction prepositive operations; downloading an engineering certificate, setting an engineering according to local configuration information, starting an information file for constructing an Application program by using an xcodebuild tool, automatically uploading the generated information files of the Application programs such as IPA (iPhone Application, apple Application program file format), dSYM (in an IOS platform, dSYM files refer to target files with debugging information) and the like to a preset storage position after the construction is successful, and sending a constructed notification message to a developer. In a specific construction process, a single script is realized through a shell (a program written by C language, which is a bridge of a user using Linux), and multi-configuration packaging is carried out. A plurality of projects can be constructed simultaneously, the projects are uploaded to an application distribution platform after the projects are completed, and each resource of a computer is fully utilized to realize automatic construction.
It should be noted that, as can be understood by those skilled in the art, CocoaPods is a very good class library management tool for IOS, and can very conveniently manage and update the third party library used in the project, and deliver the common components in the project to it for management. As will be appreciated by those skilled in the art, Xcodebuild is a command line tool that may be used to perform various operations such as compiling, finding, analyzing, testing, etc. on an Xcode project or workspace.
In this embodiment, the method includes listening to a test process of the test device through a predetermined mobile test framework, and generating a test report when it is listened that a test task is completed, including: when receiving a construction completion notification message, monitoring the test process of the test equipment through a preset mobile test frame; sending a control command for testing the running of the application program to a server corresponding to a preset mobile testing framework through a preset client library; controlling the self-defining operation of the test application program based on the control command; and generating a test report when the completion of the test task is monitored. For example, in the process of implementing the automated regression Test in this embodiment, a customized automated Test can be implemented by using a scheme in which a Test Code based on a Python Client combines with a WDA (web driver, a mobile terminal Test framework introduced by Facebook) and an iPhone Client. Specifically, the WebDriverAgent can be compiled and run into specified test equipment by using an xcodebuild tool, and Server monitoring is started on a computer. And then, a control command for testing the running of the application program is sent to a WDA Server by using a Python Client through an Http protocol, the WDA Server controls the iPhone mobile phone to realize custom operation by using an XCUITest frame provided by the apple through a WDACLIEnt application running on the equipment, and the method realizes that a Client sends a request requset by using a classic Server-Client architecture (C/S), and the Server returns a response. And when the completion of the test task is monitored, automatically generating a report of the test result, and sending a notification message of the completion of the test to the developer.
In the automatic regression testing process of the embodiment, a common Appium (a cross-platform tool) is not used, which allows a tester to write an automatic testing script on different platforms such as IOS and Android by using the same API), Macaca (a complete set of automatic testing solution), and other WDA transfer services, and mainly because the Appium and the Macaca are added with a compatible layer in order to realize the general type of the IOS and Android multiple platforms, the speed is slow, and even communication fails frequently.
In the process of the automated engineering detection in this embodiment, first, according to the acquired project engineering file and script file corresponding to the application program, the resource-related code of the application program is determined, for example, the project engineering file and script file corresponding to the application program are copied, the Git-related code in the configuration file is acquired, the setting information such as pod is processed, according to the pre-configured white list file, the information such as the picture file name of png.jpg.jpeg.gif in the non-white list is searched, through the preliminary resource detection, all the picture names and all the character strings in the application program item can be searched and determined, then, the difference set calculation is performed, and the picture resource not used in the application program item can be analyzed, but the preliminary resource detection still has a certain error because the condition of splicing by using the formatting function Python format exists in the resource using process, therefore, it is necessary to unify the stitching rules of the application project and then use the un-stitched partial search to analyze the picture that is actually not used, specifically, searching all files such as h m mm swift stored concrete stringsc cpp html js json plist css by regular expression matching, matching all character strings to obtain a resource character string array, traversing picture names, judging whether each picture name exists in the resource character string array, if any picture name exists in the resource string array, the picture is a useful resource, if not, the judgment is continued to judge whether the picture name has concatenation, for example, the names ending with numbers such as rippec 1, rippec 2, etc., it is judged by rippleC, and then, the respective resources determined as the redundant resources are counted, and a notification message of completion of the counting of the redundant resources is sent to the developer. Then, a developer may perform code detection according to the statistical result, specifically, based on a detection technique of an otool (Object file rendering tool, system library check relied on by the IOS application) in combination with a Mach Object (a file format for executable files, Object codes, dynamic libraries, and kernel dump), extract a classlystegion and a classref section of the executable files through an otool command to form an address difference set of the classlest and the classref, analyze and acquire a class name in the difference set, and then detect a redundant code in the project.
It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
As shown in fig. 2, an embodiment of the present invention further provides an automatic testing apparatus, including:
a receiving and reading module 21, configured to receive a parameter for persistent integration, and read configuration information of an application program according to the parameter;
the building module 22 is configured to build an information file of the application program according to the read configuration information;
a determining and sending module 23, configured to determine a test task in the configuration information, determine a test device based on the information file, and send a test command for the test task to the test device;
a monitoring and generating module 24, configured to monitor a test process of the test device through a predetermined mobile test framework, and generate a test report when it is monitored that the test task is completed;
and the executing and analyzing module 25 is used for determining the detection tasks in the configuration information according to the test report, executing the detection tasks, and analyzing and determining the redundant resources in the application program.
The device in this embodiment may implement the method embodiment shown in fig. 1, and for the specific function implementation, reference is made to the description in the method embodiment, which is not described herein again.
It should be noted that although several modules or units of the automatic test equipment 200 are mentioned in the above detailed description, such division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In one embodiment of the present invention, there is also provided a storage medium storing computer program instructions for performing a method according to an embodiment of the present invention.
In one exemplary configuration of the invention, the computing devices each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
In one embodiment of the present invention, there is also provided a computing device comprising: a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the computing device to perform the method of an embodiment of the invention.
Computer-readable storage media include permanent and non-permanent, removable and non-removable media and may implement information storage by any method or technology. The information may be computer readable instructions, data structures, program means, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 300 according to such an embodiment of the invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 3, electronic device 300 is embodied in the form of a general purpose computing device. The components of electronic device 300 may include, but are not limited to: the at least one processing unit 310, the at least one memory unit 320, a bus 330 connecting different system components (including the memory unit 320 and the processing unit 310), and a display unit 340.
Wherein the storage unit stores program code that is executable by the processing unit 310 to cause the processing unit 310 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary method" of the present specification. For example, the processing unit 310 may perform steps S110 to S140 as shown in fig. 1.
The storage unit 320 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)3201 and/or a cache memory unit 3202, and may further include a read only memory unit (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 370 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 300, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 300 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 350. Also, the electronic device 300 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 360. As shown, network adapter 360 communicates with the other modules of electronic device 300 via bus 330. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned "exemplary methods" section of the present description, when said program product is run on the terminal device.
Referring to fig. 4, a program product 400 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.
It should be noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In some embodiments, the software program of the present invention may be executed by a processor to implement the above steps or functions. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (10)

1. An automatic test method, comprising:
receiving parameters for continuous integration, and reading configuration information of an application program according to the parameters;
constructing an information file of the application program according to the read configuration information;
determining a test task in the configuration information, determining test equipment based on the information file, and sending a test command aiming at the test task to the test equipment;
monitoring the test process of the test equipment through a preset mobile test framework, and generating a test report when the test task is monitored to be completed;
and determining a detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining redundant resources in the application program.
2. The method of claim 1, prior to the step of receiving parameters for continued integration, comprising:
pre-configuring relevant tasks of continuous integration and delivery application programs;
the relevant tasks of the continuous integration and delivery application program comprise at least one of an engineering configuration task, a regression testing task, a user interface testing task, a pressure testing task and a code optimization detection task;
wherein the continuously integrated parameters comprise at least one of application version information parameters, remote version control parameters and local version control parameters.
3. The method according to claim 1, wherein the constructing an information file of the application according to the read configuration information comprises:
determining address information and script address information of the project engineering file of the application program according to the read configuration information;
and acquiring the project engineering file and the script file corresponding to the application program according to the address information and the script address information of the project engineering file of the application program, and constructing an information file of the application program.
4. A method according to claim 2 or 3, characterized in that it comprises, after the step of building an information file of the application program:
determining an engineering configuration task of the application program according to the read configuration information;
and sending the constructed information file of the application program to a preset storage position through the engineering configuration task, and sending a construction completion notification message.
5. The method of claim 4, wherein listening to the test process of the test device through the predetermined mobile test framework, and generating a test report when it is listened to the test task being completed comprises:
when receiving a construction completion notification message, monitoring the test process of the test equipment through a preset mobile test frame;
sending a control command for testing the running of the application program to a server corresponding to a preset mobile testing framework through a preset client library;
controlling and testing the custom operation of the application program based on the control command;
and generating a test report when the completion of the test task is monitored.
6. The method of claim 5, wherein analyzing and determining redundant resources in the application comprises:
determining resource related codes of the application program according to the acquired project engineering file and the script file corresponding to the application program;
acquiring a white list of pre-configured resource names, and searching each resource name to be detected which is not matched with the white list information in the resource related code of the application program according to the white list;
determining whether the names of the resources to be detected are redundant resources or not according to a preset splicing rule;
wherein the resource-related code includes at least one of a version control code and a project library code.
7. The method according to claim 6, wherein if it is determined that there is a redundant resource in each of the resource names to be detected, further comprising:
and counting each resource to be detected determined as the redundant resource, and sending a notification message of the completion of the redundant resource counting.
8. An automatic test apparatus, comprising:
the receiving and reading module is used for receiving parameters for continuous integration and reading the configuration information of the application program according to the parameters;
the construction module is used for constructing an information file of the application program according to the read configuration information;
the determining and sending module is used for determining the test task in the configuration information, determining test equipment based on the information file, and sending a test command aiming at the test task to the test equipment;
the monitoring and generating module is used for monitoring the test process of the test equipment through a preset mobile test frame and generating a test report when the test task is monitored to be completed;
and the execution and analysis module is used for determining the detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining the redundant resources in the application program.
9. A storage medium storing computer program instructions for performing a method according to any one of claims 1 to 7.
10. A computing device, comprising: a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the computing device to perform the method of any of claims 1 to 7.
CN202010487756.9A 2020-06-02 2020-06-02 Automatic test method and device Active CN111767208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010487756.9A CN111767208B (en) 2020-06-02 2020-06-02 Automatic test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010487756.9A CN111767208B (en) 2020-06-02 2020-06-02 Automatic test method and device

Publications (2)

Publication Number Publication Date
CN111767208A true CN111767208A (en) 2020-10-13
CN111767208B CN111767208B (en) 2023-09-19

Family

ID=72719850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010487756.9A Active CN111767208B (en) 2020-06-02 2020-06-02 Automatic test method and device

Country Status (1)

Country Link
CN (1) CN111767208B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463618A (en) * 2020-12-04 2021-03-09 斑马网络技术有限公司 Automated testing method, device, medium and equipment
CN113127374A (en) * 2021-05-19 2021-07-16 支付宝(杭州)信息技术有限公司 Application program testing method and device applied to iOS equipment
CN113485918A (en) * 2021-06-30 2021-10-08 中国民航信息网络股份有限公司 Test method, test device, electronic equipment and storage medium
CN114064482A (en) * 2021-11-17 2022-02-18 北京金堤科技有限公司 Visual testing method and device, computer storage medium and electronic equipment
WO2022227454A1 (en) * 2021-04-28 2022-11-03 京东方科技集团股份有限公司 Automated testing system and method for continuous integration, and electronic device and storage medium
CN117155485A (en) * 2023-10-23 2023-12-01 东莞信宝电子产品检测有限公司 Classical Bluetooth automatic test method, system and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632829A (en) * 2017-08-03 2018-01-26 大唐网络有限公司 A kind of App automation continuous integration systems and method based under iOS system
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
CN109542769A (en) * 2018-10-25 2019-03-29 武汉精立电子技术有限公司 A kind of automated testing method of continuous integrating
CN110096425A (en) * 2018-12-10 2019-08-06 厦门市美亚柏科信息股份有限公司 A kind of automated testing method based on QT development mode, device and storage medium
WO2019177998A1 (en) * 2018-03-12 2019-09-19 Headspin, Inc. System to determine performance based on entropy values
CN110795078A (en) * 2019-09-28 2020-02-14 同程网络科技股份有限公司 APP engineering operation system architecture method based on IOS system
CN110851135A (en) * 2019-09-12 2020-02-28 中国平安财产保险股份有限公司 Automatic application program building and uploading method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632829A (en) * 2017-08-03 2018-01-26 大唐网络有限公司 A kind of App automation continuous integration systems and method based under iOS system
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
WO2019177998A1 (en) * 2018-03-12 2019-09-19 Headspin, Inc. System to determine performance based on entropy values
CN109542769A (en) * 2018-10-25 2019-03-29 武汉精立电子技术有限公司 A kind of automated testing method of continuous integrating
CN110096425A (en) * 2018-12-10 2019-08-06 厦门市美亚柏科信息股份有限公司 A kind of automated testing method based on QT development mode, device and storage medium
CN110851135A (en) * 2019-09-12 2020-02-28 中国平安财产保险股份有限公司 Automatic application program building and uploading method and device, computer equipment and storage medium
CN110795078A (en) * 2019-09-28 2020-02-14 同程网络科技股份有限公司 APP engineering operation system architecture method based on IOS system

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
BELINDA_SL: "Jenkins 独立自动化打包ipa", pages 1 - 10, Retrieved from the Internet <URL:《https://www.cnblogs.com/lulushen/p/8759503.html》> *
KIRSHAN KUMAR LUHANA等: "Streamlining mobile app deployment with Jenkins and Fastlane in the case of Catrobat\'s pocket code", 《2018 IEEE INTERNATIONAL CONFERENCE ON INNOVATIVE RESEARCH AND DEVELOPMENT (ICIRD)》, pages 1 - 6 *
MICHAEL NEALE: "Configure Jenkins to Scale iOS CI with On-demand VM Agents", pages 1 - 6, Retrieved from the Internet <URL:《https://www.cloudbees.com/blog/configure-jenkins-to-scale-ios-ci-on-demand-vm-agents》> *
YUYANGKK: "iOS Jenkins自动化打包-Xcode插件构建", pages 1 - 18, Retrieved from the Internet <URL:《 https://wsa.jianshu.io/p/3a1ff429f91e》> *
穆荣: "基于Jenkins的WPS for iOS的自动构建服务器的设计", 《科技与创新》, pages 117 - 118 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463618A (en) * 2020-12-04 2021-03-09 斑马网络技术有限公司 Automated testing method, device, medium and equipment
WO2022227454A1 (en) * 2021-04-28 2022-11-03 京东方科技集团股份有限公司 Automated testing system and method for continuous integration, and electronic device and storage medium
CN113127374A (en) * 2021-05-19 2021-07-16 支付宝(杭州)信息技术有限公司 Application program testing method and device applied to iOS equipment
CN113127374B (en) * 2021-05-19 2022-05-17 支付宝(杭州)信息技术有限公司 Application program testing method and device applied to iOS equipment
CN113485918A (en) * 2021-06-30 2021-10-08 中国民航信息网络股份有限公司 Test method, test device, electronic equipment and storage medium
WO2023273561A1 (en) * 2021-06-30 2023-01-05 中国民航信息网络股份有限公司 Test method and apparatus, electronic device, and storage medium
CN113485918B (en) * 2021-06-30 2024-05-07 中国民航信息网络股份有限公司 Test method, test device, electronic equipment and storage medium
CN114064482A (en) * 2021-11-17 2022-02-18 北京金堤科技有限公司 Visual testing method and device, computer storage medium and electronic equipment
CN117155485A (en) * 2023-10-23 2023-12-01 东莞信宝电子产品检测有限公司 Classical Bluetooth automatic test method, system and medium

Also Published As

Publication number Publication date
CN111767208B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN111767208B (en) Automatic test method and device
US10841185B2 (en) Platform-integrated IDE
US9846638B2 (en) Exposing method related data calls during testing in an event driven, multichannel architecture
US10853232B2 (en) Adaptive system for mobile device testing
CN108196915B (en) Code processing method and device based on application container engine and storage medium
US10698797B2 (en) Mobile application program testing method, server, terminal, and storage medium
US9280445B2 (en) Logging code generation and distribution
US11561889B2 (en) Orchestration for automated performance testing
US9563415B2 (en) Generating visually encoded dynamic codes for remote launching of applications
CN110347085B (en) Automated test system, method, vehicle, and computer-readable medium
KR20140088551A (en) Server upgrades with safety checking and preview
CN112527382B (en) Method for deploying pipeline engine system, and method and device for continuous integration
US10216617B2 (en) Automatically complete a specific software task using hidden tags
US20200050534A1 (en) System error detection
CN112380145A (en) SDK generation method, device, equipment and readable storage medium
CN110443034B (en) Risk program file identification method and device, computing equipment and medium
CN111435328B (en) Application testing method and device, electronic equipment and readable storage medium
CN109358972B (en) Log management method and device of middleware client and computer system
US11301246B2 (en) Automatically generating continuous integration pipelines
CN114968644A (en) System software dump method and device, electronic equipment and readable storage medium
KR20190084827A (en) Method for automatic test of program compatibility and apparatus using the same
US20160275002A1 (en) Image capture in application lifecycle management for documentation and support
CN113392002A (en) Test system construction method, device, equipment and storage medium
CN111767486A (en) Method, device, electronic equipment and computer readable medium for displaying page
CN112084114B (en) Method and apparatus for testing interfaces

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